Package org.xmlet.xsdparser.xsdelements
Class XsdNamedElements
- java.lang.Object
-
- org.xmlet.xsdparser.xsdelements.XsdAbstractElement
-
- org.xmlet.xsdparser.xsdelements.XsdIdentifierElements
-
- org.xmlet.xsdparser.xsdelements.XsdAnnotatedElements
-
- org.xmlet.xsdparser.xsdelements.XsdNamedElements
-
- Direct Known Subclasses:
XsdAttribute,XsdAttributeGroup,XsdBuiltInDataType,XsdComplexType,XsdElement,XsdGroup,XsdSimpleType
public abstract class XsdNamedElements extends XsdAnnotatedElements
This class serves as a base to concreteXsdAbstractElementclasses that can have a name attribute. This is helpful in resolving the references present at the end of the parsing process.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.StringnameThe name of the element.-
Fields inherited from class org.xmlet.xsdparser.xsdelements.XsdAbstractElement
ABSTRACT_TAG, ATTRIBUTE_FORM_DEFAULT, attributesMap, BASE_TAG, BLOCK_DEFAULT, BLOCK_TAG, cloneOf, DEFAULT_ELEMENT_TAG, DEFAULT_TAG, ELEMENT_FORM_DEFAULT, FINAL_DEFAULT, FINAL_TAG, FIXED_TAG, FORM_TAG, ID_TAG, ITEM_TYPE_TAG, MAX_OCCURS_TAG, MEMBER_TYPES_TAG, MIN_OCCURS_TAG, MIXED_TAG, NAME_TAG, NAMESPACE, NILLABLE_TAG, parent, parentAvailable, parser, REF_TAG, SCHEMA_LOCATION, SOURCE_TAG, SUBSTITUTION_GROUP_TAG, TARGET_NAMESPACE, TYPE_TAG, USE_TAG, VALUE_TAG, VERSION, visitor, visitorFunction, XML_LANG_TAG, XMLNS
-
-
Constructor Summary
Constructors Constructor Description XsdNamedElements(XsdParserCore parser, java.util.Map<java.lang.String,java.lang.String> attributesMap, java.util.function.Function<XsdAbstractElement,XsdAbstractElementVisitor> visitorFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()java.lang.StringgetRawName()private voidrule1()Asserts that the current element doesn't have both ref and name attributes at the same time.voidsetName(java.lang.String name)voidvalidateSchemaRules()Runs verifications on each concrete element to ensure that the XSD schema rules are verified.-
Methods inherited from class org.xmlet.xsdparser.xsdelements.XsdAnnotatedElements
getAnnotation, setAnnotation
-
Methods inherited from class org.xmlet.xsdparser.xsdelements.XsdIdentifierElements
getId
-
Methods inherited from class org.xmlet.xsdparser.xsdelements.XsdAbstractElement
accept, clone, clone, compareReference, compareReference, convertNodeMap, getAttributesMap, getCloneOf, getElements, getParent, getParent, getParser, getVisitor, getXsdElements, getXsdSchema, getXsdSchema, replaceUnsolvedElements, setCloneOf, setParent, setParentAvailable, xsdParseSkeleton, xsdRawContentParse
-
-
-
-
Constructor Detail
-
XsdNamedElements
XsdNamedElements(@NotNull XsdParserCore parser, @NotNull java.util.Map<java.lang.String,java.lang.String> attributesMap, java.util.function.Function<XsdAbstractElement,XsdAbstractElementVisitor> visitorFunction)
-
-
Method Detail
-
validateSchemaRules
public void validateSchemaRules()
Runs verifications on each concrete element to ensure that the XSD schema rules are verified.- Overrides:
validateSchemaRulesin classXsdAbstractElement
-
rule1
private void rule1()
Asserts that the current element doesn't have both ref and name attributes at the same time. Throws an exception if they are both present.
-
getName
public java.lang.String getName()
- Returns:
- The name of the element, with all the special characters replaced with the '_' char.
-
getRawName
public java.lang.String getRawName()
-
setName
public void setName(java.lang.String name)
-
-