org.semanticweb.triple.application
Interface TripleService

All Known Implementing Classes:
TripleServiceImpl

public interface TripleService

TRIPLE Service API

Version:
Author:
Stefan Decker, Andreas Harth

Method Summary
 void add(java.net.URL uri)
          Add statements or rules in RDF/XML, N3, or TRIPLE syntax, according to the mime type of the URI that contains the data.
 void addN3File(java.lang.String filename)
          Compiles the N3 definitions provided by the file and adds the content incrementally to the into XSB.
 void addN3Stream(java.io.InputStream n3Stream)
          Compiles the RDF definitions provided by the InputStream and adds the content temporarily to the internal Knowledge Base into the RDF model whose URI is constructed out of the provided namespace and localname.
 void addN3String(java.lang.String n3String)
          Compiles the N3 definitions provided by the file and adds the content incrementally to the into XSB.
 void addRDFFile(java.lang.String filename, java.lang.String ns, java.lang.String localname)
          Compiles the RDF definitions provided by the file and adds the content incrementally to the into the RDF model whose URI is constructed out of the provided namespace and localname.
 void addRDFFile(java.lang.String filename, java.lang.String ns, java.lang.String localname, java.lang.String appendix)
           
 void addRDFStream(java.io.InputStream rdfStream, java.lang.String nameSpace, java.lang.String localName)
          Compiles the RDF definitions provided by the InputStream and adds the content temporarily to the internal Knowledge Base into the RDF model whose URI is constructed out of the provided namespace and localname.
 void addRDFString(java.lang.String rdfString, java.lang.String nameSpace, java.lang.String localName)
          Compiles the RDF definitions provided by the String and adds the content incrementally to the into the RDF model whose URI is constructed out of the provided namespace and localname.
 void addRDFString(java.lang.String rdfString, java.lang.String nameSpace, java.lang.String localName, java.lang.String appendix)
           
 void addTripleFile(java.lang.String fileName)
          Compiles the Triple definitions contained in the file and adds the content incrementally to the internal Knowledge Base.
 void addTripleStream(java.io.InputStream ruleStream)
          Compiles the Triple definitions provided by the InputStream and adds the content incrementally to the internal Knowledge Base.
 void addTripleString(java.lang.String rules)
          Compiles the Triple definitions contained in the string and adds the content incrementally to the internal Knowledge Base.
 void addXSBFile(java.lang.String filename)
          Add XSB commands directly (suggested by Jose Luis).
 void addXSBStream(java.io.InputStream xsbStream)
          Add XSB commands directly (suggested by Jose Luis).
 void addXSBString(java.lang.String xsbString)
          Add XSB commands directly (suggested by Jose Luis).
 ResultSet askTripleQueryFile(java.lang.String filename)
          Ask a query that's stored in a file.
 ResultSet askTripleQueryStream(java.io.InputStream queryStream)
          Ask a query that's in a stream.
 ResultSet askTripleQueryString(java.lang.String queryString)
          Ask a query that's stored in a string.
 void closeTriple()
          Cleanup.
 java.lang.String getDetails(java.lang.String ns, java.lang.String localname, java.lang.String appendix)
          Returns the details of an RDF file.
 void initTriple(java.lang.String rmiLocation)
          Init.
 ResultSet query(java.net.URL uri)
          Ask a query in TRIPLE syntax according to the content type of the URI that contains the query.
 void removeModel(java.lang.String nameSpace, java.lang.String localName)
          Deletes the content of the RDF model who's ID is given by the namespace and the localname.
 void removeN3File(java.lang.String ns, java.lang.String localname, java.lang.String appendix)
           
 void removeRDFFile(java.lang.String ns, java.lang.String localname, java.lang.String appendix)
           
 

Method Detail

initTriple

public void initTriple(java.lang.String rmiLocation)
                throws XSBException,
                       java.rmi.RemoteException
Init. Loads XSB engine.

Throws:
XSBException
java.rmi.RemoteException

closeTriple

public void closeTriple()
                 throws XSBException,
                        java.rmi.RemoteException
Cleanup. Does nothing right now.

Throws:
XSBException
java.rmi.RemoteException

add

public void add(java.net.URL uri)
         throws ParseException,
                java.io.IOException,
                XSBException,
                org.xml.sax.SAXException
Add statements or rules in RDF/XML, N3, or TRIPLE syntax, according to the mime type of the URI that contains the data.

Throws:
ParseException
java.io.IOException
XSBException
org.xml.sax.SAXException

query

public ResultSet query(java.net.URL uri)
                throws java.io.IOException,
                       ParseException,
                       XSBException
Ask a query in TRIPLE syntax according to the content type of the URI that contains the query.

Throws:
java.io.IOException
ParseException
XSBException

addTripleFile

public void addTripleFile(java.lang.String fileName)
                   throws ParseException,
                          java.io.IOException,
                          XSBException
Compiles the Triple definitions contained in the file and adds the content incrementally to the internal Knowledge Base.

Throws:
ParseException
java.io.IOException
XSBException

addTripleString

public void addTripleString(java.lang.String rules)
                     throws ParseException,
                            XSBException
Compiles the Triple definitions contained in the string and adds the content incrementally to the internal Knowledge Base.

Throws:
ParseException
XSBException

addTripleStream

public void addTripleStream(java.io.InputStream ruleStream)
                     throws ParseException,
                            XSBException
Compiles the Triple definitions provided by the InputStream and adds the content incrementally to the internal Knowledge Base.

Throws:
ParseException
XSBException

addRDFFile

public void addRDFFile(java.lang.String filename,
                       java.lang.String ns,
                       java.lang.String localname)
                throws org.xml.sax.SAXException,
                       java.io.IOException,
                       XSBException
