com.saxonica.schema
Class ElementWildcard
java.lang.Object
   com.saxonica.schema.SchemaStructure
com.saxonica.schema.SchemaStructure
       com.saxonica.schema.SimpleComponentReference
com.saxonica.schema.SimpleComponentReference
           com.saxonica.schema.Particle
com.saxonica.schema.Particle
               com.saxonica.schema.ElementWildcard
com.saxonica.schema.ElementWildcard
- All Implemented Interfaces: 
- ComponentReference, Serializable, SourceLocator, SchemaComponent
- public class ElementWildcard 
- extends Particle
This class represents an  element in the schema.
- See Also:
- Serialized Form
 
 
 
 
| Method Summary | 
|  void | compile(SchemaCompiler compiler)Compile a particle
 | 
|  boolean | fixup(SchemaCompiler compiler)Check references from this component to other components
 | 
|  void | gatherAllPermittedElements(IntHashSet result,
                           boolean ignoreWildcards)Find the set of all element particles allowed within the content model of this particle, identified
 by their integer fingerprints.
 | 
|  int | getElementParticleCardinality(int fingerprint)Find an element particle within this complex type definition having a given element name
 (identified by fingerprint), and return the cardinality associated with that element particle,
 that is, the number of times the element can occur within this complex type.
 | 
|  SchemaType | getElementParticleType(int fingerprint)Find an element particle within this complex type definition having a given element name
 (identified by fingerprint), and return the schema type associated with that element particle.
 | 
|  Term | getTerm()Get the term represented by this particle
 | 
|  Wildcard | getWildcard()
 | 
|  boolean | isEmptiable()Determine if this particle can be empty
 | 
|  boolean | isPointless(ModelGroup container)Test whether the particle is pointless, as described in XML Schema Part 1
 Schema Component Constraint: Particle Valid (Restriction)
 | 
|  void | serializeParticle(SchemaModelSerializer serializer)Serialize the particle
 | 
|  void | setWildcard(Wildcard wildcard)
 | 
|  boolean | validate(SchemaCompiler compiler)Check the validity (consistency) of this element wildcard definition.
 | 
 
 
 
| Methods inherited from class com.saxonica.schema.SchemaStructure | 
| elaborate, getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getSystemId, getValidationStatus, lookForCycles, setConfiguration, setFixupStatus, setLineNumber, setLocator, setSystemId, setValidationStatus | 
 
 
 
 
 
ElementWildcard
public ElementWildcard()
ElementWildcard
public ElementWildcard(Wildcard wc)
setWildcard
public void setWildcard(Wildcard wildcard)
- 
 
getWildcard
public Wildcard getWildcard()
- 
 
isEmptiable
public boolean isEmptiable()
- Determine if this particle can be empty
 
- 
- Specified by:
- isEmptiablein class- Particle
 
- 
 
isPointless
public boolean isPointless(ModelGroup container)
- Test whether the particle is pointless, as described in XML Schema Part 1
 Schema Component Constraint: Particle Valid (Restriction)
 
- 
- Specified by:
- isPointlessin class- Particle
 
- 
 
getTerm
public Term getTerm()
- Get the term represented by this particle
 
- 
- Specified by:
- getTermin class- Particle
 
- 
- Returns:
- the corresponding term
 
fixup
public boolean fixup(SchemaCompiler compiler)
              throws SchemaException
- Check references from this component to other components
 
- 
- Specified by:
- fixupin class- Particle
 
- 
- Parameters:
- compiler-
- Returns:
- true if all is well, false if errors found
- Throws:
- SchemaException
 
compile
public void compile(SchemaCompiler compiler)
             throws SchemaException
- Description copied from class: Particle
- Compile a particle
 
- 
- Specified by:
- compilein class- Particle
 
- 
- Throws:
- SchemaException
 
getElementParticleType
public SchemaType getElementParticleType(int fingerprint)
- Find an element particle within this complex type definition having a given element name
 (identified by fingerprint), and return the schema type associated with that element particle.
 If there is no such particle, return null. If the fingerprint matches an element wildcard,
 return the type of the global element declaration with the given name if one exists, or AnyType
 if none exists and lax validation is permitted by the wildcard.
 
- 
- Specified by:
- getElementParticleTypein class- Particle
 
- 
- Parameters:
- fingerprint- Identifies the name of the child element within this content model
 
getElementParticleCardinality
public int getElementParticleCardinality(int fingerprint)
- Find an element particle within this complex type definition having a given element name
 (identified by fingerprint), and return the cardinality associated with that element particle,
 that is, the number of times the element can occur within this complex type. The value is one of
 StaticProperty.EXACTLY_ONE,StaticProperty.ALLOWS_ZERO_OR_ONE,StaticProperty.ALLOWS_ZERO_OR_MORE,StaticProperty.ALLOWS_ONE_OR_MORE,
 If there is no such particle, return zero.
 
- 
- Specified by:
- getElementParticleCardinalityin class- Particle
 
- 
- Parameters:
- fingerprint- Identifies the name of the child element within this content model
 
gatherAllPermittedElements
public void gatherAllPermittedElements(IntHashSet result,
                                       boolean ignoreWildcards)
                                throws SchemaException
- Find the set of all element particles allowed within the content model of this particle, identified
 by their integer fingerprints. Ignore wildcards.
 
- 
- Specified by:
- gatherAllPermittedElementsin class- Particle
 
- 
- Parameters:
- result- an initially-empty integer set in which the results are accumulated
- ignoreWildcards-
- Throws:
- SchemaException
 
validate
public boolean validate(SchemaCompiler compiler)
                 throws SchemaException
- Check the validity (consistency) of this element wildcard definition.
 
- 
- Specified by:
- validatein class- Particle
 
- 
- Parameters:
- compiler-
- Returns:
- true if validation succeeded, false if errors were found.
- Throws:
- SchemaException- if an error is found and the
 error listener decides that the error is fatal
 
serializeParticle
public void serializeParticle(SchemaModelSerializer serializer)
                       throws XPathException
- Serialize the particle
 
- 
- Specified by:
- serializeParticlein class- Particle
 
- 
- Throws:
- XPathException
 
Copyright (C) Michael H. Kay. All rights reserved.