org.nuiton.eugene.models.object
Interface ObjectModel

All Superinterfaces:
Model
All Known Implementing Classes:
ObjectModelImpl

public interface ObjectModel
extends Model

Abstraction for the root node of object model trees. This an entry point for browsing a model tree. This object offers as well several facilities for a direct access to some of the object model elements. Created: 14 janv. 2004

Version:
$Revision: 1012 $ Last update : $Date: 2010-11-28 12:24:27 +0100 (Sun, 28 Nov 2010) $ by :
Author:
Cedric Pineau Copyright Code Lutin

Field Summary
static String NAME
          Plexus role-hint
 
Fields inherited from interface org.nuiton.eugene.models.Model
ROLE_NAME
 
Method Summary
 ObjectModelClass getClass(String qualifiedClassName)
          Returns the class corresponding to the given qualified name, or null if the model contains no class for this qualified name.
 Collection<ObjectModelClass> getClasses()
          Returns all classes defined in this model.
 ObjectModelClassifier getClassifier(String qualifiedClassifierName)
          Returns the classifier corresponding to the given qualified name, or null if the model contains no classifier for this qualified name.
 Collection<ObjectModelClassifier> getClassifiers()
          Returns all classifiers defined in this model.
 List<String> getComments()
          Returns all comments not lied to a particular model element
 ObjectModelEnumeration getEnumeration(String qualifiedEnumerationName)
          Return the enumeration corresponding to the given qualified name
 Collection<ObjectModelEnumeration> getEnumerations()
          Returns all enumerations defined in this model.
<O> O
getExtension(String reference, Class<O> extensionClass)
          Get the extension associated to the reference (unique)
 ObjectModelInterface getInterface(String qualifiedInterfaceName)
          Returns the interface corresponding to the given qualified name, or null if the model contains no interface for this qualified name.
 Collection<ObjectModelInterface> getInterfaces()
          Returns all interfaces defined in this model.
 boolean hasClass(String qualifiedClassName)
          Indicates whether the model contains the class associated to the given className
 
Methods inherited from interface org.nuiton.eugene.models.Model
addTagValue, getName, getTagValue, getTagValues, getVersion
 

Field Detail

NAME

static final String NAME
Plexus role-hint

See Also:
Constant Field Values
Method Detail

getClassifiers

Collection<ObjectModelClassifier> getClassifiers()
Returns all classifiers defined in this model. (Except innerClasses)

Returns:
a Collection containing all ObjectModelClassifier for this model.
See Also:
ObjectModelClassifier

getClassifier

ObjectModelClassifier getClassifier(String qualifiedClassifierName)
Returns the classifier corresponding to the given qualified name, or null if the model contains no classifier for this qualified name.

Parameters:
qualifiedClassifierName - - the qualified name of the classifier to retrieve.
Returns:
the ObjectModelClassifier of the found classifier, or null if the model contains no classifier for this qualified name.

getClasses

Collection<ObjectModelClass> getClasses()
Returns all classes defined in this model. (Except innerClasses)

Returns:
a Collection containing all ObjectModelClass for this model.
See Also:
ObjectModelClass

getClass

ObjectModelClass getClass(String qualifiedClassName)
Returns the class corresponding to the given qualified name, or null if the model contains no class for this qualified name.

Parameters:
qualifiedClassName - - the qualified name of the class to retrieve.
Returns:
the ObjectModelClass of the found class, or null if the model contains no class for this qualified name.

hasClass

boolean hasClass(String qualifiedClassName)
Indicates whether the model contains the class associated to the given className

Parameters:
qualifiedClassName - - the qualified name of the class to retrieve.
Returns:
true if the class has been found.

getInterfaces

Collection<ObjectModelInterface> getInterfaces()
Returns all interfaces defined in this model.

Returns:
a Collection containing all ObjectModelInterface for this model.
See Also:
ObjectModelInterface

getInterface

ObjectModelInterface getInterface(String qualifiedInterfaceName)
Returns the interface corresponding to the given qualified name, or null if the model contains no interface for this qualified name.

Parameters:
qualifiedInterfaceName - the qualified name of the interface to retrieve.
Returns:
the ObjectModelInterface of the found interface, or null if the model contains no interface for this qualified name.

getEnumerations

Collection<ObjectModelEnumeration> getEnumerations()
Returns all enumerations defined in this model.

Returns:
a Collection containing all ObjectModelEnumeration for this model.
See Also:
ObjectModelEnumeration

getEnumeration

ObjectModelEnumeration getEnumeration(String qualifiedEnumerationName)
Return the enumeration corresponding to the given qualified name

Parameters:
qualifiedEnumerationName - the fully qualified name of the enumeration to retrieve.
Returns:
the ObjectModelEnumeration of the found enumeration or null if the model contains no enumeration for this qualified name.

getComments

List<String> getComments()
Returns all comments not lied to a particular model element

Returns:
a List containing all comments for this model as Strings.

getExtension

<O> O getExtension(String reference,
                   Class<O> extensionClass)
               throws ClassCastException,
                      IllegalArgumentException
Get the extension associated to the reference (unique)

Type Parameters:
O - object type returned
Parameters:
reference - unique corresponding to the extension to get
extensionClass - class of the extension
Returns:
the object value for the extension
Throws:
ClassCastException - when extensionClass is not valid
IllegalArgumentException - for non existing extension with reference


Copyright © 2004-2012 CodeLutin. All Rights Reserved.