|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxsmeral.semnet.query.QueryInterface
public class QueryInterface
Simple interface for querying of the Sesame Database.
Configuration is the same as in SesameWriter
.
Field Summary | |
---|---|
static String |
QUERY_DESCRIBE
|
static String |
QUERY_DIRECTTYPE
|
static String |
QUERY_FULLTYPE
|
static String |
QUERY_WHAT
|
Constructor Summary | |
---|---|
QueryInterface(Properties props)
Initializes the repository from the given configuration. |
Method Summary | |
---|---|
void |
close()
Closes connection and shuts down repository. |
boolean |
containsLiteral(String literal)
Indicates, whether a statement with the given String literal as object is in the repository. |
long |
count()
Returns number of explicit statements in the repository. |
Collection<BindingSet> |
describe(URI uri)
Similarly to DESCRIBE in SPARQL, this method returns collection
of statements (as binding sets) in which the given URI is either a subject
or an object. |
Collection<Value> |
fullType(URI uri)
Returns full type of the resource represented by the given URI. |
RepositoryConnection |
getConnection()
Returns a connection to the underlying repository. |
Repository |
getRepository()
Returns the underlying repository. |
ValueFactory |
getValueFactory()
Returns a value factory instance. |
static void |
main(String[] args)
|
static void |
printUsage()
|
List<BindingSet> |
query(String query)
Evaluates a supplied SeRQL tuple query and returns resulting binding sets. |
Collection<Value> |
type(URI uri)
Returns direct type of the resource represented by the given URI. |
Collection<Value> |
what(String label)
Returns such resource X for which holds X rdfs:label Y, where Y is the given label. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String QUERY_DESCRIBE
public static final String QUERY_FULLTYPE
public static final String QUERY_DIRECTTYPE
public static final String QUERY_WHAT
Constructor Detail |
---|
public QueryInterface(Properties props) throws ConfigurationException, MalformedQueryException
ConfigurationException
MalformedQueryException
Method Detail |
---|
public ValueFactory getValueFactory()
public Repository getRepository()
public RepositoryConnection getConnection()
public boolean containsLiteral(String literal) throws RepositoryException
RepositoryException
public long count() throws RepositoryException
RepositoryException
public Collection<Value> type(URI uri) throws RepositoryException, MalformedQueryException, QueryEvaluationException
RepositoryException
MalformedQueryException
QueryEvaluationException
public Collection<Value> fullType(URI uri) throws RepositoryException, MalformedQueryException, QueryEvaluationException
RepositoryException
MalformedQueryException
QueryEvaluationException
public Collection<BindingSet> describe(URI uri) throws RepositoryException, MalformedQueryException, QueryEvaluationException
DESCRIBE
in SPARQL, this method returns collection
of statements (as binding sets) in which the given URI is either a subject
or an object.
RepositoryException
MalformedQueryException
QueryEvaluationException
public Collection<Value> what(String label) throws RepositoryException, MalformedQueryException, QueryEvaluationException
RepositoryException
MalformedQueryException
QueryEvaluationException
public List<BindingSet> query(String query) throws RepositoryException, MalformedQueryException, QueryEvaluationException
RepositoryException
MalformedQueryException
QueryEvaluationException
public void close() throws RepositoryException
RepositoryException
public static void printUsage()
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |