Top Description Inners Fields Constructors Methods
org.apache.xerces.impl.xs

public Class SubstitutionGroupHandler

extends Object
Class Inheritance
Imports
java.util.Hashtable, .Vector, org.apache.xerces.xni.QName, org.apache.xerces.xs.XSConstants, .XSObjectList, .XSSimpleTypeDefinition, .XSTypeDefinition

To store and validate information about substitutionGroup
Author
Sandy Gao, IBM
Version
$Id: SubstitutionGroupHandler.java 982466 2010-08-05 04:41:01Z mrglavas $

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final XSElementDecl[]
private static final SubstitutionGroupHandler.OneSubGroup[]
pack-priv Hashtable<K, V>
pack-priv Hashtable<K, V>
private final XSElementDeclHelper

Constructor Summary

AccessConstructor and Description
public
SubstitutionGroupHandler(XSElementDeclHelper elementDeclHelper)

Default constructor

Method Summary

Modifier and TypeMethod and Description
public void
addSubstitutionGroup(XSElementDecl[] elements)

add a list of substitution group information.

private boolean
public XSElementDecl
private SubstitutionGroupHandler.OneSubGroup[]
public XSElementDecl[]
getSubstitutionGroup(XSElementDecl element)

get all elements that can substitute the given element, according to the spec, we shouldn't consider the {block} constraints.

public boolean
public void
reset()

clear the internal registry of substitutionGroup information

protected boolean
substitutionGroupOK(XSElementDecl element, XSElementDecl exemplar, short blockingConstraint)

private boolean
typeDerivationOK(XSTypeDefinition derived, XSTypeDefinition base, short blockingConstraint)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_GROUPback to summary
private static final XSElementDecl[] EMPTY_GROUP
EMPTY_VECTORback to summary
private static final SubstitutionGroupHandler.OneSubGroup[] EMPTY_VECTOR
fSubGroupsback to summary
pack-priv Hashtable<K, V> fSubGroups
fSubGroupsBback to summary
pack-priv Hashtable<K, V> fSubGroupsB
fXSElementDeclHelperback to summary
private final XSElementDeclHelper fXSElementDeclHelper

Constructor Detail

SubstitutionGroupHandlerback to summary
public SubstitutionGroupHandler(XSElementDeclHelper elementDeclHelper)

Default constructor

Method Detail

addSubstitutionGroupback to summary
public void addSubstitutionGroup(XSElementDecl[] elements)

add a list of substitution group information.

getDBMethodsback to summary
private boolean getDBMethods(XSTypeDefinition typed, XSTypeDefinition typeb, SubstitutionGroupHandler.OneSubGroup methods)
getMatchingElemDeclback to summary
public XSElementDecl getMatchingElemDecl(QName element, XSElementDecl exemplar)
getSubGroupBback to summary
private SubstitutionGroupHandler.OneSubGroup[] getSubGroupB(XSElementDecl element, SubstitutionGroupHandler.OneSubGroup methods)
getSubstitutionGroupback to summary
public XSElementDecl[] getSubstitutionGroup(XSElementDecl element)

get all elements that can substitute the given element, according to the spec, we shouldn't consider the {block} constraints. from the spec, substitution group of a given element decl also contains the element itself. but the array returned from this method doesn't containt this element.

inSubstitutionGroupback to summary
public boolean inSubstitutionGroup(XSElementDecl element, XSElementDecl exemplar)
resetback to summary
public void reset()

clear the internal registry of substitutionGroup information

substitutionGroupOKback to summary
protected boolean substitutionGroupOK(XSElementDecl element, XSElementDecl exemplar, short blockingConstraint)
typeDerivationOKback to summary
private boolean typeDerivationOK(XSTypeDefinition derived, XSTypeDefinition base, short blockingConstraint)
org.apache.xerces.impl.xs back to summary

private final Class SubstitutionGroupHandler.OneSubGroup

extends Object
Class Inheritance
  • java.lang.Object
  • org.apache.xerces.impl.xs.SubstitutionGroupHandler.OneSubGroup

Field Summary

Modifier and TypeField and Description
pack-priv short
pack-priv short
pack-priv XSElementDecl

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
OneSubGroup(XSElementDecl sub, short dMethod, short bMethod)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bMethodback to summary
pack-priv short bMethod
dMethodback to summary
pack-priv short dMethod
subback to summary
pack-priv XSElementDecl sub

Constructor Detail

OneSubGroupback to summary
pack-priv OneSubGroup()
OneSubGroupback to summary
pack-priv OneSubGroup(XSElementDecl sub, short dMethod, short bMethod)