org.gnowsis.api
Interface DataAccessApi

All Known Implementing Classes:
DataAccessApiImpl

public interface DataAccessApi

access the local RDF data nicely through XML/RPC or via java. api-name is dataaccess. For a documentation of query languages, see:

Author:
sauermann

Field Summary
static String API_NAME
           
 
Method Summary
 void addTriple(String subject, String predicate, String object, boolean isLiteral)
          Add a triple to the default store, i.e. pimo
 void addTripleC(String subject, String predicate, String object, boolean isLiteral, String context)
          Add a triple to the default store (pimo) in a particular context
 void addTripleS(String subject, String predicate, String object, boolean isLiteral, String store)
          Add a triple to a particular store
 void addTriples(Vector<HashMap<String,Object>> triples, String store)
           
 void addTripleSC(String subject, String predicate, String object, boolean isLiteral, String store, String context)
          Add a triple to given store in a particular context
 String queryConstruct(String query, String lang)
          Query the default store
 String queryConstructF(String query, String lang, String format)
          Query the default store
 String queryConstructS(String query, String lang, String store)
          Query the given store
 String queryConstructSF(String query, String lang, String store, String format)
          Query the given store
 List<Map<String,String>> querySelect(String query, String lang)
          Query the default store
 List<Map<String,String>> querySelectS(String query, String lang, String store)
          Query the given store.
 void removeTriple(String subject, String predicate, String object, boolean isLiteral)
          remove a triple from the default store, i.e. pimo
 void removeTripleC(String subject, String predicate, String object, boolean isLiteral, String context)
          remove a triple from the default store (pimo) in a particular context
 void removeTripleS(String subject, String predicate, String object, boolean isLiteral, String store)
          remove a triple from a particular store
 void removeTriples(Vector<HashMap<String,Object>> triples, String store)
          Remove a list of triples from the given store.
 void removeTripleSC(String subject, String predicate, String object, boolean isLiteral, String store, String context)
          remove a triple from given store in a particular context
 

Field Detail

API_NAME

static final String API_NAME
See Also:
Constant Field Values
Method Detail

addTriple

void addTriple(String subject,
               String predicate,
               String object,
               boolean isLiteral)
               throws Exception
Add a triple to the default store, i.e. pimo

Parameters:
subject -
predicate -
object -
isLiteral -
Throws:
Exception

addTripleS

void addTripleS(String subject,
                String predicate,
                String object,
                boolean isLiteral,
                String store)
                throws Exception
Add a triple to a particular store

Parameters:
subject -
predicate -
object -
isLiteral -
store - - this has to be "resource", "pimo", or "service" (config?)
Throws:
Exception

addTripleC

void addTripleC(String subject,
                String predicate,
                String object,
                boolean isLiteral,
                String context)
                throws Exception
Add a triple to the default store (pimo) in a particular context

Parameters:
subject -
predicate -
object -
isLiteral -
context -
Throws:
Exception

addTripleSC

void addTripleSC(String subject,
                 String predicate,
                 String object,
                 boolean isLiteral,
                 String store,
                 String context)
                 throws Exception
Add a triple to given store in a particular context

Parameters:
subject -
predicate -
object -
isLiteral -
store - - this has to be "resource", "pimo", or "service" (config?)
context -
Throws:
Exception

addTriples

void addTriples(Vector<HashMap<String,Object>> triples,
                String store)
                throws Exception
Parameters:
triples - - a list of HashMaps with subject, object, predicate, isLiteral and ?context keys.
store - - the store to add to.
Throws:
Exception

removeTriple

void removeTriple(String subject,
                  String predicate,
                  String object,
                  boolean isLiteral)
                  throws Exception
remove a triple from the default store, i.e. pimo

Parameters:
subject -
predicate -
object -
isLiteral -
Throws:
Exception

removeTripleS

void removeTripleS(String subject,
                   String predicate,
                   String object,
                   boolean isLiteral,
                   String store)
                   throws Exception
remove a triple from a particular store

Parameters:
subject -
predicate -
object -
isLiteral -
store - - this has to be "resource", "pimo", or "service" (config?)
Throws:
Exception

removeTripleC

void removeTripleC(String subject,
                   String predicate,
                   String object,
                   boolean isLiteral,
                   String context)
                   throws Exception
remove a triple from the default store (pimo) in a particular context

Parameters:
subject -
predicate -
object -
isLiteral -
context -
Throws:
Exception

removeTripleSC

void removeTripleSC(String subject,
                    String predicate,
                    String object,
                    boolean isLiteral,
                    String store,
                    String context)
                    throws Exception
remove a triple from given store in a particular context

Parameters:
subject -
predicate -
object -
isLiteral -
store - - this has to be "resource", "pimo", or "service" (config?)
context -
Throws:
Exception

removeTriples

void removeTriples(Vector<HashMap<String,Object>> triples,
                   String store)
                   throws Exception
Remove a list of triples from the given store.

Parameters:
triples - - a list of HashMaps with subject, object, predicate, isLiteral and ?context keys.
store - - the store to remove to.
Throws:
Exception

querySelect

List<Map<String,String>> querySelect(String query,
                                     String lang)
                                     throws Exception
Query the default store

Parameters:
query -
lang - - must be sparql, serql or fulltext
Returns:
the result
Throws:
Exception

querySelectS

List<Map<String,String>> querySelectS(String query,
                                      String lang,
                                      String store)
                                      throws Exception
Query the given store. Query languages:

Parameters:
query - - the query in the language. for fulltext, this is the lucene query language (try "hello*")
lang - - must be sparql, serql, rdql, or fulltext
store - - name the store to query. one of pimo, resource or service
Returns:
the result
Throws:
Exception

queryConstruct

String queryConstruct(String query,
                      String lang)
                      throws Exception
Query the default store

Parameters:
query -
lang - serql or sparql
Returns:
the graph as rdf/xml
Throws:
Exception

queryConstructS

String queryConstructS(String query,
                       String lang,
                       String store)
                       throws Exception
Query the given store

Parameters:
query -
lang - serql or sparql
store - the store to query
Returns:
the graph as rdf/xml
Throws:
Exception

queryConstructF

String queryConstructF(String query,
                       String lang,
                       String format)
                       throws Exception
Query the default store

Parameters:
query -
lang - serql or sparql
format - rdfxml, n3, ntriples, trix or trig
Returns:
the graph in the given format
Throws:
Exception

queryConstructSF

String queryConstructSF(String query,
                        String lang,
                        String store,
                        String format)
                        throws Exception
Query the given store

Parameters:
query -
lang - serql or sparql
store - the store to query
format - rdfxml, n3, ntriples, trix or trig
Returns:
the graph as rdf/xml
Throws:
Exception