org.openanzo.atom.jastor.webarch
Class Factory

java.lang.Object
  extended by org.openanzo.jastor.GraphThingFactory
      extended by org.openanzo.atom.jastor.webarch.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://sw.nokia.com/WebArch-1/)





Field Summary
 
Fields inherited from class org.openanzo.jastor.GraphThingFactory
valueFactory
 
Constructor Summary
Factory()
           
 
Method Summary
static InformationResource createInformationResource(org.openrdf.model.Resource resource, INamedGraph graph)
          Create a new instance of InformationResource.
static InformationResource createInformationResource(java.lang.String uri, INamedGraph graph)
          Create a new instance of InformationResource.
static Representation createRepresentation(org.openrdf.model.Resource resource, INamedGraph graph)
          Create a new instance of Representation.
static Representation createRepresentation(java.lang.String uri, INamedGraph graph)
          Create a new instance of Representation.
static java.util.List<InformationResource> getAllInformationResource(INamedGraph graph)
          Return an instance of InformationResource for every resource in the model with rdf:Type http://sw.nokia.com/WebArch-1/InformationResource
static java.util.List<Representation> getAllRepresentation(INamedGraph graph)
          Return an instance of Representation for every resource in the model with rdf:Type http://sw.nokia.com/WebArch-1/Representation
static InformationResource getInformationResource(org.openrdf.model.Resource resource, INamedGraph graph)
          Create a new instance of InformationResource.
static InformationResource getInformationResource(java.lang.String uri, INamedGraph graph)
          Create a new instance of InformationResource.
static Representation getRepresentation(org.openrdf.model.Resource resource, INamedGraph graph)
          Create a new instance of Representation.
static Representation getRepresentation(java.lang.String uri, INamedGraph graph)
          Create a new instance of Representation.
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

createInformationResource

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

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

createInformationResource

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

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

getInformationResource

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

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

getInformationResource

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

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

getAllInformationResource

public static java.util.List<InformationResource> getAllInformationResource(INamedGraph graph)
                                                                     throws JastorException
Return an instance of InformationResource for every resource in the model with rdf:Type http://sw.nokia.com/WebArch-1/InformationResource

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

createRepresentation

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

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

createRepresentation

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

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

getRepresentation

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

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

getRepresentation

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

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

getAllRepresentation

public static java.util.List<Representation> getAllRepresentation(INamedGraph graph)
                                                           throws JastorException
Return an instance of Representation for every resource in the model with rdf:Type http://sw.nokia.com/WebArch-1/Representation

Parameters:
model - the Jena Model
Returns:
a List of Representation
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.