public class CommonNodeWrapper
extends com.epimorphics.rdfutil.RDFNodeWrapper
RDFNodeWrapper
from the
Epimorphics general library, simply to allow some local additions to the functional
capabilities of RDFNodeWrapper. In time, many or all of these methods may migrate to the
library version.Constructor and Description |
---|
CommonNodeWrapper(com.epimorphics.rdfutil.ModelWrapper mw,
com.hp.hpl.jena.rdf.model.RDFNode node) |
CommonNodeWrapper(Page page,
com.hp.hpl.jena.rdf.model.RDFNode node)
Construct a common node wrapper that is attached to a particular page.
|
Modifier and Type | Method and Description |
---|---|
int |
getInt(Object p,
int def)
Return the int value of a property
p of this resource, or return a default
value. |
com.hp.hpl.jena.rdf.model.Resource |
getResource(Object p)
Return the resource value of the given property, or null.
|
boolean |
isXmlLiteral() |
Page |
page() |
asList, asLiteral, asRDFNode, asResource, asTurtle, asTurtle, closure, closure, connectedNodes, equals, firstValueOf, get, getDatatype, getLanguage, getLexicalForm, getLocalizedValue, getModelW, getName, getPropertyValue, getShortURI, getURI, getValue, hashCode, hasResourceValue, isAnon, isList, isLiteral, isResource, listInLinks, listInLinks, listProperties, listPropertyValues, tokeniseWords, toProperty, toString
public CommonNodeWrapper(com.epimorphics.rdfutil.ModelWrapper mw, com.hp.hpl.jena.rdf.model.RDFNode node)
public CommonNodeWrapper(Page page, com.hp.hpl.jena.rdf.model.RDFNode node)
page
- The page objectnode
- The wrapped nodepublic Page page()
public int getInt(Object p, int def)
p
of this resource, or return a default
value. The default value is returned when: this node is not a resource,
this resource does not have a property p
, or the value of p
is not an integer.p
- A property, specified as a property object, URI or curiedef
- The default valuepublic com.hp.hpl.jena.rdf.model.Resource getResource(Object p)
p
- A property, specified as a property object, URI or curiep
property of this node if it is a resource.
If this node is not a resource, or does not have at least one p
property, return nullpublic boolean isXmlLiteral()
Copyright © 2014. All Rights Reserved.