Gridarta Editor
ArchetypeTypeSetParser.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2015 The Gridarta Developers.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 package net.sf.gridarta.model.archetypetype;
21 
28 import nu.xom.Attribute;
29 import nu.xom.Document;
30 import nu.xom.Element;
31 import nu.xom.Elements;
32 import nu.xom.Node;
33 import org.apache.log4j.Category;
34 import org.apache.log4j.Logger;
35 import org.jetbrains.annotations.NotNull;
36 import org.jetbrains.annotations.Nullable;
37 
43 public class ArchetypeTypeSetParser {
44 
48  @NotNull
49  private static final Category LOG = Logger.getLogger(ArchetypeTypeSetParser.class);
50 
54  @NotNull
56 
62  this.archetypeTypeParser = archetypeTypeParser;
63  }
64 
72  @NotNull
73  public ArchetypeTypeSet loadTypesFromXML(@NotNull final ErrorViewCollector errorViewCollector, @NotNull final Document document) {
74  final ArchetypeTypeSet archetypeTypeSet = new ArchetypeTypeSet();
75  final Element rootElement = document.getRootElement();
76  parseBitmasks(archetypeTypeSet, XmlUtils.getChild(rootElement, Constants.XML_ELEMENT_BITMASKS), errorViewCollector);
77  parseLists(archetypeTypeSet, XmlUtils.getChild(rootElement, Constants.XML_ELEMENT_LISTS), errorViewCollector);
78  final IgnorelistsDefinition ignorelistsDefinition = parseIgnoreLists(XmlUtils.getChild(rootElement, Constants.XML_ELEMENT_IGNORELISTS), errorViewCollector);
79  final Elements attributeOrderElements = rootElement.getChildElements(Constants.XML_ELEMENT_ATTRIBUTE_ORDER);
80  if (attributeOrderElements.size() > 0) {
81  parseAttributeOrder(archetypeTypeSet, attributeOrderElements.get(0), errorViewCollector);
82  }
83  final ArchetypeType defaultArchetypeType = parseDefaultType(archetypeTypeSet, XmlUtils.getChild(rootElement, Constants.XML_ELEMENT_DEFAULT_TYPE), errorViewCollector, ignorelistsDefinition);
84 
85  for (final Element element : new ElementsIterable(rootElement.getChildElements(Constants.XML_ELEMENT_TYPE))) {
86  parseTypes(archetypeTypeSet, element, errorViewCollector, defaultArchetypeType, ignorelistsDefinition);
87  }
88 
89  if (LOG.isInfoEnabled()) {
90  LOG.info("Loaded " + archetypeTypeSet.getArchetypeTypeCount() + " types.");
91  }
92  return archetypeTypeSet;
93  }
94 
102  private static void parseBitmasks(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Element bitmasksElement, @NotNull final ErrorViewCollector errorViewCollector) {
103  for (final Element bitmaskElement : new ElementsIterable(bitmasksElement.getChildElements(Constants.XML_ELEMENT_BITMASK))) {
104  final String name = bitmaskElement.getAttribute(Constants.XML_BITMASK_NAME).getValue();
105  final AttributeBitmask attributeBitmask = parseBitmask(bitmaskElement, name, errorViewCollector);
106  if (attributeBitmask != null) {
107  archetypeTypeSet.addBitmask(name, attributeBitmask);
108  }
109  }
110  }
111 
121  @Nullable
122  private static AttributeBitmask parseBitmask(@NotNull final Element bitmaskElement, @NotNull final String name, @NotNull final ErrorViewCollector errorViewCollector) {
123  final boolean isNamed = bitmaskElement.getAttribute(Constants.XML_BITMASK_IS_NAMED).getValue().equals("yes");
124  final AttributeBitmask attributeBitmask = new AttributeBitmask(isNamed);
125 
126  for (final Element element : new ElementsIterable(bitmaskElement.getChildElements(Constants.XML_ELEMENT_BMENTRY))) {
127  parseBmentry(element, errorViewCollector, name, isNamed, attributeBitmask);
128  }
129  if (attributeBitmask.getNumber() <= 0) {
130  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, name + ": no '" + Constants.XML_BMENTRY_BIT + "' entries");
131  return null;
132  }
133 
134  if (isNamed && !attributeBitmask.containsEncoding(0)) {
135  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, name + ": missing name for value 0");
136  return null;
137  }
138  if (isNamed && !attributeBitmask.containsEncoding(attributeBitmask.getMaxValue())) {
139  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, name + ": missing name for value " + attributeBitmask.getMaxValue());
140  return null;
141  }
142 
143  return attributeBitmask;
144  }
145 
156  private static void parseBmentry(@NotNull final Element bmentryElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final String bitmaskName, final boolean isNamed, @NotNull final AttributeBitmask attributeBitmask) {
157  final Attribute tmpBitAttribute = bmentryElement.getAttribute(Constants.XML_BMENTRY_BIT);
158  final String bitAttribute = tmpBitAttribute == null ? "" : tmpBitAttribute.getValue();
159 
160  final Attribute tmpValueAttribute = bmentryElement.getAttribute(Constants.XML_BMENTRY_VALUE);
161  final String valueAttribute = tmpValueAttribute == null ? "" : tmpValueAttribute.getValue();
162  if (!bitAttribute.isEmpty() && !valueAttribute.isEmpty()) {
163  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, bitmaskName + ": element contains both '" + Constants.XML_BMENTRY_BIT + "' and '" + Constants.XML_BMENTRY_VALUE + "' attributes");
164  return;
165  }
166 
167  final String name = bmentryElement.getAttribute(Constants.XML_BMENTRY_NAME).getValue();
168 
169  final int value;
170  if (bitAttribute.isEmpty()) {
171  if (!isNamed) {
172  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, bitmaskName + ": '" + Constants.XML_BMENTRY_VALUE + "' attribute allowed only in named bitmasks");
173  return;
174  }
175  try {
176  value = Integer.parseInt(valueAttribute);
177  } catch (final NumberFormatException ignored) {
178  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, bitmaskName + ": invalid '" + Constants.XML_BMENTRY_VALUE + "' value: " + valueAttribute);
179  return;
180  }
181  } else {
182  final int bitValue;
183  try {
184  bitValue = Integer.parseInt(bitAttribute);
185  } catch (final NumberFormatException ignored) {
186  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, bitmaskName + ": invalid '" + Constants.XML_BMENTRY_BIT + "' value: " + bitAttribute);
187  return;
188  }
189  if (bitValue < 0 || bitValue >= 32) {
190  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, bitmaskName + ": invalid '" + Constants.XML_BMENTRY_BIT + "' value: " + bitValue);
191  return;
192  }
193  if (!attributeBitmask.addBitName(bitValue, name)) {
194  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, bitmaskName + ": duplicate '" + Constants.XML_BMENTRY_BIT + "' value: " + bitValue);
195  return;
196  }
197  value = 1 << bitValue;
198  }
199 
200  attributeBitmask.addName(name, value);
201 
202  final Attribute tmpEncodingAttribute = bmentryElement.getAttribute(Constants.XML_BMENTRY_ENCODING);
203  final String encoding = tmpEncodingAttribute == null ? "" : tmpEncodingAttribute.getValue();
204  if (isNamed) {
205  if (encoding.isEmpty()) {
206  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, bitmaskName + ": missing '" + Constants.XML_BMENTRY_ENCODING + "' attribute");
207  return;
208  }
209  attributeBitmask.addNamedValue(encoding, value);
210  } else {
211  if (!encoding.isEmpty()) {
212  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, bitmaskName + ": unused '" + Constants.XML_BMENTRY_ENCODING + "' attribute");
213  //noinspection UnnecessaryReturnStatement
214  return;
215  }
216  }
217  }
218 
226  private static void parseLists(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Element listsElement, @NotNull final ErrorViewCollector errorViewCollector) {
227  for (final Element element : new ElementsIterable(listsElement.getChildElements(Constants.XML_ELEMENT_LIST))) {
228  parseList(archetypeTypeSet, element, errorViewCollector);
229  }
230  }
231 
239  private static void parseList(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Element listElement, @NotNull final ErrorViewCollector errorViewCollector) {
240  final ArchetypeTypeList list = new ArchetypeTypeList();
241  for (final Element element : new ElementsIterable(listElement.getChildElements(Constants.XML_ELEMENT_LISTENTRY))) {
242  parseListEntry(element, errorViewCollector, list);
243  }
244  final String name = listElement.getAttribute(Constants.XML_LIST_NAME).getValue();
245  archetypeTypeSet.addList(name, list);
246  }
247 
255  private static void parseListEntry(@NotNull final Element listentryElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final ArchetypeTypeList list) {
256  final String name = listentryElement.getAttribute(Constants.XML_LISTENTRY_NAME).getValue();
257  final String valueString = listentryElement.getAttribute(Constants.XML_LISTENTRY_VALUE).getValue();
258  final int value;
259  try {
260  value = Integer.valueOf(valueString);
261  } catch (final NumberFormatException ignore) {
262  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, name + ": value '" + valueString + "' is not an integer.");
263  return;
264  }
265  try {
266  list.add(value, name);
267  } catch (final IllegalArgumentException ex) {
268  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, ex.getMessage() + ".");
269  }
270  }
271 
279  @NotNull
280  private static IgnorelistsDefinition parseIgnoreLists(@NotNull final Element ignorelistsElement, @NotNull final ErrorViewCollector errorViewCollector) {
281  final IgnorelistsDefinition ignorelistsDefinition = new IgnorelistsDefinition();
282  for (final Element element : new ElementsIterable(ignorelistsElement.getChildElements(Constants.XML_ELEMENT_IGNORE_LIST))) {
283  parseIgnoreList(element, errorViewCollector, ignorelistsDefinition);
284  }
285  return ignorelistsDefinition;
286  }
287 
295  private static void parseAttributeOrder(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Node attributeOrderElement, @NotNull final ErrorViewCollector errorViewCollector) {
296  for (final String value : StringUtils.PATTERN_WHITESPACE_NEWLINE.split(attributeOrderElement.getValue())) {
297  if (!value.isEmpty()) {
298  if (archetypeTypeSet.addAttributeOrder(value)) {
299  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, value + ": duplicate attribute name");
300  }
301  }
302  }
303  }
304 
312  private static void parseIgnoreList(@NotNull final Element ignoreListElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final IgnorelistsDefinition ignorelistsDefinition) {
313  final String name = ignoreListElement.getAttribute(Constants.XML_IGNORE_LIST_NAME).getValue();
314  if (ignorelistsDefinition.containsKey(name)) {
315  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, name + ": duplicate name");
316  }
317 
318  for (final Element attributeElement : new ElementsIterable(ignoreListElement.getChildElements(Constants.XML_ELEMENT_ATTRIBUTE))) {
319  final Attribute archAttribute = attributeElement.getAttribute(Constants.XML_ATTRIBUTE_ARCH);
320  if (archAttribute == null) {
321  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, name + ": attribute missing '" + Constants.XML_ATTRIBUTE_ARCH + "'.");
322  } else {
323  try {
324  ignorelistsDefinition.put(name, archAttribute.getValue());
325  } catch (final IllegalArgumentException ex) {
326  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, name + ": " + ex.getMessage() + ".");
327  }
328  }
329 
330  try {
332  } catch (final SyntaxErrorException ex) {
333  errorViewCollector.addWarning(ErrorViewCategory.TYPES_ENTRY_INVALID, name + ": " + ex.getMessage() + ".");
334  }
335  }
336  }
337 
347  @NotNull
348  private ArchetypeType parseDefaultType(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Element defaultTypeElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final IgnorelistsDefinition ignorelistsDefinition) {
349  return archetypeTypeParser.loadAttributeList(defaultTypeElement, errorViewCollector, null, archetypeTypeSet, ignorelistsDefinition, true);
350  }
351 
362  private void parseTypes(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Element typeElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final ArchetypeType defaultArchetypeType, @NotNull final IgnorelistsDefinition ignorelistsDefinition) {
363  if (!typeElement.getAttribute(Constants.XML_TYPE_AVAILABLE).getValue().equals("no")) {
364  archetypeTypeSet.addArchetypeType(archetypeTypeParser.loadAttributeList(typeElement, errorViewCollector, defaultArchetypeType, archetypeTypeSet, ignorelistsDefinition, false));
365  }
366  }
367 
374  private static void rejectAttributes(@NotNull final Element element, @NotNull final String... attributes) throws SyntaxErrorException {
375  for (final String attribute : attributes) {
376  if (element.getAttribute(attribute) != null) {
377  throw new SyntaxErrorException("unexpected attribute '" + attribute + "'");
378  }
379  }
380  }
381 
382 }
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseBitmask
static AttributeBitmask parseBitmask(@NotNull final Element bitmaskElement, @NotNull final String name, @NotNull final ErrorViewCollector errorViewCollector)
Definition: ArchetypeTypeSetParser.java:122
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_MAX
static final String XML_ATTRIBUTE_MAX
Definition: Constants.java:271
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_IGNORELISTS
static final String XML_ELEMENT_IGNORELISTS
Definition: Constants.java:194
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_LIST
static final String XML_ELEMENT_LIST
Definition: Constants.java:106
net.sf.gridarta.model.archetypetype.AttributeBitmask.getNumber
int getNumber()
Definition: AttributeBitmask.java:249
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.loadTypesFromXML
ArchetypeTypeSet loadTypesFromXML(@NotNull final ErrorViewCollector errorViewCollector, @NotNull final Document document)
Definition: ArchetypeTypeSetParser.java:73
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.rejectAttributes
static void rejectAttributes(@NotNull final Element element, @NotNull final String... attributes)
Definition: ArchetypeTypeSetParser.java:374
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseIgnoreList
static void parseIgnoreList(@NotNull final Element ignoreListElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final IgnorelistsDefinition ignorelistsDefinition)
Definition: ArchetypeTypeSetParser.java:312
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_ATTRIBUTE
static final String XML_ELEMENT_ATTRIBUTE
Definition: Constants.java:236
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseAttributeOrder
static void parseAttributeOrder(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Node attributeOrderElement, @NotNull final ErrorViewCollector errorViewCollector)
Definition: ArchetypeTypeSetParser.java:295
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_TRUE
static final String XML_ATTRIBUTE_TRUE
Definition: Constants.java:320
net.sf.gridarta.model.archetypetype.Constants.XML_BMENTRY_VALUE
static final String XML_BMENTRY_VALUE
Definition: Constants.java:87
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser
Definition: ArchetypeTypeSetParser.java:43
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_BMENTRY
static final String XML_ELEMENT_BMENTRY
Definition: Constants.java:66
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.ArchetypeTypeSetParser
ArchetypeTypeSetParser(@NotNull final ArchetypeTypeParser archetypeTypeParser)
Definition: ArchetypeTypeSetParser.java:61
net.sf.gridarta
net.sf.gridarta.model.archetypetype.Constants.XML_LIST_NAME
static final String XML_LIST_NAME
Definition: Constants.java:113
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_LISTS
static final String XML_ELEMENT_LISTS
Definition: Constants.java:100
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_BITMASK
static final String XML_ELEMENT_BITMASK
Definition: Constants.java:46
net.sf.gridarta.model.archetypetype.AttributeBitmask.getMaxValue
int getMaxValue()
Definition: AttributeBitmask.java:241
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_MARKER
static final String XML_ATTRIBUTE_MARKER
Definition: Constants.java:334
net.sf.gridarta.model.archetypetype.ArchetypeTypeParser
Definition: ArchetypeTypeParser.java:43
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_ARCH_END
static final String XML_ATTRIBUTE_ARCH_END
Definition: Constants.java:306
net.sf
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseTypes
void parseTypes(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Element typeElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final ArchetypeType defaultArchetypeType, @NotNull final IgnorelistsDefinition ignorelistsDefinition)
Definition: ArchetypeTypeSetParser.java:362
net.sf.gridarta.model.archetypetype.Constants.XML_IGNORE_LIST_NAME
static final String XML_IGNORE_LIST_NAME
Definition: Constants.java:340
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_LENGTH
static final String XML_ATTRIBUTE_LENGTH
Definition: Constants.java:313
net.sf.gridarta.model.archetypetype.Constants.XML_BMENTRY_ENCODING
static final String XML_BMENTRY_ENCODING
Definition: Constants.java:94
net.sf.gridarta.model.archetypetype.IgnorelistsDefinition
Definition: IgnorelistsDefinition.java:34
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_LISTENTRY
static final String XML_ELEMENT_LISTENTRY
Definition: Constants.java:119
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_EDITOR
static final String XML_ATTRIBUTE_EDITOR
Definition: Constants.java:250
net.sf.gridarta.model.archetypetype.ArchetypeTypeSet
Definition: ArchetypeTypeSet.java:40
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_FALSE
static final String XML_ATTRIBUTE_FALSE
Definition: Constants.java:327
net.sf.gridarta.model.archetypetype.AttributeBitmask.containsEncoding
boolean containsEncoding(final int value)
Definition: AttributeBitmask.java:287
net.sf.gridarta.model.archetypetype.ArchetypeTypeList
Definition: ArchetypeTypeList.java:33
net.sf.gridarta.utils.XmlUtils.getChild
static Element getChild(@NotNull final Element parentElement, @NotNull final String childName)
Definition: XmlUtils.java:46
net
net.sf.gridarta.model.errorview
Definition: ErrorView.java:20
net.sf.gridarta.model.errorview.ErrorViewCollector
Definition: ErrorViewCollector.java:31
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_ATTRIBUTE_ORDER
static final String XML_ELEMENT_ATTRIBUTE_ORDER
Definition: Constants.java:200
net.sf.gridarta.model.archetypetype.AttributeBitmask
Definition: AttributeBitmask.java:42
net.sf.gridarta.model.errorview.ErrorViewCategory
Definition: ErrorViewCategory.java:28
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.LOG
static final Category LOG
Definition: ArchetypeTypeSetParser.java:49
net.sf.gridarta.utils.xml.ElementsIterable
Definition: ElementsIterable.java:30
net.sf.gridarta.model.errorview.ErrorViewCategory.TYPES_ENTRY_INVALID
TYPES_ENTRY_INVALID
Definition: ErrorViewCategory.java:92
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_ARCH
static final String XML_ATTRIBUTE_ARCH
Definition: Constants.java:243
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseList
static void parseList(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Element listElement, @NotNull final ErrorViewCollector errorViewCollector)
Definition: ArchetypeTypeSetParser.java:239
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_TYPE
static final String XML_ELEMENT_TYPE
Definition: Constants.java:139
net.sf.gridarta.utils.StringUtils.PATTERN_WHITESPACE_NEWLINE
static final Pattern PATTERN_WHITESPACE_NEWLINE
Definition: StringUtils.java:43
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseListEntry
static void parseListEntry(@NotNull final Element listentryElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final ArchetypeTypeList list)
Definition: ArchetypeTypeSetParser.java:255
net.sf.gridarta.model.archetypetype.Constants.XML_TYPE_AVAILABLE
static final String XML_TYPE_AVAILABLE
Definition: Constants.java:146
net.sf.gridarta.utils.StringUtils
Definition: StringUtils.java:31
net.sf.gridarta.model.archetypetype.Constants.XML_BITMASK_IS_NAMED
static final String XML_BITMASK_IS_NAMED
Definition: Constants.java:60
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_MIN
static final String XML_ATTRIBUTE_MIN
Definition: Constants.java:264
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_CHECK_MAX
static final String XML_ATTRIBUTE_CHECK_MAX
Definition: Constants.java:285
net.sf.gridarta.utils.SyntaxErrorException
Definition: SyntaxErrorException.java:28
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseBmentry
static void parseBmentry(@NotNull final Element bmentryElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final String bitmaskName, final boolean isNamed, @NotNull final AttributeBitmask attributeBitmask)
Definition: ArchetypeTypeSetParser.java:156
net.sf.gridarta.model
net.sf.gridarta.model.archetypetype.Constants.XML_BMENTRY_NAME
static final String XML_BMENTRY_NAME
Definition: Constants.java:80
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseLists
static void parseLists(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Element listsElement, @NotNull final ErrorViewCollector errorViewCollector)
Definition: ArchetypeTypeSetParser.java:226
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.archetypeTypeParser
final ArchetypeTypeParser archetypeTypeParser
Definition: ArchetypeTypeSetParser.java:55
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseBitmasks
static void parseBitmasks(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Element bitmasksElement, @NotNull final ErrorViewCollector errorViewCollector)
Definition: ArchetypeTypeSetParser.java:102
net.sf.gridarta.model.archetypetype.Constants
Definition: Constants.java:28
net.sf.gridarta.utils.xml
Definition: ElementsIterable.java:20
net.sf.gridarta.model.archetypetype.Constants.XML_BMENTRY_BIT
static final String XML_BMENTRY_BIT
Definition: Constants.java:73
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_VALUE
static final String XML_ATTRIBUTE_VALUE
Definition: Constants.java:257
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseDefaultType
ArchetypeType parseDefaultType(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Element defaultTypeElement, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final IgnorelistsDefinition ignorelistsDefinition)
Definition: ArchetypeTypeSetParser.java:348
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_DEFAULT_TYPE
static final String XML_ELEMENT_DEFAULT_TYPE
Definition: Constants.java:34
net.sf.gridarta.model.archetypetype.ArchetypeType
Definition: ArchetypeType.java:35
net.sf.gridarta.model.archetypetype.Constants.XML_LISTENTRY_VALUE
static final String XML_LISTENTRY_VALUE
Definition: Constants.java:133
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_ARCH_BEGIN
static final String XML_ATTRIBUTE_ARCH_BEGIN
Definition: Constants.java:299
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_IGNORE_LIST
static final String XML_ELEMENT_IGNORE_LIST
Definition: Constants.java:206
net.sf.gridarta.model.archetypetype.ArchetypeTypeSetParser.parseIgnoreLists
static IgnorelistsDefinition parseIgnoreLists(@NotNull final Element ignorelistsElement, @NotNull final ErrorViewCollector errorViewCollector)
Definition: ArchetypeTypeSetParser.java:280
net.sf.gridarta.model.archetypetype.Constants.XML_ELEMENT_BITMASKS
static final String XML_ELEMENT_BITMASKS
Definition: Constants.java:40
net.sf.gridarta.utils.XmlUtils
Definition: XmlUtils.java:30
net.sf.gridarta.model.archetypetype.Constants.XML_LISTENTRY_NAME
static final String XML_LISTENTRY_NAME
Definition: Constants.java:126
net.sf.gridarta.utils
Definition: ActionBuilderUtils.java:20
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_CHECK_MIN
static final String XML_ATTRIBUTE_CHECK_MIN
Definition: Constants.java:278
net.sf.gridarta.model.archetypetype.Constants.XML_ATTRIBUTE_TYPE
static final String XML_ATTRIBUTE_TYPE
Definition: Constants.java:292
net.sf.gridarta.model.archetypetype.ArchetypeTypeParser.loadAttributeList
ArchetypeType loadAttributeList(@NotNull final Element typeElement, @NotNull final ErrorViewCollector errorViewCollector, @Nullable final ArchetypeType parentArchetypeType, @NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final IgnorelistsDefinition ignorelistsDefinition, final boolean isDefaultType)
Definition: ArchetypeTypeParser.java:82
net.sf.gridarta.model.archetypetype.Constants.XML_BITMASK_NAME
static final String XML_BITMASK_NAME
Definition: Constants.java:53
net.sf.gridarta.model.archetypetype.ArchetypeTypeSet.getArchetypeTypeCount
int getArchetypeTypeCount()
Definition: ArchetypeTypeSet.java:177