Top Fields Constructors Methods
com.sun.xml.xsom.impl

public abstract Class ComponentImpl

extends Object
implements XSComponent
Class Inheritance
All Implemented Interfaces
com.sun.xml.xsom.XSComponent
Known Direct Subclasses
com.sun.xml.xsom.impl.DeclarationImpl, com.sun.xml.xsom.impl.EmptyImpl, com.sun.xml.xsom.impl.FacetImpl, com.sun.xml.xsom.impl.IdentityConstraintImpl, com.sun.xml.xsom.impl.ModelGroupImpl, com.sun.xml.xsom.impl.ParticleImpl, com.sun.xml.xsom.impl.WildcardImpl, com.sun.xml.xsom.impl.XPathImpl, com.sun.xml.xsom.impl.AttributeUseImpl
Imports
com.sun.xml.xsom.SCD, .XSAnnotation, .XSComponent, .XSSchemaSet, com.sun.xml.xsom.util.ComponentNameFunction, com.sun.xml.xsom.impl.parser.SchemaDocumentImpl, com.sun.xml.xsom.parser.SchemaDocument, org.xml.sax.Locator, javax.xml.namespace.NamespaceContext, java.text.ParseException, java.util.ArrayList, .Collection, .Collections, .List

Field Summary

Modifier and TypeField and Description
private AnnotationImpl
private Object
private final Locator
protected final SchemaDocumentImpl

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private List<ForeignAttributesImpl>
public final XSAnnotation
getAnnotation()

Implements com.sun.xml.xsom.XSComponent.getAnnotation.

Gets the annotation associated to this component, if any.

public XSAnnotation
getAnnotation(boolean createIfNotExist)

Implements com.sun.xml.xsom.XSComponent.getAnnotation.

Works like getAnnotation(), but allow a new empty XSAnnotation to be created if not exist.

public String
getForeignAttribute(String nsUri, String localName)

Implements com.sun.xml.xsom.XSComponent.getForeignAttribute.

Gets the foreign attribute of the given name, or null if not found.

public List<ForeignAttributesImpl>
getForeignAttributes()

Implements com.sun.xml.xsom.XSComponent.getForeignAttributes.

Gets the foreign attributes on this schema component.

public final Locator
getLocator()

Implements com.sun.xml.xsom.XSComponent.getLocator.

Gets the locator that indicates the source location where this component is created from, or null if no information is available.

public SchemaImpl
getOwnerSchema()

Implements com.sun.xml.xsom.XSComponent.getOwnerSchema.

Gets a reference to the XSSchema object to which this component belongs.

public XSSchemaSet
getRoot()

Implements com.sun.xml.xsom.XSComponent.getRoot.

Gets the root schema set that includes this component.

public SchemaDocument
getSourceDocument()

Implements com.sun.xml.xsom.XSComponent.getSourceDocument.

Gets the SchemaDocument that indicates which document this component was defined in.

public Collection<XSComponent>
select(String scd, NamespaceContext nsContext)

Implements com.sun.xml.xsom.XSComponent.select.

Evaluates a schema component designator against this schema component and returns the resulting schema components.

public XSComponent
selectSingle(String scd, NamespaceContext nsContext)

Implements com.sun.xml.xsom.XSComponent.selectSingle.

Evaluates a schema component designator against this schema component and returns the first resulting schema component.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

annotationback to summary
private AnnotationImpl annotation
foreignAttributesback to summary
private Object foreignAttributes

Either ForeignAttributesImpl or List. Initially it's ForeignAttributesImpl, but it's lazily turned into a list when necessary.

locatorback to summary
private final Locator locator
ownerDocumentback to summary
protected final SchemaDocumentImpl ownerDocument

Constructor Detail

ComponentImplback to summary
protected ComponentImpl(SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa)

Method Detail

convertToListback to summary
private List<ForeignAttributesImpl> convertToList(ForeignAttributesImpl fa)
getAnnotationback to summary
public final XSAnnotation getAnnotation()

Implements com.sun.xml.xsom.XSComponent.getAnnotation.

Doc from com.sun.xml.xsom.XSComponent.getAnnotation.

Gets the annotation associated to this component, if any.

getAnnotationback to summary
public XSAnnotation getAnnotation(boolean createIfNotExist)

Implements com.sun.xml.xsom.XSComponent.getAnnotation.

Doc from com.sun.xml.xsom.XSComponent.getAnnotation.

Works like getAnnotation(), but allow a new empty XSAnnotation to be created if not exist.

getForeignAttributeback to summary
public String getForeignAttribute(String nsUri, String localName)

Implements com.sun.xml.xsom.XSComponent.getForeignAttribute.

Doc from com.sun.xml.xsom.XSComponent.getForeignAttribute.

Gets the foreign attribute of the given name, or null if not found.

If multiple occurrences of the same attribute is found, this method returns the first one.

getForeignAttributesback to summary
public List<ForeignAttributesImpl> getForeignAttributes()

Implements com.sun.xml.xsom.XSComponent.getForeignAttributes.

Doc from com.sun.xml.xsom.XSComponent.getForeignAttributes.

Gets the foreign attributes on this schema component.

In 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.

getLocatorback to summary
public final Locator getLocator()

Implements com.sun.xml.xsom.XSComponent.getLocator.

Doc from com.sun.xml.xsom.XSComponent.getLocator.

Gets the locator that indicates the source location where this component is created from, or null if no information is available.

getOwnerSchemaback to summary
public SchemaImpl getOwnerSchema()

Implements com.sun.xml.xsom.XSComponent.getOwnerSchema.

Doc from com.sun.xml.xsom.XSComponent.getOwnerSchema.

Gets a reference to the XSSchema object to which this component belongs.

In case of XSEmpty component, this method returns null since there is no owner component.

getRootback to summary
public XSSchemaSet getRoot()

Implements com.sun.xml.xsom.XSComponent.getRoot.

Doc from com.sun.xml.xsom.XSComponent.getRoot.

Gets the root schema set that includes this component.

In case of XSEmpty component, this method returns null since there is no owner component.

getSourceDocumentback to summary
public SchemaDocument getSourceDocument()

Implements com.sun.xml.xsom.XSComponent.getSourceDocument.

Doc from com.sun.xml.xsom.XSComponent.getSourceDocument.

Gets the SchemaDocument that indicates which document this component was defined in.

selectback to summary
public Collection<XSComponent> select(String scd, NamespaceContext nsContext)

Implements com.sun.xml.xsom.XSComponent.select.

Doc from com.sun.xml.xsom.XSComponent.select.

Evaluates a schema component designator against this schema component and returns the resulting schema components.

selectSingleback to summary
public XSComponent selectSingle(String scd, NamespaceContext nsContext)

Implements com.sun.xml.xsom.XSComponent.selectSingle.

Doc from com.sun.xml.xsom.XSComponent.selectSingle.

Evaluates a schema component designator against this schema component and returns the first resulting schema component.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override