LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info
Class LyObjectInfo

java.lang.Object
  extended by leon.info.LyTag
      extended by leon.info.LyInfo
          extended by leon.info.LyObjectInfo
All Implemented Interfaces:
java.lang.Cloneable, LyCommentInterface
Direct Known Subclasses:
LyAction, LyChartInfo, LyClassInfo, LyFieldInfo, LyFilter, LyPreference, LyProject, LySort, LySticker, LyTreemapConfiguration

public abstract class LyObjectInfo
extends LyInfo
implements java.lang.Cloneable

This class is an abstract class that contains generic behavior of the classes which represent the data information read from the data model description file. These classes are : LyClassInfo, LyFieldInfo, LyAction, LyProject, LyFilter and LySort. This class inherits from LyInfo class : this means that instances of this class have an id and belong to an application. The information added on this class is the following :


Nested Class Summary
 
Nested classes/interfaces inherited from class leon.info.LyTag
LyTag.Model
 
Field Summary
static java.lang.String __VERSION
           
static java.lang.String NULL
           
static int PART_ALL
           
static int PART_BIND
           
static int PART_DATA
           
static int PART_GUI
           
static int PART_LABEL
           
 
Method Summary
 java.lang.Object clone()
          Implementation of the Cloneable interface.
 java.lang.String getAlias()
          Accessor for alias (shortname) of this instance.
 java.lang.Object getData(java.lang.Object name)
          Gets a user data by its name.
 java.util.Vector<LyData> getDataList()
          Gets list of data associated to this instance.
 java.util.Hashtable<java.lang.Object,LyData> getDatas()
          Gets table of data associated to this instance.
 java.lang.String getFilePrefix()
          Accessor to the file prefix for this instance.
 java.lang.String getGroup()
          Returns name of the group to which this instance belongs.
 java.lang.String getInternalAlias()
          Accessor for alias (shortname) of this instance.
 java.lang.String getInternalFilePrefix()
          Accessor to the file prefix for this instance.
 java.lang.String getInternalName()
          Accessor for name of this instance.
 java.util.BitSet getMarks()
          Accessor to the marks attached to this instance (presented as a bitset).
 java.lang.String getName()
          Accessor for name of this instance.
 LyObjectInfo getTemplate()
          Returns the template used to initialize this instance.
 java.lang.String getTip()
          Returns the tip (short help displayed in tool tip) associated to this instance.
 java.lang.Object getUserData()
          Gets user data associated to this class info.
 boolean hasMark(int mark)
          Check if a mark is set on this instance.
 boolean hasMarks(java.util.BitSet testMarks, boolean matchAll)
          Check if a group of marks are set on this instance.
 boolean hasTemplate(LyObjectInfo objectInfo)
          Checks recursively if this object has the given object as template.
 boolean isTemplate()
          Checks if this object info was used as template.
 java.lang.Object putData(java.lang.Object name, java.lang.Object value)
          Adds user data on this instance.
 java.lang.Object putData(java.lang.Object name, java.lang.Object value, LyTag.Model modelType)
          Adds user data on this instance.
 java.lang.Object removeData(java.lang.Object name)
          Removes a user data on this instance.
 java.lang.String toName()
          Converts this objectInfo to a string.
 
Methods inherited from class leon.info.LyInfo
getApplication, getFile, getId, getInclude, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, setApplication, setFile, toString
 
Methods inherited from class leon.info.LyTag
getCommentsEnd, getCommentsStart, getEnvironment, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface leon.parser.LyCommentInterface
getCommentsEnd, getCommentsStart, setCommentsEnd, setCommentsStart
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

PART_DATA

public static final int PART_DATA
See Also:
Constant Field Values

PART_BIND

public static final int PART_BIND
See Also:
Constant Field Values

PART_GUI

public static final int PART_GUI
See Also:
Constant Field Values

PART_LABEL

public static final int PART_LABEL
See Also:
Constant Field Values

PART_ALL

public static final int PART_ALL
See Also:
Constant Field Values

NULL

public static final java.lang.String NULL
Method Detail

toName

public java.lang.String toName()
Converts this objectInfo to a string.

Returns:
Id of the object concatenated with its name enclosed in parenthesis.

hasMark

public final boolean hasMark(int mark)
Check if a mark is set on this instance. Generic mark are declared in classes that inherit from this class. Specific marks can be found from their name by using getMarkIndex methods declared in these classes.

Parameters:
mark - Mark tested for this object.
Returns:
True if the mark is set, false otherwise.

hasMarks

