org.openanzo.atom.jastor.owl
Class Factory

java.lang.Object
  extended by org.openanzo.jastor.GraphThingFactory
      extended by org.openanzo.atom.jastor.owl.Factory

public class Factory
extends GraphThingFactory

Factory for instantiating objects for ontology classes in the ontology. The get methods leave the graph unchanged and return a Java view of the object in the graph. The create methods may add certain baseline properties to the graph such as rdf:type and any properties with hasValue restrictions.

(URI: http://www.w3.org/2002/07/owl#)





Field Summary
 
Fields inherited from class org.openanzo.jastor.GraphThingFactory
valueFactory
 
Constructor Summary
Factory()
           
 
Method Summary
static ObjectProperty createObjectProperty(org.openrdf.model.Resource resource, INamedGraph graph)
          Create a new instance of ObjectProperty.
static ObjectProperty createObjectProperty(java.lang.String uri, INamedGraph graph)
          Create a new instance of ObjectProperty.
static java.util.List<ObjectProperty> getAllObjectProperty(INamedGraph graph)
          Return an instance of ObjectProperty for every resource in the model with rdf:Type http://www.w3.org/2002/07/owl#ObjectProperty
static ObjectProperty getObjectProperty(org.openrdf.model.Resource resource, INamedGraph graph)
          Create a new instance of ObjectProperty.
static ObjectProperty getObjectProperty(java.lang.String uri, INamedGraph graph)
          Create a new instance of ObjectProperty.
static java.util.List listCompatibleInterfaces(org.openrdf.model.Resource type)
          Return a list of compatible interfaces for the given type.
 
Methods inherited from class org.openanzo.jastor.GraphThingFactory
clearCache, clearCaches, createGraphThing, createGraphThing, getGraphThing, getGraphThing
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Factory

public Factory()
Method Detail

createObjectProperty

public static ObjectProperty createObjectProperty(org.openrdf.model.Resource resource,
                                                  INamedGraph graph)
                                           throws JastorException
Create a new instance of ObjectProperty. Adds the rdf:type property for the given resource to the graph.

Parameters:
resource - The resource of the ObjectProperty
graph - the Jena graph.
Throws:
JastorException

createObjectProperty

public static ObjectProperty createObjectProperty(java.lang.String uri,
                                                  INamedGraph graph)
                                           throws JastorException
Create a new instance of ObjectProperty. Adds the rdf:type property for the given resource to the graph.

Parameters:
uri - The uri of the ObjectProperty
graph - the Jena graph.
Throws:
JastorException

getObjectProperty

public static ObjectProperty getObjectProperty(java.lang.String uri,
                                               INamedGraph graph)
                                        throws JastorException
Create a new instance of ObjectProperty. Leaves the graph unchanged.

Parameters:
uri - The uri of the ObjectProperty
graph - the Jena graph.
Throws:
JastorException

getObjectProperty

public static ObjectProperty getObjectProperty(org.openrdf.model.Resource resource,
                                               INamedGraph graph)
                                        throws JastorException
Create a new instance of ObjectProperty. Leaves the graph unchanged.

Parameters:
resource - The resource of the ObjectProperty
graph - the Jena graph.
Throws:
JastorException

getAllObjectProperty

public static java.util.List<ObjectProperty> getAllObjectProperty(INamedGraph graph)
                                                           throws JastorException
Return an instance of ObjectProperty for every resource in the model with rdf:Type http://www.w3.org/2002/07/owl#ObjectProperty

Parameters:
model - the Jena Model
Returns:
a List of ObjectProperty
Throws:
JastorException

listCompatibleInterfaces

public static java.util.List listCompatibleInterfaces(org.openrdf.model.Resource type)
Return a list of compatible interfaces for the given type. Searches through all ontology classes in the ontology.

Returns:
a List of type java.lang.Class


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.