|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.toscanaj.model.lattice.ConceptImplementation
This implements concepts. Intent and extent are mapped into filter and ideal resp. to avoid redundant storage. Filter and ideal are explicitely stored to reduce computational efforts for these operations. The calculation of intent and extent size is done in this class, the joins on the sets themselves are done by creating an iterator which iterates over all contingents in filter and ideal resp. To use this class one has to ensure all sub- and superconcept relations are set up properly. If only the neighbourhood relation is set the method buildClosures() can be called to extent this to the full sub-/superconcept relation.
| Field Summary | |
static java.lang.String |
ATTRIBUTE_CONTINGENT_ELEMENT_NAME
|
static java.lang.String |
ATTRIBUTE_ELEMENT_NAME
|
static java.lang.String |
CONCEPT_ELEMENT_NAME
|
static java.lang.String |
DESCRIPTION_ELEMENT_NAME
|
protected java.util.Set |
filter
Stores all concepts in the filter, including this. |
protected java.util.Set |
ideal
Stores all concepts in the ideal, including this. |
static java.lang.String |
OBJECT_CONTINGENT_ELEMENT_NAME
|
static java.lang.String |
OBJECT_ELEMENT_NAME
|
| Constructor Summary | |
ConceptImplementation()
Initializes the ideal and filter with linked list having a reference to this. |
|
ConceptImplementation(org.jdom.Element element)
|
|
| Method Summary | |
void |
addAttribute(java.lang.Object attribute)
|
void |
addObject(java.lang.Object object)
|
void |
addSubConcept(Concept subConcept)
Adds a concept to the ideal. |
void |
addSuperConcept(Concept superConcept)
Adds a concept to the filter. |
void |
buildClosures()
Calculates the ideal and filter for this concept if only direct neighbours are given. |
java.util.Iterator |
getAttributeContingentIterator()
Returns an iterator returning the attributes from the contingent. |
int |
getAttributeContingentSize()
Returns the size of the attribute contingent. |
double |
getAttributeContingentSizeRelative()
Calculates the relative attribute contingent size. |
Concept |
getBottomConcept()
|
java.util.Collection |
getDownset()
|
java.util.Iterator |
getExtentIterator()
Iterates over all object contingents in the ideal. |
int |
getExtentSize()
Calculates the extent size based on the contingent sizes in the ideal. |
double |
getExtentSizeRelative()
Calculates the relative extent size. |
java.util.Iterator |
getIntentIterator()
Iterates over all attribute contingents in the filter. |
int |
getIntentSize()
Calculates the intent size based on the contingent sizes in the filter. |
double |
getIntentSizeRelative()
Calculates the relative intent size. |
java.util.Iterator |
getObjectContingentIterator()
Returns an iterator returning the objects from the contingent. |
int |
getObjectContingentSize()
Returns the size of the object contingent. |
double |
getObjectContingentSizeRelative()
Calculates the relative object contingent size. |
Concept |
getTopConcept()
|
java.util.Collection |
getUpset()
|
boolean |
hasSubConcept(Concept concept)
Returns true iff the given concept is in the ideal of this one. |
boolean |
hasSuperConcept(Concept concept)
Returns true iff the given concept is in the filter of this one. |
boolean |
isBottom()
Returns true if this is the bottom concept. |
boolean |
isEqual(Ordered other)
Compare the current with another object on equality. |
boolean |
isJoinIrreducible()
|
boolean |
isLesserThan(Ordered other)
Compares the current with another object on ordering. |
boolean |
isMeetIrreducible()
|
boolean |
isTop()
Returns true if this is the top concept. |
void |
readXML(org.jdom.Element elem)
Read this element as the content of elem. |
void |
removeAttribute(java.lang.Object attribute)
|
void |
removeObject(java.lang.Object object)
|
void |
removeObjectContingent()
|
void |
replaceObject(java.lang.Object objectToReplace,
java.lang.Object newObject)
|
org.jdom.Element |
toXML()
Write this element as the content of elem. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String CONCEPT_ELEMENT_NAME
public static final java.lang.String OBJECT_CONTINGENT_ELEMENT_NAME
public static final java.lang.String OBJECT_ELEMENT_NAME
public static final java.lang.String ATTRIBUTE_CONTINGENT_ELEMENT_NAME
public static final java.lang.String ATTRIBUTE_ELEMENT_NAME
public static final java.lang.String DESCRIPTION_ELEMENT_NAME
protected java.util.Set filter
protected java.util.Set ideal
| Constructor Detail |
public ConceptImplementation()
public ConceptImplementation(org.jdom.Element element)
throws XMLSyntaxError
| Method Detail |
public org.jdom.Element toXML()
XMLizable
toXML in interface XMLizablepublic void addSuperConcept(Concept superConcept)
public void addSubConcept(Concept subConcept)
public void buildClosures()
public int getIntentSize()
getIntentSize in interface Conceptpublic double getIntentSizeRelative()
public int getExtentSize()
getExtentSize in interface Conceptpublic double getExtentSizeRelative()
public java.util.Iterator getIntentIterator()
getIntentIterator in interface Conceptpublic java.util.Iterator getExtentIterator()
getExtentIterator in interface Conceptpublic double getAttributeContingentSizeRelative()
public double getObjectContingentSizeRelative()
public boolean isTop()
isTop in interface Conceptpublic boolean isBottom()
isBottom in interface Conceptpublic boolean hasSuperConcept(Concept concept)
hasSuperConcept in interface Conceptpublic boolean hasSubConcept(Concept concept)
hasSubConcept in interface Conceptpublic java.util.Collection getDownset()
getDownset in interface Conceptpublic java.util.Collection getUpset()
getUpset in interface Conceptpublic int getAttributeContingentSize()
Concept
getAttributeContingentSize in interface Conceptpublic int getObjectContingentSize()
Concept
getObjectContingentSize in interface Conceptpublic java.util.Iterator getAttributeContingentIterator()
Concept
getAttributeContingentIterator in interface Conceptpublic java.util.Iterator getObjectContingentIterator()
Concept
getObjectContingentIterator in interface Concept
public void readXML(org.jdom.Element elem)
throws XMLSyntaxError
XMLizable
readXML in interface XMLizableXMLSyntaxErrorpublic void addObject(java.lang.Object object)
public void addAttribute(java.lang.Object attribute)
public void replaceObject(java.lang.Object objectToReplace,
java.lang.Object newObject)
public void removeObject(java.lang.Object object)
public void removeAttribute(java.lang.Object attribute)
public boolean isLesserThan(Ordered other)
Ordered
isLesserThan in interface Orderedother - the object to compare to, must not be null
public boolean isEqual(Ordered other)
Ordered
isEqual in interface Orderedother - the object to compare to, must not be null
public boolean isMeetIrreducible()
isMeetIrreducible in interface Conceptpublic boolean isJoinIrreducible()
isJoinIrreducible in interface Conceptpublic void removeObjectContingent()
public Concept getTopConcept()
getTopConcept in interface Conceptpublic Concept getBottomConcept()
getBottomConcept in interface Concept
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||