public final class Project extends Concept
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_FCT_NAME
predefined constants for special values.
|
static java.lang.String |
DEFAULT_FCT_NAME_TMP
predefined constants for special values.
|
static java.lang.String |
ID_DEFAULT
predefined constants for special values.
|
static java.lang.String |
NO_SPECIAL_VALUE
predefined constants for special values.
|
static java.lang.String |
UNDEFINED_SPECIAL_ATTRIBUTE
predefined constants for special values.
|
static java.lang.String |
UNKNOWN_SPECIAL_VALUE
predefined constants for special values.
|
| Constructor and Description |
|---|
Project()
Default constructor.
|
Project(java.lang.String path)
Constructor for project from file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeDesc(AttributeDesc desc)
Adds given description as attribute description to current c
description.
|
TaxonomyFct |
addInhFct(java.lang.String name)
Creates a new InheritanceFct for myCBR's model.
|
void |
addPartOfRelation(ConceptDesc desc)
Adds desc as a part of relation of this concept.
|
void |
addSpecialValue(java.lang.String value) |
Similarity |
calculateMultipleAttributeSimilarity(java.lang.Object simFct,
MultipleAttribute<?> att1,
MultipleAttribute<?> att2)
Calculates the similarity of the given
MultipleAttribute objects
based on the given similarity function. |
Similarity |
calculateSpecialSimilarity(Attribute att1,
Attribute att2)
Calculates the similarity of the given attributes by calling the
calculateSimilarity method of the appropriate similarity function.
|
boolean |
canOverride(Concept c) |
void |
cleanInstances(Concept c,
AttributeDesc desc)
Cleans all instances known for concept c.
|
DefaultCaseBase |
createDefaultCB(java.lang.String name)
Tries to create a default case base for this project.
|
DefaultCaseBase |
createDefaultCB(java.lang.String cbName,
int currentCBCount)
Used to speed up the import of case bases if the number of cases
is known.
|
Concept |
createTopConcept(java.lang.String id)
Adds a new top c with the specified name to this project.
|
void |
delete()
Deletes the concept with the given ID from this model
|
ICaseBase |
deleteCaseBase(java.lang.String name)
Removes the case base specified by name from this project.
|
void |
deletePartOfRelation(ConceptDesc desc)
Removes the given description as part-of relation.
|
java.util.HashMap<java.lang.String,AttributeDesc> |
getAllAttributeDescs()
Gets the attribute descriptions of this c including inherited
attributes.
|
java.util.Collection<Instance> |
getAllInstances()
Returns all instances that are known for this project.
|
java.util.LinkedList<AttributeDesc> |
getAttDescsByName(java.lang.String name)
Returns a list of attribute descriptions with the given name.
|
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.lang.String |
getAuthor()
Gets the author of this project.
|
java.util.HashMap<java.lang.String,ICaseBase> |
getCaseBases()
Gets the case bases for this project.
|
ICaseBase |
getCB(java.lang.String name)
Returns the case base associated with the given name.
|
Concept |
getConceptByID(java.lang.String id)
Returns the c description with the given name.
|
int |
getCurrentNumberOfCases()
Returns the number of cases that have been imported so far.
|
ExplanationManager |
getExplanationManager() |
java.lang.String |
getExtension()
Returns the zip file's extension.
|
TaxonomyFct |
getInhFct()
Returns the inheritance function of this c.
|
Instance |
getInstance(java.lang.String name)
Returns the instance of this with name name and null
if there is none.
|
Similarity |
getLocalSimilarity(Attribute a,
Attribute b,
AttributeDesc desc)
For displaying local similarities.
|
java.util.Vector<ConceptDesc> |
getPartOfRelations()
Returns all part-of relation known for this concept.
|
java.lang.String |
getPath()
Gets the path of this project.
|
Project |
getProject()
Returns the current project.
|
Attribute |
getSpecialAttribute(java.lang.String obj)
Returns the
SpecialAttribute object corresponding to
the given string. |
SymbolFct |
getSpecialFct()
Returns the special function of this project.
|
SpecialDesc |
getSpecialValueDesc() |
Concept |
getSuperConcept() |
int |
getTotalNumberOfCases()
The total number of cases that have to be imported
is given by this project's .myCBR file.
|
boolean |
hasCB(java.lang.String name)
Checks whether there is a case base with the given name.
|
java.lang.Boolean |
hasConceptWithID(java.lang.String id)
Checks whether there is a c description in the current inheritance
hierarchy which has the specified name.
|
boolean |
isImporting()
Checks whether the import of this project is still running.
|
boolean |
isSpecialAttribute(java.lang.String obj) |
boolean |
removeAttributeDesc(java.lang.String name)
Removes the attribute given by name from
the attributes of this c.
|
void |
removeCase(java.lang.String name)
Removes the case with the given name from each case base.
|
Concept |
removeSubConcept(java.lang.String name)
Removes the sub concept with name name.
|
void |
save()
Loads the project from the given file.
|
void |
setAuthor(java.lang.String author)
Sets the author of this project.
|
void |
setInhFct(SpecialFct f)
Changes the active special value function.
|
void |
setPath(java.lang.String path)
Sets the project's path to the specified path.
|
void |
setSpecialValueFct(SpecialFct f)
Changes the active special function.
|
void |
setSuperConcept(Concept c,
boolean isNEW)
Moves this concept in the inheritance hierarchy.
|
void |
update(java.util.Observable o,
java.lang.Object arg) |
addAmalgamationFct, addInstance, addInstance, addSubConcept, copyInstance, deleteAmalgamFct, getActiveAmalgamFct, getAllSubConcepts, getAttributeDesc, getAttributesOfSubDescsForName, getAvailableAmalgamFcts, getDirectInstances, getExpType, getFct, getName, getQueryInstance, getSubConcepts, hasAttributeDesc, hasDirectAttributeDesc, removeInstance, renameAmalgamationFct, renameAttDesc, renameInstance, renameSubConcept, setActiveAmalgamFct, setAllInstancesMultiple, setAllInstancesSingle, setNamepublic static final java.lang.String UNDEFINED_SPECIAL_ATTRIBUTE
public static final java.lang.String UNKNOWN_SPECIAL_VALUE
public static final java.lang.String NO_SPECIAL_VALUE
public static final java.lang.String DEFAULT_FCT_NAME
public static final java.lang.String DEFAULT_FCT_NAME_TMP
public static final java.lang.String ID_DEFAULT
public Project()
throws java.lang.Exception
java.lang.Exception - neverpublic Project(java.lang.String path)
throws java.lang.Exception
path - the path to load the project fromjava.lang.Exception - neverpublic boolean isImporting()
public int getTotalNumberOfCases()
public int getCurrentNumberOfCases()
public void save()
public DefaultCaseBase createDefaultCB(java.lang.String name) throws java.lang.Exception
name - the name of the new case basejava.lang.Exception - if there is a case base with that namepublic boolean hasCB(java.lang.String name)
name - the name of the case basepublic ICaseBase getCB(java.lang.String name)
name - the name of the case base to be returnedpublic ICaseBase deleteCaseBase(java.lang.String name)
name - the unique name of the case base to be removedpublic java.util.HashMap<java.lang.String,ICaseBase> getCaseBases()
public Concept createTopConcept(java.lang.String id) throws java.lang.Exception
id - the name for the new cjava.lang.Exception - if there is another concept with name idpublic Concept getConceptByID(java.lang.String id)
id - the ID of the c description to be returnedpublic java.lang.Boolean hasConceptWithID(java.lang.String id)
id - the name to be checkedpublic java.util.LinkedList<AttributeDesc> getAttDescsByName(java.lang.String name)
name - the name of the attribute description's to be returnedpublic void setPath(java.lang.String path)
path - the project path to setpublic java.lang.String getPath()
public java.lang.String getExtension()
public void setAuthor(java.lang.String author)
author - the project author to setpublic java.lang.String getAuthor()
public SpecialDesc getSpecialValueDesc()
public boolean isSpecialAttribute(java.lang.String obj)
obj - the string which is checkedpublic ExplanationManager getExplanationManager()
public void addSpecialValue(java.lang.String value)
value - the special value to be addedpublic Instance getInstance(java.lang.String name)
ConceptgetInstance in class Conceptname - the name of the instance to be returnedpublic TaxonomyFct getInhFct()
public void setInhFct(SpecialFct f)
SpecialDesc.addSpecialFct(String, boolean)
on getSpecialValueDesc()f - the new special value functionpublic TaxonomyFct addInhFct(java.lang.String name)
name - the name of the new inheritance functionpublic SymbolFct getSpecialFct()
public void setSpecialValueFct(SpecialFct f)
SpecialDesc.addSpecialFct(String, boolean)
on getSpecialValueDesc()f - the new special value functionpublic Similarity calculateSpecialSimilarity(Attribute att1, Attribute att2)
att1 - the query's special valueatt2 - the case's special valuejava.lang.Exceptionpublic Similarity calculateMultipleAttributeSimilarity(java.lang.Object simFct, MultipleAttribute<?> att1, MultipleAttribute<?> att2)
MultipleAttribute objects
based on the given similarity function.simFct - the similarity function to compare simple attributesatt1 - the query's multiple valueatt2 - the case's multiple valuepublic Attribute getSpecialAttribute(java.lang.String obj)
SpecialAttribute object corresponding to
the given string.obj - the value for the special value attribute to be returnedSpecialDesc.getAttribute(String)public void cleanInstances(Concept c, AttributeDesc desc)
c - the concept whose instances should be cleaneddesc - the cases are cleaned wrt the attribute descriptionpublic Concept removeSubConcept(java.lang.String name)
ConceptremoveSubConcept in class Conceptname - the name of the sub concept to be removedpublic Concept getSuperConcept()
getSuperConcept in class Conceptpublic void setSuperConcept(Concept c, boolean isNEW)
ConceptsetSuperConcept in class Conceptc - the new super concept of thispublic java.util.HashMap<java.lang.String,AttributeDesc> getAttributeDescs()
ConceptConcept.getAllAttributeDescs()getAttributeDescs in class Conceptpublic java.util.HashMap<java.lang.String,AttributeDesc> getAllAttributeDescs()
ConceptgetAllAttributeDescs in class Conceptpublic void addAttributeDesc(AttributeDesc desc) throws java.lang.Exception
ConceptaddAttributeDesc in class Conceptdesc - the attribute description to be added to this descriptionjava.lang.Exceptionpublic boolean removeAttributeDesc(java.lang.String name)
ConceptremoveAttributeDesc in class Conceptpublic boolean canOverride(Concept c)
canOverride in class Conceptpublic Project getProject()
ConceptgetProject in class Conceptpublic void addPartOfRelation(ConceptDesc desc)
ConceptaddPartOfRelation in class Conceptdesc - the description which has a part-of relation to thispublic java.util.Vector<ConceptDesc> getPartOfRelations()
ConceptgetPartOfRelations in class Conceptpublic void deletePartOfRelation(ConceptDesc desc)
ConceptdeletePartOfRelation in class Conceptdesc - the part-of relation to be removedpublic void delete()
Conceptpublic Similarity getLocalSimilarity(Attribute a, Attribute b, AttributeDesc desc) throws java.lang.Exception
a - the query attributeb - the case attributedesc - the attribute description underlying the given attributesjava.lang.Exception - if something goes wrong during similarity computationspublic DefaultCaseBase createDefaultCB(java.lang.String cbName, int currentCBCount) throws java.lang.Exception
cbName - the name of the default case base to be createdcurrentCBCount - the number of expected casesjava.lang.Exception - if there is another case base with that namepublic void update(java.util.Observable o,
java.lang.Object arg)
public void removeCase(java.lang.String name)
name - the cases' namepublic java.util.Collection<Instance> getAllInstances()
getAllInstances in class Concept