Package org.xmlet.xsdparser.xsdelements
Class XsdExtension
- java.lang.Object
-
- org.xmlet.xsdparser.xsdelements.XsdAbstractElement
-
- org.xmlet.xsdparser.xsdelements.XsdIdentifierElements
-
- org.xmlet.xsdparser.xsdelements.XsdAnnotatedElements
-
- org.xmlet.xsdparser.xsdelements.XsdExtension
-
public class XsdExtension extends XsdAnnotatedElements
A class representing the xsd:extension element.
-
-
Field Summary
Fields Modifier and Type Field Description private ReferenceBasebaseAXsdElementinstance wrapped in aReferenceBaseobject from which thisXsdExtensioninstance extends.private ReferenceBasechildElementThe child element of theXsdExtensioninstance.static java.lang.StringTAGstatic java.lang.StringXS_TAGstatic java.lang.StringXSD_TAG-
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 Modifier Constructor Description privateXsdExtension(XsdParserCore parser, java.util.Map<java.lang.String,java.lang.String> attributesMap, java.util.function.Function<XsdAbstractElement,XsdAbstractElementVisitor> visitorFunction)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(XsdAbstractElementVisitor visitorParam)Base method for all accept methods.private booleanchildrenIsMultipleElement()XsdExtensionclone(java.util.Map<java.lang.String,java.lang.String> placeHolderAttributes)Performs a copy of the current object for replacing purposes.XsdNamedElementsgetBase()XsdBuiltInDataTypegetBaseAsBuiltInDataType()XsdComplexTypegetBaseAsComplexType()XsdSimpleTypegetBaseAsSimpleType()XsdAllgetChildAsAll()XsdChoicegetChildAsChoice()XsdGroupgetChildAsGroup()XsdSequencegetChildAsSequence()java.util.List<ReferenceBase>getElements()java.util.stream.Stream<XsdAttributeGroup>getXsdAttributeGroup()java.util.stream.Stream<XsdAttribute>getXsdAttributes()XsdAbstractElementgetXsdChildElement()static ReferenceBaseparse(ParseData parseData)voidreplaceUnsolvedElements(NamedConcreteElement element)This method should always receive two elements, one to replace theUnsolvedReferencecreated due to the value present in the base attribute and another if it has anUnsolvedReferenceas a child element.voidsetChildElement(ReferenceBase childElement)-
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
clone, compareReference, compareReference, convertNodeMap, getAttributesMap, getCloneOf, getParent, getParent, getParser, getVisitor, getXsdElements, getXsdSchema, getXsdSchema, setCloneOf, setParent, setParentAvailable, validateSchemaRules, xsdParseSkeleton, xsdRawContentParse
-
-
-
-
Field Detail
-
XSD_TAG
public static final java.lang.String XSD_TAG
- See Also:
- Constant Field Values
-
XS_TAG
public static final java.lang.String XS_TAG
- See Also:
- Constant Field Values
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
childElement
private ReferenceBase childElement
The child element of theXsdExtensioninstance. Either aXsdGroup,XsdAll,XsdSequenceor aXsdChoiceinstance wrapped in aReferenceBaseobject.
-
base
private ReferenceBase base
AXsdElementinstance wrapped in aReferenceBaseobject from which thisXsdExtensioninstance extends.
-
-
Constructor Detail
-
XsdExtension
private XsdExtension(@NotNull XsdParserCore parser, @NotNull java.util.Map<java.lang.String,java.lang.String> attributesMap, @NotNull java.util.function.Function<XsdAbstractElement,XsdAbstractElementVisitor> visitorFunction)
-
-
Method Detail
-
replaceUnsolvedElements
public void replaceUnsolvedElements(NamedConcreteElement element)
This method should always receive two elements, one to replace theUnsolvedReferencecreated due to the value present in the base attribute and another if it has anUnsolvedReferenceas a child element.- Overrides:
replaceUnsolvedElementsin classXsdAbstractElement- Parameters:
element- A concrete element with a name that will replace theUnsolvedReferenceobject created in theXsdExtensionconstructor. TheUnsolvedReferenceis only replaced if there is a match between theUnsolvedReference.refand theNamedConcreteElement.name.
-
accept
public void accept(XsdAbstractElementVisitor visitorParam)
Description copied from class:XsdAbstractElementBase method for all accept methods. It serves as a way to guarantee that every accept call assigns the parent field.- Overrides:
acceptin classXsdAbstractElement- Parameters:
visitorParam- The visitor that is visiting the current instance.
-
clone
public XsdExtension clone(@NotNull java.util.Map<java.lang.String,java.lang.String> placeHolderAttributes)
Performs a copy of the current object for replacing purposes. The cloned objects are used to replaceUnsolvedReferenceobjects in the reference solving process.- Overrides:
clonein classXsdAbstractElement- Parameters:
placeHolderAttributes- The additional attributes to add to the clone.- Returns:
- A copy of the object from which is called upon.
-
getElements
public java.util.List<ReferenceBase> getElements()
- Overrides:
getElementsin classXsdAbstractElement- Returns:
- Its children elements as his own.
-
getBase
public XsdNamedElements getBase()
- Returns:
- Either a
XsdComplexTypeor aXsdSimpleTypefrom which this extension extends or null if theXsdParserCorewasn't able to replace theUnsolvedReferencecreated by the base attribute value.
-
getBaseAsComplexType
public XsdComplexType getBaseAsComplexType()
- Returns:
- The
XsdComplexTypefrom which this extension extends or null if theXsdParserCorewasn't able to replace theUnsolvedReferencecreated by the base attribute value.
-
getBaseAsSimpleType
public XsdSimpleType getBaseAsSimpleType()
- Returns:
- The
XsdSimpleTypefrom which this extension extends or null if theXsdParserCorewasn't able to replace theUnsolvedReferencecreated by the base attribute value.
-
getBaseAsBuiltInDataType
public XsdBuiltInDataType getBaseAsBuiltInDataType()
- Returns:
- The
XsdBuiltInDataTypefrom which this extension extends.
-
parse
public static ReferenceBase parse(@NotNull ParseData parseData)
-
getXsdAttributes
public java.util.stream.Stream<XsdAttribute> getXsdAttributes()
-
getXsdAttributeGroup
public java.util.stream.Stream<XsdAttributeGroup> getXsdAttributeGroup()
-
getXsdChildElement
public XsdAbstractElement getXsdChildElement()
-
setChildElement
public void setChildElement(ReferenceBase childElement)
-
getChildAsGroup
public XsdGroup getChildAsGroup()
-
getChildAsAll
public XsdAll getChildAsAll()
-
getChildAsChoice
public XsdChoice getChildAsChoice()
-
getChildAsSequence
public XsdSequence getChildAsSequence()
- Returns:
- The childElement as a
XsdSequenceobject or null if childElement isn't aXsdSequenceinstance.
-
childrenIsMultipleElement
private boolean childrenIsMultipleElement()
-
-