org.mindswap.ocl
Interface OCLModel

All Known Implementing Classes:
OCLModelImpl

public interface OCLModel

Title: OCLModel

Description: Extends the Jena Model interface to provide OCL specific model functionality

Copyright: Copyright (c) 2005

Company: Mindswap (http://www.mindswap.org)


Method Summary
 OCLConstructor createConstructor()
          Creates a new OCL constructor
 OCLConstructor createDefaultConstructor()
          Creates a new OCL default (no parameters) constructor
 OCLMethod createMethod(java.lang.String theURI)
          Creates a new OCL Method with the given URI, or as a bnode if the URI is null
 OCLMethodChain createMethodChain(java.lang.String theURI)
          Creates a new OCL MethodChain with the given URI, or as a bnode if the URI is null
 OCLObject createObject(java.lang.String theURI)
          Creates a new OCL Object with the given URI, or as a bnode if the URI is null
 OCLParameter createParameter()
          Create a new OCL Parameter
 OCLParameter createParameter(java.lang.Class theHasClass, java.lang.String theValue)
          Create a new OCL parameter with the specified type and value
 OCLStaticMethod createStaticMethod(java.lang.String theURI)
          Creates a new OCL StaticMethod with the given URI, or as a bnode if the URI is null
 OCLCache getCache()
          Returns the current cache for this model
 java.lang.Object getRegisteredValue(java.lang.String theURL)
          Gets a registered object from the model given its url ID.
 boolean hasRegisteredValue(java.lang.String theURL)
          Checks whether or not an object with the specified URL is registered with the model
 ResIterator listOCLMethodChains()
          Lists all OCLMethodChains in the model
 ResIterator listOCLMethods()
          Lists all OCLMethods in the model
 ResIterator listOCLObjects()
          Lists all OCLObjects currently in the model
 ResIterator listOCLStaticMethods()
          Lists all OCLStaticMethods in the model
 void register(java.lang.String theURL, java.lang.Object theObject)
          Registers an outside object with the model.
 void setCache(OCLCache theCache)
          Sets the cache to be used by this model.
 void setRegistry(OCLRegistry theRegistry)
          Sets the OCL registry for this model
 

Method Detail

listOCLObjects

public ResIterator listOCLObjects()
Lists all OCLObjects currently in the model

Returns:
ResIterator an iterator over the list of OCLObjects in the model

listOCLMethods

public ResIterator listOCLMethods()
Lists all OCLMethods in the model

Returns:
ResIterator an iterator over the list of OCLMethods in the model

listOCLStaticMethods

public ResIterator listOCLStaticMethods()
Lists all OCLStaticMethods in the model

Returns:
ResIterator an iterator over the list of OCLStaticMethods in the model

listOCLMethodChains

public ResIterator listOCLMethodChains()
Lists all OCLMethodChains in the model

Returns:
ResIterator an iterator over the list of OCLMethodChains in the model

register

public void register(java.lang.String theURL,
                     java.lang.Object theObject)
Registers an outside object with the model. Registering an object allows it to be used by OCL objects during their construction and invocation.

Parameters:
theURL - String the url ID of the object
theObject - Object the object to register

hasRegisteredValue

public boolean hasRegisteredValue(java.lang.String theURL)
Checks whether or not an object with the specified URL is registered with the model

Parameters:
theURL - String the url to check
Returns:
boolean true if an object with the url is registered, false otherwise

getRegisteredValue

public java.lang.Object getRegisteredValue(java.lang.String theURL)
Gets a registered object from the model given its url ID.

Parameters:
theURL - String the URL of the object to get
Returns:
Object the object with the corresponding url ID, or null if none exists

setRegistry

public void setRegistry(OCLRegistry theRegistry)
Sets the OCL registry for this model

Parameters:
theRegistry - OCLRegistry the new OCL registry

setCache

public void setCache(OCLCache theCache)
Sets the cache to be used by this model. The cache is used to keep records of Jar files that have been downloaded already so that they do not have to be re-downloaded every time something is executed

Parameters:
theCache - OCLCache the new cache to use

getCache

public OCLCache getCache()
Returns the current cache for this model

Returns:
OCLCache the current cache

createObject

public OCLObject createObject(java.lang.String theURI)
Creates a new OCL Object with the given URI, or as a bnode if the URI is null

Parameters:
theURI - String the uri of the new object, or null to create a bnode
Returns:
OCLObject

createMethod

public OCLMethod createMethod(java.lang.String theURI)
Creates a new OCL Method with the given URI, or as a bnode if the URI is null

Parameters:
theURI - String the uri of the new method, or null to create a bnode
Returns:
OCLMethod

createStaticMethod

public OCLStaticMethod createStaticMethod(java.lang.String theURI)
Creates a new OCL StaticMethod with the given URI, or as a bnode if the URI is null

Parameters:
theURI - String the uri of the new method, or null to create a bnode
Returns:
OCLStaticMethod

createMethodChain

public OCLMethodChain createMethodChain(java.lang.String theURI)
Creates a new OCL MethodChain with the given URI, or as a bnode if the URI is null

Parameters:
theURI - String the uri of the new method chain, or null to create a bnode
Returns:
OCLMethodChain

createDefaultConstructor

public OCLConstructor createDefaultConstructor()
Creates a new OCL default (no parameters) constructor

Returns:
OCLConstructor

createConstructor

public OCLConstructor createConstructor()
Creates a new OCL constructor

Returns:
OCLConstructor

createParameter

public OCLParameter createParameter()
Create a new OCL Parameter

Returns:
OCLParameter

createParameter

public OCLParameter createParameter(java.lang.Class theHasClass,
                                    java.lang.String theValue)
Create a new OCL parameter with the specified type and value

Parameters:
theHasClass - Class the parameter class type
theValue - String the parameter value
Returns:
OCLParameter