Package org.xmlet.xsdparser.xsdelements
Class XsdAttributeGroup
- java.lang.Object
-
- org.xmlet.xsdparser.xsdelements.XsdAbstractElement
-
- org.xmlet.xsdparser.xsdelements.XsdIdentifierElements
-
- org.xmlet.xsdparser.xsdelements.XsdAnnotatedElements
-
- org.xmlet.xsdparser.xsdelements.XsdNamedElements
-
- org.xmlet.xsdparser.xsdelements.XsdAttributeGroup
-
public class XsdAttributeGroup extends XsdNamedElements
A class is representing xsd:attributeGroup elements. It can have a ref attribute and therefore extends fromXsdNamedElements, which serves as a base to every element type that can have a ref attribute. For more information checkXsdNamedElements.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ReferenceBase>attributeGroupsA list ofXsdAttributeGroupchildren instances.private java.util.List<ReferenceBase>attributesA list ofXsdAttributechildren instances.static java.lang.StringTAGstatic java.lang.StringXS_TAGstatic java.lang.StringXSD_TAG-
Fields inherited from class org.xmlet.xsdparser.xsdelements.XsdNamedElements
name
-
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 privateXsdAttributeGroup(XsdParserCore parser, java.util.Map<java.lang.String,java.lang.String> attributesMap, java.util.function.Function<XsdAbstractElement,XsdAbstractElementVisitor> visitorFunction)privateXsdAttributeGroup(XsdAbstractElement parent, 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.voidaddAttribute(ReferenceBase attribute)voidaddAttributeGroup(ReferenceBase attributeGroup)XsdNamedElementsclone(java.util.Map<java.lang.String,java.lang.String> placeHolderAttributes)Performs a copy of the current object for replacing purposes.java.util.stream.Stream<XsdAttributeGroup>getAllXsdAttributeGroups()java.util.stream.Stream<XsdAttribute>getDirectAttributes()java.util.List<ReferenceBase>getElements()java.util.stream.Stream<XsdAttributeGroup>getXsdAttributeGroups()java.util.stream.Stream<XsdAttribute>getXsdAttributes()static ReferenceBaseparse(ParseData parseData)voidreplaceUnsolvedElements(NamedConcreteElement element)This method iterates on the current element children and replaces anyUnsolvedReferenceobject that has a ref attribute that matches the receivingNamedConcreteElementname attribute.-
Methods inherited from class org.xmlet.xsdparser.xsdelements.XsdNamedElements
getName, getRawName, setName, validateSchemaRules
-
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, 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
-
attributeGroups
private java.util.List<ReferenceBase> attributeGroups
A list ofXsdAttributeGroupchildren instances.
-
attributes
private java.util.List<ReferenceBase> attributes
A list ofXsdAttributechildren instances.
-
-
Constructor Detail
-
XsdAttributeGroup
private XsdAttributeGroup(@NotNull XsdParserCore parser, @NotNull java.util.Map<java.lang.String,java.lang.String> attributesMap, @NotNull java.util.function.Function<XsdAbstractElement,XsdAbstractElementVisitor> visitorFunction)
-
XsdAttributeGroup
private XsdAttributeGroup(XsdAbstractElement parent, @NotNull XsdParserCore parser, @NotNull java.util.Map<java.lang.String,java.lang.String> attributesMap, @NotNull java.util.function.Function<XsdAbstractElement,XsdAbstractElementVisitor> visitorFunction)
-
-
Method Detail
-
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.
-
getElements
public java.util.List<ReferenceBase> getElements()
- Overrides:
getElementsin classXsdAbstractElement- Returns:
- A list of all
XsdAttributeobjects contained in the currentXsdAttributeGroupinstance, either directly or present in its childrenXsdAttributeGroupin theattributeGroupsfield.
-
clone
public XsdNamedElements 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.
-
replaceUnsolvedElements
public void replaceUnsolvedElements(NamedConcreteElement element)
Description copied from class:XsdAbstractElementThis method iterates on the current element children and replaces anyUnsolvedReferenceobject that has a ref attribute that matches the receivingNamedConcreteElementname attribute.- Overrides:
replaceUnsolvedElementsin classXsdAbstractElement- Parameters:
element- A fully parsed element with a name that will replace anUnsolvedReferenceobject, if a match between theNamedConcreteElementname attribute and theUnsolvedReferenceref attribute.
-
getXsdAttributeGroups
public java.util.stream.Stream<XsdAttributeGroup> getXsdAttributeGroups()
-
getAllXsdAttributeGroups
public java.util.stream.Stream<XsdAttributeGroup> getAllXsdAttributeGroups()
-
getXsdAttributes
public java.util.stream.Stream<XsdAttribute> getXsdAttributes()
- Returns:
- All the attributes of this attributeGroup and other attributeGroups contained within.
-
getDirectAttributes
public java.util.stream.Stream<XsdAttribute> getDirectAttributes()
- Returns:
- The attributes directly defined in this attributeGroup.
-
parse
public static ReferenceBase parse(@NotNull ParseData parseData)
-
addAttribute
public void addAttribute(ReferenceBase attribute)
-
addAttributeGroup
public void addAttributeGroup(ReferenceBase attributeGroup)
-
-