public final boolean hasMarks(java.util.BitSet testMarks,
                              boolean matchAll)
Check if a group of marks are set on this instance.

Parameters:
testMarks - Tested marks.
matchAll - Specifies if this instance have to match all specified marks or only one.
Returns:
True if the test succeeds, false otherwise.

putData

public final java.lang.Object putData(java.lang.Object name,
                                      java.lang.Object value)
Adds user data on this instance. A user data is a value associated to a name stored in a hashtable.

Parameters:
name - Name of the user data. If a value was already stored for that name, this value is overridden.
value - Value of the user data.
Returns:
The previous value associated to the given name if there was one, null otherwise.
Throws:
java.lang.IllegalArgumentException - If the given name or value is null.

putData

public final java.lang.Object putData(java.lang.Object name,
                                      java.lang.Object value,
                                      LyTag.Model modelType)
Adds user data on this instance. A user data is a value associated to a name stored in a hashtable.

Parameters:
name - Name of the user data. If a value was already stored for that name, this value is overridden.
value - Value of the user data.
modelType - Model type where the data is declared.
Returns:
The previous value associated to the given name if there was one, null otherwise.
Throws:
java.lang.IllegalArgumentException - If the given name or value is null.

removeData

public final java.lang.Object removeData(java.lang.Object name)
Removes a user data on this instance.

Parameters:
name - Name of the data to be removed.
Returns:
The value that was associated to the given name if there was one, null otherwise.
Throws:
java.lang.IllegalArgumentException - If the given name is null.
java.lang.IllegalStateException - If this method is called before any data has been added (data hashtable is null).

clone

public java.lang.Object clone()
Implementation of the Cloneable interface. Overridden to clone the property table properly

Overrides:
clone in class LyTag

getName

public final java.lang.String getName()
Accessor for name of this instance.

Overrides:
getName in class LyInfo
Returns:
Name of this instance. If the name is null, this method returns the id.

getInternalName

public final java.lang.String getInternalName()
Accessor for name of this instance.

Returns:
Name of this instance. If the name is null, this method returns null.

getAlias

public final java.lang.String getAlias()
Accessor for alias (shortname) of this instance.

Overrides:
getAlias in class LyInfo
Returns:
Alias of this instance. If the alias is null, this method returns the name.

getInternalAlias

public final java.lang.String getInternalAlias()
Accessor for alias (shortname) of this instance. This method doesn't compute a value if it is null

Returns:
Alias of this instance.

getFilePrefix

public final java.lang.String getFilePrefix()
Accessor to the file prefix for this instance.

Returns:
File prefix of the instance. If the file prefix is null, this method returns the id.

getInternalFilePrefix

public final java.lang.String getInternalFilePrefix()
Accessor to the file prefix for this instance.

Returns:
File prefix of the instance. If the file prefix is null, this method returns null.

getTemplate

public final LyObjectInfo getTemplate()
Returns the template used to initialize this instance.

Returns:
The template is one was used when creating this instance, null otherwise.

getGroup

public final java.lang.String getGroup()
Returns name of the group to which this instance belongs. This group is simply a string used to gather instances logically in the same named panel in some views.

Returns:
Name of the group, or null if no group was specified.

getMarks

public final java.util.BitSet getMarks()
Accessor to the marks attached to this instance (presented as a bitset).

Returns:
A copy of the bitset which represents the marks (properties) of this instance.
See Also:
BitSet

getTip

public java.lang.String getTip()
Returns the tip (short help displayed in tool tip) associated to this instance.

Returns:
Tip of the instance, or null if no tip was defined.

getData

public final java.lang.Object getData(java.lang.Object name)
Gets a user data by its name.

Parameters:
name - Name for which a value is searched.
Returns:
Found value if any, or null if no data was stored with the given name.
Throws:
java.lang.IllegalArgumentException - If the given name is null.

getDataList

public final java.util.Vector<LyData> getDataList()
Gets list of data associated to this instance.

Returns:
Returns the list of all the data associated to this object info.

getDatas

public final java.util.Hashtable<java.lang.Object,LyData> getDatas()
Gets table of data associated to this instance.

Returns:
Returns the table of all the data associated to this object info. This is a copy of the internal hashtable that contains these data.

getUserData

public java.lang.Object getUserData()
Gets user data associated to this class info.

Returns:
User data (may be null).

hasTemplate

public boolean hasTemplate(LyObjectInfo objectInfo)
Checks recursively if this object has the given object as template.

Returns:
True if success, false otherwise.

isTemplate

public boolean isTemplate()
Checks if this object info was used as template.


(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com