|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectse.kmr.scam.editor.util.QueryModel
Helper for a RDF-model defined as a QueryModel .
In a QueryModel a set of variables are deified, the
inter-relation between the varaibles describes an abstract path . The
abstract path defines a path to a value in the ValueModel that
the variable represents.
NOTE: A variable represents the value of a property in the
ValueModel. For properties that is repeated (or properties with multiple
values) the corresponding variable is repeated. This means that a variable
can be bound to more than one value.
| Nested Class Summary | |
class |
QueryModel.QueryNode
|
class |
QueryModel.QueryStatement
A simple container class for shipping queryStatements back and forth. |
| Field Summary | |
static int |
BNODE
|
static int |
LITERAL
|
protected static Hashtable |
modelToQueryModel
|
static int |
RESOURCE
|
| Constructor Summary | |
QueryModel(Model queryModel)
Constructor for the QueryModel object |
|
QueryModel(String rdfXmlFilepath)
Constructor for the QueryModel object |
|
| Method Summary | |
QueryBinding |
bind(ValueModel value)
Method bind. |
QueryBinding |
bind(ValueModel value,
boolean createMissing)
Description of the Method |
QueryBinding |
createNewBindingForVariable(QueryBinding pointOfAttachement,
Resource variable)
Creates new triples in the value model along a path between two variables in the query, the triple-path starts from a given point of attachement (a resource bound in a QueryBinding) for the first variable. |
QueryBinding |
getBinding()
Gets the binding attribute of the QueryModel object |
Model |
getModel()
Gets the model attribute of the QueryModel object |
Resource |
getParameterVariable()
Gets a resource defined as a parameter varaible in the QueryModel . |
int |
getParseType(Resource variable)
Diggs out the parsetype for a variable via it's constraints. |
TreeSet |
getPredefinedValues(Resource variable,
boolean literalValue)
Method fetches predefined values according to the constraints given in the query. |
int |
getShortestPathLength(Resource startVariable,
Resource endVariable)
Finds the shortestpath between two variables. |
void |
setExternalModel(Model model)
Sets a model to be used for constraint checks for non anonymous resource if they fail to match in the value-model. |
void |
setExternalModel(String rdfXmlFilePath)
As setExternalModel(Model). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static Hashtable modelToQueryModel
public static final int BNODE
public static final int RESOURCE
public static final int LITERAL
| Constructor Detail |
public QueryModel(String rdfXmlFilepath)
throws RDFException
rdfXmlFilepath - Description of the Parameter
RDFException - Description of the Exception
public QueryModel(Model queryModel)
throws RDFException
queryModel - Description of the Parameter
RDFException - Description of the Exception| Method Detail |
public void setExternalModel(Model model)
model - the external Model.
public void setExternalModel(String rdfXmlFilePath)
throws RDFException
setExternalModel(Model).
RDFException
public QueryBinding bind(ValueModel value,
boolean createMissing)
throws RDFException
value - a model containing the data that should be bound into a querybinding tree.createMissing - wether we want placeholder triples (either dummy-resources or empty literals for objects)
to be created to cover for variables with no matches.
RDFException - if stuff go wrong.
public QueryBinding bind(ValueModel value)
throws RDFException
value -
RDFExceptionpublic QueryBinding getBinding()
public Model getModel()
public Resource getParameterVariable()
throws RDFException
RDFException - Description of the Exception
public int getShortestPathLength(Resource startVariable,
Resource endVariable)
startVariable - endVariable -
public QueryBinding createNewBindingForVariable(QueryBinding pointOfAttachement,
Resource variable)
pointOfAttachement - a QueryBinding constituting the
start variable and a resource to be the first subject in the triple path.variable - constitutes the end of the path to be created.
public TreeSet getPredefinedValues(Resource variable,
boolean literalValue)
variable - to search predefined values for.literalValue - tells wether literals is acceptable as predefined
values.
public int getParseType(Resource variable)
throws RDFException
RDFException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||