public class XsdSimpleType extends XsdNamedElements
| Modifier and Type | Field | Description |
|---|---|---|
private SimpleTypeFinalEnum |
finalObj |
Prevents other elements to derive depending on its value.
|
private XsdList |
list |
A
XsdList instance that is present in the XsdSimpleType instance. |
private XsdRestriction |
restriction |
A
XsdRestriction instance that is present in the XsdSimpleType instance. |
private XsdUnion |
union |
A
XsdUnion instance that is present in the XsdSimpleType instance. |
private XsdSimpleTypeVisitor |
visitor |
XsdSimpleTypeVisitor instance which restricts its children to XsdList, XsdUnion or
XsdRestriction instances. |
static String |
XS_TAG |
|
static String |
XSD_TAG |
ABSTRACT_TAG, ATTRIBUTE_FORM_DEFAULT, BASE_TAG, BLOCK_DEFAULT, BLOCK_TAG, DEFAULT_ELEMENT_TAG, DEFAULT_TAG, ELEMENT_FORM_DEFAULT, elementFieldsMap, 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, parser, REF_TAG, SCHEMA_LOCATION, SOURCE_TAG, SUBSTITUTION_GROUP_TAG, TARGET_NAMESPACE, TYPE_TAG, USE_TAG, VALUE_TAG, VERSION, XML_LANG_TAG, XMLNSname| Modifier | Constructor | Description |
|---|---|---|
private |
XsdSimpleType(XsdParser parser,
Map<String,String> elementFieldsMapParam) |
|
private |
XsdSimpleType(XsdAbstractElement parent,
XsdParser parser,
Map<String,String> elementFieldsMapParam) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
accept(XsdAbstractElementVisitor visitorParam) |
Base method for all accept methods.
|
XsdSimpleType |
clone(Map<String,String> placeHolderAttributes) |
Performs a copy of the current object for replacing purposes.
|
private boolean |
existsRestrictionOverlap(XsdRestriction existing,
XsdRestriction newRestriction) |
Checks for any restriction overlap between two different
XsdRestriction instances. |
List<XsdRestriction> |
getAllRestrictions() |
This method obtains all the restrictions for the current
XsdSimpleType element. |
String |
getFinalObj() |
|
XsdList |
getList() |
|
XsdRestriction |
getRestriction() |
|
XsdUnion |
getUnion() |
|
XsdSimpleTypeVisitor |
getVisitor() |
Obtains the visitor of a concrete
XsdAbstractElement instance. |
static ReferenceBase |
parse(XsdParser parser,
Node node) |
|
private void |
rule2() |
Asserts that the current object has the required name attribute when not being a direct child of the XsdSchema element.
|
private void |
rule3() |
Asserts if the current has no value for its name attribute while being a direct child of the top level XsdSchema element,
which is required.
|
void |
setFields(Map<String,String> elementFieldsMapParam) |
Sets the name field with the value present in the Map containing the Node object.
|
void |
setList(XsdList list) |
|
void |
setRestriction(XsdRestriction restriction) |
|
void |
setUnion(XsdUnion union) |
|
private void |
updateExistingRestriction(XsdRestriction existing,
XsdRestriction newRestriction) |
Joins two distinct
XsdRestriction instances. |
private void |
updateExistingRestrictionEnumerations(XsdRestriction existing,
XsdRestriction newRestriction) |
Updates the existing
XsdRestriction with the restrictions of the new XsdRestriction instance. |
void |
validateSchemaRules() |
Runs verifications on each concrete element to ensure that the XSD schema rules are verified.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertNodeMap, getElementFieldsMap, getElements, getParent, getParser, getXsdElements, replaceUnsolvedElements, setParent, xsdParseSkeleton, xsdRawContentParsegetAnnotation, setAnnotationgetIdgetName, getRawName, setNamepublic static final String XSD_TAG
public static final String XS_TAG
private XsdSimpleTypeVisitor visitor
XsdSimpleTypeVisitor instance which restricts its children to XsdList, XsdUnion or
XsdRestriction instances. Can also have XsdAnnotation as children as per inheritance of
XsdAnnotatedElementsVisitor.private XsdRestriction restriction
XsdRestriction instance that is present in the XsdSimpleType instance.private XsdUnion union
XsdUnion instance that is present in the XsdSimpleType instance.private XsdList list
XsdList instance that is present in the XsdSimpleType instance.private SimpleTypeFinalEnum finalObj
private XsdSimpleType(@NotNull
XsdParser parser,
@NotNull
Map<String,String> elementFieldsMapParam)
private XsdSimpleType(XsdAbstractElement parent, XsdParser parser, @NotNull Map<String,String> elementFieldsMapParam)
public void setFields(@NotNull
Map<String,String> elementFieldsMapParam)
XsdNamedElementssetFields in class XsdNamedElementselementFieldsMapParam - The Map object containing the information previously contained in the Node object.public void validateSchemaRules()
validateSchemaRules in class XsdNamedElementsprivate void rule2()
private void rule3()
public XsdSimpleTypeVisitor getVisitor()
XsdAbstractElementXsdAbstractElement instance.getVisitor in class XsdAbstractElementpublic void accept(XsdAbstractElementVisitor visitorParam)
XsdAbstractElementaccept in class XsdAbstractElementvisitorParam - The visitor that is visiting the current instance.public XsdSimpleType clone(@NotNull Map<String,String> placeHolderAttributes)
UnsolvedReference objects in the reference solving process.clone in class XsdNamedElementsplaceHolderAttributes - The additional attributes to add to the clone.public static ReferenceBase parse(@NotNull XsdParser parser, Node node)
public XsdRestriction getRestriction()
public XsdUnion getUnion()
public XsdList getList()
public List<XsdRestriction> getAllRestrictions()
XsdSimpleType element. It also joins multiple
restrictions with the same base attribute in the same XsdRestriction object, if a overlap doesn't occur.
In case of restriction overlap an exception is thrown because the information on the xsd file is contradictory.private void updateExistingRestriction(XsdRestriction existing, XsdRestriction newRestriction)
XsdRestriction instances. This method assumes that the information of both
XsdRestriction objects don't have overlapping or contradictory information.existing - The existing restriction.newRestriction - The new restriction.private void updateExistingRestrictionEnumerations(XsdRestriction existing, XsdRestriction newRestriction)
XsdRestriction with the restrictions of the new XsdRestriction instance.existing - The existing XsdRestriction instance.newRestriction - The new XsdRestriction instance.private boolean existsRestrictionOverlap(XsdRestriction existing, XsdRestriction newRestriction)
XsdRestriction instances.existing - The existing restriction.newRestriction - The second restriction found.public void setList(XsdList list)
public void setUnion(XsdUnion union)
public void setRestriction(XsdRestriction restriction)
public String getFinalObj()
Copyright © 2018. All rights reserved.