|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractSet
java.util.HashSet
aminePlatform.util.AmineSet
Title : util.AmineSet Class
Description : Class AmineSet is a specialization of HashSet : Like a Set, no order is applied on the elements of an AmineSet object. Since a concept descriptor can be an AmineSet and in order to have a simple and efficient definition of CG matching operations, we adopt the following restriction on the kinds of elements an AmineSet could contain : each element of an AmineSet should be a simple object : an Integer, a Double, a Boolean, a String, an Identifier, a Type or an Individual CS. An AmineSet can be a descriptor (or contained in a descriptor) of a concept in a CG.
Implements : AmineObject and Matching interfaces
Copyright: Copyright (c) Adil KABBAJ, 2004-2009
Field Summary |
Fields inherited from class java.util.HashSet |
|
Constructor Summary | |
AmineSet()
|
|
AmineSet(int i)
|
Method Summary | |
boolean |
add(java.lang.Object element)
Override the method add() in order to check that the specified element is a simple object. |
boolean |
addAll(java.util.Collection c)
Override the method addAll() in order to check that the elements of the specified collection are simple objects. |
static boolean |
canBeElement(java.lang.Object element)
Check if the specified element can be an element in an AmineSet object : an Integer, a Double, a Boolean, a String, an Identifier or a Type or an Individual CS. |
void |
clear()
Clear the content of the current AmineSet |
java.lang.Object |
clone(BindingContext bindContext,
java.lang.Object bindInf)
Since no variables could be contained in an AmineSet, this definition is reduced to a simple clone(). |
AmineSet |
copy()
Return a copy of the current AmineSet. |
boolean |
equal(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Check that the current object is equal with the specified object obj. |
boolean |
equal(java.lang.Object obj)
Check that the current object is equal with the specified object obj. |
void |
finalize()
Implements AmineObject Methods |
java.lang.Object |
generalize(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Perform a generalization of the current object with the specified object obj, to determine what is common to the two objects. |
java.lang.Object |
generalize(java.lang.Object obj)
Perform a generalization of the current object with the specified object obj, to determine what is common to the two objects. |
void |
getVariables(java.util.ArrayList varsIdent)
This method has an empty body since elements of an AmineSet can not be variables. |
AmineSet |
intersection(AmineSet set)
Intersection of two sets. |
static boolean |
isAmineSet(java.lang.Object obj)
Check if the specified Object obj is an AmineSet. |
boolean |
isMember(java.lang.Object obj)
Test if the specified object is member of the current set. |
boolean |
isSubSet(AmineSet set)
This methods is equivalent to the inherited method containsAll(). |
java.lang.Object |
match(byte matchOperation,
BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Match the current object with the specified object obj, according to the value of the parameter matchOperation. |
java.lang.Object |
match(byte matchOperation,
java.lang.Object obj)
Match the current object with the specified object obj, according to the value of the parameter matchOperation. |
java.lang.Object |
maximalJoin(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Perform a maximal join of the current object with the specified object obj. |
java.lang.Object |
maximalJoin(java.lang.Object obj)
Perform a maximal join of the current object with the specified object obj. |
static AmineSet |
parse(java.lang.String amineSetInString)
Parse the textual formulation of an AmineSet (parameter amineSetInString) and return its internal representation (i.e. an AmineList object). |
static AmineSet |
parse(java.lang.String amineSetInString,
Lexicon lexicon)
Parse the textual formulation of an AmineSet (parameter amineSetInString) using the specified lexicon and return its internal representation (i.e. an AmineSet object). |
boolean |
subsume(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Check that the current object subsumes (is more general than) the specified object obj. |
boolean |
subsume(java.lang.Object obj)
Check that the current object subsumes (is more general than) the specified object obj. |
java.lang.Object |
subsumeWithResult(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Check that the current object subsumes (is more general than) the specified object obj. |
java.lang.Object |
subsumeWithResult(java.lang.Object obj)
Check that the current object subsumes (is more general than) the specified object obj. |
AmineList |
toAmineList()
Create an AmineList object with the content of the current AmineSet. |
java.lang.String |
toString()
This method overrides toString() and returns a textual formulation of the current AmineSet. |
java.lang.String |
toString(BindingContext bindContext,
java.lang.Object bindInf,
Lexicon lexicon)
Since this class implements AmineObject interface, it should define this method which is reduced in the case of AmineSet to the simpler version (without binding information). |
java.lang.String |
toString(Lexicon lexicon)
Like toString() method, this method returns a textual formulation of the current AmineSet using the specified lexicon. |
boolean |
unify(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Unify the current object with the specified object obj. |
AmineSet |
union(AmineSet set)
Union of two sets. |
AmineSet |
union(java.lang.Object obj)
Add the specified object to the current set. |
Methods inherited from class java.util.HashSet |
clone, contains, isEmpty, iterator, remove, size |
Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
containsAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface aminePlatform.util.AmineObject |
clone |
Methods inherited from interface java.util.Set |
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
Constructor Detail |
public AmineSet()
public AmineSet(int i)
Method Detail |
public void finalize()
finalize
in interface AmineObject
public void clear()
clear
in interface AmineObject
public AmineSet copy()
public java.lang.Object clone(BindingContext bindContext, java.lang.Object bindInf)
clone
in interface AmineObject
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and the current AmineSet
public void getVariables(java.util.ArrayList varsIdent)
getVariables
in interface AmineObject
varsIdent
- An ArrayList of variablespublic java.lang.String toString(Lexicon lexicon) throws ToStringException
toString
in interface ToString
lexicon
- The lexicon to use during the textual formulation of the current AmineSet
Lexicon is relevant since it could contains references to CS present
in the current ontology and so the possibility to express CS in different
languages, via the associated identifiers.
ToStringException
- if an error occurs during the textual
formulation of this AmineSet object.public java.lang.String toString()
public java.lang.String toString(BindingContext bindContext, java.lang.Object bindInf, Lexicon lexicon) throws ToStringException
toString
in interface AmineObject
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and the current AmineSetlexicon
- The lexicon in use during the textual formulation of the current AmineSet
ToStringException
- if an error occurs during the textual
formulation of this AmineSet object.public static boolean isAmineSet(java.lang.Object obj)
obj
- : an object
public AmineList toAmineList()
public static AmineSet parse(java.lang.String amineSetInString, Lexicon lexicon) throws ParsingException
amineSetInString
- a textual formulation of an AmineSetlexicon
- The lexicon to use during the parsing
throws
- ParsingException if an error occurs during the parsing of
amineSetInString.
ParsingException
public static AmineSet parse(java.lang.String amineSetInString) throws ParsingException
amineSetInString
- a textual formulation of an AmineSet
throws
- ParsingException if an error occurs during the parsing of
amineListInString.
ParsingException
public boolean add(java.lang.Object element)
add
in interface java.util.Set
element
- : an Object
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Set
c
- : a collection of objects
public static boolean canBeElement(java.lang.Object element)
element
- : an object
public boolean isSubSet(AmineSet set)
set
- An AmineSet
public AmineSet union(AmineSet set)
set
- An AmineSet
public AmineSet union(java.lang.Object obj)
obj
- An Object
public AmineSet intersection(AmineSet set)
set
- An AmineSet
public boolean isMember(java.lang.Object obj)
obj
- An Object
public java.lang.Object match(byte matchOperation, java.lang.Object obj)
match
in interface Matching
matchOperation
- A byte value that specifies which kind of matching to applyobj
- The object to match with the current object
public java.lang.Object match(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
match
in interface Matching
matchOperation
- A byte value that specifies which kind of matching to apply.
Atually, these values are defined in AmineConstants interface and are: EQUAL,
UNIFY, SUBSUME, SUBSUME_WITH_RSLT, MAXIMAL_JOIN, and GENERALIZE.bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to match with the current objectbindInfObj
- The binding information for the parameter obj
public boolean equal(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
equal
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to check the equality with the current objectbindInfObj
- The binding information for the parameter obj
public boolean equal(java.lang.Object obj)
equal
in interface Matching
obj
- The object to check the equality with the current object
public boolean unify(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
unify
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to unify with the current objectbindInfObj
- The binding information for the parameter obj
public boolean subsume(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
subsume
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to check its subsumption by the current objectbindInfObj
- The binding information for the parameter obj
public boolean subsume(java.lang.Object obj)
subsume
in interface Matching
obj
- The object to check its subsumption by the current object
public java.lang.Object subsumeWithResult(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
subsumeWithResult
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to check its subsumption by the current objectbindInfObj
- The binding information for the parameter obj
public java.lang.Object subsumeWithResult(java.lang.Object obj)
subsumeWithResult
in interface Matching
obj
- The object to check its subsumption by the current object
public java.lang.Object maximalJoin(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
maximalJoin
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to join with the current objectbindInfObj
- The binding information for the parameter obj
public java.lang.Object maximalJoin(java.lang.Object obj)
maximalJoin
in interface Matching
obj
- The object to join with the current object
public java.lang.Object generalize(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
generalize
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to generalize with the current objectbindInfObj
- The binding information for the parameter obj
public java.lang.Object generalize(java.lang.Object obj)
generalize
in interface Matching
obj
- The object to generalize with the current object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |