Top Description Inners Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.xs.identity

public Class Selector

extends Object
Class Inheritance
Imports
com.sun.org.apache.xerces.internal.impl.xpath.XPathException, com.sun.org.apache.xerces.internal.util.SymbolTable, .XMLChar, com.sun.org.apache.xerces.internal.xni.NamespaceContext, .QName, .XMLAttributes, com.sun.org.apache.xerces.internal.xs.ShortList, .XSTypeDefinition

Schema identity constraint selector.
Author
Andy Clark, IBM

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class
Selector.Matcher

Selector matcher.

public static class
Selector.XPath

Schema identity constraint selector XPath expression.

Field Summary

Modifier and TypeField and Description
protected IdentityConstraint
protected final IdentityConstraint
fIdentityConstraint

Identity constraint.

protected final Selector.XPath
fXPath

XPath.

Constructor Summary

AccessConstructor and Description
public
Selector(Selector.XPath xpath, IdentityConstraint identityConstraint)

Constructs a selector.

Method Summary

Modifier and TypeMethod and Description
public XPathMatcher
createMatcher(FieldActivator
The activator for this selector's fields.
activator
,
int
The depth in the document at which this matcher began its life; used in correctly handling recursive elements.
initialDepth
)

Creates a selector matcher.

public IdentityConstraint
getIDConstraint()

Returns the identity constraint.

public XPath
getXPath()

Returns the selector XPath.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

fIDConstraintback to summary
protected IdentityConstraint fIDConstraint
fIdentityConstraintback to summary
protected final IdentityConstraint fIdentityConstraint

Identity constraint.

fXPathback to summary
protected final Selector.XPath fXPath

XPath.

Constructor Detail

Selectorback to summary
public Selector(Selector.XPath xpath, IdentityConstraint identityConstraint)

Constructs a selector.

Method Detail

createMatcherback to summary
public XPathMatcher createMatcher(FieldActivator activator, int initialDepth)

Creates a selector matcher.

Parameters
activator:FieldActivator

The activator for this selector's fields.

initialDepth:int

The depth in the document at which this matcher began its life; used in correctly handling recursive elements.

getIDConstraintback to summary
public IdentityConstraint getIDConstraint()

Returns the identity constraint.

getXPathback to summary
public XPath getXPath()

Returns the selector XPath.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this object.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

com.sun.org.apache.xerces.internal.impl.xs.identity back to summary

public Class Selector.Matcher

extends XPathMatcher
Class Inheritance

Selector matcher.
Author
Andy Clark, IBM

Field Summary

Modifier and TypeField and Description
protected int
fElementDepth

Element depth.

protected final FieldActivator
fFieldActivator

Field activator.

protected final int
fInitialDepth

Initial depth in the document at which this matcher was created.

protected int
fMatchedDepth

Depth at match.

Inherited from com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher:
DEBUG_ALLDEBUG_ANYDEBUG_MATCHDEBUG_METHODSDEBUG_METHODS2DEBUG_METHODS3DEBUG_STACKfMatchedStringfQNameMATCHEDMATCHED_ATTRIBUTEMATCHED_DESCENDANTMATCHED_DESCENDANT_PREVIOUS

Constructor Summary

AccessConstructor and Description
public
Matcher(Selector.XPath xpath, FieldActivator activator, int initialDepth)

Constructs a selector matcher.

Method Summary

Modifier and TypeMethod and Description
public void
endElement(QName
name of the element.
element
,
XSTypeDefinition
content type of this element. IOW, the XML schema type of the value. Note that this may not be the type declared in the element declaration, but it is "the actual type". For example, if the XML is <foo xsi:type="xs:string">aaa</foo>, this parameter will be "xs:string".
type
,
boolean
- nillable true if the element declaration is nillable.
nillable
,
Object
- actual value the typed value of the content of this element.
actualValue
,
short valueType, ShortList itemValueType)

Overrides com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher.endElement.

public IdentityConstraint
getIdentityConstraint()

Returns the identity constraint.

public int
getInitialDepth()

get the initial depth at which this selector matched.

public void
public void
startElement(QName
The name of the element.
element
,
XMLAttributes
The element attributes.
attributes
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher.startElement.

The start of an element.

Inherited from com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher:
handleContentisMatchedmatchedtoString

Field Detail

fElementDepthback to summary
protected int fElementDepth

Element depth.

fFieldActivatorback to summary
protected final FieldActivator fFieldActivator

Field activator.

fInitialDepthback to summary
protected final int fInitialDepth

Initial depth in the document at which this matcher was created.

fMatchedDepthback to summary
protected int fMatchedDepth

Depth at match.

Constructor Detail

Matcherback to summary
public Matcher(Selector.XPath xpath, FieldActivator activator, int initialDepth)

Constructs a selector matcher.

Method Detail

endElementback to summary
public void endElement(QName element, XSTypeDefinition type, boolean nillable, Object actualValue, short valueType, ShortList itemValueType)

Overrides com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher.endElement.

Parameters
element:QName

Doc from com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher.endElement.

name of the element.

type:XSTypeDefinition

Doc from com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher.endElement.

content type of this element. IOW, the XML schema type of the value. Note that this may not be the type declared in the element declaration, but it is "the actual type". For example, if the XML is <foo xsi:type="xs:string">aaa</foo>, this parameter will be "xs:string".

nillable:boolean

Doc from com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher.endElement.

- nillable true if the element declaration is nillable.

actualValue:Object

Doc from com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher.endElement.

- actual value the typed value of the content of this element.

getIdentityConstraintback to summary
public IdentityConstraint getIdentityConstraint()

Returns the identity constraint.

getInitialDepthback to summary
public int getInitialDepth()

get the initial depth at which this selector matched.

startDocumentFragmentback to summary
public void startDocumentFragment()

Overrides com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher.startDocumentFragment.

Doc from com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher.startDocumentFragment.

The start of the document fragment.

startElementback to summary
public void startElement(QName element, XMLAttributes attributes)

Overrides com.sun.org.apache.xerces.internal.impl.xs.identity.XPathMatcher.startElement.

The start of an element. If the document specifies the start element by using an empty tag, then the startElement method will immediately be followed by the endElement method, with no intervening methods.

Parameters
element:QName

The name of the element.

attributes:XMLAttributes

The element attributes.

com.sun.org.apache.xerces.internal.impl.xs.identity back to summary

public Class Selector.XPath

extends XPath
Class Inheritance

Schema identity constraint selector XPath expression.
Author
Andy Clark, IBM

Field Summary

Inherited from com.sun.org.apache.xerces.internal.impl.xpath.XPath:
fExpressionfLocationPathsfSymbolTable

Constructor Summary

AccessConstructor and Description
public
XPath(String xpath, SymbolTable symbolTable, NamespaceContext context)

Constructs a selector XPath expression.

Method Summary

Modifier and TypeMethod and Description
private static String
Inherited from com.sun.org.apache.xerces.internal.impl.xpath.XPath:
getLocationPathgetLocationPathsmaintoString

Constructor Detail

XPathback to summary
public XPath(String xpath, SymbolTable symbolTable, NamespaceContext context) throws XPathException

Constructs a selector XPath expression.

Method Detail

normalizeback to summary
private static String normalize(String xpath)