|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.xsom.impl.SchemaImpl
public class SchemaImpl
| Field Summary | |
|---|---|
protected SchemaSetImpl |
parent
|
| Constructor Summary | |
|---|---|
SchemaImpl(SchemaSetImpl _parent,
Locator loc,
String tns)
|
|
| Method Summary | |
|---|---|
void |
addAttGroupDecl(XSAttGroupDecl newDecl,
boolean overwrite)
|
void |
addAttributeDecl(XSAttributeDecl newDecl)
|
void |
addComplexType(XSComplexType newDecl,
boolean overwrite)
|
void |
addElementDecl(XSElementDecl newDecl)
|
void |
addForeignAttributes(ForeignAttributesImpl fa)
|
protected void |
addIdentityConstraint(IdentityConstraintImpl c)
|
void |
addModelGroupDecl(XSModelGroupDecl newDecl,
boolean overwrite)
|
void |
addNotation(XSNotation newDecl)
|
void |
addSimpleType(XSSimpleType newDecl,
boolean overwrite)
|
Object |
apply(XSFunction function)
Accepts a functor. |
XSAnnotation |
getAnnotation()
Gets the annotation associated to this component, if any. |
XSAnnotation |
getAnnotation(boolean createIfNotExist)
Works like XSComponent.getAnnotation(), but allow a new empty XSAnnotation to be created
if not exist. |
XSAttGroupDecl |
getAttGroupDecl(String name)
|
Map<String,XSAttGroupDecl> |
getAttGroupDecls()
Gets all the XSAttGroupDecls in this schema. |
XSAttributeDecl |
getAttributeDecl(String name)
|
Map<String,XSAttributeDecl> |
getAttributeDecls()
Gets all the XSAttributeDecls in this schema
keyed by their local names. |
XSComplexType |
getComplexType(String name)
|
Map<String,XSComplexType> |
getComplexTypes()
Gets all the XSComplexTypes in this schema. |
XSElementDecl |
getElementDecl(String name)
|
Map<String,XSElementDecl> |
getElementDecls()
Gets all the XSElementDecls in this schema. |
String |
getForeignAttribute(String nsUri,
String localName)
Gets the foreign attribute of the given name, or null if not found. |
List<ForeignAttributes> |
getForeignAttributes()
Gets the foreign attributes on this schema component. |
XSIdentityConstraint |
getIdentityConstraint(String localName)
Gets the identity constraint of the given name, or null if not found. |
Map<String,XSIdentityConstraint> |
getIdentityConstraints()
Gets all the XSIdentityConstraints in this schema,
keyed by their names. |
Locator |
getLocator()
Gets the locator that indicates the source location where this component is created from, or null if no information is available. |
XSModelGroupDecl |
getModelGroupDecl(String name)
|
Map<String,XSModelGroupDecl> |
getModelGroupDecls()
Gets all the XSModelGroupDecls in this schema. |
XSNotation |
getNotation(String name)
|
Map<String,XSNotation> |
getNotations()
Gets all the XSNotations in this schema. |
XSSchema |
getOwnerSchema()
Gets a reference to the XSSchema object to which this component
belongs. |
SchemaSetImpl |
getRoot()
Gets the root schema set that includes this schema. |
XSSimpleType |
getSimpleType(String name)
|
Map<String,XSSimpleType> |
getSimpleTypes()
Gets all the XSSimpleTypes in this schema. |
SchemaDocument |
getSourceDocument()
Sine an XSSchema is not necessarily defined in
one schema document (for example one schema can span across
many documents through <xs:include>s.),
so this method always returns null. |
String |
getTargetNamespace()
Gets the target namespace of the schema. |
XSType |
getType(String name)
|
Map<String,XSType> |
getTypes()
Gets all the XSTypes in this schema (union of
XSSchema.getSimpleTypes() and XSSchema.getComplexTypes() |
Iterator<XSAttGroupDecl> |
iterateAttGroupDecls()
|
Iterator<XSAttributeDecl> |
iterateAttributeDecls()
|
Iterator<XSComplexType> |
iterateComplexTypes()
|
Iterator<XSElementDecl> |
iterateElementDecls()
|
Iterator<XSModelGroupDecl> |
iterateModelGroupDecls()
|
Iterator<XSNotation> |
iterateNotations()
|
Iterator<XSSimpleType> |
iterateSimpleTypes()
|
Iterator<XSType> |
iterateTypes()
|
Collection<XSComponent> |
select(String scd,
NamespaceContext nsContext)
Evaluates a schema component designator against this schema component and returns the resulting schema components. |
XSComponent |
selectSingle(String scd,
NamespaceContext nsContext)
Evaluates a schema component designator against this schema component and returns the first resulting schema component. |
void |
setAnnotation(XSAnnotation a)
|
void |
visit(XSVisitor visitor)
Accepts a visitor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final SchemaSetImpl parent
| Constructor Detail |
|---|
public SchemaImpl(SchemaSetImpl _parent,
Locator loc,
String tns)
| Method Detail |
|---|
public SchemaDocument getSourceDocument()
XSSchemaXSSchema is not necessarily defined in
one schema document (for example one schema can span across
many documents through <xs:include>s.),
so this method always returns null.
getSourceDocument in interface XSComponentgetSourceDocument in interface XSSchemaXSContentType. This method also
returns null for XSSchema.
For all other user-defined
components this method returns non-null, even if they are local.public SchemaSetImpl getRoot()
XSSchema
getRoot in interface XSComponentgetRoot in interface XSSchemapublic String getTargetNamespace()
XSSchema
getTargetNamespace in interface XSSchemapublic XSSchema getOwnerSchema()
XSComponentXSSchema object to which this component
belongs.
In case of XSEmpty component, this method
returns null since there is no owner component.
getOwnerSchema in interface XSComponentpublic void setAnnotation(XSAnnotation a)
public XSAnnotation getAnnotation()
XSComponent
getAnnotation in interface XSComponentpublic XSAnnotation getAnnotation(boolean createIfNotExist)
XSComponentXSComponent.getAnnotation(), but allow a new empty XSAnnotation to be created
if not exist.
getAnnotation in interface XSComponentcreateIfNotExist - true to create a new XSAnnotation if it doesn't exist already.
false to make this method behavel like XSComponent.getAnnotation().
public Locator getLocator()
XSComponent
getLocator in interface XSComponentpublic void addAttributeDecl(XSAttributeDecl newDecl)
public Map<String,XSAttributeDecl> getAttributeDecls()
XSSchemaXSAttributeDecls in this schema
keyed by their local names.
getAttributeDecls in interface XSSchemapublic XSAttributeDecl getAttributeDecl(String name)
getAttributeDecl in interface XSSchemapublic Iterator<XSAttributeDecl> iterateAttributeDecls()
iterateAttributeDecls in interface XSSchemapublic void addElementDecl(XSElementDecl newDecl)
public Map<String,XSElementDecl> getElementDecls()
XSSchemaXSElementDecls in this schema.
getElementDecls in interface XSSchemapublic XSElementDecl getElementDecl(String name)
getElementDecl in interface XSSchemapublic Iterator<XSElementDecl> iterateElementDecls()
iterateElementDecls in interface XSSchema
public void addAttGroupDecl(XSAttGroupDecl newDecl,
boolean overwrite)
public Map<String,XSAttGroupDecl> getAttGroupDecls()
XSSchemaXSAttGroupDecls in this schema.
getAttGroupDecls in interface XSSchemapublic XSAttGroupDecl getAttGroupDecl(String name)
getAttGroupDecl in interface XSSchemapublic Iterator<XSAttGroupDecl> iterateAttGroupDecls()
iterateAttGroupDecls in interface XSSchemapublic void addNotation(XSNotation newDecl)
public Map<String,XSNotation> getNotations()
XSSchemaXSNotations in this schema.
getNotations in interface XSSchemapublic XSNotation getNotation(String name)
getNotation in interface XSSchemapublic Iterator<XSNotation> iterateNotations()
iterateNotations in interface XSSchema
public void addModelGroupDecl(XSModelGroupDecl newDecl,
boolean overwrite)
public Map<String,XSModelGroupDecl> getModelGroupDecls()
XSSchemaXSModelGroupDecls in this schema.
getModelGroupDecls in interface XSSchemapublic XSModelGroupDecl getModelGroupDecl(String name)
getModelGroupDecl in interface XSSchemapublic Iterator<XSModelGroupDecl> iterateModelGroupDecls()
iterateModelGroupDecls in interface XSSchemaprotected void addIdentityConstraint(IdentityConstraintImpl c)
public Map<String,XSIdentityConstraint> getIdentityConstraints()
XSSchemaXSIdentityConstraints in this schema,
keyed by their names.
getIdentityConstraints in interface XSSchemapublic XSIdentityConstraint getIdentityConstraint(String localName)
XSSchema
getIdentityConstraint in interface XSSchema
public void addSimpleType(XSSimpleType newDecl,
boolean overwrite)
public Map<String,XSSimpleType> getSimpleTypes()
XSSchemaXSSimpleTypes in this schema.
getSimpleTypes in interface XSSchemapublic XSSimpleType getSimpleType(String name)
getSimpleType in interface XSSchemapublic Iterator<XSSimpleType> iterateSimpleTypes()
iterateSimpleTypes in interface XSSchema
public void addComplexType(XSComplexType newDecl,
boolean overwrite)
public Map<String,XSComplexType> getComplexTypes()
XSSchemaXSComplexTypes in this schema.
getComplexTypes in interface XSSchemapublic XSComplexType getComplexType(String name)
getComplexType in interface XSSchemapublic Iterator<XSComplexType> iterateComplexTypes()
iterateComplexTypes in interface XSSchemapublic Map<String,XSType> getTypes()
XSSchemaXSTypes in this schema (union of
XSSchema.getSimpleTypes() and XSSchema.getComplexTypes()
getTypes in interface XSSchemapublic XSType getType(String name)
getType in interface XSSchemapublic Iterator<XSType> iterateTypes()
iterateTypes in interface XSSchemapublic void visit(XSVisitor visitor)
XSComponent
visit in interface XSComponentpublic Object apply(XSFunction function)
XSComponent
apply in interface XSComponentpublic void addForeignAttributes(ForeignAttributesImpl fa)
public List<ForeignAttributes> getForeignAttributes()
XSComponentIn general, a schema component may match multiple elements in a schema document, and those elements can individually carry foreign attributes.
This method returns a list of ForeignAttributes, where
each ForeignAttributes object represent foreign attributes
on one element.
getForeignAttributes in interface XSComponent
public String getForeignAttribute(String nsUri,
String localName)
XSComponentIf multiple occurences of the same attribute is found, this method returns the first one.
getForeignAttribute in interface XSComponentXSComponent.getForeignAttributes()
public Collection<XSComponent> select(String scd,
NamespaceContext nsContext)
XSComponent
select in interface XSComponentscd - Schema component designator. See SCD for more details.nsContext - The namespace context in which SCD is evaluated. Cannot be null.
public XSComponent selectSingle(String scd,
NamespaceContext nsContext)
XSComponent
selectSingle in interface XSComponentscd - Schema component designator. See SCD for more details.nsContext - The namespace context in which SCD is evaluated. Cannot be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||