Package net.sf.saxon.om
Interface GroundedValue
-
- All Superinterfaces:
Sequence
- All Known Subinterfaces:
ArrayItem
,AtomicSequence
,ExternalObject<T>
,Function
,Item
,MapItem
,MutableNodeInfo
,NodeInfo
,SiblingCountingNode
,SteppingNode<N>
,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
,AnalyzeStringFn
,AnalyzeUri
,AnnotationParent
,AnyURIValue
,ApplyFn
,ArrayFunctionSet.ArrayAppend
,ArrayFunctionSet.ArrayFilter
,ArrayFunctionSet.ArrayFlatten
,ArrayFunctionSet.ArrayFoldLeft
,ArrayFunctionSet.ArrayFoldRight
,ArrayFunctionSet.ArrayForEach
,ArrayFunctionSet.ArrayForEachPair
,ArrayFunctionSet.ArrayFromSequence
,ArrayFunctionSet.ArrayGet
,ArrayFunctionSet.ArrayHead
,ArrayFunctionSet.ArrayInsertBefore
,ArrayFunctionSet.ArrayJoin
,ArrayFunctionSet.ArrayPut
,ArrayFunctionSet.ArrayRemove
,ArrayFunctionSet.ArrayReverse
,ArrayFunctionSet.ArraySize
,ArrayFunctionSet.ArraySubarray
,ArrayFunctionSet.ArrayTail
,ArrayFunctionSet.ArrayToSequence
,ArrayMember
,ArrayMemberValue
,ArraySort
,AtomicArray
,AtomicConstructorFunction
,AtomicValue
,AttributeImpl
,AvailableEnvironmentVariables
,AvailableSystemProperties
,Average
,AxiomAttributeWrapper
,AxiomDocumentNodeWrapper
,AxiomElementNodeWrapper
,AxiomLeafNodeWrapper
,AxiomParentNodeWrapper
,Base64BinaryValue
,BaseUri_1
,BigDecimalValue
,BigIntegerValue
,Bindery.FailureValue
,BooleanFn
,BooleanValue
,CalendarValue
,CallableFunction
,Ceiling
,Chain
,CharactersFn
,CodepointEqual
,CodepointsToString
,CoercedFunction
,CollatingFunctionFixed
,CollatingFunctionFree
,CollationKeyFn
,CollectionFn
,CommentImpl
,CompactStringValue
,Compare
,CompileQuery
,CompileStylesheet
,CompileXPath
,Concat
,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
,DeepEqual
,DeepEqual
,DelegatingArrayItem
,DelegatingMapItem
,DictionaryMap
,DistinctValues
,Doc
,Doc_2
,DocAvailable
,DocumentFn
,DocumentImpl
,DocumentUri_1
,DOM4JNodeWrapper
,DominoAttr
,DominoNode
,DOMNodeWrapper
,DoubleValue
,DurationValue
,DynamicContextAccessor
,DynamicContextAccessor.CurrentDate
,DynamicContextAccessor.CurrentDateTime
,DynamicContextAccessor.CurrentTime
,DynamicContextAccessor.DefaultLanguage
,DynamicContextAccessor.ImplicitTimezone
,ElementAvailable
,ElementImpl
,Empty
,EmptyAtomicSequence
,EmptySequence
,EncodeForUri
,Ending
,Ending.ItemsBefore
,Ending.ItemsUntil
,EndsWith
,EnvironmentVariable
,EQName
,Error
,EscapeHtmlUri
,Eval
,Evaluate
,Exists
,EXPathFileFunctionSet.BaseDir
,ExpressionFn
,ExsltCommonFunctionSet.NodeSetFn
,ExsltCommonFunctionSet.ObjectTypeFn
,ExtensionInstruction
,FilterFn
,FleetingDocumentNode
,FleetingElementNode
,FleetingNode
,FleetingParentNode
,FloatValue
,Floor
,FoldingFunction
,FoldLeftFn
,FoldRightFn
,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
,Idref
,ImmutableArrayItem
,Index
,IndexedValue
,IndexOf
,IndexWhere
,Innermost
,InScopeNamespacesFn
,InScopePrefixes
,InsertBefore
,Int64Value
,IntegerRange
,IntegerValue
,IriToUri
,IsNaN
,IXSLFunctionSet.Call
,IXSLFunctionSet.Eval
,IXSLFunctionSet.ScheduleActionFn
,IXSLFunctionSet.Source
,IXSLFunctionSet.Stub
,IXSLRemoveAttribute
,IXSLRemoveProperty
,IXSLScheduleAction
,IXSLSetAttribute
,IXSLSetProperty
,IXSLSetStyle
,JDOM2NodeWrapper
,JsonDoc
,JsonToXMLFn
,KeyFn
,KeyMap
,Lang
,LastModified
,Leading
,ListCastableFunction
,ListConstructorFunction
,LiteralResultElement
,LoadXqueryModule
,LocalName_1
,LowerCase
,MapCreate
,MapFunctionSet.MapContains
,MapFunctionSet.MapEntry
,MapFunctionSet.MapFind
,MapFunctionSet.MapForEach
,MapFunctionSet.MapGet
,MapFunctionSet.MapKeys
,MapFunctionSet.MapMerge
,MapFunctionSet.MapPut
,MapFunctionSet.MapRemove
,MapFunctionSet.MapSize
,MapSearch
,MapUntypedContains
,Matches
,MathFunctionSet.AcosFn
,MathFunctionSet.AsinFn
,MathFunctionSet.Atan2Fn
,MathFunctionSet.AtanFn
,MathFunctionSet.CosFn
,MathFunctionSet.Exp10Fn
,MathFunctionSet.ExpFn
,MathFunctionSet.Log10Fn
,MathFunctionSet.LogFn
,MathFunctionSet.PiFn
,MathFunctionSet.PowFn
,MathFunctionSet.SinFn
,MathFunctionSet.SqrtFn
,MathFunctionSet.TanFn
,MemoFunction
,MessageCount
,Minimax
,Minimax.Max
,Minimax.Min
,Name_1
,NamespaceForPrefix
,NamespaceNode
,NamespaceUri_1
,NestedIntegerValue
,NewAttribute
,NewComment
,NewDocument
,NewElement
,NewNamespace
,NewProcessingInstruction
,NewText
,Nilled_1
,NodeImpl
,NodeName_1
,NormalizeSpace_1
,NormalizeUnicode
,NotationValue
,NotFn
,Number_1
,NumericValue
,ObjectMap
,ObjectValue
,One
,OneOrMore
,OriginalFunction
,Orphan
,Outermost
,ParentNodeImpl
,Parse
,ParseHtml
,ParseIetfDate
,ParseJsonFn
,ParseXml
,ParseXmlFragment
,ParseXPath
,Path_1
,PedigreeArrayItem
,PedigreeFn
,PedigreeMapItem
,PositionAndLast
,PositionAndLast.Last
,PositionAndLast.Position
,ProcInstImpl
,Put
,QNameFn
,QNameValue
,QualifiedNameValue
,QueryFn
,RandomNumberGenerator
,RangeKey
,RebasedNode
,RegexFunction
,RegexFunctionSansFlags
,RegexGroup
,Remove
,Replace
,ReplaceWith
,ResolveQName
,ResolveURI
,Reverse
,Root_1
,Round
,RoundHalfToEven
,SaxonArray
,SaxonArrayMemberInst
,SaxonAssign
,SaxonChange
,SaxonDeepUpdate
,SaxonDelete
,SaxonDo
,SaxonDoctype
,SaxonEntityRef
,SaxonForEachMember
,SaxonImportQuery
,SaxonInsert
,SaxonItemType
,SaxonParam
,SaxonPreprocess
,SaxonRename
,SaxonReplace
,SaxonTabulateMaps
,SaxonUpdate
,SaxonWhile
,ScalarSystemFunction
,SchemaElement
,SchemaFn
,SearchableValue
,SendMail
,SequenceExtent
,SequenceSlice
,Serialize
,Serialize
,SimpleArrayItem
,SingleEntryMap
,SnapshotFn
,SnapshotNode
,Sort_1
,Sort_2
,Sort_3
,SpaceStrippedNode
,SQLClose
,SQLColumn
,SQLConnect
,SQLConnectFn
,SQLDelete
,SQLDeleteFn
,SQLExecute
,SQLExecuteFn
,SQLInsert
,SQLInsertFn
,SQLPreparedQueryFn
,SQLPreparedStatementFn
,SQLQuery
,SQLQueryFn
,SQLTableFn
,SQLUpdate
,SQLUpdateFn
,Starting
,Starting.ItemsAfter
,Starting.ItemsFrom
,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
,Translate
,TreatFn
,TreatFn.ExactlyOne
,TreatFn.OneOrMore
,TreatFn.ZeroOrOne
,Tuple
,TypeAvailable
,TypeStrippedNode
,UnionCastableFunction
,UnionConstructorFunction
,UnknownElement
,Unordered
,UnparsedEntity
,UnparsedEntity.UnparsedEntityPublicId
,UnparsedEntity.UnparsedEntityUri
,UnparsedText
,UnparsedTextAvailable
,UnparsedTextFunction
,UnparsedTextLines
,UnresolvedXQueryFunctionItem
,UntypedAtomicValue
,UpperCase
,UriCollection
,UserFunction
,UserFunctionReference.BoundUserFunction
,ValidateFn
,VendorFunctionSetHE.DynamicErrorInfoFn
,VendorFunctionSetHE.HasLocalNamespaces
,VendorFunctionSetHE.HasUniformNamespaces
,VendorFunctionSetHE.IsWholeNumberFn
,VirtualCopy
,VirtualUntypedCopy
,WhitespaceTextImpl
,WithPedigree
,XMLToJsonFn
,XOMDocumentWrapper
,XOMNodeWrapper
,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
,XSLAssert
,XSLAttribute
,XSLAttributeSet
,XSLBreak
,XSLBreakOrContinue
,XSLCallTemplate
,XSLCatch
,XSLCharacterMap
,XSLChoose
,XSLComment
,XSLContextItem
,XSLCopy
,XSLCopyOf
,XSLDecimalFormat
,XSLDocument
,XSLElement
,XSLEvaluate
,XSLExpose
,XSLFallback
,XSLForEach
,XSLForEachGroup
,XSLFork
,XSLFunction
,XSLGeneralIncorporate
,XSLGeneralVariable
,XSLGlobalContextItem
,XSLGlobalParam
,XSLGlobalVariable
,XSLIf
,XSLImport
,XSLImportSchema
,XSLInclude
,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
,XSLTemplate
,XSLText
,XSLTry
,XSLUsePackage
,XSLValueOf
,XSLWhen
,XSLWherePopulated
,XSLWithParam
,YearMonthDurationValue
,ZeroOrMore
,ZeroOrOne
public interface GroundedValue extends Sequence
A value that exists in memory and that can be directly addressed- Since:
- 9.5. Generified in 9.9. De-generified in 10.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.Iterable<? extends Item>
asIterable()
default GroundedValue
concatenate(GroundedValue... others)
Append two or more grounded values to form a new grounded valuedefault boolean
containsNode(NodeInfo sought)
Determine whether a particular node is present in the valuedefault boolean
effectiveBooleanValue()
Get the effective boolean value of this sequenceint
getLength()
Get the size of the value (the number of items in the value, considered as a sequence)java.lang.String
getStringValue()
Get the string value of this sequence.java.lang.CharSequence
getStringValueCS()
Get the string value of this sequence.Item
head()
Get the first item of the sequence.Item
itemAt(int n)
Get the n'th item in the value, counting from zero (0)UnfailingIterator
iterate()
Get an iterator over all the items in the sequence.default GroundedValue
materialize()
Create aGroundedValue
containing the same items as this Sequence.default GroundedValue
reduce()
Reduce the sequence to its simplest form.GroundedValue
subsequence(int start, int length)
Get a subsequence of the valuedefault java.lang.String
toShortString()
Produce a short representation of the value of the sequence, suitable for use in error messages-
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
-
-
-
Method Detail
-
iterate
UnfailingIterator iterate()
Get an iterator over all the items in the sequence. This differs from the superclass method in not allowing an exception, either during this method call, or in the subsequent processing of the returned iterator.- Specified by:
iterate
in interfaceSequence
- Returns:
- an iterator (meaning a Saxon
SequenceIterator
rather than a JavaIterator
) over all the items in this Sequence.
-
itemAt
Item itemAt(int n)
Get the n'th item in the value, counting from zero (0)- Parameters:
n
- the index of the required item, with zero (0) representing the first item in the sequence- Returns:
- the n'th item if it exists, or null if the requested position is out of range
-
head
Item head()
Get the first item of the sequence. This differs from the parent interface in not allowing an exception
-
subsequence
GroundedValue subsequence(int start, int length)
Get a subsequence of the value- 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 length goes off the end of the sequence, the result returns items up to the end of the sequence- Returns:
- the required subsequence.
-
getLength
int getLength()
Get the size of the value (the number of items in the value, considered as a sequence)- 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).
-
effectiveBooleanValue
default boolean effectiveBooleanValue() throws XPathException
Get the effective boolean value of this sequence- Returns:
- the effective boolean value
- Throws:
XPathException
- if the sequence has no effective boolean value (for example a sequence of two integers)
-
getStringValue
java.lang.String getStringValue() throws XPathException
Get the string value of this sequence. The string value of an item is the result of applying the string() function. The string value of a sequence is the space-separated result of applying the string-join() function using a single space as the separator- Returns:
- the string value of the sequence.
- Throws:
XPathException
- if the sequence contains items that have no string value (for example, function items)
-
getStringValueCS
java.lang.CharSequence getStringValueCS() throws XPathException
Get the string value of this sequence. The string value of an item is the result of applying the string() function. The string value of a sequence is the space-separated result of applying the string-join() function using a single space as the separator- Returns:
- the string value of the sequence.
- Throws:
XPathException
- if the sequence contains items that have no string value (for example, function 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.- Returns:
- the simplified sequence
-
materialize
default GroundedValue materialize()
Create aGroundedValue
containing the same items as this Sequence. Since this Sequence is already aGroundedValue
this method returns thisGroundedValue
unchanged.- Specified by:
materialize
in interfaceSequence
- Returns:
- this
GroundedValue
-
toShortString
default java.lang.String toShortString()
Produce a short representation of the value of the sequence, suitable for use in error messages- Returns:
- a short representation of the value
-
asIterable
default java.lang.Iterable<? extends Item> asIterable()
-
containsNode
default boolean containsNode(NodeInfo sought) throws XPathException
Determine whether a particular node is present in the value- Parameters:
sought
- the sought-after node- Returns:
- true if the sought node is present
- Throws:
XPathException
- This should never happen
-
concatenate
default GroundedValue concatenate(GroundedValue... others)
Append two or more grounded values to form a new grounded value- Parameters:
others
- one or more grounded values that are to be concatenated with this one, in order- Returns:
- the concatenation of the supplied sequences (none of which is modified by the operation)
-
-