Compiles the RDF definitions provided by the file and adds the content incrementally to the into the RDF model whose URI is constructed out of the provided namespace and localname.

Throws:
org.xml.sax.SAXException
java.io.IOException
XSBException

addRDFFile

public void addRDFFile(java.lang.String filename,
                       java.lang.String ns,
                       java.lang.String localname,
                       java.lang.String appendix)
                throws org.xml.sax.SAXException,
                       java.io.IOException,
                       XSBException
Throws:
org.xml.sax.SAXException
java.io.IOException
XSBException

removeRDFFile

public void removeRDFFile(java.lang.String ns,
                          java.lang.String localname,
                          java.lang.String appendix)
                   throws org.xml.sax.SAXException,
                          java.io.IOException,
                          XSBException
Throws:
org.xml.sax.SAXException
java.io.IOException
XSBException

removeN3File

public void removeN3File(java.lang.String ns,
                         java.lang.String localname,
                         java.lang.String appendix)
                  throws org.xml.sax.SAXException,
                         java.io.IOException,
                         XSBException
Throws:
org.xml.sax.SAXException
java.io.IOException
XSBException

addRDFString

public void addRDFString(java.lang.String rdfString,
                         java.lang.String nameSpace,
                         java.lang.String localName)
                  throws org.xml.sax.SAXException,
                         java.io.IOException,
                         XSBException
Compiles the RDF definitions provided by the String and adds the content incrementally to the into the RDF model whose URI is constructed out of the provided namespace and localname.

Throws:
org.xml.sax.SAXException
java.io.IOException
XSBException

addRDFString

public void addRDFString(java.lang.String rdfString,
                         java.lang.String nameSpace,
                         java.lang.String localName,
                         java.lang.String appendix)
                  throws org.xml.sax.SAXException,
                         java.io.IOException,
                         XSBException
Throws:
org.xml.sax.SAXException
java.io.IOException
XSBException

addRDFStream

public void addRDFStream(java.io.InputStream rdfStream,
                         java.lang.String nameSpace,
                         java.lang.String localName)
                  throws org.xml.sax.SAXException,
                         java.io.IOException,
                         XSBException
Compiles the RDF definitions provided by the InputStream and adds the content temporarily to the internal Knowledge Base into the RDF model whose URI is constructed out of the provided namespace and localname.

Throws:
org.xml.sax.SAXException
java.io.IOException
XSBException

removeModel

public void removeModel(java.lang.String nameSpace,
                        java.lang.String localName)
                 throws XSBException,
                        java.rmi.RemoteException
Deletes the content of the RDF model who's ID is given by the namespace and the localname.

Throws:
XSBException
java.rmi.RemoteException

askTripleQueryFile

public ResultSet askTripleQueryFile(java.lang.String filename)
                             throws ParseException,
                                    XSBException,
                                    java.rmi.RemoteException,
                                    java.io.IOException
Ask a query that's stored in a file.

Throws:
ParseException
XSBException
java.rmi.RemoteException
java.io.IOException

askTripleQueryString

public ResultSet askTripleQueryString(java.lang.String queryString)
                               throws ParseException,
                                      XSBException,
                                      java.rmi.RemoteException,
                                      java.io.IOException
Ask a query that's stored in a string.

Throws:
ParseException
XSBException
java.rmi.RemoteException
java.io.IOException

askTripleQueryStream

public ResultSet askTripleQueryStream(java.io.InputStream queryStream)
                               throws ParseException,
                                      XSBException,
                                      java.rmi.RemoteException,
                                      java.io.IOException
Ask a query that's in a stream.

Throws:
ParseException
XSBException
java.rmi.RemoteException
java.io.IOException

addN3File

public void addN3File(java.lang.String filename)
               throws java.io.IOException,
                      java.rmi.RemoteException,
                      XSBException
Compiles the N3 definitions provided by the file and adds the content incrementally to the into XSB.

Throws:
java.io.IOException
java.rmi.RemoteException
XSBException

addN3String

public void addN3String(java.lang.String n3String)
                 throws java.io.IOException,
                        java.rmi.RemoteException,
                        XSBException
Compiles the N3 definitions provided by the file and adds the content incrementally to the into XSB.

Throws:
java.io.IOException
java.rmi.RemoteException
XSBException

addN3Stream

public void addN3Stream(java.io.InputStream n3Stream)
                 throws java.io.IOException,
                        java.rmi.RemoteException,
                        XSBException
Compiles the RDF definitions provided by the InputStream and adds the content temporarily to the internal Knowledge Base into the RDF model whose URI is constructed out of the provided namespace and localname.

Throws:
java.io.IOException
java.rmi.RemoteException
XSBException

getDetails

public java.lang.String getDetails(java.lang.String ns,
                                   java.lang.String localname,
                                   java.lang.String appendix)
                            throws java.io.IOException
Returns the details of an RDF file.

Throws:
java.io.IOException

addXSBFile

public void addXSBFile(java.lang.String filename)
                throws java.io.IOException,
                       java.rmi.RemoteException,
                       XSBException
Add XSB commands directly (suggested by Jose Luis).

Throws:
java.io.IOException
java.rmi.RemoteException
XSBException

addXSBString

public void addXSBString(java.lang.String xsbString)
                  throws java.io.IOException,
                         java.rmi.RemoteException,
                         XSBException
Add XSB commands directly (suggested by Jose Luis).

Throws:
java.io.IOException
java.rmi.RemoteException
XSBException

addXSBStream

public void addXSBStream(java.io.InputStream xsbStream)
                  throws java.io.IOException,
                         java.rmi.RemoteException,
                         XSBException
Add XSB commands directly (suggested by Jose Luis).

Throws:
java.io.IOException
java.rmi.RemoteException
XSBException