|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaminePlatform.kernel.lexicons.Identifier
Title : lexicons.Identifier Class
Description : In general, an identifier is used in Amine Platform to specify 'words' of languages (english, french, arabic, etc.) and identifiers of a language are associated to Conceptual Structures (CS) to form entries of the language's lexicon. CSs are in general interconnected and compose a (conceptual) ontology. CSs are defined in the package ontology.
An identifier has a name which is a String. An identifier is a word that should start with an alphabetic character (underscore '_' is considered as an alphabetic character) and followed by zero or more alphabetic or digit characters. Please note that identifiers should not contain spaces.
A static attribute, the boolean 'ignoreCase' which is common to all the identifiers, is defined in this class (Identifier) to switch on/off the consideration of case. Comparison methods, like equals() and hashCode() are overriden to take into account this possibility. If the user wants to ignore case, he should assign true to the 'ignoreCase' attribute, i.e. by calling Identifier.setIgnoreCase(true). If he does not want to ignore case, he should assign false : Identifier.setIgnoreCase(false). By default, the 'ignoreCase' attribute is initialized to true.
Note: since the class Variable is a subclass of Identifier, it inherits the possibility to ignore or not case.
Subclasses : util.Variable
Implements : The class Identifier implements the interface Muable, which means that an Identifier is an Amine simple object and its value can be changed (i.e., its value is muable).
Copyright: Copyright (c) Adil KABBAJ, 2004-2009
Field Summary | |
protected static Identifier |
id
A static attribute used to wrap a name (a String) in an Identifier form |
protected static boolean |
ignoreCase
A static attribute that functions as a switcher, for all the identifiers, to activate/de-activate the option to ignore (or not) case in the identifiers. |
protected java.lang.String |
name
An identifier has a name |
Constructor Summary | |
Identifier(java.lang.String s)
Construct a new Identifier with the specified name. |
Method Summary | |
java.lang.Object |
clone()
Get a clone of the current identifier |
int |
compareTo(java.lang.Object obj)
|
Identifier |
copy()
Get a copy of the current identifier. |
boolean |
equals(java.lang.Object obj)
Override the method equals(). |
static boolean |
getIgnoreCase()
Get the value of the ignoreCase static attribute, true or false |
java.lang.String |
getName()
Get the name of the current identifier. |
int |
hashCode()
Override the method hashCode() which takes into account the treatment of case. |
static boolean |
isCorrectIdentName(java.lang.String name)
|
static boolean |
isIdentifier(java.lang.Object obj)
Check if the specified obj is an Identifier |
static boolean |
isIgnoreCase()
Check if the value of the ignoreCase static attribute is true. |
static void |
setIgnoreCase(boolean b)
Change the value of the ignoreCase static attribute to the specified value b. |
void |
setName(java.lang.String newName)
Change the name of the current identifier to the specified name. |
java.lang.String |
toString()
Return the name of the current Identifier |
static Identifier |
wrap(java.lang.String s)
This static method wraps the given string s as an identifier. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static boolean ignoreCase
protected static Identifier id
protected java.lang.String name
Constructor Detail |
public Identifier(java.lang.String s)
s
- The name for the new identifierMethod Detail |
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
public java.lang.String getName()
public void setName(java.lang.String newName)
newName
- The name for the current identifierpublic static boolean isCorrectIdentName(java.lang.String name)
public static boolean getIgnoreCase()
public static boolean isIgnoreCase()
public static void setIgnoreCase(boolean b)
b
- A boolean that indicates if case will be ignored (b = true) or not (b = false).public static boolean isIdentifier(java.lang.Object obj)
obj
- An object
public static Identifier wrap(java.lang.String s)
public boolean equals(java.lang.Object obj)
obj
- An Object
public int hashCode()
public java.lang.Object clone()
clone
in interface Muable
public Identifier copy()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |