Package com.saxonica.functions.qt4.pin
Class LabeledMapItem
java.lang.Object
net.sf.saxon.ma.MapOrArray
net.sf.saxon.ma.map.MapItem
com.saxonica.xsltextn.pedigree.DelegatingMapItem
com.saxonica.functions.qt4.pin.LabeledMapItem
- All Implemented Interfaces:
LabeledItem,Callable,FunctionItem,GroundedValue,Item,Sequence
n
A
LabeledMapItem represents an XDM map together with a label, which is a map:
the map typically contains retained information about how the map was selected within a JSON-like tree.-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.saxon.ma.map.MapItem
MapItem.KeyIterator -
Field Summary
Fields inherited from class net.sf.saxon.ma.map.MapItem
mapConstructorDuplicatesAction, xslMapDuplicatesAction, xslRecordDuplicatesAction -
Constructor Summary
ConstructorsConstructorDescriptionLabeledMapItem(MapItem base, MapItem label) Create a LabeledMapItem with a supplied label -
Method Summary
Modifier and TypeMethodDescriptionstatic GroundedValueadaptValue(LabeledItem parent, AtomicValue key, GroundedValue value) get(AtomicValue key) Get the value of the entry in the map with a specified key, retaining information about how that value was selectedgetLabel()Get the pedigree of this map item, providing information as to how it was selected.Get the subject item without its labelGet an iterable collection of key-value pairs representing the entries in this map; any entry whose value is a singleton array or map will itself have a pedigree indicating how it was selectedstatic LabeledMapItemmakePinnedMapItem(MapItem base) remove(AtomicValue key) Remove an entry from the maptoString()Methods inherited from class com.saxonica.xsltextn.pedigree.DelegatingMapItem
conforms, getBaseItem, getItemType, isEmpty, keys, put, sizeMethods inherited from class net.sf.saxon.ma.map.MapItem
atomize, call, deepEqual40, deepEquals, effectiveBooleanValue, entries, export, followingKeyValuePairs, getAnnotations, getArity, getDescription, getFunctionItemType, getFunctionName, getGenre, getItemTypeOfSequence, getOperandRoles, getSpecVersion, getTypedValue, getU, getUnicodeStringValue, getWithPlan, isArray, isKnownToConform, isMap, isTrustedResultType, itemAt, makeNewContext, mapToString, precedingKeyValuePairs, setSpecVersion, toShortStringMethods inherited from class net.sf.saxon.ma.MapOrArray
obtainRootJNodeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.om.FunctionItem
isSequenceVariadicMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materializeMethods inherited from interface net.sf.saxon.om.Item
atomize, getLength, getStringValue, getUnicodeStringValue, head, isStreamed, itemAt, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
LabeledMapItem
Create a LabeledMapItem with a supplied label- Parameters:
base- the subject map itemlabel- the label
-
-
Method Details
-
getSubject
Get the subject item without its label- Specified by:
getSubjectin interfaceLabeledItem- Returns:
- the subject item
-
makePinnedMapItem
-
get
Get the value of the entry in the map with a specified key, retaining information about how that value was selected- Overrides:
getin classDelegatingMapItem- Parameters:
key- the key of the required entry- Returns:
- the corresponding value, which will itself have a pedigree if it is a singleton map or array; or null if there is no entry with this key
-
keyValuePairs
Get an iterable collection of key-value pairs representing the entries in this map; any entry whose value is a singleton array or map will itself have a pedigree indicating how it was selected- Overrides:
keyValuePairsin classDelegatingMapItem- Returns:
- the entries in this map as an iterable collection
-
remove
Description copied from class:MapItemRemove an entry from the map- Overrides:
removein classDelegatingMapItem- Parameters:
key- the key of the entry to be removed- Returns:
- a new map in which the requested entry has been removed; or this map unchanged if the specified key was not present
-
adaptValue
-
getLabel
Get the pedigree of this map item, providing information as to how it was selected.- Specified by:
getLabelin interfaceItem- Specified by:
getLabelin interfaceLabeledItem- Returns:
- the pedigree of this map item
-
toString
- Overrides:
toStringin classDelegatingMapItem
-