|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.nwalsh.xslt.TwigJena
XSLT extensions to access portions of an RDF graph.
Copyright (C) 2002, 2003 Norman Walsh.
This class provides the core functions needed to access portions of an RDF graph with an XSLT processor. The actual binding to a particular XSLT processor is provided in another class.
The underlying RDF model is accessed with Jena.
WARNING: The resource() function will never return an anonymous resource. Jena doesn't really provide access to serialized anonymous resources very well. In practice, this means you can't use these functions with graphs that contain blank nodes.
Change Log:
Initial release.
Field Summary | |
static com.hp.hpl.mesa.rdf.jena.model.Model |
defaultModel
|
static boolean |
loadedModel
|
static boolean |
quiet
|
Constructor Summary | |
TwigJena()
|
Method Summary | |
protected static void |
defaultModelWarning()
Warn the user if there's no default model. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
difference(com.hp.hpl.mesa.rdf.jena.model.Model model,
com.hp.hpl.mesa.rdf.jena.model.Resource results1,
com.hp.hpl.mesa.rdf.jena.model.Resource results2)
Returns the difference between the FindResuls in results1 and results2. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
difference(com.hp.hpl.mesa.rdf.jena.model.Resource results1,
com.hp.hpl.mesa.rdf.jena.model.Resource results2)
Convenience method using the default model. |
protected static void |
exceptionWarning(java.lang.Exception e)
Tell the user about exceptions. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
filter(com.hp.hpl.mesa.rdf.jena.model.Model model,
com.hp.hpl.mesa.rdf.jena.model.Resource findResults,
com.hp.hpl.mesa.rdf.jena.model.Property property,
com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
Find all the resources in the result set that have the specified resource as a value of the specified property. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
filter(com.hp.hpl.mesa.rdf.jena.model.Model model,
com.hp.hpl.mesa.rdf.jena.model.Resource findResults,
com.hp.hpl.mesa.rdf.jena.model.Property property,
java.lang.String literal)
Find all the resources in the result set that have the specified literal as a value of the specified property. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
filter(com.hp.hpl.mesa.rdf.jena.model.Resource findResults,
com.hp.hpl.mesa.rdf.jena.model.Property property,
com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
Convenience method using the default model. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
filter(com.hp.hpl.mesa.rdf.jena.model.Resource findResults,
com.hp.hpl.mesa.rdf.jena.model.Property property,
java.lang.String literal)
Convenience method using the default model. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
filterNot(com.hp.hpl.mesa.rdf.jena.model.Model model,
com.hp.hpl.mesa.rdf.jena.model.Resource findResults,
com.hp.hpl.mesa.rdf.jena.model.Property property,
com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
Find all the resources in the result set that |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
filterNot(com.hp.hpl.mesa.rdf.jena.model.Model model,
com.hp.hpl.mesa.rdf.jena.model.Resource findResults,
com.hp.hpl.mesa.rdf.jena.model.Property property,
java.lang.String literal)
Find all the resources in the result set that |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
filterNot(com.hp.hpl.mesa.rdf.jena.model.Resource findResults,
com.hp.hpl.mesa.rdf.jena.model.Property property,
com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
Convenience method using the default model. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
filterNot(com.hp.hpl.mesa.rdf.jena.model.Resource findResults,
com.hp.hpl.mesa.rdf.jena.model.Property property,
java.lang.String literal)
Convenience method using the default model. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
find(com.hp.hpl.mesa.rdf.jena.model.Model model,
com.hp.hpl.mesa.rdf.jena.model.Property property,
com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
Find all the resources in the model that have the specified resource as a value of the specified property. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
find(com.hp.hpl.mesa.rdf.jena.model.Model model,
com.hp.hpl.mesa.rdf.jena.model.Property property,
java.lang.String literal)
Find all the resources in the model that have the specified literal as a value of the specified property. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
find(com.hp.hpl.mesa.rdf.jena.model.Property property,
com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
Convenience method using the default model. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
find(com.hp.hpl.mesa.rdf.jena.model.Property property,
java.lang.String literal)
Convenience method using the default model. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
get(com.hp.hpl.mesa.rdf.jena.model.Model model,
com.hp.hpl.mesa.rdf.jena.model.Resource rsrc,
com.hp.hpl.mesa.rdf.jena.model.Property property)
Find all the nodes in the model that are the values of the specified property on the specified resrc. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
get(com.hp.hpl.mesa.rdf.jena.model.Resource rsrc,
com.hp.hpl.mesa.rdf.jena.model.Property property)
Convenience method using the default model. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
intersection(com.hp.hpl.mesa.rdf.jena.model.Model model,
com.hp.hpl.mesa.rdf.jena.model.Resource results1,
com.hp.hpl.mesa.rdf.jena.model.Resource results2)
Returns the intersection of the FindResuls in results1 and results2. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
intersection(com.hp.hpl.mesa.rdf.jena.model.Resource results1,
com.hp.hpl.mesa.rdf.jena.model.Resource results2)
Convenience method using the default model. |
static com.hp.hpl.mesa.rdf.jena.model.Model |
load(java.lang.String filename)
Load an RDF model. |
static com.hp.hpl.mesa.rdf.jena.model.Property |
property(java.lang.String namespaceUri,
java.lang.String localName)
Constructs an RDF property. |
static boolean |
quiet(boolean newQuiet)
Toggle informative messages. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
resource(com.hp.hpl.mesa.rdf.jena.model.Model model,
java.lang.String resource)
Constructs an RDF resource from a string. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
resource(java.lang.String resource)
Convenience method using the default model. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
union(com.hp.hpl.mesa.rdf.jena.model.Model model,
com.hp.hpl.mesa.rdf.jena.model.Resource results1,
com.hp.hpl.mesa.rdf.jena.model.Resource results2)
Returns the union of the FindResuls in results1 and results2. |
static com.hp.hpl.mesa.rdf.jena.model.Resource |
union(com.hp.hpl.mesa.rdf.jena.model.Resource results1,
com.hp.hpl.mesa.rdf.jena.model.Resource results2)
Convenience method using the default model. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean quiet
public static boolean loadedModel
public static com.hp.hpl.mesa.rdf.jena.model.Model defaultModel
Constructor Detail |
public TwigJena()
Method Detail |
public static boolean quiet(boolean newQuiet)
public static com.hp.hpl.mesa.rdf.jena.model.Model load(java.lang.String filename)
If only one model is loaded, it is used as the default and the model parameter can be omitted from other functions. If more than one model is loaded, you must store the model returned from this function and pass it to the other functions explicitly.
filename
- The name of the file to load.
protected static void defaultModelWarning()
protected static void exceptionWarning(java.lang.Exception e)
public static com.hp.hpl.mesa.rdf.jena.model.Property property(java.lang.String namespaceUri, java.lang.String localName)
namespaceUri
- The namespace URI of the property.localName
- The local name of the property.
public static com.hp.hpl.mesa.rdf.jena.model.Resource resource(com.hp.hpl.mesa.rdf.jena.model.Model model, java.lang.String resource)
model
- The external object containing the RDF model to use.resource
- The URI of a resource. If no such resource exists, it
will be created.
public static com.hp.hpl.mesa.rdf.jena.model.Resource resource(java.lang.String resource)
resource(Model,String)
public static com.hp.hpl.mesa.rdf.jena.model.Resource find(com.hp.hpl.mesa.rdf.jena.model.Model model, com.hp.hpl.mesa.rdf.jena.model.Property property, com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
model
- The external object containing the RDF model to use.property
- The external object containing the propertyrsrc
- The external object containing the resource.
If the resource specified is the result of a previous find, then the function
will return all the resources in the model that have any of the resources in
the find results as a value of the specified property.
public static com.hp.hpl.mesa.rdf.jena.model.Resource find(com.hp.hpl.mesa.rdf.jena.model.Model model, com.hp.hpl.mesa.rdf.jena.model.Property property, java.lang.String literal)
model
- The external object containing the RDF model to use.property
- The external object containing the propertyliteral
- The literal value for which to search
public static com.hp.hpl.mesa.rdf.jena.model.Resource find(com.hp.hpl.mesa.rdf.jena.model.Property property, com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
find(Model,Property,Resource)
public static com.hp.hpl.mesa.rdf.jena.model.Resource find(com.hp.hpl.mesa.rdf.jena.model.Property property, java.lang.String literal)
find(Model,Property,String)
public static com.hp.hpl.mesa.rdf.jena.model.Resource get(com.hp.hpl.mesa.rdf.jena.model.Model model, com.hp.hpl.mesa.rdf.jena.model.Resource rsrc, com.hp.hpl.mesa.rdf.jena.model.Property property)
model
- The external object containing the RDF model to use.rsrc
- The external object containing the resource.property
- The external object containing the property
public static com.hp.hpl.mesa.rdf.jena.model.Resource get(com.hp.hpl.mesa.rdf.jena.model.Resource rsrc, com.hp.hpl.mesa.rdf.jena.model.Property property)
get(Model,Resource,Property)
public static com.hp.hpl.mesa.rdf.jena.model.Resource filter(com.hp.hpl.mesa.rdf.jena.model.Model model, com.hp.hpl.mesa.rdf.jena.model.Resource findResults, com.hp.hpl.mesa.rdf.jena.model.Property property, com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
model
- The external object containing the RDF model to use.findResults
- The external object containing the FindResults of a previous queryproperty
- The external object containing the propertyrsrc
- The external object containing the resource.
If the resource specified is the result of a previous find, then the function
will return all the resources in the result set that have any of the resources in
the find results as a value of the specified property.
public static com.hp.hpl.mesa.rdf.jena.model.Resource filter(com.hp.hpl.mesa.rdf.jena.model.Model model, com.hp.hpl.mesa.rdf.jena.model.Resource findResults, com.hp.hpl.mesa.rdf.jena.model.Property property, java.lang.String literal)
model
- The external object containing the RDF model to use.findResults
- The external object containing the FindResults of a previous queryproperty
- The external object containing the propertyliteral
- The literal value for which to search
public static com.hp.hpl.mesa.rdf.jena.model.Resource filter(com.hp.hpl.mesa.rdf.jena.model.Resource findResults, com.hp.hpl.mesa.rdf.jena.model.Property property, com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
filter(Model,Resource,Property,Resource)
public static com.hp.hpl.mesa.rdf.jena.model.Resource filter(com.hp.hpl.mesa.rdf.jena.model.Resource findResults, com.hp.hpl.mesa.rdf.jena.model.Property property, java.lang.String literal)
filter(Model,Resource,Property,String)
public static com.hp.hpl.mesa.rdf.jena.model.Resource filterNot(com.hp.hpl.mesa.rdf.jena.model.Model model, com.hp.hpl.mesa.rdf.jena.model.Resource findResults, com.hp.hpl.mesa.rdf.jena.model.Property property, com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
model
- The external object containing the RDF model to use.findResults
- The external object containing the FindResults of a previous queryproperty
- The external object containing the propertyrsrc
- The external object containing the resource.
public static com.hp.hpl.mesa.rdf.jena.model.Resource filterNot(com.hp.hpl.mesa.rdf.jena.model.Model model, com.hp.hpl.mesa.rdf.jena.model.Resource findResults, com.hp.hpl.mesa.rdf.jena.model.Property property, java.lang.String literal)
model
- The external object containing the RDF model to use.findResults
- The external object containing the FindResults of a previous queryproperty
- The external object containing the propertyliteral
- The literal value for which to search
public static com.hp.hpl.mesa.rdf.jena.model.Resource filterNot(com.hp.hpl.mesa.rdf.jena.model.Resource findResults, com.hp.hpl.mesa.rdf.jena.model.Property property, com.hp.hpl.mesa.rdf.jena.model.Resource rsrc)
filterNot(Model,Resource,Property,Resource)
public static com.hp.hpl.mesa.rdf.jena.model.Resource filterNot(com.hp.hpl.mesa.rdf.jena.model.Resource findResults, com.hp.hpl.mesa.rdf.jena.model.Property property, java.lang.String literal)
filterNot(Model,Resource,Property,String)
public static com.hp.hpl.mesa.rdf.jena.model.Resource union(com.hp.hpl.mesa.rdf.jena.model.Model model, com.hp.hpl.mesa.rdf.jena.model.Resource results1, com.hp.hpl.mesa.rdf.jena.model.Resource results2)
results1
- An external object containing a FindResults from a previous queryresults2
- An external object containing a FindResults from a previous query
public static com.hp.hpl.mesa.rdf.jena.model.Resource union(com.hp.hpl.mesa.rdf.jena.model.Resource results1, com.hp.hpl.mesa.rdf.jena.model.Resource results2)
union(Model,Resource,Resource)
public static com.hp.hpl.mesa.rdf.jena.model.Resource intersection(com.hp.hpl.mesa.rdf.jena.model.Model model, com.hp.hpl.mesa.rdf.jena.model.Resource results1, com.hp.hpl.mesa.rdf.jena.model.Resource results2)
results1
- An external object containing a FindResults from a previous queryresults2
- An external object containing a FindResults from a previous query
public static com.hp.hpl.mesa.rdf.jena.model.Resource intersection(com.hp.hpl.mesa.rdf.jena.model.Resource results1, com.hp.hpl.mesa.rdf.jena.model.Resource results2)
intersection(Model,Resource,Resource)
public static com.hp.hpl.mesa.rdf.jena.model.Resource difference(com.hp.hpl.mesa.rdf.jena.model.Model model, com.hp.hpl.mesa.rdf.jena.model.Resource results1, com.hp.hpl.mesa.rdf.jena.model.Resource results2)
results1
- An external object containing a FindResults from a previous queryresults2
- An external object containing a FindResults from a previous query
public static com.hp.hpl.mesa.rdf.jena.model.Resource difference(com.hp.hpl.mesa.rdf.jena.model.Resource results1, com.hp.hpl.mesa.rdf.jena.model.Resource results2)
difference(Model,Resource,Resource)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |