public abstract class SimpleType extends XMLType implements Referable
Modifier and Type | Field and Description |
---|---|
static String |
FINAL_ALL
The value of the final attribute used for blocking all types of
derivation.
|
static String |
FINAL_LIST
The value of the final attribute used for blocking list derivation.
|
static String |
FINAL_RESTRICTION
The value of the final attribute used for blocking restriction
derivation.
|
static String |
FINAL_UNION
The value of the final attribute used for blocking union derivation.
|
NULL_ARGUMENT
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, MODELGROUP, MODELGROUP_REF, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD
Constructor and Description |
---|
SimpleType()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFacet(Facet facet)
Adds the given Facet to this Simpletype.
|
protected void |
copyFacets(SimpleType target)
Copy this type's facets to the target type.
|
protected SimpleType |
createReference(String name)
A helper method for classes which extend SimpleType.
|
SimpleType |
getBuiltInBaseType()
Returns the built in type this type is derived from.
|
Enumeration<Facet> |
getEffectiveFacets()
Returns an enumeration of the effective facets for this type.
|
Facet |
getFacet(String name)
Returns the first facet associated with the given name.
|
Enumeration<Facet> |
getFacets()
Returns an Enumeration of all the Facets (including inherited) facets for
this type.
|
Enumeration<Facet> |
getFacets(String name)
Returns the facets associated with the given name.
|
String |
getFinal()
Returns the value of the 'final' property, indicating which types of
derivation are not allowed, or null if the final property has not been
set.
|
Long |
getLength()
Returns the value of the length facet result can be null
|
Enumeration<Facet> |
getLocalFacets()
Returns the facets of this type (without the parent's facets).
|
Long |
getMaxLength()
Returns the value of the maxlength facet result can be null
|
Long |
getMinLength()
Returns the value of the minlength facet result can be null
|
int |
getNumberOfFacets(String name)
Returns the number of facets named 'name' within the list of facets of
this simple type.
|
Structure |
getParent()
Returns the parent Structure that contains this SimpleType.
|
String |
getReferenceId()
Returns the Id used to Refer to this Object.
|
short |
getStructureType()
Returns the type of this Schema Structure
|
int |
getTypeCode()
Gets the code for this simple type.
|
boolean |
hasFacet(String name)
Returns true if this
SimpleType has a specified Facet
with the given name. |
boolean |
isBuiltInType()
Returns true if this SimpleType is a built in type.
|
boolean |
isDateTimeType()
Indicates whether this
SimpleType is a date/time type. |
boolean |
isNumericType()
Indicates whether this
SimpleType is a numeric type. |
boolean |
isRedefined()
Returns true if this simpleType is a redefinition.
|
boolean |
removeFacet(Facet facet)
Removes the given Facet from this SimpleType.
|
boolean |
removeFacet(String name)
Removes the facet with the given name from this SimpleType.
|
protected static SimpleType |
resolveReference(SimpleType simpleType)
A helper method for classes which extend SimpleType.
|
void |
setFinal(String finalValue)
Sets the value of the 'final' property, indicating which types of
derivation are not allowed.
|
protected void |
setParent(Structure parent)
Sets the parent for this SimpleType
|
void |
setRedefined()
Sets this Group has redefined.
|
void |
validate()
Checks the validity of this SimpleType definition.
|
getBaseType, getBaseTypeName, getDerivationMethod, getId, getName, getSchema, isAnyType, isComplexType, isSimpleType, setBaseType, setDerivationMethod, setId, setName, setSchema
addAnnotation, getAnnotations, removeAnnotation
public static final String FINAL_ALL
public static final String FINAL_LIST
public static final String FINAL_UNION
public static final String FINAL_RESTRICTION
public void addFacet(Facet facet)
facet
- the Facet to add to this Simpletypepublic Facet getFacet(String name)
name
- the name of the Facet to look forpublic Enumeration<Facet> getFacets(String name)
name
- the name of the Facet to look forpublic Enumeration<Facet> getFacets()
public String getFinal()
public Enumeration<Facet> getLocalFacets()
public Enumeration<Facet> getEffectiveFacets()
getLocalFacets()
,
getFacets()
public SimpleType getBuiltInBaseType()
public Structure getParent()
public String getReferenceId()
getReferenceId
in interface Referable
Referable
public boolean hasFacet(String name)
SimpleType
has a specified Facet
with the given name.name
- the name of the Facet
to look forSimpleType
has a specified Facet
with the given namepublic boolean isBuiltInType()
public boolean isNumericType()
SimpleType
is a numeric type.public boolean isDateTimeType()
SimpleType
is a date/time type.public boolean isRedefined()
public void setRedefined()
public int getTypeCode()
public Long getLength()
public Long getMinLength()
public Long getMaxLength()
public boolean removeFacet(Facet facet)
Removes only local facets.
facet
- the Facet to removepublic boolean removeFacet(String name)
Removes only local facets.
name
- the name of the Facet to removepublic void setFinal(String finalValue)
finalValue
- the value of the final property.IllegalArgumentException
- when the value is not a valid value.public short getStructureType()
getStructureType
in class Structure
public void validate() throws ValidationException
validate
in class Structure
ValidationException
- when this SimpleType definition is invalid.protected SimpleType createReference(String name)
protected static SimpleType resolveReference(SimpleType simpleType)
createReference(java.lang.String)
protected void setParent(Structure parent)
protected void copyFacets(SimpleType target)
target
- the SimpleType to copy facets topublic int getNumberOfFacets(String name)
name
- Name (type) of the facet.Copyright © 2022. All rights reserved.