|
||||||||||
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 java.lang.String |
DEFAULT_REASONER_URL
Default URL for connecting to a local DIG reasoner on port 8081 |
static java.lang.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(org.w3c.dom.Document response,
DIGProfile profile)
Check the response from the DIG server to see if there is an error code, and raise an excption if so. |
java.lang.String |
getReasonerURL()
Answer the URL of the external reasoner this connection is bound to. |
java.util.Iterator |
getWarnings()
Answer an iterator over the warnings received since the last tell operation |
void |
release()
Release this connection back to the connection pool. |
org.w3c.dom.Document |
sendDigVerb(org.w3c.dom.Document digVerb,
DIGProfile profile)
Send a verb to the attached DIG reasoner and answer the result. |
void |
serialiseDocument(org.w3c.dom.Document doc,
java.io.Writer out)
Serialise the given document to the given output writer. |
void |
setReasonerURL(java.lang.String url)
Set the URL of the external reasoner with which this connection communicates. |
boolean |
warningCheck(org.w3c.dom.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 java.lang.String DEFAULT_REASONER_URL
public static final java.lang.String XSI
Constructor Detail |
---|
public DIGConnection()
Method Detail |
---|
public org.w3c.dom.Document sendDigVerb(org.w3c.dom.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(org.w3c.dom.Document doc, java.io.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(org.w3c.dom.Document response, DIGProfile profile)
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(org.w3c.dom.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 java.util.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 java.lang.String getReasonerURL()
Answer the URL of the external reasoner this connection is bound to.
public void setReasonerURL(java.lang.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 |