|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.reasoner.dig.DIGConnection
public class DIGConnection
Encapsulates the connection to a DIG reasoner.
Field Summary | |
---|---|
static String |
DEFAULT_REASONER_URL
Default URL for connecting to a local DIG reasoner on port 8081 |
static String |
XSI
Namespace for XSI |
Constructor Summary | |
---|---|
DIGConnection()
|
Method Summary | |
---|---|
void |
bindKB(boolean rebind,
DIGProfile profile)
Bind a DIG KB to this adapter, by requesting a KB URI through the newKB verb. |
void |
errorCheck(Document response)
Check the response from the DIG server to see if there is an error code, and raise an excption if so. |
String |
getReasonerURL()
Answer the URL of the external reasoner this connection is bound to. |
Iterator |
getWarnings()
Answer an iterator over the warnings received since the last tell operation |
void |
release()
Release this connection back to the connection pool. |
Document |
sendDigVerb(Document digVerb,
DIGProfile profile)
Send a verb to the attached DIG reasoner and answer the result. |
void |
serialiseDocument(Document doc,
Writer out)
Serialise the given document to the given output writer. |
void |
setReasonerURL(String url)
Set the URL of the external reasoner with which this connection communicates. |
boolean |
warningCheck(Document response)
Append any warning messages from this response to the list of recent warnings, which is first cleared. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_REASONER_URL
public static final String XSI
Constructor Detail |
---|
public DIGConnection()
Method Detail |
---|
public Document sendDigVerb(Document digVerb, DIGProfile profile)
Send a verb to the attached DIG reasoner and answer the result. The verb is encoded as an XML document object.
digVerb
- A DIG verb (information request, ask or tell) as an XML document
DigReasonerException
- for any errors in XML encoding or HTTP transmissionpublic void serialiseDocument(Document doc, Writer out)
Serialise the given document to the given output writer.
doc
- An XML document to serialiseout
- A writer that will consume the seralised form of the documentpublic void bindKB(boolean rebind, DIGProfile profile)
Bind a DIG KB to this adapter, by requesting a KB URI through the newKB verb. If there is already a binding, do nothing unless rebind is true.
rebind
- If true, any existing KB will be released before binding
to a new KBpublic void errorCheck(Document response)
Check the response from the DIG server to see if there is an error code, and raise an excption if so.
response
- The response from the DIG serverpublic boolean warningCheck(Document response)
Append any warning messages from this response to the list of recent warnings, which is first cleared.
response
- The response from the DIG server
public Iterator getWarnings()
Answer an iterator over the warnings received since the last tell operation
public void release()
Release this connection back to the connection pool.
public String getReasonerURL()
Answer the URL of the external reasoner this connection is bound to.
public void setReasonerURL(String url)
Set the URL of the external reasoner with which this connection communicates.
url
- The URL of the new external reasoner connection point
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |