|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fuberlin.wiwiss.ng4j.impl.NamedGraphSetIO de.fuberlin.wiwiss.ng4j.impl.NamedGraphSetImpl de.fuberlin.wiwiss.ng4j.semwebclient.SemanticWebClient
public class SemanticWebClient
The SematicWebClient interface enables applications to access the Semantic Web.
The Semantic Web is represended as a single, global RDF graph. The library enables applications to query this global graph using SPARQL- and find(SPO) queries. To answer queries, the library dynamically retrieves information from the Semantic Web.
During the execution of a query, information about all resources that appear in triple patterns and in the query results is dynamically loaded from the Semantic Web by:
Internally, retrieved information is represented as a set of named graphs, which allows applications to keep track of information provenance.
If the result of dereferencing a URI is a RDF graph, the graph is added as a
named graph (named with the retrieval URI) to graph set.
Within each graphset there is a graph http://localhost/provenanceInformation,
which contains provenance information for each retrieved graph. The graph
contains a swp:sourceURL and a swp:retrievalTimestamp triple for each
retrieved graph.
More information about the Semantic Web Client is found on the project's website:
http://sites.wiwiss.fu-berlin.de/suhl/bizer/ng4j/semwebclient/
Field Summary | |
---|---|
String |
CONFIG_ENABLEGRDDL
|
String |
CONFIG_MAXFILESIZE
|
String |
CONFIG_MAXGRAPHS
|
String |
CONFIG_MAXSTEPS
|
String |
CONFIG_MAXTHREADS
|
String |
CONFIG_TIMEOUT
|
Constructor Summary | |
---|---|
SemanticWebClient()
Creates a Semantic Web Client. |
Method Summary | |
---|---|
void |
addGraph(NamedGraph graph)
Adds a NamedGraph to the set. |
void |
addRemoteGraph(String uri)
Adds a remote graph to the graphset. |
Graph |
asJenaGraph(Node defaultGraphForAdding)
Returns the union graph of the NamedGraphSet. |
void |
close()
Determines all retrieval threads. |
SemWebIterator |
find(TripleMatch pattern)
Finds Triples that match a triple pattern. |
void |
find(TripleMatch pattern,
TripleListener listener)
Finds Triples that match a triple pattern. |
String |
getConfig(String option)
Returns the value of a given configuration option. |
boolean |
isClosed()
Returns true if the SemanticWebCliend is already closed false if not. |
void |
reloadRemoteGraph(String uri)
Reloads a remote graph. |
boolean |
requestDereferencing(String uri,
int step,
DereferencingListener listener)
Initiates a new retrieval process for a given uri. |
void |
setConfig(String option,
String value)
Sets a configuration option. |
List |
successfullyDereferencedURIs()
Returns an iterator over all successfully dereferenced URIs. |
List |
unsuccessfullyDereferencedURIs()
Returns an iterator over all URIs that couldn't be dereferenced. |
Methods inherited from class de.fuberlin.wiwiss.ng4j.impl.NamedGraphSetImpl |
---|
addQuad, asJenaModel, clear, containsGraph, containsGraph, containsQuad, countGraphs, countQuads, createGraph, createGraph, createNamedGraphInstance, findQuads, findQuads, getGraph, getGraph, isEmpty, listGraphs, removeGraph, removeGraph, removeQuad |
Methods inherited from class de.fuberlin.wiwiss.ng4j.impl.NamedGraphSetIO |
---|
read, read, read, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.fuberlin.wiwiss.ng4j.NamedGraphSet |
---|
read, read, read, write, write |
Field Detail |
---|
public String CONFIG_MAXSTEPS
public String CONFIG_MAXTHREADS
public String CONFIG_TIMEOUT
public String CONFIG_MAXGRAPHS
public String CONFIG_MAXFILESIZE
public String CONFIG_ENABLEGRDDL
Constructor Detail |
---|
public SemanticWebClient()
Method Detail |
---|
public SemWebIterator find(TripleMatch pattern)
Node.ANY
).
The implementation of the find method uses multithreading, thus the first
triples can already be used while there is still information being
retrieved in the background.
Returned triples have a getSource() method which returns the URL from
which the triple was retrieved.
pattern
-
public void find(TripleMatch pattern, TripleListener listener)
Node.ANY
).
The implementation of the find method uses multithreading, thus the first
triples can already be used while there is still information being
retrieved in the background.
This method is called with a TripleListener as second parameter which is
notified each time when a triple is found and when the retrieval process
is finished.
pattern
- public void addRemoteGraph(String uri)
seconds
- public void reloadRemoteGraph(String uri)
seconds
- public void setConfig(String option, String value)
public String getConfig(String option)
public List successfullyDereferencedURIs()
public List unsuccessfullyDereferencedURIs()
public void close()
close
in interface NamedGraphSet
close
in class NamedGraphSetImpl
public boolean isClosed()
public Graph asJenaGraph(Node defaultGraphForAdding)
NamedGraphSet
Add operations to the union graph are all written to the default graph specified as the argument.
Delete operations remove the triple from all NamedGraphs.
asJenaGraph
in interface NamedGraphSet
asJenaGraph
in class NamedGraphSetImpl
defaultGraphForAdding
- The name of the default graph used for
adding triples; must be an URI
public void addGraph(NamedGraph graph)
NamedGraphSet
addGraph
in interface NamedGraphSet
addGraph
in class NamedGraphSetImpl
graph
- The NamedGraph to be addedpublic boolean requestDereferencing(String uri, int step, DereferencingListener listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |