|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.inria.ns.reflex.processor.core.AbstractAction
org.inria.ns.reflex.processor.asl.AbstractStepAction
org.inria.ns.reflex.processor.asl.types.TypeAction
public class TypeAction
TypeAction defines a data type
exposed with the <asl:type> element.
A type definition may be named or anonymous.
A type definition may be based on another type.
At runtime, a type matcher backed by this type is feeding the context.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.inria.ns.reflex.processor.asl.AbstractStepAction |
|---|
AbstractStepAction.ItemsLists |
| Nested classes/interfaces inherited from class org.inria.ns.reflex.processor.core.AbstractAction |
|---|
AbstractAction.ParameterAdapter, AbstractAction.UselessAction |
| Field Summary |
|---|
| Fields inherited from class org.inria.ns.reflex.processor.asl.AbstractStepAction |
|---|
STEP_USED_BUBBLE_MESSAGE |
| Fields inherited from class org.inria.ns.reflex.processor.core.AbstractAction |
|---|
actions, parent, processorInstance |
| Constructor Summary | |
|---|---|
TypeAction(QName name,
QName base,
Expression init,
int ws,
QName compareWith,
QName parseWith,
Element element,
AbstractAction parent)
Creates a new instance of TypeAction. |
|
| Method Summary | |
|---|---|
CompositeData |
addToDataModel(TypedData typedData,
QName name,
Object value)
|
TypedData |
cast(Object o,
XPathContext ctxt)
Cast an object to a typed data of this type. |
TypedData |
cast(Object o,
XPathContext ctxt,
boolean useParseWith)
Cast an object to a typed data of this type. |
Comparator |
getComparator()
Return the comparator. |
Schema |
getOwnerSchema()
The schema instance that owns this definition. |
QName |
getParentType()
Return either the base type if defined or xs:anySimpleType |
QName |
getTypeName()
Return the name of this type. |
TypedData |
parse(TextCandidate tc,
XPathContext ctxt)
Parses a string to a data of this type. |
void |
runAction(DataSet dataSet)
Feeds the context with this type. |
static AbstractAction |
unmarshal(AbstractAction parent,
Element element)
XML unmarshaller for TypeAction. |
| Methods inherited from class org.inria.ns.reflex.processor.asl.AbstractStepAction |
|---|
computeOccurs, getId, getMaxOccurs, getMinOccurs, invokeHandler, stableRun, unstableRun |
| Methods inherited from class org.inria.ns.reflex.processor.core.AbstractAction |
|---|
addAction, addFallbackAction, createContext, getCanonicalPath, getFallbackAction, getLocalFallbackAction, getLogger, getNamespaceContext, getNode, getParent, recover, recover, removeFallbackAction, reorganize, run, runActions, toPrettyString, toPrettyString, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TypeAction(QName name,
QName base,
Expression init,
int ws,
QName compareWith,
QName parseWith,
Element element,
AbstractAction parent)
TypeAction.
name - The name of the type, that can be null if the type is anonymous.base - The type on which this type is based.init - Used to initialize the typed data.ws - Indicates how to process whitespace : -1=unspecified, 0=preserve (default), 1=replace, 2=collapsecompareWith - The XPath function used for comparison.parseWith - The XPath function used for casting.element - The element from which the action has been unmarshalled. Used
for namespace prefix resolution when performing XPath
expressions.parent - The action depending from.| Method Detail |
|---|
public static AbstractAction unmarshal(AbstractAction parent,
Element element)
throws XMLException
TypeAction.
parent - The action depending from.element - The XML element to unmarshall.
TypeAction created.
UnmarshalException - When the element and its content is not those expected.
XMLException
public void runAction(DataSet dataSet)
throws ExecutionException,
XPathException
runAction in class AbstractStepActiondataSet - The set of datas used when the action is running.
ExecutionException - If the action can't be performed.
XPathException
public TypedData parse(TextCandidate tc,
XPathContext ctxt)
throws TypeFormatException
parse in interface Typetc - The string to parse, as a text candidate.ctxt - The context uses a variable resolver that can supply the
data set and the schema client handler, and used to
store the $asl:data property while parsing.
TypeFormatException - If the string is not of this type.org.inria.ns.reflex.processor.asl.types.Type#parse(String, XPathContext)
public CompositeData addToDataModel(TypedData typedData,
QName name,
Object value)
public TypedData cast(Object o,
XPathContext ctxt)
throws TypeFormatException
cast in interface Typeo - The object to cast.ctxt - The XPath context used to perform the cast.
TypeFormatException - When the input object is not of the type
expected.Type.cast(Object, XPathContext)
public TypedData cast(Object o,
XPathContext ctxt,
boolean useParseWith)
throws TypeFormatException
o - The object to cast.ctxt - The XPath context used to perform the cast.useParseWith - true indicates to use the XPath function
given by the @parse-with attribute, false otherwise.
TypeFormatExceptionType.cast(Object, XPathContext)public QName getTypeName()
getTypeName in interface NamedTypeNamedType.getTypeName()public Schema getOwnerSchema()
getOwnerSchema in interface Typepublic Comparator getComparator()
getComparator in interface Typenull comparator
that may comparate datas of this type.Type.getComparator()public QName getParentType()
getParentType in interface TypeThe - parent type.
null type name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||