|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.ua.bioinformatics.coeus.api.API
public class API
COEUS API handler class.
Main API class for internal Java usage, use this or internal when building new data access methods!
Constructor Summary | |
---|---|
API()
|
Method Summary | |
---|---|
boolean |
addStatement(com.hp.hpl.jena.rdf.model.Resource subject,
com.hp.hpl.jena.rdf.model.Property predicate,
boolean object)
Adds the given triple statement to COEUS model |
boolean |
addStatement(com.hp.hpl.jena.rdf.model.Resource subject,
com.hp.hpl.jena.rdf.model.Property predicate,
com.hp.hpl.jena.rdf.model.Resource object)
Adds the given triple statement to COEUS model. |
boolean |
addStatement(com.hp.hpl.jena.rdf.model.Resource subject,
com.hp.hpl.jena.rdf.model.Property predicate,
java.lang.String object)
Adds the given triple statement to COEUS model |
com.hp.hpl.jena.rdf.model.Resource |
createResource(java.lang.String uri)
Creates a new Resource in COEUS SDB. |
java.lang.String |
getIndividual(java.lang.String individual,
java.lang.String format)
Gets all properties associated with a given individual. |
com.hp.hpl.jena.rdf.model.InfModel |
getInferredModel()
|
Internal |
getInternal()
|
org.json.simple.parser.JSONParser |
getJsonparser()
|
com.hp.hpl.jena.rdf.model.Model |
getModel()
|
com.hp.hpl.jena.rdf.model.Resource |
getResource(java.lang.String uri)
Gets information for a given Resource in COEUS SDB. |
java.lang.String |
getTriple(java.lang.String sub,
java.lang.String pred,
java.lang.String obj,
java.lang.String format)
Gets triple-based information according to given parameters. |
java.lang.String |
labelToItem(java.lang.String label)
Extracts an item identifier from an Item label. |
java.lang.String |
select(java.lang.String query,
java.lang.String format,
boolean inferred)
Perform a SPARQL SELECT query to COEUS SDB with multiple output formats support. |
com.hp.hpl.jena.query.ResultSet |
selectRS(java.lang.String query,
boolean inferred)
Perform a SPARQL SELECT query to COEUS SDB. |
void |
setInferredModel(com.hp.hpl.jena.rdf.model.InfModel inferredModel)
|
void |
setInternal(Internal internal)
|
void |
setJsonparser(org.json.simple.parser.JSONParser jsonparser)
|
void |
setModel(com.hp.hpl.jena.rdf.model.Model model)
|
java.lang.String |
uriToItem(java.lang.String uri)
Extracts an item identifier from a full URI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public API()
Method Detail |
---|
public org.json.simple.parser.JSONParser getJsonparser()
public void setJsonparser(org.json.simple.parser.JSONParser jsonparser)
public Internal getInternal()
public void setInternal(Internal internal)
public com.hp.hpl.jena.rdf.model.InfModel getInferredModel()
public void setInferredModel(com.hp.hpl.jena.rdf.model.InfModel inferredModel)
public com.hp.hpl.jena.rdf.model.Model getModel()
public void setModel(com.hp.hpl.jena.rdf.model.Model model)
public com.hp.hpl.jena.query.ResultSet selectRS(java.lang.String query, boolean inferred)
query
- the SPARQL query (no prefixes).format
- the response format (csv, xml, json/js, rdf)inferred
- true to query on inferred model, false to query on simple model.
public java.lang.String select(java.lang.String query, java.lang.String format, boolean inferred)
query
- the SPARQL query (no prefixes).format
- the response format (csv, xml, json/js, rdf)inferred
- true to query on inferred model, false to query on simple model.
public java.lang.String getIndividual(java.lang.String individual, java.lang.String format)
individual
- the individual COEUS id format
- the response format.
public java.lang.String getTriple(java.lang.String sub, java.lang.String pred, java.lang.String obj, java.lang.String format)
sub
- the subject (defaults to s, sub, subject).pred
- the predicate (defaults to p, pred, predicate).obj
- the object (defaults to o, obj, object).format
- the response format.
public boolean addStatement(com.hp.hpl.jena.rdf.model.Resource subject, com.hp.hpl.jena.rdf.model.Property predicate, com.hp.hpl.jena.rdf.model.Resource object)
subject
- a Resource for to the statement subject.predicate
- a Property for the statement predicate.object
- a Resource for the statement object.
public boolean addStatement(com.hp.hpl.jena.rdf.model.Resource subject, com.hp.hpl.jena.rdf.model.Property predicate, java.lang.String object)
subject
- a Resource for to the statement subject.predicate
- a Property for the statement predicate.object
- a String for the statement object.
public boolean addStatement(com.hp.hpl.jena.rdf.model.Resource subject, com.hp.hpl.jena.rdf.model.Property predicate, boolean object)
subject
- a Resource for to the statement subject.predicate
- a Property for the statement predicate.object
- a boolean value for the statement object.
public com.hp.hpl.jena.rdf.model.Resource getResource(java.lang.String uri)
uri
- the desired Resource URI.
public com.hp.hpl.jena.rdf.model.Resource createResource(java.lang.String uri)
uri
- the URI for the new Resource.
public java.lang.String uriToItem(java.lang.String uri)
uri
-
public java.lang.String labelToItem(java.lang.String label)
uri
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |