|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pelds.rules.RuleQuery
public class RuleQuery
RuleQuery takes a SPARQL query, a ruleset, and some data and returns only triples permitted by the given rules.
Field Summary | |
---|---|
static java.lang.String |
PELDS_NS
|
static java.lang.String |
PELDS_ONT_FILE
|
static java.lang.String |
PELDS_ONT_LOC
|
static java.lang.String |
PELDS_PREFIX
|
static java.lang.String |
QUERY_ACTION
|
static java.lang.String |
UPDATE_ACTION
|
Constructor Summary | |
---|---|
RuleQuery(java.lang.String type,
com.hp.hpl.jena.rdf.model.Model data,
java.util.Collection<java.lang.String> identities,
java.util.Collection<java.lang.String> rules,
com.hp.hpl.jena.shared.PrefixMapping pm)
Constructor |
Method Summary | |
---|---|
RuleQuery |
addRule(java.lang.String ruleStr)
|
boolean |
checkUpdates(com.hp.hpl.jena.rdf.model.Model updates)
Returns true if the changes to the model are allowed by the rules |
static java.lang.String |
createRandomizedUri(java.lang.String subNs)
Create a random URI for variables and actions |
com.hp.hpl.jena.rdf.model.Model |
getCheckedModel()
Returns a model containing only the triples authorized by the rules |
com.hp.hpl.jena.ontology.OntModel |
getModel()
|
com.hp.hpl.jena.shared.PrefixMapping |
getPrefixMapping()
|
RuleQuery |
setData(com.hp.hpl.jena.rdf.model.Model data)
|
RuleQuery |
setIdentities(java.util.Collection<java.lang.String> verifiedIds)
|
RuleQuery |
setRules(java.util.Collection<java.lang.String> rules)
|
RuleQuery |
setVerbose(boolean set)
|
static java.lang.String |
slurp(java.io.InputStream in)
Reads a whole InputStream into a String |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PELDS_PREFIX
public static final java.lang.String PELDS_NS
public static final java.lang.String PELDS_ONT_LOC
public static final java.lang.String PELDS_ONT_FILE
public static final java.lang.String QUERY_ACTION
public static final java.lang.String UPDATE_ACTION
Constructor Detail |
---|
public RuleQuery(java.lang.String type, com.hp.hpl.jena.rdf.model.Model data, java.util.Collection<java.lang.String> identities, java.util.Collection<java.lang.String> rules, com.hp.hpl.jena.shared.PrefixMapping pm)
type
- Query type, either QueryAction or UpdateActiondata
- RDF Model containing the data to be checkedidentities
- querying users authenticated Web IDsrules
- rules in string representationpm
- prefix mapping from configurationMethod Detail |
---|
public com.hp.hpl.jena.rdf.model.Model getCheckedModel()
public boolean checkUpdates(com.hp.hpl.jena.rdf.model.Model updates)
updates
- changes as RDF model
public static java.lang.String createRandomizedUri(java.lang.String subNs)
subNs
- namespace separator
public static java.lang.String slurp(java.io.InputStream in) throws java.io.IOException
in
- Stream
java.io.IOException
public RuleQuery setIdentities(java.util.Collection<java.lang.String> verifiedIds)
public RuleQuery setVerbose(boolean set)
public RuleQuery setRules(java.util.Collection<java.lang.String> rules)
public RuleQuery addRule(java.lang.String ruleStr)
public RuleQuery setData(com.hp.hpl.jena.rdf.model.Model data)
public com.hp.hpl.jena.shared.PrefixMapping getPrefixMapping()
public com.hp.hpl.jena.ontology.OntModel getModel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |