Package com.sun.xml.xsom.impl
Class ParticleImpl
- java.lang.Object
-
- com.sun.xml.xsom.impl.ComponentImpl
-
- com.sun.xml.xsom.impl.ParticleImpl
-
- All Implemented Interfaces:
ContentTypeImpl,Ref.ContentType,XSComponent,XSContentType,XSParticle
public class ParticleImpl extends ComponentImpl implements XSParticle, ContentTypeImpl
-
-
Field Summary
-
Fields inherited from class com.sun.xml.xsom.impl.ComponentImpl
ownerDocument
-
Fields inherited from interface com.sun.xml.xsom.XSParticle
UNBOUNDED
-
-
Constructor Summary
Constructors Constructor Description ParticleImpl(SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, Locator _loc)ParticleImpl(SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, Locator _loc, int _maxOccurs, int _minOccurs)ParticleImpl(SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, Locator _loc, BigInteger _maxOccurs, BigInteger _minOccurs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectapply(XSContentTypeFunction function)Objectapply(XSFunction function)Accepts a functor.XSContentTypeasEmpty()If this content type represents the empty content, returnthis, otherwise null.XSParticleasParticle()Equivalent of(this instanceof XSParticle)?this:nullXSSimpleTypeasSimpleType()Equivalent of(this instanceof XSSimpleType)?this:nullXSContentTypegetContentType()ListgetForeignAttributes()Foreign attribuets are considered to be on terms.BigIntegergetMaxOccurs()Gets the max occurs property.BigIntegergetMinOccurs()XSTermgetTerm()booleanisRepeated()True if the maxOccurs is neither 0 or 1.voidredefine(ModelGroupDeclImpl oldMG)voidvisit(XSContentTypeVisitor visitor)voidvisit(XSVisitor visitor)Accepts a visitor.-
Methods inherited from class com.sun.xml.xsom.impl.ComponentImpl
getAnnotation, getAnnotation, getForeignAttribute, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sun.xml.xsom.XSComponent
getAnnotation, getAnnotation, getForeignAttribute, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle
-
-
-
-
Constructor Detail
-
ParticleImpl
public ParticleImpl(SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, Locator _loc, BigInteger _maxOccurs, BigInteger _minOccurs)
-
ParticleImpl
public ParticleImpl(SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, Locator _loc, int _maxOccurs, int _minOccurs)
-
ParticleImpl
public ParticleImpl(SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, Locator _loc)
-
-
Method Detail
-
getTerm
public XSTerm getTerm()
- Specified by:
getTermin interfaceXSParticle
-
getMaxOccurs
public BigInteger getMaxOccurs()
Description copied from interface:XSParticleGets the max occurs property.- Specified by:
getMaxOccursin interfaceXSParticle- Returns:
XSParticle.UNBOUNDEDwill be returned if the value is "unbounded".
-
isRepeated
public boolean isRepeated()
Description copied from interface:XSParticleTrue if the maxOccurs is neither 0 or 1.- Specified by:
isRepeatedin interfaceXSParticle
-
getMinOccurs
public BigInteger getMinOccurs()
- Specified by:
getMinOccursin interfaceXSParticle
-
redefine
public void redefine(ModelGroupDeclImpl oldMG)
-
asSimpleType
public XSSimpleType asSimpleType()
Description copied from interface:XSContentTypeEquivalent of(this instanceof XSSimpleType)?this:null- Specified by:
asSimpleTypein interfaceXSContentType
-
asParticle
public XSParticle asParticle()
Description copied from interface:XSContentTypeEquivalent of(this instanceof XSParticle)?this:null- Specified by:
asParticlein interfaceXSContentType
-
asEmpty
public XSContentType asEmpty()
Description copied from interface:XSContentTypeIf this content type represents the empty content, returnthis, otherwise null.- Specified by:
asEmptyin interfaceXSContentType
-
apply
public final Object apply(XSFunction function)
Description copied from interface:XSComponentAccepts a functor.- Specified by:
applyin interfaceXSComponent
-
apply
public final Object apply(XSContentTypeFunction function)
- Specified by:
applyin interfaceXSContentType
-
visit
public final void visit(XSVisitor visitor)
Description copied from interface:XSComponentAccepts a visitor.- Specified by:
visitin interfaceXSComponent
-
visit
public final void visit(XSContentTypeVisitor visitor)
- Specified by:
visitin interfaceXSContentType
-
getContentType
public XSContentType getContentType()
- Specified by:
getContentTypein interfaceRef.ContentType
-
getForeignAttributes
public List getForeignAttributes()
Foreign attribuets are considered to be on terms. REVISIT: is this a good design?- Specified by:
getForeignAttributesin interfaceXSComponent- Overrides:
getForeignAttributesin classComponentImpl- Returns:
- can be an empty list but never be null.
-
-