Package net.sf.saxon.om
Interface Item
-
- All Superinterfaces:
GroundedValue
,Sequence
- All Known Subinterfaces:
AnyExternalObject
,FunctionItem
,MutableNodeInfo
,NodeInfo
,SiblingCountingNode
,SteppingNode
,VirtualNode
- All Known Implementing Classes:
Abs
,AbsentExtensionElement
,AbstractArrayItem
,AbstractFunction
,AbstractNodeWrapper
,AbstractVirtualNode
,AccessorFn
,AccessorFn.DayFromDate
,AccessorFn.DayFromDateTime
,AccessorFn.DaysFromDuration
,AccessorFn.HoursFromDateTime
,AccessorFn.HoursFromDuration
,AccessorFn.HoursFromTime
,AccessorFn.LocalNameFromQName
,AccessorFn.MinutesFromDateTime
,AccessorFn.MinutesFromDuration
,AccessorFn.MinutesFromTime
,AccessorFn.MonthFromDate
,AccessorFn.MonthFromDateTime
,AccessorFn.MonthsFromDuration
,AccessorFn.NamespaceUriFromQName
,AccessorFn.PrefixFromQName
,AccessorFn.SecondsFromDateTime
,AccessorFn.SecondsFromDuration
,AccessorFn.SecondsFromTime
,AccessorFn.TimezoneFromDate
,AccessorFn.TimezoneFromDateTime
,AccessorFn.TimezoneFromTime
,AccessorFn.YearFromDate
,AccessorFn.YearFromDateTime
,AccessorFn.YearsFromDuration
,AccumulatorFn
,AccumulatorFn.AccumulatorAfter
,AccumulatorFn.AccumulatorBefore
,Adjust_1
,Adjust_2
,Aggregate
,AllDifferent
,AllEqual
,AnalyzeStringFn
,AnalyzeUri
,AnnotationParent
,AnyURIValue
,ApplyFn
,ArrayFunctionSet.ArrayAppend
,ArrayFunctionSet.ArrayBuild
,ArrayFunctionSet.ArrayEmpty
,ArrayFunctionSet.ArrayExists
,ArrayFunctionSet.ArrayFilter
,ArrayFunctionSet.ArrayFlatten
,ArrayFunctionSet.ArrayFoldLeft
,ArrayFunctionSet.ArrayFoldRight
,ArrayFunctionSet.ArrayFoot
,ArrayFunctionSet.ArrayForEach
,ArrayFunctionSet.ArrayForEachPair
,ArrayFunctionSet.ArrayFromSequence
,ArrayFunctionSet.ArrayGeneratingFunction
,ArrayFunctionSet.ArrayGet
,ArrayFunctionSet.ArrayHead
,ArrayFunctionSet.ArrayIndexWhere
,ArrayFunctionSet.ArrayInsertBefore
,ArrayFunctionSet.ArrayJoin
,ArrayFunctionSet.ArrayMembers
,ArrayFunctionSet.ArrayOfMembers
,ArrayFunctionSet.ArrayPut
,ArrayFunctionSet.ArrayRemove
,ArrayFunctionSet.ArrayReplace
,ArrayFunctionSet.ArrayReverse
,ArrayFunctionSet.ArraySize
,ArrayFunctionSet.ArraySlice
,ArrayFunctionSet.ArraySplit
,ArrayFunctionSet.ArraySubarray
,ArrayFunctionSet.ArrayTail
,ArrayFunctionSet.ArrayToSequence
,ArrayFunctionSet.ArrayTrunk
,ArrayItem
,ArraySort
,AtomicConstructorFunction
,AtomicEqual
,AtomicValue
,AttributeImpl
,AvailableEnvironmentVariables
,AvailableSystemProperties
,Average
,AxiomAttributeWrapper
,AxiomDocumentNodeWrapper
,AxiomElementNodeWrapper
,AxiomLeafNodeWrapper
,AxiomParentNodeWrapper
,Base64BinaryValue
,BaseUri_1
,BigDecimalValue
,BigIntegerValue
,Bindery.FailureValue
,BooleanFn
,BooleanValue
,BuildURI
,CalendarValue
,CallableFunction
,Ceiling
,CharactersFn
,CharactersFn
,CharFn
,CodepointEqual
,CodepointsToString
,CoercedFunction
,CollatingFunctionFixed
,CollatingFunctionFree
,CollationKeyFn
,CollectionFn
,CommentImpl
,Compare
,CompileQuery
,CompileStylesheet
,CompileXPath
,Concat
,Concat31
,ConstantFunction
,ConstantFunction.False
,ConstantFunction.True
,Contains
,ContainsToken
,ContextAccessorFunction
,ContextItemAccessorFunction
,ContextItemAccessorFunction.Number_0
,ContextItemAccessorFunction.StringAccessor
,CopyOfFn
,Count
,Current
,CurrentGroup
,CurrentGroupingKey
,CurrentMergeGroup
,CurrentMergeKey
,CurrentOutputUri
,CurriedFunction
,Data_1
,DataElement
,DateTimeConstructor
,DateTimeValue
,DateValue
,DayTimeDurationValue
,DecimalDivide
,DecimalValue
,DecodeFromURI
,DeepEqual
,DelegatingArrayItem
,DelegatingMapItem
,DictionaryMap
,DistinctValues
,Doc
,Doc_2
,DocAvailable
,DocumentFn
,DocumentImpl
,DocumentUri_1
,DOM4JNodeWrapper
,DominoAttr
,DominoNode
,DOMNodeWrapper
,DoubleValue
,DuplicateValues
,DurationValue
,DynamicContextAccessor
,DynamicContextAccessor.CurrentDate
,DynamicContextAccessor.CurrentDateTime
,DynamicContextAccessor.CurrentTime
,DynamicContextAccessor.DefaultLanguage
,DynamicContextAccessor.ImplicitTimezone
,ElementAvailable
,ElementImpl
,Empty
,EncodeForUri
,EndsWith
,EnvironmentVariable
,EQName
,Error
,EscapeHtmlUri
,EscapeNCName
,Eval
,Evaluate
,EveryFn
,Exists
,ExpandedQNameFn
,EXPathBinaryFunctionSet.BinaryAnd
,EXPathBinaryFunctionSet.BinaryBin
,EXPathBinaryFunctionSet.BinaryDecodeString
,EXPathBinaryFunctionSet.BinaryEncodeString
,EXPathBinaryFunctionSet.BinaryFind
,EXPathBinaryFunctionSet.BinaryFromOctets
,EXPathBinaryFunctionSet.BinaryHex
,EXPathBinaryFunctionSet.BinaryInsertBefore
,EXPathBinaryFunctionSet.BinaryJoin
,EXPathBinaryFunctionSet.BinaryLength
,EXPathBinaryFunctionSet.BinaryNot
,EXPathBinaryFunctionSet.BinaryOctal
,EXPathBinaryFunctionSet.BinaryOr
,EXPathBinaryFunctionSet.BinaryPackDouble
,EXPathBinaryFunctionSet.BinaryPackFloat
,EXPathBinaryFunctionSet.BinaryPackInteger
,EXPathBinaryFunctionSet.BinaryPadLeft
,EXPathBinaryFunctionSet.BinaryPadRight
,EXPathBinaryFunctionSet.BinaryPart
,EXPathBinaryFunctionSet.BinaryShift
,EXPathBinaryFunctionSet.BinaryToOctets
,EXPathBinaryFunctionSet.BinaryUnpackDouble
,EXPathBinaryFunctionSet.BinaryUnpackFloat
,EXPathBinaryFunctionSet.BinaryUnpackInteger
,EXPathBinaryFunctionSet.BinaryUnpackUnsignedInteger
,EXPathBinaryFunctionSet.BinaryVersion
,EXPathBinaryFunctionSet.BinaryXor
,EXPathFileFunctionSet.FileAppend
,EXPathFileFunctionSet.FileAppendBinary
,EXPathFileFunctionSet.FileAppendText
,EXPathFileFunctionSet.FileAppendTextLines
,EXPathFileFunctionSet.FileBaseDir
,EXPathFileFunctionSet.FileChildren
,EXPathFileFunctionSet.FileCopy
,EXPathFileFunctionSet.FileCreateDir
,EXPathFileFunctionSet.FileCreateTempDir
,EXPathFileFunctionSet.FileCreateTempFile
,EXPathFileFunctionSet.FileCurrentDir
,EXPathFileFunctionSet.FileDelete
,EXPathFileFunctionSet.FileDirSeparator
,EXPathFileFunctionSet.FileExists
,EXPathFileFunctionSet.FileIsDir
,EXPathFileFunctionSet.FileIsFile
,EXPathFileFunctionSet.FileLastModified
,EXPathFileFunctionSet.FileLineSeparator
,EXPathFileFunctionSet.FileList
,EXPathFileFunctionSet.FileMove
,EXPathFileFunctionSet.FileName
,EXPathFileFunctionSet.FileParent
,EXPathFileFunctionSet.FilePathSeparator
,EXPathFileFunctionSet.FilePathToNative
,EXPathFileFunctionSet.FilePathToUri
,EXPathFileFunctionSet.FileReadBinary
,EXPathFileFunctionSet.FileReadText
,EXPathFileFunctionSet.FileReadTextLines
,EXPathFileFunctionSet.FileResolvePath
,EXPathFileFunctionSet.FileSize
,EXPathFileFunctionSet.FileTempDir
,EXPathFileFunctionSet.FileWrite
,EXPathFileFunctionSet.FileWriteBinary
,EXPathFileFunctionSet.FileWriteText
,EXPathFileFunctionSet.FileWriteTextLines
,ExpressionFn
,ExsltCommonFunctionSet.NodeSetFn
,ExsltCommonFunctionSet.ObjectTypeFn
,ExtensionInstruction
,FilterFn
,FleetingDocumentNode
,FleetingElementNode
,FleetingNode
,FleetingParentNode
,FloatValue
,Floor
,FoldingFunction
,FoldLeftFn
,FoldRightFn
,FootFn
,ForEachFn
,ForEachPairFn
,FormatDate
,FormatInteger
,FormatNumber
,FunctionAnnotations
,FunctionArity
,FunctionAvailable
,FunctionLookup
,FunctionName
,GDateValue
,GDayValue
,GenerateId_1
,GMonthDayValue
,GMonthValue
,GroupStarting
,GYearMonthValue
,GYearValue
,HasChildren_1
,HashTrieMap
,HeadFn
,HexBinaryValue
,HighestOrLowest
,HighestOrLowest
,IdentityFn
,Idref
,ImmutableArrayItem
,Index
,IndexOf
,IndexWhere
,Innermost
,InScopeNamespacesFn
,InScopePrefixes
,InsertBefore
,Int64Value
,IntegerValue
,Intersperse
,IriToUri
,IsNaN
,ItemsAt
,ItemsEnding
,ItemsEnding.ItemsBefore
,ItemsEnding.ItemsUntil
,ItemsStarting
,ItemsStarting.ItemsAfter
,ItemsStarting.ItemsFrom
,IterateWhileFn
,IXSLFunctionSet.Call
,IXSLFunctionSet.Eval
,IXSLFunctionSet.ScheduleActionFn
,IXSLFunctionSet.Source
,IXSLFunctionSet.Stub
,IXSLPromise
,IXSLRemoveAttribute
,IXSLRemoveProperty
,IXSLScheduleAction
,IXSLSetAttribute
,IXSLSetProperty
,IXSLSetStyle
,JDOM2NodeWrapper
,JsonDoc
,JsonToXMLFn
,KeyFn
,KeyMap
,Lang
,LastModified
,Leading
,ListCastableFunction
,ListConstructorFunction
,LiteralResultElement
,LoadXqueryModule
,LocalName_1
,LowerCase
,MapCreate
,MapFunctionSet.MapBuild
,MapFunctionSet.MapContains
,MapFunctionSet.MapEntries
,MapFunctionSet.MapEntry
,MapFunctionSet.MapFilter
,MapFunctionSet.MapFind
,MapFunctionSet.MapForEach
,MapFunctionSet.MapGet
,MapFunctionSet.MapKeys
,MapFunctionSet.MapMerge
,MapFunctionSet.MapOfPairs
,MapFunctionSet.MapPair
,MapFunctionSet.MapPairs
,MapFunctionSet.MapPut
,MapFunctionSet.MapRemove
,MapFunctionSet.MapSize
,MapItem
,MapSearch
,MapUntypedContains
,Matches
,MathFunctionSet.Atan2Fn
,MathFunctionSet.PiFn
,MathFunctionSet.PowFn
,MathFunctionSet.TrigFn1
,MemoFunction
,MemoFunction.NodeSurrogate
,MessageCount
,Minimax
,Minimax.Max
,Minimax.Min
,Name_1
,NamespaceForPrefix
,NamespaceNode
,NamespaceUriFn_1
,NewAttribute
,NewComment
,NewDocument
,NewElement
,NewNamespace
,NewProcessingInstruction
,NewText
,Nilled_1
,NodeImpl
,NodeName_1
,NormalizeSpace_1
,NormalizeUnicode
,NotationValue
,NotFn
,Number_1
,NumericValue
,ObjectMap
,ObjectValue
,OpFn
,OriginalFunction
,Orphan
,Outermost
,Parcel
,ParcelFn
,ParentNodeImpl
,Parse
,ParseHtml
,ParseIetfDate
,ParseInteger
,ParseJsonFn
,ParseQNameFn
,ParseURI
,ParseXml
,ParseXmlFragment
,ParseXPath
,Partition
,Parts
,Path_1
,PedigreeArrayItem
,PedigreeFn
,PedigreeMapItem
,PositionAndLast
,PositionAndLast.Last
,PositionAndLast.Position
,ProcInstImpl
,Put
,QNameFn
,QNameValue
,QualifiedNameValue
,QueryFn
,RandomNumberGenerator
,RangeKey
,ReadBinaryResource
,RebasedNode
,RegexFunction
,RegexFunctionSansFlags
,RegexGroup
,Remove
,Replace
,ReplaceWith
,Replicate
,ResolveQName
,ResolveURI
,Reverse
,Root_1
,Round
,RoundHalfToEven
,SaxonAssign
,SaxonChange
,SaxonDeepEqual
,SaxonDeepUpdate
,SaxonDelete
,SaxonDo
,SaxonDoctype
,SaxonEntityRef
,SaxonImportQuery
,SaxonInsert
,SaxonParam
,SaxonPreprocess
,SaxonRename
,SaxonReplace
,SaxonSlice
,SaxonTabulateMaps
,SaxonUpdate
,SaxonWhile
,ScalarSystemFunction
,SchemaElement
,SchemaFn
,SchemaTypeFn
,SendMail
,SequenceMatching
,SequenceMatching.ContainsSequence
,SequenceMatching.EndsWithSequence
,SequenceMatching.StartsWithSequence
,Serialize
,Serialize
,SimpleArrayItem
,SingleEntryMap
,Slice
,SnapshotFn
,SnapshotNode
,SomeFn
,Sort_1
,Sort_2
,Sort_3
,SpaceStrippedNode
,SQLClose
,SQLColumn
,SQLConnect
,SQLConnectFn
,SQLDelete
,SQLDeleteFn
,SQLExecute
,SQLExecuteFn
,SQLInsert
,SQLInsertFn
,SQLPreparedQueryFn
,SQLPreparedStatementFn
,SQLQuery
,SQLQueryFn
,SQLTableFn
,SQLUpdate
,SQLUpdateFn
,StartsWith
,StaticBaseUri
,StaticContextAccessor
,StaticContextAccessor.DefaultCollation
,StreamableUserFunction
,StreamAvailable
,StreamFn
,String_1
,StringJoin
,StringLength_1
,StringToCodepoints
,StringValue
,StyleElement
,Subsequence_2
,Subsequence_3
,Substring
,SubstringAfter
,SubstringBefore
,Sum
,SuperId
,SuperId.ElementWithId
,SuperId.Id
,SystemFunction
,SystemFunctionWithBoundContextItem
,SystemProperty
,TailFn
,TextFragmentValue
,TextImpl
,TextValueTemplateNode
,TimestampFn
,TimeValue
,TinyAttributeImpl
,TinyDocumentImpl
,TinyElementImpl
,TinyNodeImpl
,TinyParentNodeImpl
,TinyTextImpl
,TinyTextualElement
,TinyTextualElement.TinyTextualElementText
,Tokenize_1
,Tokenize_3
,Trace
,TransformFn
,TransformFn
,TransitiveClosure
,Translate
,TreatFn
,TreatFn.ExactlyOne
,TreatFn.OneOrMore
,TreatFn.ZeroOrOne
,Trunk
,Tuple
,TypeAvailable
,TypeStrippedNode
,UnescapeNCName
,Unindexed
,UnionCastableFunction
,UnionConstructorFunction
,UnknownElement
,Unordered
,UnparcelFn
,UnparsedEntity
,UnparsedEntity.UnparsedEntityPublicId
,UnparsedEntity.UnparsedEntityUri
,UnparsedText
,UnparsedTextAvailable
,UnparsedTextFunction
,UnparsedTextLines
,UnresolvedXQueryFunctionItem
,UpperCase
,UriCollection
,URIFunctions
,UserFunction
,UserFunctionReference.BoundUserFunction
,ValidateFn
,VendorFunctionSetHE.ArrayAsSequenceOfMaps
,VendorFunctionSetHE.ConcatenateSequences
,VendorFunctionSetHE.DynamicErrorInfoFn
,VendorFunctionSetHE.HasLocalNamespaces
,VendorFunctionSetHE.HasUniformNamespaces
,VendorFunctionSetHE.IsWholeNumberFn
,VendorFunctionSetHE.MapAsSequenceOfMaps
,VendorFunctionSetHE.YesNoBoolean
,VendorFunctionSetPE.AdjustToCivilTime
,VendorFunctionSetPE.Base64BinaryToOctets
,VendorFunctionSetPE.Base64BinaryToString
,VendorFunctionSetPE.ColumnNumber
,VendorFunctionSetPE.ConfigurationFn
,VendorFunctionSetPE.ContextFn
,VendorFunctionSetPE.ControllerFn
,VendorFunctionSetPE.CurrentModeName
,VendorFunctionSetPE.DiscardDocument
,VendorFunctionSetPE.GetContext
,VendorFunctionSetPE.GetPseudoAttribute
,VendorFunctionSetPE.HasSameNodes
,VendorFunctionSetPE.HexBinaryToOctets
,VendorFunctionSetPE.HexBinaryToString
,VendorFunctionSetPE.InSummerTime
,VendorFunctionSetPE.IsDefaulted
,VendorFunctionSetPE.LineNumber
,VendorFunctionSetPE.NamespaceNodeFn
,VendorFunctionSetPE.OctetsToBase64Binary
,VendorFunctionSetPE.OctetsToHexBinary
,VendorFunctionSetPE.ParseDateTime
,VendorFunctionSetPE.PrintStack
,VendorFunctionSetPE.StringToBase64BinaryFn
,VendorFunctionSetPE.StringToHexBinaryFn
,VendorFunctionSetPE.StringToUTF8
,VendorFunctionSetPE.SystemId
,VendorFunctionSetPE.TunnelParamsFn
,VendorFunctionSetPE.TypeAnnotationFn
,VendorFunctionSetPE.UnparsedEntities
,VendorFunctionSetPE.ValidCharacter
,VirtualCopy
,VirtualUntypedCopy
,VoidFn
,WhitespaceTextImpl
,WithPedigree
,XdmToJsonFn
,XMLToJsonFn
,XOMDocumentWrapper
,XOMNodeWrapper
,XQueryFn
,XSDAlternative
,XSDAnnotation
,XSDAny
,XSDAnyAttribute
,XSDAssert
,XSDAttribute
,XSDAttributeGroup
,XSDComplexContent
,XSDComplexContentRestriction
,XSDComplexType
,XSDCompositor
,XSDDefaultOpenContent
,XSDDocumentation
,XSDElement
,XSDExtension
,XSDFacet
,XSDFieldOrSelector
,XSDGroup
,XSDIdentityConstraint
,XSDImport
,XSDInclude
,XSDList
,XSDNotation
,XSDOpenContent
,XSDOverride
,XSDRedefine
,XSDSchema
,XSDSimpleContent
,XSDSimpleContentRestriction
,XSDSimpleType
,XSDSimpleTypeRestriction
,XSDUnion
,XSLAccept
,XSLAcceptExpose
,XSLAccumulator
,XSLAccumulatorRule
,XSLAnalyzeString
,XSLApplyImports
,XSLApplyTemplates
,XSLArray
,XSLArrayMember
,XSLAssert
,XSLAttribute
,XSLAttributeSet
,XSLBreak
,XSLBreakOrContinue
,XSLCallTemplate
,XSLCatch
,XSLCharacterMap
,XSLChoose
,XSLChooseOrSwitch
,XSLComment
,XSLContextItem
,XSLCopy
,XSLCopyOf
,XSLDecimalFormat
,XSLDocument
,XSLElement
,XSLEvaluate
,XSLExpose
,XSLFallback
,XSLForEach
,XSLForEachGroup
,XSLFork
,XSLFunction
,XSLGeneralIncorporate
,XSLGeneralVariable
,XSLGlobalContextItem
,XSLGlobalParam
,XSLGlobalVariable
,XSLIf
,XSLImport
,XSLImportSchema
,XSLInclude
,XSLItemType
,XSLIterate
,XSLKey
,XSLLeafNodeConstructor
,XSLLocalParam
,XSLLocalVariable
,XSLMap
,XSLMapEntry
,XSLMatchingSubstring
,XSLMerge
,XSLMergeAction
,XSLMergeKey
,XSLMergeSource
,XSLMessage
,XSLMode
,XSLModuleRoot
,XSLNamespace
,XSLNamespaceAlias
,XSLNextIteration
,XSLNextMatch
,XSLNumber
,XSLOnCompletion
,XSLOnEmpty
,XSLOnNonEmpty
,XSLOtherwise
,XSLOutput
,XSLOutputCharacter
,XSLOverride
,XSLPackage
,XSLPerformSort
,XSLPreserveSpace
,XSLProcessingInstruction
,XSLResultDocument
,XSLSequence
,XSLSort
,XSLSortOrMergeKey
,XSLSourceDocument
,XSLStylesheet
,XSLSwitch
,XSLTemplate
,XSLText
,XSLTry
,XSLUsePackage
,XSLValueOf
,XSLWhen
,XSLWherePopulated
,XSLWithParam
,YearMonthDurationValue
public interface Item extends GroundedValue
An Item is an object that can occur as a member of a sequence. It corresponds directly to the concept of an item in the XPath 2.0 data model. There are four kinds of Item: atomic values, nodes, function items, and external objects.This interface is part of the public Saxon API. As such (starting from Saxon 8.4), methods that form part of the stable API are labelled with a JavaDoc "since" tag to identify the Saxon release at which they were introduced.
Note: there is no method getItemType(). This is to avoid having to implement it on every implementation of NodeInfo. Instead, use the static method Type.getItemType(Item).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AtomicSequence
atomize()
Atomize the item.Genre
getGenre()
Get the genre of this item (to distinguish the top-level categories of item, such as nodes, atomic values, and functions)default int
getLength()
Get the size of the value (the number of items)default java.lang.String
getStringValue()
Get the value of the item as a Java string.UnicodeString
getUnicodeStringValue()
Get the value of the item as a Unicode string.default Item
head()
Get the first item in the sequence.default boolean
isStreamed()
Ask whether this is a node in a streamed documentdefault Item
itemAt(int n)
Get the n'th item in the value, counting from 0default SingletonIterator
iterate()
Get an iterator over all the items in the sequencedefault GroundedValue
reduce()
Reduce the sequence to its simplest form.default GroundedValue
subsequence(int start, int length)
Get a subsequence of the valuedefault java.lang.String
toShortString()
Provide a short string showing the contents of the item, suitable for use in error messages-
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materialize
-
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
-
-
-
Method Detail
-
getGenre
Genre getGenre()
Get the genre of this item (to distinguish the top-level categories of item, such as nodes, atomic values, and functions)- Returns:
- the genre
-
head
default Item head()
Get the first item in the sequence. Differs from the superclassSequence
in that * no exception is thrown.- Specified by:
head
in interfaceGroundedValue
- Specified by:
head
in interfaceSequence
- Returns:
- the first item in the sequence if there is one, or null if the sequence is empty
-
getUnicodeStringValue
UnicodeString getUnicodeStringValue()
Get the value of the item as a Unicode string. For nodes, this is the string value of the node as defined in the XPath 2.0 data model, except that all nodes are treated as being untyped: it is not an error to get the string value of a node with a complex type. For atomic values, the method returns the result of casting the atomic value to a string.- Specified by:
getUnicodeStringValue
in interfaceGroundedValue
- Returns:
- the string value of the item
- Throws:
java.lang.UnsupportedOperationException
- if the item is a function item (an unchecked exception is used here to avoid introducing exception handling to a large number of paths where it is not needed)- Since:
- 8.4
-
getStringValue
default java.lang.String getStringValue()
Get the value of the item as a Java string. For nodes, this is the string value of the node as defined in the XPath 2.0 data model, except that all nodes are treated as being untyped: it is not an error to get the string value of a node with a complex type. For atomic values, the method returns the result of casting the atomic value to a string.- Specified by:
getStringValue
in interfaceGroundedValue
- Returns:
- the string value of the item
- Throws:
java.lang.UnsupportedOperationException
- if the item is a function item (an unchecked exception is used here to avoid introducing exception handling to a large number of paths where it is not needed)- Since:
- 8.4
-
atomize
AtomicSequence atomize() throws XPathException
Atomize the item.- Returns:
- the result of atomization
- Throws:
XPathException
- if atomization is not allowed for this kind of item
-
toShortString
default java.lang.String toShortString()
Provide a short string showing the contents of the item, suitable for use in error messages- Specified by:
toShortString
in interfaceGroundedValue
- Returns:
- a depiction of the item suitable for use in error messages
-
itemAt
default Item itemAt(int n)
Get the n'th item in the value, counting from 0- Specified by:
itemAt
in interfaceGroundedValue
- Parameters:
n
- the index of the required item, with 0 representing the first item in the sequence- Returns:
- the n'th item if it exists, or null otherwise
-
subsequence
default GroundedValue subsequence(int start, int length)
Get a subsequence of the value- Specified by:
subsequence
in interfaceGroundedValue
- Parameters:
start
- the index of the first item to be included in the result, counting from zero. A negative value is taken as zero. If the value is beyond the end of the sequence, an empty sequence is returnedlength
- the number of items to be included in the result. Specify Integer.MAX_VALUE to get the subsequence up to the end of the base sequence. If the value is negative, an empty sequence is returned. If the value goes off the end of the sequence, the result returns items up to the end of the sequence- Returns:
- the required subsequence. If min is
-
getLength
default int getLength()
Get the size of the value (the number of items)- Specified by:
getLength
in interfaceGroundedValue
- Returns:
- the number of items in the sequence. Note that for a single item, including a map or array, the result is always 1 (one).
-
iterate
default SingletonIterator iterate()
Get an iterator over all the items in the sequence- Specified by:
iterate
in interfaceGroundedValue
- Specified by:
iterate
in interfaceSequence
- Returns:
- an iterator over all the items
-
reduce
default GroundedValue reduce()
Reduce the sequence to its simplest form. If the value is an empty sequence, the result will be EmptySequence.getInstance(). If the value is a single atomic value, the result will be an instance of AtomicValue. If the value is a single item of any other kind, the result will be an instance of Item. Otherwise, the result will typically be unchanged.- Specified by:
reduce
in interfaceGroundedValue
- Returns:
- the simplified sequence
-
isStreamed
default boolean isStreamed()
Ask whether this is a node in a streamed document- Returns:
- true if the node is in a document being processed using streaming
-
-