|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.w3c.IsaViz.fresnel.FSLEvaluator
org.w3c.IsaViz.fresnel.FSLJenaEvaluator
Main class for evaluating an FSL expression on a Jena model (requires Jena 2.3)
| Field Summary | |
static boolean |
DEBUG
|
| Constructor Summary | |
FSLJenaEvaluator(FSLNSResolver nsr,
FSLHierarchyStore fhs)
Construct an FSL Path evaluator for expression path |
|
| Method Summary | |
void |
error(java.lang.Exception ex)
|
java.util.Vector |
evaluate(java.lang.String path,
short firstStepType,
java.lang.String file,
boolean printPaths)
Evaluate this FSL expression on an RDF/XML file |
java.util.Vector |
evaluatePath(FSLPath p)
Evaluate a path expression on the repository set by setRepository(Repository r). The initial set of nodes/arcs (i.e., the set of nodes or arcs that are going to be considered as potential starting points for matching paths) is: 1) all resource nodes in the graph if firstStepType = NODE_STEP and the first location step does not test for a literal node (i.e. |
java.util.Vector |
evaluatePath(FSLPath p,
java.util.Vector startSet)
Evaluate a path expression on the repository set by setRepository(Repository r), only considering specific nodes/arcs in the graph as potential starting points for paths. |
java.util.Vector |
evaluatePathExpr(FSLPath expr,
java.lang.Object nodeOrArc)
|
void |
fatalError(java.lang.Exception ex)
|
java.lang.String |
fcLiteralDT(FSLPath expr,
java.lang.Object nodeOrArc)
|
java.lang.String |
fcLiteralValue(FSLPath expr,
java.lang.Object nodeOrArc)
|
java.lang.String |
fcLocalName(FSLPath expr,
java.lang.Object nodeOrArc)
|
java.lang.String |
fcNamespaceURI(FSLPath expr,
java.lang.Object nodeOrArc)
|
java.lang.String |
fcURI(FSLPath expr,
java.lang.Object nodeOrArc)
|
float |
getFirstLiteralAsNumber(FSLPath expr,
java.lang.Object nodeOrArc)
|
java.lang.String |
getFirstLiteralAsString(FSLPath expr,
java.lang.Object nodeOrArc)
|
float[] |
getLiteralsAsNumbers(FSLPath expr,
java.lang.Object nodeOrArc)
|
java.lang.String[] |
getLiteralsAsStrings(FSLPath expr,
java.lang.Object nodeOrArc)
|
com.hp.hpl.jena.rdf.model.Model |
getModel()
Get the Jena model on which the path expression is evaluated |
static void |
main(java.lang.String[] args)
|
void |
printPath(java.util.Vector v)
|
void |
setModel(com.hp.hpl.jena.rdf.model.Model m)
Set the Jena model on which the path expression will be evaluated This method should be used when the model is created, initialized and populated somewhere else. When just evaluating the path expression on a file or URL, it is simpler to use methods evaluate(...) |
void |
warning(java.lang.Exception ex)
|
| Methods inherited from class org.w3c.IsaViz.fresnel.FSLEvaluator |
callBooleanFunction, callNumberFunction, callStringFunction, evaluateBooleanExpr, evaluateNumberExpr, evaluateStringExpr, fcBoolean, fcConcat, fcContains, fcContains, fcContains, fcContains, fcCount, fcExpand, fcFalse, fcNormalizeSpace, fcNot, fcNumber, fcNumber, fcStartsWith, fcStartsWith, fcStartsWith, fcStartsWith, fcStringLength, fcStringLength, fcSubstring, fcSubstring, fcSubstringAfter, fcSubstringBefore, fcTrue, printFunctionCallError, printUnknownFunctionError, testDIFFExpr, testEQExpr, testINFEQExpr, testINFExpr, testSUPEQExpr, testSUPExpr |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean DEBUG
| Constructor Detail |
public FSLJenaEvaluator(FSLNSResolver nsr,
FSLHierarchyStore fhs)
nsr - namespace prefix bindings used in the FSL expression (this has to be instantiated by the client)fhs - class / type hierarchy store for RDFS/OWL awareness (this has to be instantiated by the client)| Method Detail |
public java.util.Vector evaluate(java.lang.String path,
short firstStepType,
java.lang.String file,
boolean printPaths)
path - the FSL path expression as a StringfirstStepType - one of {FSLPath.NODE_STEP, FSLPath.ARC_STEP} - specifies how the first location step should be interpreted (as a node step or arc step)file - the file's URLprintPaths - should the result paths be printed on System.out or not
public void setModel(com.hp.hpl.jena.rdf.model.Model m)
m - the model on which to evaluate the expressionpublic com.hp.hpl.jena.rdf.model.Model getModel()
public java.util.Vector evaluatePath(FSLPath p)
p - the FSL path expression (use FSLPath.pathFactory() to build it from its String representation)
evaluatePath(FSLPath p, Vector startSet)
public java.util.Vector evaluatePath(FSLPath p,
java.util.Vector startSet)
p - the FSL path expression (use FSLPath.pathFactory() to build it from its String representation)startSet - The initial set of nodes/arcs (i.e., the set of nodes or arcs that are going to be considered as potential starting points for matching paths).evaluatePath(FSLPath p)
public java.util.Vector evaluatePathExpr(FSLPath expr,
java.lang.Object nodeOrArc)
evaluatePathExpr in class FSLEvaluator
public float[] getLiteralsAsNumbers(FSLPath expr,
java.lang.Object nodeOrArc)
getLiteralsAsNumbers in class FSLEvaluator
public java.lang.String[] getLiteralsAsStrings(FSLPath expr,
java.lang.Object nodeOrArc)
getLiteralsAsStrings in class FSLEvaluator
public java.lang.String getFirstLiteralAsString(FSLPath expr,
java.lang.Object nodeOrArc)
getFirstLiteralAsString in class FSLEvaluator
public float getFirstLiteralAsNumber(FSLPath expr,
java.lang.Object nodeOrArc)
getFirstLiteralAsNumber in class FSLEvaluator
public java.lang.String fcLocalName(FSLPath expr,
java.lang.Object nodeOrArc)
fcLocalName in class FSLEvaluator
public java.lang.String fcNamespaceURI(FSLPath expr,
java.lang.Object nodeOrArc)
fcNamespaceURI in class FSLEvaluator
public java.lang.String fcURI(FSLPath expr,
java.lang.Object nodeOrArc)
fcURI in class FSLEvaluator
public java.lang.String fcLiteralValue(FSLPath expr,
java.lang.Object nodeOrArc)
fcLiteralValue in class FSLEvaluator
public java.lang.String fcLiteralDT(FSLPath expr,
java.lang.Object nodeOrArc)
fcLiteralDT in class FSLEvaluatorpublic void error(java.lang.Exception ex)
error in interface com.hp.hpl.jena.rdf.model.RDFErrorHandlerpublic void fatalError(java.lang.Exception ex)
fatalError in interface com.hp.hpl.jena.rdf.model.RDFErrorHandlerpublic void warning(java.lang.Exception ex)
warning in interface com.hp.hpl.jena.rdf.model.RDFErrorHandlerpublic void printPath(java.util.Vector v)
public static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||