|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BaseRDFTripleModel
Model containing basic RDF management methods. This is the sole model which does not contain a default implementation in this library, and is thus a container for those methods which must be implemented for any wrapped RDF management technology This model supports Named Graphs, so wrapper RDF technologies must also support named graphs or be provided with some extension for supporting them.
Legenda: (..., G1, G2, GN) written after the name of an operation means: all the standard arguments for that operation, followed by the set of name named graphs G1, G2...GN. So, for example, (...) means no NG is being specified
NodeFilters.MAINGRAPH)IllegalArgumentExceptionNodeFilters.ANY)) throws an IllegalArgumentException (ANY valid only
for read/delete)IllegalArgumentExceptionNodeFilters.ANY)) list all statements from all NGs (as the previous
one)ARTResource)null)) throws an IllegalArgumentExceptionNodeFilters.MAINGRAPH)) retrieves stats from the UnnamedGraph (
NodeFilters.MAINGRAPH)
NodeFilters.ANY when used as a NG, returns Statements from all NGs (i.e. from the unnamed NG and
all other NGs) but if you put both NodeFilters.ANY and another NG, you will get all statements only once
per each NG, ignoring all further NG specifications
es: given a graph composed of graphs: MAIN+ngA+ngB
listStatements(..., ngA, NodeFilters.ANY) returns all statements from all NGs (i.e. from the unnamed NG+ngA
and ngB), but will not return again stats from ngA even though it has been specified both directly and
undirectly through use of ANY
| Method Summary | |
|---|---|
void |
addRDF(java.io.File inputFile,
java.lang.String baseURI,
RDFFormat rdfFormat,
ARTResource... graphs)
adds RDF data to graphs graphs by loading it from inputfile inputFile. |
void |
addRDF(java.net.URL url,
java.lang.String baseURI,
RDFFormat rdfFormat,
ARTResource... graphs)
adds RDF data to graphs graphs by loading it from url url. |
void |
addStatement(ARTStatement stat,
ARTResource... graphs)
add statement stat to graphs graphs |
void |
addTriple(ARTResource subject,
ARTURIResource predicate,
ARTNode object,
ARTResource... graphs)
adds the specified triple to graphs graphs |
void |
clearRDF(ARTResource... graphs)
completely clears any RDF statement from the specified graphs |
void |
close()
closes the current model, releasing its resources |
void |
deleteStatement(ARTStatement statement,
ARTResource... graphs)
deletes the specified statement from graphs graphs |
void |
deleteTriple(ARTResource subject,
ARTURIResource property,
ARTNode object,
ARTResource... graphs)
deletes the triple identified by < subject, property, object
> from the specified graphs |
java.lang.String |
getBaseURI()
returns the baseuri of the ontology managed by this model |
java.lang.String |
getDefaultNamespace()
returns the default namespace of the ontology managed by this model |
boolean |
hasStatement(ARTStatement stat,
boolean inferred,
ARTResource... graphs)
checks that the specified statement is present in this model, inside one of the graphs specified in graphs |
boolean |
hasTriple(ARTResource subj,
ARTURIResource pred,
ARTNode obj,
boolean inferred,
ARTResource... graphs)
checks that the triple identified by < subj, pred, obj> is
present in this model, inside one of the graphs specified in graphs |
ARTResourceIterator |
listNamedGraphs()
returns an ARTResourceIterator over the namedgraphs declared in the global RDF graph |
ARTNamespaceIterator |
listNamespaces()
list all namespaces used in this model |
ARTURIResourceIterator |
listPredicatesOfSubjObjPair(ARTResource subject,
ARTNode object,
boolean inferred,
ARTResource... graphs)
list all uri resources which appear as predicates of statements having given subject and
object |
ARTStatementIterator |
listStatements(ARTResource subj,
ARTURIResource pred,
ARTNode obj,
boolean inferred,
ARTResource... graphs)
returns statements which unify with triples containing subj, pred and
obj in their respective positions. |
ARTResourceIterator |
listSubjectsOfPredObjPair(ARTURIResource predicate,
ARTNode object,
boolean inferred,
ARTResource... graphs)
list all resources which appear as subjects of statements having given predicate and
object |
ARTNodeIterator |
listValuesOfSubjPredPair(ARTResource subject,
ARTURIResource predicate,
boolean inferred,
ARTResource... graphs)
list all nodes which appear as objects of statements having given subject and
predicate |
void |
setBaseURI(java.lang.String uri)
sets the baseuri for the ontology managed by this model |
void |
setDefaultNamespace(java.lang.String namespace)
sets the default namespace for the ontology managed by this model |
void |
writeRDF(java.io.File outputFile,
RDFFormat rdfFormat,
ARTResource... graphs)
writes RDF data from graphs graphs into file outputFile. |
void |
writeRDF(java.io.OutputStream os,
RDFFormat rdfFormat,
ARTResource... graphs)
writes RDF data from graphs graphs to output stream os. |
| Methods inherited from interface it.uniroma2.art.owlart.models.PrefixMapping |
|---|
expandQName, getNamespacePrefixMapping, getNSForPrefix, getPrefixForNS, getQName, removeNsPrefixMapping, setNsPrefix |
| Methods inherited from interface it.uniroma2.art.owlart.models.TripleQueryModel |
|---|
createBooleanQuery, createGraphQuery, createQuery, createTupleQuery |
| Methods inherited from interface it.uniroma2.art.owlart.model.ARTNodeFactory |
|---|
createBNode, createBNode, createLiteral, createLiteral, createLiteral, createURIResource |
| Method Detail |
|---|
void addTriple(ARTResource subject,
ARTURIResource predicate,
ARTNode object,
ARTResource... graphs)
throws ModelUpdateException
graphs
subject - predicate - object - graphs -
ModelUpdateException
void addStatement(ARTStatement stat,
ARTResource... graphs)
throws ModelUpdateException
stat to graphs graphs
stat - graphs -
ModelUpdateException
void setDefaultNamespace(java.lang.String namespace)
throws ModelUpdateException
namespace -
ModelUpdateException
void setBaseURI(java.lang.String uri)
throws ModelUpdateException
uri -
ModelUpdateExceptionjava.lang.String getDefaultNamespace()
java.lang.String getBaseURI()
boolean hasTriple(ARTResource subj,
ARTURIResource pred,
ARTNode obj,
boolean inferred,
ARTResource... graphs)
throws ModelAccessException
subj, pred, obj> is
present in this model, inside one of the graphs specified in graphs
subj - the subject of the triplepred - the predicate of the tripleobj - the object of the tripleinferred - tells if the inference engine of the model is to be used for this retrieval operationgraphs - the graphs where to look for the specified triple
ModelAccessException
boolean hasStatement(ARTStatement stat,
boolean inferred,
ARTResource... graphs)
throws ModelAccessException
graphs
stat - the statement which is checked inside the modelinferred - tells if the inference engine of the model is to be used for this retrieval operationgraphs - the graphs where to look for the specified statement
ModelAccessException
ARTStatementIterator listStatements(ARTResource subj,
ARTURIResource pred,
ARTNode obj,
boolean inferred,
ARTResource... graphs)
throws ModelAccessException
subj, pred and
obj in their respective positions. A NodeFilters.ANY value in one of these
positions is equivalent to putting a wildcard in that position.
subj - the subject of the triplepred - the predicate of the tripleobj - the object of the triple
ModelAccessException
void deleteTriple(ARTResource subject,
ARTURIResource property,
ARTNode object,
ARTResource... graphs)
throws ModelUpdateException
subject, property, object
> from the specified graphs
subject - property - object - graphs -
ModelUpdateException
void deleteStatement(ARTStatement statement,
ARTResource... graphs)
throws ModelUpdateException
graphs
statement - graphs -
ModelUpdateException
void clearRDF(ARTResource... graphs)
throws ModelUpdateException
ModelUpdateException
ARTNamespaceIterator listNamespaces()
throws ModelAccessException
ModelAccessException
void addRDF(java.io.File inputFile,
java.lang.String baseURI,
RDFFormat rdfFormat,
ARTResource... graphs)
throws java.io.FileNotFoundException,
java.io.IOException,
ModelAccessException,
ModelUpdateException,
UnsupportedRDFFormatException
graphs by loading it from inputfile inputFile. Data
in the file must be formatted according to the specified rdfFormat. The specified
baseURI is used for those formats where relative resource names are present and the
baseuri is not present in the file.
inputFile - baseURI - rdfFormat - graphs -
java.io.FileNotFoundException
java.io.IOException
ModelAccessException
ModelUpdateException
UnsupportedRDFFormatException
void addRDF(java.net.URL url,
java.lang.String baseURI,
RDFFormat rdfFormat,
ARTResource... graphs)
throws java.io.FileNotFoundException,
java.io.IOException,
ModelAccessException,
ModelUpdateException,
UnsupportedRDFFormatException
graphs by loading it from url url. Data in the file
must be formatted according to the specified rdfFormat. The specified baseURI
is used for those formats where relative resource names are present and the baseuri is not present in
the file.RDFFormat.getMIMEType() method.
url - baseURI - rdfFormat - graphs -
java.io.FileNotFoundException
java.io.IOException
ModelAccessException
ModelUpdateException
UnsupportedRDFFormatException
void writeRDF(java.io.File outputFile,
RDFFormat rdfFormat,
ARTResource... graphs)
throws java.io.IOException,
ModelAccessException,
UnsupportedRDFFormatException
graphs into file outputFile. Data in the file
will be formatted according to the specified rdfFormat.
outputFile - rdfFormat - graphs -
java.io.IOException
ModelAccessException
UnsupportedRDFFormatException
void writeRDF(java.io.OutputStream os,
RDFFormat rdfFormat,
ARTResource... graphs)
throws java.io.IOException,
ModelAccessException,
UnsupportedRDFFormatException
graphs to output stream os. Data in the file will
be formatted according to the specified rdfFormat.
os - rdfFormat - graphs -
java.io.IOException
ModelAccessException
UnsupportedRDFFormatException
void close()
throws ModelUpdateException
ModelUpdateException
ARTResourceIterator listNamedGraphs()
throws ModelAccessException
ARTResourceIterator over the namedgraphs declared in the global RDF graph
ModelAccessException
ARTResourceIterator listSubjectsOfPredObjPair(ARTURIResource predicate,
ARTNode object,
boolean inferred,
ARTResource... graphs)
throws ModelAccessException
predicate and
object
predicate - object - inferred -
ModelAccessException
ARTNodeIterator listValuesOfSubjPredPair(ARTResource subject,
ARTURIResource predicate,
boolean inferred,
ARTResource... graphs)
throws ModelAccessException
subject and
predicate
subject - predicate - inferred - contexts -
ModelAccessException
ARTURIResourceIterator listPredicatesOfSubjObjPair(ARTResource subject,
ARTNode object,
boolean inferred,
ARTResource... graphs)
throws ModelAccessException
subject and
object
subject - object - inferred - contexts -
ModelAccessException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||