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, org.xml.sax.Locator _loc)
ParticleImpl(SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, org.xml.sax.Locator _loc, int _maxOccurs, int _minOccurs)
ParticleImpl(SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, org.xml.sax.Locator _loc, java.math.BigInteger _maxOccurs, java.math.BigInteger _minOccurs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
apply(XSContentTypeFunction function)
java.lang.Object
apply(XSFunction function)
Accepts a functor.XSContentType
asEmpty()
If this content type represents the empty content, returnthis
, otherwise null.XSParticle
asParticle()
Equivalent of(this instanceof XSParticle)?this:null
XSSimpleType
asSimpleType()
Equivalent of(this instanceof XSSimpleType)?this:null
XSContentType
getContentType()
java.util.List
getForeignAttributes()
Foreign attribuets are considered to be on terms.java.math.BigInteger
getMaxOccurs()
Gets the max occurs property.java.math.BigInteger
getMinOccurs()
XSTerm
getTerm()
boolean
isRepeated()
True if the maxOccurs is neither 0 or 1.void
redefine(ModelGroupDeclImpl oldMG)
void
visit(XSContentTypeVisitor visitor)
void
visit(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, org.xml.sax.Locator _loc, java.math.BigInteger _maxOccurs, java.math.BigInteger _minOccurs)
-
ParticleImpl
public ParticleImpl(SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, org.xml.sax.Locator _loc, int _maxOccurs, int _minOccurs)
-
ParticleImpl
public ParticleImpl(SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, org.xml.sax.Locator _loc)
-
-
Method Detail
-
getTerm
public XSTerm getTerm()
- Specified by:
getTerm
in interfaceXSParticle
-
getMaxOccurs
public java.math.BigInteger getMaxOccurs()
Description copied from interface:XSParticle
Gets the max occurs property.- Specified by:
getMaxOccurs
in interfaceXSParticle
- Returns:
XSParticle.UNBOUNDED
will be returned if the value is "unbounded".
-
isRepeated
public boolean isRepeated()
Description copied from interface:XSParticle
True if the maxOccurs is neither 0 or 1.- Specified by:
isRepeated
in interfaceXSParticle
-
getMinOccurs
public java.math.BigInteger getMinOccurs()
- Specified by:
getMinOccurs
in interfaceXSParticle
-
redefine
public void redefine(ModelGroupDeclImpl oldMG)
-
asSimpleType
public XSSimpleType asSimpleType()
Description copied from interface:XSContentType
Equivalent of(this instanceof XSSimpleType)?this:null
- Specified by:
asSimpleType
in interfaceXSContentType
-
asParticle
public XSParticle asParticle()
Description copied from interface:XSContentType
Equivalent of(this instanceof XSParticle)?this:null
- Specified by:
asParticle
in interfaceXSContentType
-
asEmpty
public XSContentType asEmpty()
Description copied from interface:XSContentType
If this content type represents the empty content, returnthis
, otherwise null.- Specified by:
asEmpty
in interfaceXSContentType
-
apply
public final java.lang.Object apply(XSFunction function)
Description copied from interface:XSComponent
Accepts a functor.- Specified by:
apply
in interfaceXSComponent
-
apply
public final java.lang.Object apply(XSContentTypeFunction function)
- Specified by:
apply
in interfaceXSContentType
-
visit
public final void visit(XSVisitor visitor)
Description copied from interface:XSComponent
Accepts a visitor.- Specified by:
visit
in interfaceXSComponent
-
visit
public final void visit(XSContentTypeVisitor visitor)
- Specified by:
visit
in interfaceXSContentType
-
getContentType
public XSContentType getContentType()
- Specified by:
getContentType
in interfaceRef.ContentType
-
getForeignAttributes
public java.util.List getForeignAttributes()
Foreign attribuets are considered to be on terms. REVISIT: is this a good design?- Specified by:
getForeignAttributes
in interfaceXSComponent
- Overrides:
getForeignAttributes
in classComponentImpl
- Returns:
- can be an empty list but never be null.
-
-