public class FieldMapping<T,Node> extends Object implements LDPathConstruct<Node>
Constructor and Description |
---|
FieldMapping(String fieldName,
URI fieldType,
NodeSelector<Node> selector,
NodeTransformer<T,Node> transformer,
Map<String,String> fieldConfig) |
FieldMapping(URI fieldName,
URI fieldType,
NodeSelector<Node> selector,
NodeTransformer<T,Node> transformer,
Map<String,String> fieldConfig) |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getFieldConfig() |
String |
getFieldName() |
URI |
getFieldType() |
String |
getPathExpression(NodeBackend<Node> backend)
Return the representation of the NodeFunction or NodeSelector in the RDF Path Language
|
NodeSelector<Node> |
getSelector() |
NodeTransformer<T,Node> |
getTransformer() |
Collection<T> |
getValues(RDFBackend<Node> backend,
Node context)
Get the values of this mapping for the context node passed as argument, transformed into the
datatype generated by the transformer.
|
Collection<T> |
getValues(RDFBackend<Node> backend,
Node context,
Map<Node,List<Node>> paths)
Get the values of this mapping for the context node passed as argument, transformed into the
datatype generated by the transformer.
|
void |
setFieldConfig(Map<String,String> fieldConfig) |
void |
setSelector(NodeSelector<Node> selector) |
void |
setTransformer(NodeTransformer<T,Node> transformer) |
public FieldMapping(URI fieldName, URI fieldType, NodeSelector<Node> selector, NodeTransformer<T,Node> transformer, Map<String,String> fieldConfig)
public FieldMapping(String fieldName, URI fieldType, NodeSelector<Node> selector, NodeTransformer<T,Node> transformer, Map<String,String> fieldConfig)
public String getFieldName()
public URI getFieldType()
public NodeSelector<Node> getSelector()
public void setSelector(NodeSelector<Node> selector)
public NodeTransformer<T,Node> getTransformer()
public void setTransformer(NodeTransformer<T,Node> transformer)
public Collection<T> getValues(RDFBackend<Node> backend, Node context, Map<Node,List<Node>> paths)
backend
- context
- public Collection<T> getValues(RDFBackend<Node> backend, Node context)
backend
- context
- public String getPathExpression(NodeBackend<Node> backend)
LDPathConstruct
getPathExpression
in interface LDPathConstruct<Node>
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.