public abstract class OREResourceJena extends Object implements OREResource, GraphResource
| Modifier and Type | Field and Description |
|---|---|
protected com.hp.hpl.jena.rdf.model.Model |
model |
protected com.hp.hpl.jena.rdf.model.Resource |
res |
| Modifier | Constructor and Description |
|---|---|
protected |
OREResourceJena() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
aboveInHierarchy(Vocab type) |
void |
addAgent(URI relationship,
Agent agent) |
void |
addCreator(Agent creator) |
protected void |
addModelToModel(com.hp.hpl.jena.rdf.model.Model externalModel) |
void |
addRDF(String rdf,
String format) |
protected void |
addResourceToModel(com.hp.hpl.jena.rdf.model.Resource resource) |
void |
addTriple(Triple triple)
Add the given triple to the current graph.
|
void |
addTriples(List<Triple> triples)
Add the list of triples to the current graph.
|
void |
addType(URI type)
Add the given type URI to the resource
|
void |
clearAgents(URI relationship) |
void |
clearCreators() |
void |
clearTypes()
Remove all the types associated with this resource.
|
Triple |
createTriple(Predicate pred,
Object literal)
Create a triple with the given predicate on the given literal.
|
Triple |
createTriple(Predicate pred,
URI uri)
Create a triple with the given predicate on the given URI
|
Triple |
createTriple(URI pred,
Object literal)
Create a triple using the given URI for the predicate and the given
literal for the subject.
|
Triple |
createTriple(URI pred,
URI uri)
Create a triple using the given URI for the predicate and the given
URI for the subject.
|
Triple |
createTriple(Vocab pred,
Object literal)
Create a triple using the given Vocab enum element as the source of the
prdicate, and the given Object as a literal.
|
Triple |
createTriple(Vocab pred,
URI uri)
Create a triple using the given Vocab enum element as the source of the
predicate, and the given URI for the subject.
|
abstract void |
detach()
Detach the current object from the current model.
|
abstract void |
empty()
Remove everyting inside the object, but leave the object itself
in existence.
|
List<Agent> |
getAgents(URI relationship) |
List<Agent> |
getCreators() |
com.hp.hpl.jena.rdf.model.Model |
getModel() |
protected List<Vocab> |
getOREObjectOfPredicates(com.hp.hpl.jena.rdf.model.Resource resource) |
protected List<Vocab> |
getORESubjectOfPredicates(com.hp.hpl.jena.rdf.model.Resource resource) |
protected Vocab |
getOREType(com.hp.hpl.jena.rdf.model.Resource resource) |
com.hp.hpl.jena.rdf.model.Resource |
getResource() |
List<URI> |
getTypes()
Get a list of the types associated with this resource.
|
URI |
getURI()
Get the URI representing the resource
|
protected boolean |
isUsedElsewhere(com.hp.hpl.jena.rdf.model.Resource resource) |
List<Triple> |
listAllTriples()
List all triples associated with the whole ORE graph as known about by
the resource in its current environment.
|
List<Triple> |
listAllTriples(TripleSelector selector)
List all triples associated with the whole ORE graph as known about by
the resource in its current environment, which match the selection
criteria
|
List<Triple> |
listTriples()
List all of the triples directly descended from the resource type.
|
List<Triple> |
listTriples(TripleSelector selector)
List all the triples directly descended from the resource type which match
the selection criteria.
|
protected List<Triple> |
listTriples(URI subjectURI,
Predicate predInit,
URI objectURI,
Object objectLiteral) |
protected void |
prune() |
protected boolean |
recursivelyRemovable(com.hp.hpl.jena.rdf.model.Statement stmt) |
protected void |
recursiveRemove(com.hp.hpl.jena.rdf.model.Resource resource) |
void |
removeTriple(Triple triple)
Remove the given triple from the current graph.
|
void |
setAgents(List<URI> relationship,
Agent agent) |
void |
setCreators(List<Agent> creators) |
void |
setModel(com.hp.hpl.jena.rdf.model.Model model,
com.hp.hpl.jena.rdf.model.AnonId blankID) |
void |
setModel(com.hp.hpl.jena.rdf.model.Model model,
URI resourceURI) |
void |
setResource(com.hp.hpl.jena.rdf.model.Resource resource) |
void |
setTypes(List<URI> types)
Set the list of types associated with this resource.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetORETypeprotected com.hp.hpl.jena.rdf.model.Model model
protected com.hp.hpl.jena.rdf.model.Resource res
public URI getURI() throws OREException
OREResourcegetURI in interface OREResourcenull if not.OREExceptionpublic List<Triple> listTriples() throws OREException
OREResourcelistTriples in interface OREResourceOREExceptionpublic List<Triple> listAllTriples() throws OREException
OREResourcelistAllTriples in interface OREResourceOREExceptionpublic List<Triple> listTriples(TripleSelector selector) throws OREException
OREResourcelistTriples in interface OREResourceOREExceptionpublic List<Triple> listAllTriples(TripleSelector selector) throws OREException
OREResourcelistAllTriples in interface OREResourceOREExceptionpublic void addTriples(List<Triple> triples) throws OREException
OREResourceaddTriples in interface OREResourceOREExceptionpublic void addTriple(Triple triple) throws OREException
OREResourceaddTriple in interface OREResourceOREExceptionpublic void removeTriple(Triple triple) throws OREException
OREResourceremoveTriple in interface OREResourceOREExceptionpublic Triple createTriple(Predicate pred, URI uri) throws OREException
OREResourcecreateTriple in interface OREResourceOREExceptionpublic Triple createTriple(Predicate pred, Object literal) throws OREException
OREResource.toString() method or another method
as per the implementation.createTriple in interface OREResourceOREExceptionpublic Triple createTriple(URI pred, URI uri) throws OREException
OREResourcecreateTriple in interface OREResourceOREExceptionpublic Triple createTriple(URI pred, Object literal) throws OREException
OREResourcecreateTriple in interface OREResourceOREExceptionpublic Triple createTriple(Vocab pred, URI uri) throws OREException
OREResourcecreateTriple in interface OREResourceOREExceptionpublic Triple createTriple(Vocab pred, Object literal) throws OREException
OREResourcecreateTriple in interface OREResourceOREExceptionpublic List<Agent> getCreators()
getCreators in interface OREResourcepublic void setCreators(List<Agent> creators)
setCreators in interface OREResourcepublic void addCreator(Agent creator)
addCreator in interface OREResourcepublic void clearCreators()
clearCreators in interface OREResourcepublic List<Agent> getAgents(URI relationship) throws OREException
getAgents in interface OREResourceOREExceptionpublic void setAgents(List<URI> relationship, Agent agent) throws OREException
setAgents in interface OREResourceOREExceptionpublic void addAgent(URI relationship, Agent agent) throws OREException
addAgent in interface OREResourceOREExceptionpublic void clearAgents(URI relationship) throws OREException
clearAgents in interface OREResourceOREExceptionpublic List<URI> getTypes() throws OREException
OREResourcegetTypes in interface OREResourceOREExceptionpublic void setTypes(List<URI> types)
OREResourcesetTypes in interface OREResourcepublic void addType(URI type)
OREResourceaddType in interface OREResourcepublic void clearTypes()
OREResourceclearTypes in interface OREResourcepublic void addRDF(String rdf, String format) throws OREException
addRDF in interface OREResourceOREExceptionpublic abstract void empty()
throws OREException
OREResourceempty in interface OREResourceOREExceptionpublic abstract void detach()
throws OREException
OREResourcedetach in interface OREResourceOREExceptionpublic com.hp.hpl.jena.rdf.model.Resource getResource()
getResource in interface GraphResourcepublic void setResource(com.hp.hpl.jena.rdf.model.Resource resource)
setResource in interface GraphResourcepublic com.hp.hpl.jena.rdf.model.Model getModel()
getModel in interface GraphResourcepublic void setModel(com.hp.hpl.jena.rdf.model.Model model,
URI resourceURI)
throws OREException
setModel in interface GraphResourceOREExceptionpublic void setModel(com.hp.hpl.jena.rdf.model.Model model,
com.hp.hpl.jena.rdf.model.AnonId blankID)
throws OREException
setModel in interface GraphResourceOREExceptionprotected List<Triple> listTriples(URI subjectURI, Predicate predInit, URI objectURI, Object objectLiteral) throws OREException
OREExceptionprotected void addResourceToModel(com.hp.hpl.jena.rdf.model.Resource resource)
protected void addModelToModel(com.hp.hpl.jena.rdf.model.Model externalModel)
protected void recursiveRemove(com.hp.hpl.jena.rdf.model.Resource resource)
throws OREException
OREExceptionprotected boolean recursivelyRemovable(com.hp.hpl.jena.rdf.model.Statement stmt)
throws OREException
OREExceptionprotected Vocab getOREType(com.hp.hpl.jena.rdf.model.Resource resource) throws OREException
OREExceptionprotected boolean aboveInHierarchy(Vocab type) throws OREException
OREExceptionprotected boolean isUsedElsewhere(com.hp.hpl.jena.rdf.model.Resource resource)
throws OREException
OREExceptionprotected void prune()
protected List<Vocab> getOREObjectOfPredicates(com.hp.hpl.jena.rdf.model.Resource resource)
Copyright © 2020. All rights reserved.