org.eclipse.tigerstripe.workbench.model.deprecated_
Interface IModelComponent

All Superinterfaces:
IStereotypeCapable
All Known Subinterfaces:
IAbstractArtifact, IAssociationArtifact, IAssociationClassArtifact, IAssociationEnd, IDatatypeArtifact, IDependencyArtifact, IEnumArtifact, IEventArtifact, IExceptionArtifact, IField, ILiteral, IManagedEntityArtifact, IMethod, IPrimitiveTypeArtifact, IQueryArtifact, ISessionArtifact, IUpdateProcedureArtifact

public interface IModelComponent
extends IStereotypeCapable

A component for a Tigerstripe Model.

Author:
Eric Dillon

Nested Class Summary
static class IModelComponent.EMultiplicity
          An enum of the possible values for the multiplicity of an component.
static class IModelComponent.EVisibility
          An enum of the possible values for the visibility of a component.
 
Method Summary
 java.lang.Object getAnnotation(java.lang.String scheme, java.lang.String annotationType)
          Returns the first annotation defined against this object for the given scheme and annotationType
 java.util.List<java.lang.Object> getAnnotations()
          Returns a list of all the annotations for this object
 java.util.List<java.lang.Object> getAnnotations(java.lang.String scheme)
          Returns a list of all the annotations for for the given scheme for this object
 java.util.List<java.lang.Object> getAnnotations(java.lang.String scheme, java.lang.String annotationType)
          Returns the list of annotations defined against this object for the given scheme and annotationType
 java.lang.String getComment()
          Returns the comment (or plain-english description) associated with this model component.
 IModelComponentMetadata getMetadata()
          Returns the metadata about this Artifact type
 java.lang.String getName()
          Returns the name associated with this component.
 ITigerstripeModelProject getProject()
          Returns the project that this Model Component belongs to.
 IModelComponent.EVisibility getVisibility()
          Returns an integer value indicating the visibility of this component.
 boolean hasAnnotations()
          Returns true if there is any annotation defined against this object
 boolean hasAnnotations(java.lang.String scheme)
          Returns true if there is any annotation defined against this object for the given scheme
 boolean hasAnnotations(java.lang.String scheme, java.lang.String annotationType)
          Returns true if there is any annotation defined against this object for the given scheme and given annotationType
 boolean isInActiveFacet()
          Returns true if this component is included in the current active facet.
 void setComment(java.lang.String comment)
          Set the comment for this component.
 void setName(java.lang.String name)
          Sets the name associated with this component
 void setVisibility(IModelComponent.EVisibility visibility)
          Sets the visibility of this component.
 IStatus validate()
           
 
Methods inherited from interface org.eclipse.tigerstripe.workbench.profile.stereotype.IStereotypeCapable
addStereotypeInstance, getStereotypeInstanceByName, getStereotypeInstances, hasStereotypeInstance, removeStereotypeInstance, removeStereotypeInstances
 

Method Detail

getName

java.lang.String getName()
Returns the name associated with this component.

Returns:
String - the name of the component

setName

void setName(java.lang.String name)
Sets the name associated with this component


getComment

java.lang.String getComment()
Returns the comment (or plain-english description) associated with this model component.

Returns:
String - the comment

setComment

void setComment(java.lang.String comment)
Set the comment for this component.

Parameters:
comment -

getVisibility

IModelComponent.EVisibility getVisibility()
Returns an integer value indicating the visibility of this component. Possible values are defined in the static fields of this class.

Returns:
int - representing the visbility

setVisibility

void setVisibility(IModelComponent.EVisibility visibility)
Sets the visibility of this component. Possible values are defined in the static fields of this class.

Parameters:
visibility -

isInActiveFacet

boolean isInActiveFacet()
                        throws TigerstripeException
Returns true if this component is included in the current active facet. For IFields, IMethods and ILiterals this looks at Annotation-based exclusion only. If no facet is active, always returns true.

Returns:
Throws:
TigerstripeException

validate

IStatus validate()

getMetadata

IModelComponentMetadata getMetadata()
Returns the metadata about this Artifact type

Returns:

getAnnotations

java.util.List<java.lang.Object> getAnnotations()
Returns a list of all the annotations for this object

Returns:
a list of all annotations defined againt this object

getAnnotations

java.util.List<java.lang.Object> getAnnotations(java.lang.String scheme)
Returns a list of all the annotations for for the given scheme for this object

Specified by:
getAnnotations in interface IStereotypeCapable
Parameters:
scheme - - the scheme to limit the return to
Returns:
the list of all annotations for the given scheme defined against this object

getAnnotation

java.lang.Object getAnnotation(java.lang.String scheme,
                               java.lang.String annotationType)
Returns the first annotation defined against this object for the given scheme and annotationType

Specified by:
getAnnotation in interface IStereotypeCapable
Parameters:
scheme - - the scheme to match, e.g. "tigerstripe"
annotationType - - the annotation type to match. Match is done on the fully qualified name of the annotation type using endsWidth(..), so "org.eclipse.tigerstripe.annotation.example.Person" or "Person" would work, e.g.
Returns:
the first annotation for the given scheme and annotationType

getAnnotations

java.util.List<java.lang.Object> getAnnotations(java.lang.String scheme,
                                                java.lang.String annotationType)
Returns the list of annotations defined against this object for the given scheme and annotationType

Specified by:
getAnnotations in interface IStereotypeCapable
Parameters:
scheme - - the scheme to match, e.g. "tigerstripe"
annotationType - - the annotation type to match. Match is done on the fully qualified name of the annotation type using endsWidth(..), so "org.eclipse.tigerstripe.annotation.example.Person" or "Person" would work, e.g.
Returns:
the list of annotations for the given scheme and annotationType

hasAnnotations

boolean hasAnnotations()
Returns true if there is any annotation defined against this object

Returns:
true - if there is any annotation defined against this object

hasAnnotations

boolean hasAnnotations(java.lang.String scheme)
Returns true if there is any annotation defined against this object for the given scheme

Specified by:
hasAnnotations in interface IStereotypeCapable
Parameters:
scheme - - the scheme to match, for example "tigerstripe"
Returns:
true - if there is any annotation defined against this object

hasAnnotations

boolean hasAnnotations(java.lang.String scheme,
                       java.lang.String annotationType)
Returns true if there is any annotation defined against this object for the given scheme and given annotationType

Specified by:
hasAnnotations in interface IStereotypeCapable
Parameters:
scheme - - the scheme to match, for example "tigerstripe"
annotationType - - the annotation type to match. Match is done on the fully qualified name of the annotation type using endsWidth(..), so "org.eclipse.tigerstripe.annotation.example.Person" or "Person" would work, e.g.
Returns:
true - if there is any annotation defined against this object

getProject

ITigerstripeModelProject getProject()
                                    throws TigerstripeException
Returns the project that this Model Component belongs to.

Returns:
the project this component belongs to, null if the component has not been stored in a Model Project
Throws:
TigerstripeException - if the project is invalid (descriptor missing, etc..)