Class AttributesVisitor
- java.lang.Object
-
- org.xmlet.xsdparser.xsdelements.visitors.XsdAnnotatedElementsVisitor
-
- org.xmlet.xsdparser.xsdelements.visitors.AttributesVisitor
-
- All Implemented Interfaces:
XsdAbstractElementVisitor
- Direct Known Subclasses:
XsdComplexTypeVisitor,XsdExtensionVisitor,XsdRestrictionsVisitor,XsdSchemaVisitor
public abstract class AttributesVisitor extends XsdAnnotatedElementsVisitor
Represents the restrictions of the all elements that can containXsdAttributeandXsdAttributeGroup. This visitor contains theattributesandattributeGroupsthat belong to the owner and apart from receiving the attributes in the visit method this visitor also performs thereplaceUnsolvedAttributes(org.xmlet.xsdparser.core.XsdParserCore, org.xmlet.xsdparser.xsdelements.elementswrapper.NamedConcreteElement, org.xmlet.xsdparser.xsdelements.XsdAbstractElement)method, which is a method that was shared by all the types that contained a list ofXsdAttributeandXsdAttributeGroupobjects. Can also have xsd:annotation children as per inheritance ofXsdAnnotatedElementsVisitor.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ReferenceBase>attributeGroupsThe list ofXsdAttributeGroupinstances received by this visitor, wrapped in aReferenceBaseobject.private java.util.List<ReferenceBase>attributesThe list ofXsdAttributeinstances received by this visitor, wrapped in aReferenceBaseobject.
-
Constructor Summary
Constructors Constructor Description AttributesVisitor(XsdAnnotatedElements owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<XsdAttribute>getAllAttributes()java.util.stream.Stream<XsdAttributeGroup>getAllXsdAttributeGroups()java.util.List<ReferenceBase>getAttributeGroups()java.util.List<ReferenceBase>getAttributes()java.util.stream.Stream<XsdAttributeGroup>getXsdAttributeGroups()java.util.stream.Stream<XsdAttribute>getXsdAttributes()voidreplaceUnsolvedAttributes(XsdParserCore parser, NamedConcreteElement element, XsdAbstractElement parent)Tries to match the receivedNamedConcreteElementobject, with any of the elements present either inattributeGroupsorattributes.voidsetAttributeGroups(java.util.List<ReferenceBase> attributeGroups)voidsetAttributes(java.util.List<ReferenceBase> attributes)voidvisit(XsdAttribute attribute)voidvisit(XsdAttributeGroup attributeGroup)-
Methods inherited from class org.xmlet.xsdparser.xsdelements.visitors.XsdAnnotatedElementsVisitor
getOwner, visit
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xmlet.xsdparser.xsdelements.visitors.XsdAbstractElementVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
-
-
-
Field Detail
-
attributeGroups
private java.util.List<ReferenceBase> attributeGroups
The list ofXsdAttributeGroupinstances received by this visitor, wrapped in aReferenceBaseobject.
-
attributes
private java.util.List<ReferenceBase> attributes
The list ofXsdAttributeinstances received by this visitor, wrapped in aReferenceBaseobject.
-
-
Constructor Detail
-
AttributesVisitor
AttributesVisitor(XsdAnnotatedElements owner)
-
-
Method Detail
-
visit
public void visit(XsdAttribute attribute)
-
visit
public void visit(XsdAttributeGroup attributeGroup)
-
setAttributes
public void setAttributes(java.util.List<ReferenceBase> attributes)
-
setAttributeGroups
public void setAttributeGroups(java.util.List<ReferenceBase> attributeGroups)
-
getAttributes
public java.util.List<ReferenceBase> getAttributes()
- Returns:
- All the wrapped
XsdAttributeobjects received by this visitor.
-
getAttributeGroups
public java.util.List<ReferenceBase> getAttributeGroups()
- Returns:
- All the wrapped
XsdAttributeGroupobjects received by this visitor.
-
getXsdAttributes
public java.util.stream.Stream<XsdAttribute> getXsdAttributes()
- Returns:
- All the
XsdAttributeobjects that are fully resolved by this visitor. TheXsdAttributeobjects wrapped inUnsolvedReferenceobjects are not returned.
-
getXsdAttributeGroups
public java.util.stream.Stream<XsdAttributeGroup> getXsdAttributeGroups()
- Returns:
- All the
XsdAttributeGroupobjects that are fully resolved by this visitor. TheXsdAttributeGroupobjects wrapped inUnsolvedReferenceobjects are not returned.
-
getAllXsdAttributeGroups
public java.util.stream.Stream<XsdAttributeGroup> getAllXsdAttributeGroups()
-
replaceUnsolvedAttributes
public void replaceUnsolvedAttributes(XsdParserCore parser, NamedConcreteElement element, XsdAbstractElement parent)
Tries to match the receivedNamedConcreteElementobject, with any of the elements present either inattributeGroupsorattributes. If a match occurs this method performs all the required actions to fully exchange theUnsolvedReferenceobject with the element parameter.- Parameters:
element- The resolved element that will be match with the contents of this visitor in order to assert if there is anything to replace.
-
getAllAttributes
public java.util.List<XsdAttribute> getAllAttributes()
-
-