ibspan.tss.datamodel.ontology
Class DataModelFactory

java.lang.Object
  extended by com.ibm.adtech.jastor.ThingFactory
      extended by ibspan.tss.datamodel.ontology.DataModelFactory

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

Factory for instantiating objects for ontology classes in the DataModel 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/DataModel)





Field Summary
 
Fields inherited from class com.ibm.adtech.jastor.ThingFactory
copyright, listeners, objects
 
Constructor Summary
DataModelFactory()
           
 
Method Summary
static ErrorMessage createErrorMessage(Resource resource, Model model)
          Create a new instance of ErrorMessage.
static ErrorMessage createErrorMessage(String uri, Model model)
          Create a new instance of ErrorMessage.
static Link createLink(Resource resource, Model model)
          Create a new instance of Link.
static Link createLink(String uri, Model model)
          Create a new instance of Link.
static Menu createMenu(Resource resource, Model model)
          Create a new instance of Menu.
static Menu createMenu(String uri, Model model)
          Create a new instance of Menu.
static List getAllErrorMessage(Model model)
          Return an instance of ErrorMessage for every resource in the model with rdf:Type http://www.ibspan.waw.pl/tss/DataModel#ErrorMessage
static List getAllLink(Model model)
          Return an instance of Link for every resource in the model with rdf:Type http://www.ibspan.waw.pl/tss/DataModel#Link
static List getAllMenu(Model model)
          Return an instance of Menu for every resource in the model with rdf:Type http://www.ibspan.waw.pl/tss/DataModel#Menu
static ErrorMessage getErrorMessage(Resource resource, Model model)
          Create a new instance of ErrorMessage.
static ErrorMessage getErrorMessage(String uri, Model model)
          Create a new instance of ErrorMessage.
static Link getLink(Resource resource, Model model)
          Create a new instance of Link.
static Link getLink(String uri, Model model)
          Create a new instance of Link.
static Menu getMenu(Resource resource, Model model)
          Create a new instance of Menu.
static Menu getMenu(String uri, Model model)
          Create a new instance of Menu.
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

DataModelFactory

public DataModelFactory()
Method Detail

createMenu

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

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

createMenu

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

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

getMenu

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

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

getMenu

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

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

getAllMenu

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

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

createLink

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

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

createLink

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

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

getLink

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

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

getLink

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

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

getAllLink

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

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

createErrorMessage

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

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

createErrorMessage

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

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

getErrorMessage

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

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

getErrorMessage

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

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

getAllErrorMessage

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

Parameters:
model - the Jena Model
Returns:
a List of ErrorMessage
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 DataModel ontology. The list is sorted according to the topological sort of the class hierarchy

Returns:
a List of type java.lang.Class