public class RowExtractors extends Object
RowExtractors.ExtractFromRow
implementations.Modifier and Type | Class and Description |
---|---|
static interface |
RowExtractors.ExtractFromRow
An operation that extracts a single value from the current row in a given
NodeSequence.Batch . |
Modifier and Type | Method and Description |
---|---|
static RowExtractors.ExtractFromRow |
convert(RowExtractors.ExtractFromRow extractor,
TypeSystem.TypeFactory<?> newType)
Obtain a new
RowExtractors.ExtractFromRow instance that uses the supplied row extractor but converts the value to the supplied
type. |
static RowExtractors.ExtractFromRow |
extractFullText(int indexInRow,
NodeCache cache,
Name propertyName,
TypeSystem types,
BinaryStore binaries)
Obtain a new
RowExtractors.ExtractFromRow instance that will extract the full text for a single property of a node. |
static RowExtractors.ExtractFromRow |
extractFullText(int indexInRow,
NodeCache cache,
TypeSystem types,
BinaryStore binaries)
Obtain a new
RowExtractors.ExtractFromRow instance that will extract the full text for a node. |
static void |
extractFullTextFrom(Object propertyValue,
TypeSystem.TypeFactory<String> type,
BinaryStore binaries,
StringBuilder fullTextString) |
protected static void |
extractFullTextFrom(Property property,
TypeSystem.TypeFactory<String> type,
StringBuilder fullTextString,
BinaryStore binaries,
CachedNode node,
NodeCache cache) |
static RowExtractors.ExtractFromRow |
extractLocalName(int indexInRow,
NodeCache cache,
TypeSystem types)
Create an extractor that extracts the name from the node at the given position in the row.
|
static RowExtractors.ExtractFromRow |
extractName(int indexInRow,
NodeCache cache,
TypeSystem types)
Create an extractor that extracts the name from the node at the given position in the row.
|
static RowExtractors.ExtractFromRow |
extractNodeKey(int indexInRow,
NodeCache cache,
TypeSystem types)
Create an extractor that extracts the
NodeKey from the node at the given position in the row. |
static RowExtractors.ExtractFromRow |
extractorWith(Collection<RowExtractors.ExtractFromRow> extractors)
Obtain an extractor of a tuple containing each of the values from the supplied extractors.
|
static RowExtractors.ExtractFromRow |
extractorWith(RowExtractors.ExtractFromRow extractor,
Order order,
NullOrder nullOrder)
Create an extractor that has a
type factory with a comparator that sorts according to the specified order and null-order behavior. |
static RowExtractors.ExtractFromRow |
extractorWith(RowExtractors.ExtractFromRow first,
RowExtractors.ExtractFromRow second)
Obtain an extractor of a tuple containing each of the values from the supplied extractors.
|
static RowExtractors.ExtractFromRow |
extractorWith(RowExtractors.ExtractFromRow first,
RowExtractors.ExtractFromRow second,
RowExtractors.ExtractFromRow third)
Obtain an extractor of a tuple containing each of the values from the supplied extractors.
|
static RowExtractors.ExtractFromRow |
extractorWith(RowExtractors.ExtractFromRow first,
RowExtractors.ExtractFromRow second,
RowExtractors.ExtractFromRow third,
RowExtractors.ExtractFromRow fourth)
Obtain an extractor of a tuple containing each of the values from the supplied extractors.
|
static RowExtractors.ExtractFromRow |
extractParentNodeKey(int indexInRow,
NodeCache cache,
TypeSystem types)
Create an extractor that extracts the parent's
NodeKey from the node at the given position in the row. |
static RowExtractors.ExtractFromRow |
extractParentPath(int indexInRow,
NodeCache cache,
TypeSystem types)
Create an extractor that extracts the parent path from the node at the given position in the row.
|
static RowExtractors.ExtractFromRow |
extractPath(int indexInRow,
NodeCache cache,
TypeSystem types)
Create an extractor that extracts the path from the node at the given position in the row.
|
static RowExtractors.ExtractFromRow |
extractPropertyValue(Name propertyName,
int indexInRow,
NodeCache cache,
TypeSystem.TypeFactory<?> desiredType)
Create an extractor that extracts the property value from the node at the given position in the row.
|
static RowExtractors.ExtractFromRow |
extractRelativePath(int indexInRow,
Path relativePath,
NodeCache cache,
TypeSystem types)
Create an extractor that extracts the path from the node at the given position in the row and applies the relative path.
|
static void |
extractTextFromSingleProperty(Object propertyValue,
TypeSystem.TypeFactory<String> type,
BinaryStore binaries,
StringBuilder fullTextString) |
static RowExtractors.ExtractFromRow |
extractUniqueKey(int rowWidth,
TypeSystem types)
Create an extractor that extracts an object that uniquely identifies the row.
|
public static RowExtractors.ExtractFromRow convert(RowExtractors.ExtractFromRow extractor, TypeSystem.TypeFactory<?> newType)
RowExtractors.ExtractFromRow
instance that uses the supplied row extractor but converts the value to the supplied
type.extractor
- the extractor that obtains a value from the row; may not be nullnewType
- the factory for the desired type; may not be nullpublic static RowExtractors.ExtractFromRow extractFullText(int indexInRow, NodeCache cache, TypeSystem types, BinaryStore binaries)
RowExtractors.ExtractFromRow
instance that will extract the full text for a node.
Note that if the node is null at the specified index in the row, the extractor's
RowExtractors.ExtractFromRow.getValueInRow(NodeSequence.RowAccessor)
will return null.
indexInRow
- the index of the selector in the row; presumed to be validcache
- the node cache; may not be nulltypes
- the system of types; may not be nullbinaries
- the binary store; may not be nullpublic static RowExtractors.ExtractFromRow extractFullText(int indexInRow, NodeCache cache, Name propertyName, TypeSystem types, BinaryStore binaries)
RowExtractors.ExtractFromRow
instance that will extract the full text for a single property of a node.
Note that if the named property does not exist on a node or the node is null at the specified index in the row, the
extractor's RowExtractors.ExtractFromRow.getValueInRow(NodeSequence.RowAccessor)
will return null.
indexInRow
- the index of the selector in the row; presumed to be validcache
- the node cache; may not be nullpropertyName
- the name of the property from which the full text is to be extracted; may not be nulltypes
- the system of types; may not be nullbinaries
- the binary store; may not be nullprotected static void extractFullTextFrom(Property property, TypeSystem.TypeFactory<String> type, StringBuilder fullTextString, BinaryStore binaries, CachedNode node, NodeCache cache)
public static void extractFullTextFrom(Object propertyValue, TypeSystem.TypeFactory<String> type, BinaryStore binaries, StringBuilder fullTextString)
public static void extractTextFromSingleProperty(Object propertyValue, TypeSystem.TypeFactory<String> type, BinaryStore binaries, StringBuilder fullTextString)
public static RowExtractors.ExtractFromRow extractNodeKey(int indexInRow, NodeCache cache, TypeSystem types)
NodeKey
from the node at the given position in the row.indexInRow
- the index of the node in the rows; must be validcache
- the cache containing the nodes; may not be nulltypes
- the type system; may not be nullpublic static RowExtractors.ExtractFromRow extractParentNodeKey(int indexInRow, NodeCache cache, TypeSystem types)
NodeKey
from the node at the given position in the row.indexInRow
- the index of the node in the rows; must be validcache
- the cache containing the nodes; may not be nulltypes
- the type system; may not be nullpublic static RowExtractors.ExtractFromRow extractPath(int indexInRow, NodeCache cache, TypeSystem types)
indexInRow
- the index of the node in the rows; must be validcache
- the cache containing the nodes; may not be nulltypes
- the type system; may not be nullpublic static RowExtractors.ExtractFromRow extractParentPath(int indexInRow, NodeCache cache, TypeSystem types)
indexInRow
- the index of the node in the rows; must be validcache
- the cache containing the nodes; may not be nulltypes
- the type system; may not be nullpublic static RowExtractors.ExtractFromRow extractRelativePath(int indexInRow, Path relativePath, NodeCache cache, TypeSystem types)
indexInRow
- the index of the node in the rows; must be validrelativePath
- the relative path that should be applied to the nodes' path; may not be null and must be a valid
relative pathcache
- the cache containing the nodes; may not be nulltypes
- the type system; may not be nullpublic static RowExtractors.ExtractFromRow extractName(int indexInRow, NodeCache cache, TypeSystem types)
indexInRow
- the index of the node in the rows; must be validcache
- the cache containing the nodes; may not be nulltypes
- the type system; may not be nullpublic static RowExtractors.ExtractFromRow extractLocalName(int indexInRow, NodeCache cache, TypeSystem types)
indexInRow
- the index of the node in the rows; must be validcache
- the cache containing the nodes; may not be nulltypes
- the type system; may not be nullpublic static RowExtractors.ExtractFromRow extractUniqueKey(int rowWidth, TypeSystem types)
NodeKey
(if rowWidth is 1), or a tuple
containing each of the NodeKey
s of the nodes in the row. Note that
any of the node keys can be null, but this extractor will never return a null object.rowWidth
- the number of nodes in each row; must be positivetypes
- the types system; may not be nullpublic static RowExtractors.ExtractFromRow extractPropertyValue(Name propertyName, int indexInRow, NodeCache cache, TypeSystem.TypeFactory<?> desiredType)
propertyName
- the name of the property; may not be nullindexInRow
- the index of the node in the rows; must be validcache
- the cache containing the nodes; may not be nulldesiredType
- the desired type, which should be converted from the actual value; may not be nullpublic static RowExtractors.ExtractFromRow extractorWith(RowExtractors.ExtractFromRow first, RowExtractors.ExtractFromRow second)
first
- the first extractor; may not be nullsecond
- the second extractor; may not be nullpublic static RowExtractors.ExtractFromRow extractorWith(RowExtractors.ExtractFromRow first, RowExtractors.ExtractFromRow second, RowExtractors.ExtractFromRow third)
first
- the first extractor; may not be nullsecond
- the second extractor; may not be nullthird
- the third extractor; may not be nullpublic static RowExtractors.ExtractFromRow extractorWith(RowExtractors.ExtractFromRow first, RowExtractors.ExtractFromRow second, RowExtractors.ExtractFromRow third, RowExtractors.ExtractFromRow fourth)
first
- the first extractor; may not be nullsecond
- the second extractor; may not be nullthird
- the third extractor; may not be nullfourth
- the fourth extractor; may not be nullpublic static RowExtractors.ExtractFromRow extractorWith(Collection<RowExtractors.ExtractFromRow> extractors)
extractors
- the extractors; may not be null or emptypublic static RowExtractors.ExtractFromRow extractorWith(RowExtractors.ExtractFromRow extractor, Order order, NullOrder nullOrder)
type factory
with a comparator
that sorts according to the specified order and null-order behavior.extractor
- the original extractor; may not be nullorder
- the specification of whether the comparator should order ascending or descending; may not be nullnullOrder
- the specification of whether null values should appear first or last; may not be nullCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.