public static ExtractFromRow extractPath ( final int indexInRow , final NodeCache cache , TypeSystem types ) { final TypeFactory < Path > type = types . getPathFactory ( ) ; final boolean trace = NodeSequence . LOGGER . isTraceEnabled ( ) ; return new ExtractFromRow ( ) { @ Override public TypeFactory < Path > getType ( ) { return type ; } @ Override public Object getValueInRow ( RowAccessor row ) { CachedNode node = row . getNode ( indexInRow ) ; if ( node == null ) return null ; Path path = node . getPath ( cache ) ; if ( trace ) NodeSequence . LOGGER . trace ( "Extracting path from {0}" , path ) ; return path ; } @ Override public String toString ( ) { return "(extract-path)" ; } } ; }
Create an extractor that extracts the path from the node at the given position in the row .