Package net.sf.saxon.functions
Class Component
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.Component
- All Implemented Interfaces:
Serializable,SourceLocator,LocationProvider,SaxonLocator,EvaluableItem,SequenceIterable,InstructionInfo,Locator
This class supports the get_X_from_Y functions defined in XPath 2.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class net.sf.saxon.functions.SystemFunction
operationFields inherited from class net.sf.saxon.expr.FunctionCall
argumentFields inherited from class net.sf.saxon.expr.Expression
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Copy an expression.evaluateItem(XPathContext context) Evaluate the expressionintGet the required componentGet the required component name as a stringsimplify(ExpressionVisitor visitor) Simplify the function call.Methods inherited from class net.sf.saxon.functions.SystemFunction
addContextDocumentArgument, addDocToPathMap, checkArguments, computeCardinality, computeSpecialProperties, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, makeSystemFunction, optimize, setDetails, useContextItemAsDefaultMethods inherited from class net.sf.saxon.expr.FunctionCall
addExternalFunctionCallToPathMap, checkArgumentCount, equals, explain, getArguments, getDisplayName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionName, simplifyArguments, toString, typeCheckMethods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, findParentOf, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, iterate, iterateEvents, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeError
-
Field Details
-
YEAR
public static final int YEAR- See Also:
-
MONTH
public static final int MONTH- See Also:
-
DAY
public static final int DAY- See Also:
-
HOURS
public static final int HOURS- See Also:
-
MINUTES
public static final int MINUTES- See Also:
-
SECONDS
public static final int SECONDS- See Also:
-
TIMEZONE
public static final int TIMEZONE- See Also:
-
LOCALNAME
public static final int LOCALNAME- See Also:
-
NAMESPACE
public static final int NAMESPACE- See Also:
-
PREFIX
public static final int PREFIX- See Also:
-
MICROSECONDS
public static final int MICROSECONDS- See Also:
-
WHOLE_SECONDS
public static final int WHOLE_SECONDS- See Also:
-
YEAR_ALLOWING_ZERO
public static final int YEAR_ALLOWING_ZERO- See Also:
-
-
Constructor Details
-
Component
public Component()
-
-
Method Details
-
simplify
Description copied from class:FunctionCallSimplify the function call. Default method is to simplify each of the supplied arguments and evaluate the function if all are now known.- Overrides:
simplifyin classFunctionCall- Parameters:
visitor- an expression visitor- Returns:
- the simplified expression
- Throws:
XPathException- if an error is discovered during expression rewriting
-
getRequiredComponent
public int getRequiredComponent()Get the required component -
getRequiredComponentAsString
Get the required component name as a string -
evaluateItem
Evaluate the expression- Specified by:
evaluateItemin interfaceEvaluableItem- Overrides:
evaluateItemin classExpression- Parameters:
context- The context in which the expression is to be evaluated- Returns:
- the node or atomic value that results from evaluating the expression; or null to indicate that the result is an empty sequence
- Throws:
XPathException- if any dynamic error occurs evaluating the expression
-
copy
Copy an expression. This makes a deep copy.- Overrides:
copyin classSystemFunction- Returns:
- the copy of the original expression
-