THE KNOWLEDGE REPOSITORY SERVICES API REFERENCE (version 2.0)

EXPORTER SERVICE
METHOD NAME DESCRIPTION/PRECONDITIONS/EFFECTS METHOD SIGNATURE EXCEPTIONS  THROWN
FETCH Description:
This method is responsible for dumping into a byte sequence (in RDF/XML serialization or TRIG triple-based formats) the contents of the namespaces or named graphs given as input (spaces). The user of the service needs only to specify the URIs (whose contents will be dumped) and the format to use (TRIG or RDF_XML).
Preconditions:
  • Format is either "TRIG" or "RDF_XML"  
Effects:
Only the requested namespaces and/or graphspaces are returned; not their dependencies. Section 2.1 explains the notion of dependencies among RDF spaces.
public java.lang.String[][] fetchWithData(
java.lang.String[] spaces,
java.lang.String formatDesc,
gr.forth.ics.rdfsuite.services.DbSettings dbSettings

The following exceptions are thrown by the service:

  • PostgresConnectionException: 
    this exception is thrown when the postgres driver is not found or when there is some other problem connecting to the postgres database.

  • ExporterDBException: 
    this exception is thrown when an exception query does not return the expected results because the database is not in the expected state.

  • ExporterOutputException: 
    this exception is thrown when an error appears in the writing to file/to string procedure of the exporter.

FETCH WITH DEPENDENCIES Description:
Fetches the RDF contents of the requested URIs from the underlying storage and all their dependencies, using the requested format (TRIG or RDF_XML). The functionality is similar to the one described in , but, in this method, all transitively dependent namespaces or named graphs of the requested ones are also returned.
Preconditions:
  • Format is either "TRIG" or "RDF_XML"
Effects:
An error is raised if a requested URI, or any URI reachable recursively through dependencies cannot be located (i.e. it has not been stored in the past).  The returned array contains rows with RDF documents, in the requested format. Each row has exactly two String elements, the URI of a returned document, and the document itself.
public java.lang.String[][] fetchWithDependencies(
java.lang.String[] spaces,
java.lang.String formatDesc,
gr.forth.ics.rdfsuite.services.DbSettings dbSettings)
FETCH WITH DATA Description:
Fetches the RDF contents of the requested URIs from the underlying storage, as "Fetch" operation does. Additionally, for every requested namespace, it returns a document containing every data element that is related to that namespace (for example, a class instance of a class declared in that namespace).
Preconditions:
  • Format is either "TRIG" or "RDF_XML"
Effects:
Only the requested namespaces and/or graphspaces are returned; not their dependencies.
public java.lang.String[][] fetch(
java.lang.String[] spaces,
java.lang.String formatDesc,
gr.forth.ics.rdfsuite.services.DbSettingss dbSettings)
FETCH WITH DATA AND DEPENDENCIES Description:
Fetches the RDF contents of the requested URIs from the underlying storage, as "Fetch with dependencies" operation does. Additionally, for every requested namespace, it returns a document containing every data element that is related to that namespace (for example, a class instance of a class declared in that namespace).
Preconditions:
  • Format is either "TRIG" or "RDF_XML"
Effects:
An error is raised if a requested URI, or any URI reachable recursively through dependencies cannot be located (i.e. it has not been stored in the past). The returned array contains rows with RDF documents (the requested ones plus the artificial documents, one for each namespace), in the requested format. Each row has exactly two String elements, the URI of a returned document, and the document itself.
public java.lang.String[][] fetchWithDataAndDependencies(
java.lang.String[] spaces,
java.lang.String formatDesc,
gr.forth.ics.rdfsuite.services.DbSettings dbSettings)