Package org.xmlet.xsdparser.xsdelements
Class XsdRestriction
- java.lang.Object
-
- org.xmlet.xsdparser.xsdelements.XsdAbstractElement
-
- org.xmlet.xsdparser.xsdelements.XsdIdentifierElements
-
- org.xmlet.xsdparser.xsdelements.XsdAnnotatedElements
-
- org.xmlet.xsdparser.xsdelements.XsdRestriction
-
public class XsdRestriction extends XsdAnnotatedElements
A class representing the xsd:restriction element.
-
-
Field Summary
Fields Modifier and Type Field Description private XsdAllallprivate ReferenceBasebaseTheXsdSimpleTypeinstance of thisXsdRestrictioninstance.private java.lang.StringbaseStringThe name of the type where this instance restrictions should be applied.private XsdChoicechoiceprivate java.util.List<XsdEnumeration>enumerationA List ofXsdEnumerationitems, that represent a set of possible values for a given type.private XsdFractionDigitsfractionDigitsAXsdFractionDigitsinstance that specifies the number of fraction digits allowed in a numeric type.private ReferenceBasegroupprivate XsdLengthlengthAXsdLengthinstance that specifies the specific length of a List or String type.private XsdMaxExclusivemaxExclusiveAXsdMaxExclusiveinstance that specifies the maxExclusive value for a numeric type.private XsdMaxInclusivemaxInclusiveAXsdMaxInclusiveinstance that specifies the maxInclusive value for a numeric type.private XsdMaxLengthmaxLengthAXsdMaxLengthinstance that specifies the maxLength of a List or a String type.private XsdMinExclusiveminExclusiveAXsdMinExclusiveinstance that specifies the minExclusive value for a numeric type.private XsdMinInclusiveminInclusiveAXsdMinInclusiveinstance that specifies the minInclusive value for a numeric type.private XsdMinLengthminLengthAXsdMinLengthinstance that specifies the minLength of a List or a String type.private XsdPatternpatternAXsdPatterninstance that specifies a regex pattern that a String type should follow.private XsdSequencesequencestatic java.lang.StringTAGprivate XsdTotalDigitstotalDigitsAXsdTotalDigitsinstance that specifies the total number of digits that a numeric type is allowed to have.private XsdWhiteSpacewhiteSpaceAXsdWhiteSpaceinstance that specifies how the whitespace characters should be dealt with.static 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 privateXsdRestriction(XsdParserCore parser, java.util.Map<java.lang.String,java.lang.String> attributesMap, java.util.function.Function<XsdAbstractElement,XsdAbstractElementVisitor> visitorFunction)XsdRestriction(XsdAbstractElement parent, XsdParserCore parser, java.util.Map<java.lang.String,java.lang.String> elementFieldsMapParam, java.util.function.Function<XsdAbstractElement,XsdAbstractElementVisitor> visitorFunction)
-
Method Summary
-
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, getElements, 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
-
base
private ReferenceBase base
TheXsdSimpleTypeinstance of thisXsdRestrictioninstance.
-
enumeration
private java.util.List<XsdEnumeration> enumeration
A List ofXsdEnumerationitems, that represent a set of possible values for a given type.
-
fractionDigits
private XsdFractionDigits fractionDigits
AXsdFractionDigitsinstance that specifies the number of fraction digits allowed in a numeric type.
-
length
private XsdLength length
AXsdLengthinstance that specifies the specific length of a List or String type.
-
maxExclusive
private XsdMaxExclusive maxExclusive
AXsdMaxExclusiveinstance that specifies the maxExclusive value for a numeric type.
-
maxInclusive
private XsdMaxInclusive maxInclusive
AXsdMaxInclusiveinstance that specifies the maxInclusive value for a numeric type.
-
maxLength
private XsdMaxLength maxLength
AXsdMaxLengthinstance that specifies the maxLength of a List or a String type.
-
minExclusive
private XsdMinExclusive minExclusive
AXsdMinExclusiveinstance that specifies the minExclusive value for a numeric type.
-
minInclusive
private XsdMinInclusive minInclusive
AXsdMinInclusiveinstance that specifies the minInclusive value for a numeric type.
-
minLength
private XsdMinLength minLength
AXsdMinLengthinstance that specifies the minLength of a List or a String type.
-
pattern
private XsdPattern pattern
AXsdPatterninstance that specifies a regex pattern that a String type should follow.
-
totalDigits
private XsdTotalDigits totalDigits
AXsdTotalDigitsinstance that specifies the total number of digits that a numeric type is allowed to have.
-
whiteSpace
private XsdWhiteSpace whiteSpace
AXsdWhiteSpaceinstance that specifies how the whitespace characters should be dealt with.
-
group
private ReferenceBase group
-
all
private XsdAll all
-
choice
private XsdChoice choice
-
sequence
private XsdSequence sequence
-
baseString
private java.lang.String baseString
The name of the type where this instance restrictions should be applied.
-
-
Constructor Detail
-
XsdRestriction
private XsdRestriction(@NotNull XsdParserCore parser, @NotNull java.util.Map<java.lang.String,java.lang.String> attributesMap, @NotNull java.util.function.Function<XsdAbstractElement,XsdAbstractElementVisitor> visitorFunction)
-
XsdRestriction
public XsdRestriction(XsdAbstractElement parent, @NotNull XsdParserCore parser, @NotNull java.util.Map<java.lang.String,java.lang.String> elementFieldsMapParam, @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.
-
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.
-
clone
public XsdRestriction 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.
-
parse
public static ReferenceBase parse(@NotNull ParseData parseData)
-
getXsdAttributes
public java.util.stream.Stream<XsdAttribute> getXsdAttributes()
-
getXsdAttributeGroup
public java.util.stream.Stream<XsdAttributeGroup> getXsdAttributeGroup()
-
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.
-
getBase
public java.lang.String getBase()
-
getEnumeration
public java.util.List<XsdEnumeration> getEnumeration()
-
setEnumeration
void setEnumeration(java.util.List<XsdEnumeration> enumeration)
-
getFractionDigits
public XsdFractionDigits getFractionDigits()
-
setFractionDigits
public void setFractionDigits(XsdFractionDigits fractionDigits)
-
getLength
public XsdLength getLength()
-
setLength
public void setLength(XsdLength length)
-
getMaxExclusive
public XsdMaxExclusive getMaxExclusive()
-
setMaxExclusive
public void setMaxExclusive(XsdMaxExclusive maxExclusive)
-
getMaxInclusive
public XsdMaxInclusive getMaxInclusive()
-
setMaxInclusive
public void setMaxInclusive(XsdMaxInclusive maxInclusive)
-
getMaxLength
public XsdMaxLength getMaxLength()
-
setMaxLength
public void setMaxLength(XsdMaxLength maxLength)
-
getMinExclusive
public XsdMinExclusive getMinExclusive()
-
setMinExclusive
public void setMinExclusive(XsdMinExclusive minExclusive)
-
getMinInclusive
public XsdMinInclusive getMinInclusive()
-
setMinInclusive
public void setMinInclusive(XsdMinInclusive minInclusive)
-
getMinLength
public XsdMinLength getMinLength()
-
setMinLength
public void setMinLength(XsdMinLength minLength)
-
getPattern
public XsdPattern getPattern()
-
setPattern
public void setPattern(XsdPattern pattern)
-
getTotalDigits
public XsdTotalDigits getTotalDigits()
-
setTotalDigits
public void setTotalDigits(XsdTotalDigits totalDigits)
-
getWhiteSpace
public XsdWhiteSpace getWhiteSpace()
-
setWhiteSpace
public void setWhiteSpace(XsdWhiteSpace whiteSpace)
-
add
public void add(XsdEnumeration enumerationMember)
-
getGroup
public XsdGroup getGroup()
-
setGroup
public void setGroup(ReferenceBase group)
-
getAll
public XsdAll getAll()
-
setAll
public void setAll(XsdAll all)
-
getChoice
public XsdChoice getChoice()
-
setChoice
public void setChoice(XsdChoice choice)
-
getSequence
public XsdSequence getSequence()
-
setSequence
public void setSequence(XsdSequence sequence)
-
-