ibspan.tss.layout.ontology.templates
Class TemplatesFactory

java.lang.Object
  extended by com.ibm.adtech.jastor.ThingFactory
      extended by ibspan.tss.layout.ontology.templates.TemplatesFactory

public class TemplatesFactory
extends com.ibm.adtech.jastor.ThingFactory

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

(URI: http://www.ibspan.waw.pl/tss/db/Templates)



Dublin Core Standard Properties
creator : ^^http://www.w3.org/2001/XMLSchema#string


Field Summary
 
Fields inherited from class com.ibm.adtech.jastor.ThingFactory
copyright, listeners, objects
 
Constructor Summary
TemplatesFactory()
           
 
Method Summary
static DummyClass createDummyClass(Resource resource, Model model)
          Create a new instance of DummyClass.
static DummyClass createDummyClass(String uri, Model model)
          Create a new instance of DummyClass.
static List getAllDummyClass(Model model)
          Return an instance of DummyClass for every resource in the model with rdf:Type http://www.ibspan.waw.pl/tss/db/Templates#DummyClass
static DummyClass getDummyClass(Resource resource, Model model)
          Create a new instance of DummyClass.
static DummyClass getDummyClass(String uri, Model model)
          Create a new instance of DummyClass.
static com.ibm.adtech.jastor.Thing getThing(Resource res, Model model)
          Returns an instance of an interface for the given Resource.
static com.ibm.adtech.jastor.Thing getThing(String uri, Model model)
          Returns an instance of an interface for the given Resource URI.
static List listCompatibleInterfaces(Resource type)
          Return a list of compatible interfaces for the given type.
 
Methods inherited from class com.ibm.adtech.jastor.ThingFactory
clearCache, clearCaches, createThing, createThing, registerThing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplatesFactory

public TemplatesFactory()
Method Detail

createDummyClass

public static DummyClass createDummyClass(Resource resource,
                                          Model model)
                                   throws com.ibm.adtech.jastor.JastorException
Create a new instance of DummyClass. Adds the rdf:type property for the given resource to the model.

Parameters:
resource - The resource of the DummyClass
model - the Jena Model.
Throws:
com.ibm.adtech.jastor.JastorException

createDummyClass

public static DummyClass createDummyClass(String uri,
                                          Model model)
                                   throws com.ibm.adtech.jastor.JastorException
Create a new instance of DummyClass. Adds the rdf:type property for the given resource to the model.

Parameters:
uri - The uri of the DummyClass
model - the Jena Model.
Throws:
com.ibm.adtech.jastor.JastorException

getDummyClass

public static DummyClass getDummyClass(String uri,
                                       Model model)
                                throws com.ibm.adtech.jastor.JastorException
Create a new instance of DummyClass. Leaves the model unchanged.

Parameters:
uri - The uri of the DummyClass
model - the Jena Model.
Throws:
com.ibm.adtech.jastor.JastorException

getDummyClass

public static DummyClass getDummyClass(Resource resource,
                                       Model model)
                                throws com.ibm.adtech.jastor.JastorException
Create a new instance of DummyClass. Leaves the model unchanged.

Parameters:
resource - The resource of the DummyClass
model - the Jena Model.
Throws:
com.ibm.adtech.jastor.JastorException

getAllDummyClass

public static List getAllDummyClass(Model model)
                             throws com.ibm.adtech.jastor.JastorException
Return an instance of DummyClass for every resource in the model with rdf:Type http://www.ibspan.waw.pl/tss/db/Templates#DummyClass

Parameters:
model - the Jena Model
Returns:
a List of DummyClass
Throws:
com.ibm.adtech.jastor.JastorException

getThing

public static com.ibm.adtech.jastor.Thing getThing(Resource res,
                                                   Model model)
                                            throws com.ibm.adtech.jastor.JastorException
Returns an instance of an interface for the given Resource. The return instance is guaranteed to implement the most specific interface in *some* hierarchy in which the Resource participates. The behavior is unspecified for resources with RDF types from different hierarchies.

Returns:
an instance of Thing
Throws:
com.ibm.adtech.jastor.JastorException

getThing

public static com.ibm.adtech.jastor.Thing getThing(String uri,
                                                   Model model)
                                            throws com.ibm.adtech.jastor.JastorException
Returns an instance of an interface for the given Resource URI. The return instance is guaranteed to implement the most specific interface in *some* hierarchy in which the Resource participates. The behavior is unspecified for resources with RDF types from different hierarchies.

Returns:
an instance of Thing
Throws:
com.ibm.adtech.jastor.JastorException

listCompatibleInterfaces

public static List listCompatibleInterfaces(Resource type)
Return a list of compatible interfaces for the given type. Searches through all ontology classes in the Templates ontology. The list is sorted according to the topological sort of the class hierarchy

Returns:
a List of type java.lang.Class