public class RDFNodeWrapper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ModelWrapper |
modelw |
protected org.apache.jena.rdf.model.RDFNode |
node |
| Constructor and Description |
|---|
RDFNodeWrapper(ModelWrapper modelw,
org.apache.jena.rdf.model.RDFNode node) |
| Modifier and Type | Method and Description |
|---|---|
List<RDFNodeWrapper> |
asList()
Return the contents of the RDF list as a list of wrapped nodes
|
org.apache.jena.rdf.model.Literal |
asLiteral()
Return as a Jena Literal object
|
org.apache.jena.rdf.model.RDFNode |
asRDFNode()
Return unwrapped Jena RDFNode
|
org.apache.jena.rdf.model.Resource |
asResource()
Return as a Jena Resource object
|
String |
asTurtle()
Format a wrapped node as though it was being serialise as Turtle.
|
protected String |
asTurtle(org.apache.jena.rdf.model.RDFNode val,
org.apache.jena.shared.PrefixMapping prefixes) |
ModelWrapper |
closure()
Return a wrapped memory model containing the bNode closure of this resource
|
ModelWrapper |
closure(ModelWrapper target)
Added the bNode closure of this resource into the given (wrapped) model
|
List<RDFNodeWrapper> |
connectedNodes(String path)
Return the list nodes which link to this one via a SPARQL property path
|
boolean |
equals(Object other) |
RDFNodeWrapper |
firstValueOf(String props)
Check each property in a comma-separated list of named properties and return the
value of the first that has a value
|
RDFNodeWrapper |
get(Object prop)
Return a single value for the property of null if there is none, property can be specified using URI strings, curies or nodes
|
RDFNodeWrapper |
getDatatype()
If this is a literal return its datatype as a wrapped node, otherwise return null
|
String |
getLanguage()
If this is a literal return its language, otherwise return null
|
String |
getLexicalForm()
Return the lexical form for a literal, the URI of a resource, the anonID of a bNode
|
String |
getLocalizedValue(Object prop)
Return a string value for the given property, selecting one in the model's locale language if possible
|
ModelWrapper |
getModelW() |
String |
getName() |
RDFNodeWrapper |
getPropertyValue(Object prop)
Return a single value for the property of null if there is none, property can be specified using URI strings, curies or nodes
|
String |
getShortURI()
Return the shortform curi for the URI if possible, else the full URI
|
String |
getURI()
Return the URI
|
Object |
getValue()
If this is a literal return the literal value as a java object, otherwise returns self
|
int |
hashCode() |
boolean |
hasResourceValue(Object prop,
Object value)
Return true if the property has the given value
|
boolean |
isAnon()
Return true if this is an anonymous resource
|
boolean |
isList()
Return true if the node is an RDF list
|
boolean |
isLiteral()
tests true of the node is a literal
|
boolean |
isResource()
Return true if this is an RDF resource
|
List<PropertyValue> |
listInLinks()
Return the set of nodes which point to us
|
List<RDFNodeWrapper> |
listInLinks(Object prop)
Return list of nodes that point to us by the given property
|
List<PropertyValue> |
listProperties()
Return the set of property values of this node as a ordered list of value bindings
|
List<RDFNodeWrapper> |
listPropertyValues(Object prop)
Return the value of the given property as a list of literal values or wrapped nodes, property can be specified using URI strings, curies or nodes
|
protected String |
tokeniseWords(String name)
Tokenise the input string into words based on camelCase boundaries and hyphen characters.
|
org.apache.jena.rdf.model.Property |
toProperty(Object prop)
Return the RDF property object identified by the given
prop. |
String |
toString() |
protected org.apache.jena.rdf.model.RDFNode node
protected ModelWrapper modelw
public RDFNodeWrapper(ModelWrapper modelw, org.apache.jena.rdf.model.RDFNode node)
public String asTurtle()
protected String asTurtle(org.apache.jena.rdf.model.RDFNode val, org.apache.jena.shared.PrefixMapping prefixes)
public ModelWrapper getModelW()
public org.apache.jena.rdf.model.RDFNode asRDFNode()
public boolean isLiteral()
public org.apache.jena.rdf.model.Literal asLiteral()
public boolean isList()
public List<RDFNodeWrapper> asList()
public String getLexicalForm()
public String getName()
protected String tokeniseWords(String name)
name - The input name to tokenisepublic String getLanguage()
public Object getValue()
public RDFNodeWrapper getDatatype()
public boolean isResource()
public boolean isAnon()
public org.apache.jena.rdf.model.Resource asResource()
public String getURI()
public String getShortURI()
public org.apache.jena.rdf.model.Property toProperty(Object prop)
prop.
Cases:
prop is the URI of the property in fullprop is the URI of the property in prefix:name formprop is an RDF Property objectprop is an RDF Resource objectprop is an RDFNodeWrapper, in which case the property
denoted is that denoted by the wrapped RDF nodeprop - An object identifying a propertyProperty object, or nullpublic RDFNodeWrapper get(Object prop)
public RDFNodeWrapper getPropertyValue(Object prop)
public String getLocalizedValue(Object prop)
public boolean hasResourceValue(Object prop, Object value)
public List<RDFNodeWrapper> listPropertyValues(Object prop)
public List<PropertyValue> listProperties()
public List<RDFNodeWrapper> listInLinks(Object prop)
public List<PropertyValue> listInLinks()
public RDFNodeWrapper firstValueOf(String props)
public List<RDFNodeWrapper> connectedNodes(String path)
public ModelWrapper closure()
public ModelWrapper closure(ModelWrapper target)
Copyright © 2017. All rights reserved.