public class GraphNodeDataFieldResolver extends DataFieldResolver
GraphNode
to be used with DefaultParser
.
It is used by DefaultParser
to resolve RDF data fields in templates.
Modifier and Type | Class and Description |
---|---|
static class |
GraphNodeDataFieldResolver.PropertyKey |
Constructor and Description |
---|
GraphNodeDataFieldResolver(GraphNode node,
RenderingFunctions renderingFunctions)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
resolve(String fieldName,
int[] arrayPos)
invokes resolveAsObject and transforms its result to a String
|
Object |
resolveAsObject(String fieldName,
int[] arrayPos)
This method resolves the specified
fieldName to its object value,
if any level of the fieldName is an array,
the corresponding entry in arrayPos is used for resolution. |
public GraphNodeDataFieldResolver(GraphNode node, RenderingFunctions renderingFunctions)
node
- An RDF resource.public Object resolveAsObject(String fieldName, int[] arrayPos) throws FieldDoesNotHaveDimensionException, FieldIndexOutOfBoundsException, InvalidElementException, IOException
DataFieldResolver
fieldName
to its object value,
if any level of the fieldName
is an array,
the corresponding entry in arrayPos
is used for resolution.resolveAsObject
in class DataFieldResolver
fieldName
- name of the data field to resolve.arrayPos
- An array containing array indices (the loop variables)
for array fields.FieldDoesNotHaveDimensionException
- If arrayPos
is longer than the field has dimensions.FieldIndexOutOfBoundsException
- If a value of arrayPos
is larger than the
number of elements in field.InvalidElementException
- If field-name is invalid.IOException
public String resolve(String fieldName, int[] arrayPos) throws FieldDoesNotHaveDimensionException, FieldIndexOutOfBoundsException, InvalidElementException, IOException
DataFieldResolver
resolve
in class DataFieldResolver
fieldName
- name of the data field to resolve.arrayPos
- An array containing array indices (the loop variables)
for array fields.FieldDoesNotHaveDimensionException
- If arrayPos
is longer than the field has dimensions.FieldIndexOutOfBoundsException
- If a value of arrayPos
is larger than the
number of elements in field.InvalidElementException
- If field-name is invalid.IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.