|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.cke.importexport.KnowledgeModelImportUtilities
Some general methods used to ease the import process.
Nested Class Summary | |
class |
KnowledgeModelImportUtilities.CaseAlreadyExist
An exception that is thrown in cases where there have been an attempt to create a case that already exist. |
class |
KnowledgeModelImportUtilities.ClassDescriptorDoNotExist
An exception that is thrown in cases where there have been an attempt to use a class descriptor that does not exist. |
class |
KnowledgeModelImportUtilities.CompilationFault
An exception that is thrown in cases where there have been a fault in the compilation of a new relation type. |
class |
KnowledgeModelImportUtilities.EntityAlreadyExist
An exception that is thrown in cases where there have been an attempt to create an entity that already exist. |
class |
KnowledgeModelImportUtilities.EntityDoNotExist
An exception that is thrown in cases where there have been an attempt to use an entity that does not exist. |
class |
KnowledgeModelImportUtilities.EqualRelationAlreadyExist
An exception that is thrown in cases where there have been an attempt to add a relation between two entities and these entities already have an equal relation between them. |
class |
KnowledgeModelImportUtilities.EqualRelationTypeAlreadyExist
An exception that is thrown in cases where there have been an attempt to create a new relation type that already exist and is equal, that is, uses the same class descriptor. |
class |
KnowledgeModelImportUtilities.RelationTypeAlreadyExist
An exception that is thrown in cases where there have been an attempt to create a new relation type that already exist but is not equal, that is, uses another class descriptor. |
class |
KnowledgeModelImportUtilities.RelationTypeDoNotExist
An exception that is thrown in cases where there have been an attempt to use a relation type that does not exist. |
class |
KnowledgeModelImportUtilities.RelationTypeNameAlreadyInUse
An exception that is thrown in cases where there have been an attempt to create a new relation type with either a name or inverse name that is already in use. |
Constructor Summary | |
KnowledgeModelImportUtilities(KnowledgeModel km)
The constructor that only sets the JavaCreek Knowledge Model to use in the import process. |
Method Summary | |
void |
addCase(java.lang.String name,
java.lang.String description)
Adds a new case to the Knowledge Model of Creek. |
void |
addEntity(java.lang.String name,
java.lang.String description,
java.lang.String valueClass,
java.lang.String value)
Adds a new entity if not already exist. |
void |
addHasFinding(java.lang.String caseName,
java.lang.String relationType,
java.lang.String toEntity,
java.lang.String importance,
java.lang.String predictiveStrength)
Adds a finding to an already existing case of the Knowledge Model of Creek. |
void |
addHasSolution(java.lang.String caseName,
java.lang.String status,
java.lang.String toEntity,
java.lang.String importance,
java.lang.String predictiveStrength)
Adds a solution to an already existing case of the Knowledge Model of Creek. |
void |
addNewRelationType(java.lang.String classDescriptor,
java.lang.String name,
java.lang.String inverseName,
java.lang.String defaultStrengthStr,
java.lang.String description)
Creates a new relation type if not already exists. |
void |
addRelation(java.lang.String fromEntity,
java.lang.String relationType,
java.lang.String toEntity,
java.lang.String strengthStr)
Adds a new relation between two entities. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KnowledgeModelImportUtilities(KnowledgeModel km)
km
- the JavaCreek Knowledge Model that the data should
be imported intoMethod Detail |
public void addNewRelationType(java.lang.String classDescriptor, java.lang.String name, java.lang.String inverseName, java.lang.String defaultStrengthStr, java.lang.String description) throws KnowledgeModelImportUtilities.ClassDescriptorDoNotExist, KnowledgeModelImportUtilities.RelationTypeAlreadyExist, KnowledgeModelImportUtilities.EqualRelationTypeAlreadyExist, KnowledgeModelImportUtilities.RelationTypeNameAlreadyInUse, KnowledgeModelImportUtilities.CompilationFault
classDescriptor
- the class descriptor from which this new relation type
should inherit functionallity fromname
- the name of the new relation typeinverseName
- the inverse name of the new relation typedefaultStrengthStr
- the default explanation strength, a value between 0 and 1.
If this value is not in between 0 and 1 then a default value will be used which is 0.5description
- the description of the new relation type
KnowledgeModelImportUtilities.ClassDescriptorDoNotExist
- if the classDescriptor does not exists
KnowledgeModelImportUtilities.RelationTypeAlreadyExist
- in a relation type already exist
KnowledgeModelImportUtilities.EqualRelationTypeAlreadyExist
- if an equal relation type already exist
KnowledgeModelImportUtilities.RelationTypeNameAlreadyInUse
- if a realtion with an equal name exist
KnowledgeModelImportUtilities.CompilationFault
- if it wasn't possible to compile the new relation type,
which e.g. may happen in cases where the classpath doesn't contain tool.jarpublic void addEntity(java.lang.String name, java.lang.String description, java.lang.String valueClass, java.lang.String value) throws KnowledgeModelImportUtilities.EntityAlreadyExist
name
- the name of the new entitydescription
- the description of the new entity
KnowledgeModelImportUtilities.EntityAlreadyExist
- if an entity by the same name already existpublic void addRelation(java.lang.String fromEntity, java.lang.String relationType, java.lang.String toEntity, java.lang.String strengthStr) throws KnowledgeModelImportUtilities.EqualRelationAlreadyExist, KnowledgeModelImportUtilities.EntityDoNotExist, KnowledgeModelImportUtilities.RelationTypeDoNotExist
fromEntity
- the name of the entity from where the new relation should come fromrelationType
- the relation type to usetoEntity
- the name of the entity to where the the new relation should endstrengthStr
- the default strength, a value between 0 and 1.
If this value is not in between 0 and 1 then a default value will be used which is 0.5
KnowledgeModelImportUtilities.EqualRelationAlreadyExist
- if an equal relation between these two entities
already exist
KnowledgeModelImportUtilities.EntityDoNotExist
- if one of the entities specified doesn't exist
KnowledgeModelImportUtilities.RelationTypeDoNotExist
- if the relation type specified doesn't existpublic void addCase(java.lang.String name, java.lang.String description) throws KnowledgeModelImportUtilities.CaseAlreadyExist
name
- the name of the new case to createdescription
- the description of the new case
KnowledgeModelImportUtilities.CaseAlreadyExist
- if a case with a equal name already exist in the
Knowledge Modelpublic void addHasFinding(java.lang.String caseName, java.lang.String relationType, java.lang.String toEntity, java.lang.String importance, java.lang.String predictiveStrength) throws KnowledgeModelImportUtilities.EqualRelationAlreadyExist, KnowledgeModelImportUtilities.EntityDoNotExist, KnowledgeModelImportUtilities.RelationTypeDoNotExist
caseName
- the name of the case to add a new findingrelationType
- the relation type for this relation. This relation type
should either be of HasFinding class or a subclass of this. There is not done
any checking to ensure that this is followed.toEntity
- the name of the entity that is the finding of this caseimportance
- the default importance of this finding, a value between 0 and 1.
If this value is not in between 0 and 1 then a default value will be used which is 0.5predictiveStrength
- the default predictive strength of this finding, a value
between 0 and 1. If this value is not in between 0 and 1 then a default value will
be used which is 0.5
KnowledgeModelImportUtilities.EqualRelationAlreadyExist
- if an equal relation already exist
KnowledgeModelImportUtilities.EntityDoNotExist
- if the entity of this finding does not exist
KnowledgeModelImportUtilities.RelationTypeDoNotExist
- if the relation type specified does not existpublic void addHasSolution(java.lang.String caseName, java.lang.String status, java.lang.String toEntity, java.lang.String importance, java.lang.String predictiveStrength) throws KnowledgeModelImportUtilities.EqualRelationAlreadyExist, KnowledgeModelImportUtilities.EntityDoNotExist
caseName
- the name of the case to add a new findingstatus
- the status of this solution, that is, SOLVED or UNSOLVEDtoEntity
- the name of the entity that is the solution of this caseimportance
- the default importance of this solution, a value between 0 and 1.
If this value is not in between 0 and 1 then a default value will be used which is 0.5predictiveStrength
- the default predictive strength of this solution, a value
between 0 and 1. If this value is not in between 0 and 1 then a default value will
be used which is 0.5
KnowledgeModelImportUtilities.EqualRelationAlreadyExist
- if an equal relation already exist
KnowledgeModelImportUtilities.EntityDoNotExist
- if the entity of this finding does not exist
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |