org.mindswap.ocl.impl
Class OCLObjectImpl

java.lang.Object
  extended byResourceImpl
      extended byorg.mindswap.ocl.impl.OCLResourceImpl
          extended byorg.mindswap.ocl.impl.OCLObjectImpl
All Implemented Interfaces:
OCLObject

public class OCLObjectImpl
extends OCLResourceImpl
implements OCLObject

Title: OCLObjectImpl

Description: Implementation of the OCLObject interface, an abstract representation of a java object

Copyright: Copyright (c) 2005

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

See Also:
Serialized Form

Field Summary
static boolean DEBUG
           
static Implementation factory
           
 
Constructor Summary
protected OCLObjectImpl(Node n, EnhGraph eg)
          Creates a new OCLJenaObject resource.
Not for public use.
 
Method Summary
 void addJar(java.lang.String theJar)
          Adds a new remote jar url.
 java.lang.Object create()
          Creates the java object this resource corresponds to.
 OCLConstructor getConstructor()
          Returns the constructor for this object
 Literal getHasClass()
          Returns the value of the hasClass property, which is the java type of this object
 Literal getJar()
          Gets the remote jar url.
 NodeIterator listJars()
          Return a list of remote jars associated with this object
 void removeJar(java.lang.String theJar)
          Removes the specified jar property
 void setConstructor(OCLConstructor theConstructor)
          Sets the constructor for this object
 void setHasClass(Literal theHasClass)
           
 
Methods inherited from class org.mindswap.ocl.impl.OCLResourceImpl
mustBeValidModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mindswap.ocl.OCLObject
setHasClass, setHasClass
 

Field Detail

DEBUG

public static boolean DEBUG

factory

public static Implementation factory
Constructor Detail

OCLObjectImpl

protected OCLObjectImpl(Node n,
                        EnhGraph eg)
Creates a new OCLJenaObject resource.
Not for public use. Intended for the Implementation factory to use when wrapping a Resource to an OCLJenaObject

Parameters:
n - Node the node to wrap as an image
eg - EnhGraph the graph the node belongs to
Method Detail

getJar

public Literal getJar()
Description copied from interface: OCLObject
Gets the remote jar url. If this property is specified, this value represents the remote location of the class file for this object

Specified by:
getJar in interface OCLObject
Returns:
Literal the jar url

listJars

public NodeIterator listJars()
Description copied from interface: OCLObject
Return a list of remote jars associated with this object

Specified by:
listJars in interface OCLObject
Returns:
ResIterator the list of remote jars

addJar

public void addJar(java.lang.String theJar)
Description copied from interface: OCLObject
Adds a new remote jar url.

Specified by:
addJar in interface OCLObject
Parameters:
theJar - String the new jar url to add

removeJar

public void removeJar(java.lang.String theJar)
Description copied from interface: OCLObject
Removes the specified jar property

Specified by:
removeJar in interface OCLObject
Parameters:
theJar - String the jar value to remove

getHasClass

public Literal getHasClass()
Description copied from interface: OCLObject
Returns the value of the hasClass property, which is the java type of this object

Specified by:
getHasClass in interface OCLObject
Returns:
Literal

setHasClass

public void setHasClass(Literal theHasClass)

getConstructor

public OCLConstructor getConstructor()
Description copied from interface: OCLObject
Returns the constructor for this object

Specified by:
getConstructor in interface OCLObject
Returns:
OCLConstructor

setConstructor

public void setConstructor(OCLConstructor theConstructor)
Description copied from interface: OCLObject
Sets the constructor for this object

Specified by:
setConstructor in interface OCLObject
Parameters:
theConstructor - OCLConstructor the new constructor

create

public java.lang.Object create()
                        throws java.lang.ClassNotFoundException,
                               java.lang.NoSuchMethodException,
                               java.lang.InstantiationException,
                               java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException
Description copied from interface: OCLObject
Creates the java object this resource corresponds to. Throws one of many exceptions if the data for this resource is not valid for creating an object of the specified type.

Specified by:
create in interface OCLObject
Returns:
Object the java object created by this resource
Throws:
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.reflect.InvocationTargetException