public class Concept extends java.util.Observable implements IExplainable, java.util.Observer
| Constructor and Description |
|---|
Concept(java.lang.String ID,
Project project,
Concept superConcept)
Initializes this with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
AmalgamationFct |
addAmalgamationFct(AmalgamationConfig amalgam,
java.lang.String name,
boolean active)
Creates a new AmalgamationFct for the given description.
|
void |
addAttributeDesc(AttributeDesc desc)
Adds given description as attribute description to current c
description.
|
boolean |
addInstance(Instance i)
Adds the given instance to this concept's range.
|
Instance |
addInstance(java.lang.String name)
Adds a new instance to this concept's range.
|
void |
addPartOfRelation(ConceptDesc desc)
Adds desc as a part of relation of this concept.
|
boolean |
addSubConcept(Concept c,
boolean isNew)
Adds the given concept as sub concept of this.
|
boolean |
canOverride(Concept c) |
Instance |
copyInstance(Instance original,
java.lang.String newName) |
void |
delete()
Deletes the concept with the given ID from this model
|
void |
deleteAmalgamFct(AmalgamationFct f)
Deletes the given function from the list of
known functions for the given description.
|
void |
deletePartOfRelation(ConceptDesc desc)
Removes the given description as part-of relation.
|
AmalgamationFct |
getActiveAmalgamFct()
Get the value of activeSimFcts
|
java.util.HashMap<java.lang.String,AttributeDesc> |
getAllAttributeDescs()
Gets the attribute descriptions of this c including inherited
attributes.
|
java.util.Collection<Instance> |
getAllInstances()
Get all instances known for this concept
including instances of sub concepts.
|
java.util.HashMap<java.lang.String,Concept> |
getAllSubConcepts()
Gets all sub c descriptions by inheritance.
|
AttributeDesc |
getAttributeDesc(java.lang.String name)
Returns the attribute description with the given name visible in this concept.
|
java.util.HashMap<java.lang.String,AttributeDesc> |
getAttributeDescs()
Gets the attribute descriptions of this c
Be aware that the inherited attribute descriptions are not returned by
this method.
|
java.util.Vector<AttributeDesc> |
getAttributesOfSubDescsForName(java.lang.String name)
Searches for an attribute with the given name.
|
java.util.List<AmalgamationFct> |
getAvailableAmalgamFcts()
Returns the available similarity functions for the specified description
|
java.util.Collection<Instance> |
getDirectInstances()
Returns the instances of this concept.
|
Explainable |
getExpType() |
AmalgamationFct |
getFct(java.lang.String name) |
Instance |
getInstance(java.lang.String name)
Returns the instance of this with name name and null
if there is none.
|
java.lang.String |
getName() |
java.util.Vector<ConceptDesc> |
getPartOfRelations()
Returns all part-of relation known for this concept.
|
Project |
getProject()
Returns the current project.
|
Instance |
getQueryInstance()
Returns a new instance that can be used as a query object
for retrieval.
|
java.util.HashMap<java.lang.String,Concept> |
getSubConcepts()
Gets the sub c descriptions by inheritance.
|
Concept |
getSuperConcept() |
boolean |
hasAttributeDesc(java.lang.String name) |
boolean |
hasDirectAttributeDesc(java.lang.String name) |
boolean |
removeAttributeDesc(java.lang.String name)
Removes the attribute given by name from
the attributes of this c.
|
void |
removeInstance(java.lang.String name) |
Concept |
removeSubConcept(java.lang.String name)
Removes the sub concept with name name.
|
void |
renameAmalgamationFct(java.lang.String nameOLD,
java.lang.String nameNEW)
Should be called when name of an sub concept changes.
|
void |
renameAttDesc(java.lang.String name,
java.lang.String name2)
Sets the name of the attribute description given by name to name2.
|
void |
renameInstance(java.lang.String name,
java.lang.String name2)
Renames the instance with name name.
|
void |
renameSubConcept(java.lang.String nameOLD,
java.lang.String nameNEW)
Should be called when name of an sub concept changes.
|
void |
setActiveAmalgamFct(AmalgamationFct amalgam)
Set the active amalgamation function for this.
|
void |
setAllInstancesMultiple(AttributeDesc desc) |
void |
setAllInstancesSingle(AttributeDesc desc) |
void |
setName(java.lang.String id)
Rename this c if possible.
|
void |
setSuperConcept(Concept c,
boolean isNew)
Moves this concept in the inheritance hierarchy.
|
void |
update(java.util.Observable o,
java.lang.Object arg) |
public Concept(java.lang.String ID,
Project project,
Concept superConcept)
throws java.lang.Exception
ID - the ID to be used for this description.java.lang.Exceptionpublic java.util.HashMap<java.lang.String,Concept> getSubConcepts()
public java.util.HashMap<java.lang.String,Concept> getAllSubConcepts()
public AmalgamationFct getFct(java.lang.String name)
public Concept removeSubConcept(java.lang.String name)
name - the name of the sub concept to be removedpublic void renameSubConcept(java.lang.String nameOLD,
java.lang.String nameNEW)
nameOLD - the name of the sub concept to be renamednameNEW - the new namepublic Concept getSuperConcept()
public void removeInstance(java.lang.String name)
public void setSuperConcept(Concept c, boolean isNew)
c - the new super concept of thispublic boolean addSubConcept(Concept c, boolean isNew)
c - the concept to be added as sub conceptpublic void setName(java.lang.String id)
throws java.lang.Exception
id - the new ID for this conceptjava.lang.Exceptionpublic java.util.HashMap<java.lang.String,AttributeDesc> getAttributeDescs()
getAllAttributeDescs()public java.util.HashMap<java.lang.String,AttributeDesc> getAllAttributeDescs()
public void addAttributeDesc(AttributeDesc desc) throws java.lang.Exception
desc - the attribute description to be added to this descriptionjava.lang.Exceptionpublic boolean hasDirectAttributeDesc(java.lang.String name)
public boolean hasAttributeDesc(java.lang.String name)
public java.util.Vector<AttributeDesc> getAttributesOfSubDescsForName(java.lang.String name)
public boolean removeAttributeDesc(java.lang.String name)
name - public boolean canOverride(Concept c)
public Project getProject()
public java.util.Collection<Instance> getDirectInstances()
public java.util.Collection<Instance> getAllInstances()
public void addPartOfRelation(ConceptDesc desc)
desc - the description which has a part-of relation to thispublic java.util.Vector<ConceptDesc> getPartOfRelations()
public void deletePartOfRelation(ConceptDesc desc)
desc - the part-of relation to be removedpublic void delete()
public Instance getInstance(java.lang.String name)
name - public Instance getQueryInstance()
public Instance addInstance(java.lang.String name) throws java.lang.Exception
name - the name of the new instancejava.lang.Exception - if name is null or emptypublic Instance copyInstance(Instance original, java.lang.String newName) throws java.lang.Exception
java.lang.Exceptionpublic boolean addInstance(Instance i)
i - the new instancepublic void renameInstance(java.lang.String name,
java.lang.String name2)
name - name of the instance to be renamedname2 - new name of the instancepublic void deleteAmalgamFct(AmalgamationFct f)
f - the function to be deletedpublic AmalgamationFct addAmalgamationFct(AmalgamationConfig amalgam, java.lang.String name, boolean active)
name - the description for which a new function should be createdpublic AmalgamationFct getActiveAmalgamFct()
public void setActiveAmalgamFct(AmalgamationFct amalgam)
amalgam - the new amalgamation functionpublic java.util.List<AmalgamationFct> getAvailableAmalgamFcts()
public void renameAmalgamationFct(java.lang.String nameOLD,
java.lang.String nameNEW)
nameOLD - the name of the sub concept to be renamednameNEW - the new namepublic AttributeDesc getAttributeDesc(java.lang.String name)
name - the name of the attribute description to be returnedpublic void renameAttDesc(java.lang.String name,
java.lang.String name2)
name - name2 - public java.lang.String getName()
getName in interface IExplainablepublic Explainable getExpType()
getExpType in interface IExplainablepublic void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerpublic void setAllInstancesMultiple(AttributeDesc desc)
desc - the description that now uses multiple attributes as valuespublic void setAllInstancesSingle(AttributeDesc desc)
desc - the description that now uses single attributes as values