Class SMTaxonomyClassicUserWeightsImpl
- java.lang.Object
-
- de.uni_trier.wi2.procake.similarity.impl.SimilarityMeasureImpl
-
- de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyImpl
-
- de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyWeightedNodes
-
- de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyClassicImpl
-
- de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyClassicUserWeightsImpl
-
- All Implemented Interfaces:
SMTaxonomy,SMTaxonomyClassic,SMTaxonomyClassicUserWeights,SimilarityMeasure
public class SMTaxonomyClassicUserWeightsImpl extends SMTaxonomyClassicImpl implements SMTaxonomyClassicUserWeights
- Author:
- Rainer Maximini
-
-
Field Summary
-
Fields inherited from class de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyWeightedNodes
deepestNodeHeight
-
Fields inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
COMPONENT, COMPONENT_KEY, LOG_ORDER_NAME_NOT_FOUND
-
Fields inherited from interface de.uni_trier.wi2.procake.similarity.base.taxonomy.SMTaxonomyClassic
NAME, STRATEGY_DEFAULT
-
Fields inherited from interface de.uni_trier.wi2.procake.similarity.base.taxonomy.SMTaxonomyClassicUserWeights
NAME
-
-
Constructor Summary
Constructors Constructor Description SMTaxonomyClassicUserWeightsImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckForDescendingWeightsTowardsRoot()This method checks if the weights of all nodes are descending towards the root.voidcheckForDuplicateNodeNames()This method checks if the taxonomy contains duplicate node entries.voidcheckForMissingWeights()This method checks if all defined inner nodes have an associated weight.List<AtomicObject>getDefinedNodes()DoublegetNodeWeight(AtomicObject nodeValue)StringgetSystemName()The system name can be used to distinguish the similarity measures.DoublegetWeight(AtomicObject nodeValue)voidinitClassCaches()voidremoveAllWeights()Removes all weights.voidremoveWeight(AtomicObject nodeValue)Removes the value of the node.voidsetWeight(AtomicObject nodeValue, Double weight)-
Methods inherited from class de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyClassicImpl
compute, compute, getInnerNodeInCaseStrategy, getInnerNodeInQueryStrategy, initLeafNodeCache, initNodeWeightCache, setInnerNodeInCaseStrategy, setInnerNodeInQueryStrategy
-
Methods inherited from class de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyWeightedNodes
addNodeWeight, clearNodeWeights, removeNodeWeight
-
Methods inherited from class de.uni_trier.wi2.procake.similarity.base.taxonomy.impl.SMTaxonomyImpl
getAtomicClass, getInstanceTaxonomyOrderPredicate, initialize, isSimilarityFor
-
Methods inherited from class de.uni_trier.wi2.procake.similarity.impl.SimilarityMeasureImpl
getDataClass, getName, initializeBasedOn, isAggregate, isForceOverride, isInterval, isNumeric, isObject, isReusable, isSet, isTable, isTaxonomy, isText, setDataClass, setForceOverride, setName, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
compute, getDataClass, getName, isForceOverride, isReusable, setForceOverride
-
Methods inherited from interface de.uni_trier.wi2.procake.similarity.base.taxonomy.SMTaxonomy
getInstanceTaxonomyOrderPredicate
-
Methods inherited from interface de.uni_trier.wi2.procake.similarity.base.taxonomy.SMTaxonomyClassic
getInnerNodeInCaseStrategy, getInnerNodeInQueryStrategy, setInnerNodeInCaseStrategy, setInnerNodeInQueryStrategy
-
-
-
-
Method Detail
-
getDefinedNodes
public List<AtomicObject> getDefinedNodes()
- Specified by:
getDefinedNodesin interfaceSMTaxonomyClassicUserWeights- Returns:
- A list of defined AtomicObjects
- See Also:
AtomicObject
-
getNodeWeight
public Double getNodeWeight(AtomicObject nodeValue)
- Overrides:
getNodeWeightin classSMTaxonomyWeightedNodes
-
getSystemName
public String getSystemName()
Description copied from interface:SimilarityMeasureThe system name can be used to distinguish the similarity measures. Each similarity measure that can be instantiated contains a static final field called NAME representing the system name, e.g.,SMAggregateEuclidian.NAMEThe system name must also be given during initialization, see
SimilarityModel.createSimilarityMeasure(String, DataClass).- Specified by:
getSystemNamein interfaceSimilarityMeasure- Overrides:
getSystemNamein classSMTaxonomyClassicImpl- Returns:
- The system name of the similarity measure. This is equal to SimilarityMeasure.NAME.
-
getWeight
public Double getWeight(AtomicObject nodeValue)
- Specified by:
getWeightin interfaceSMTaxonomyClassicUserWeights- Parameters:
nodeValue- The value of the node.- Returns:
- The weight of the given node. If no weight is defined, null will be returned.
-
removeWeight
public void removeWeight(AtomicObject nodeValue)
Description copied from interface:SMTaxonomyClassicUserWeightsRemoves the value of the node. If no value exists, noting happens.- Specified by:
removeWeightin interfaceSMTaxonomyClassicUserWeights- Parameters:
nodeValue- A nodes is specified by its value.
-
removeAllWeights
public void removeAllWeights()
Description copied from interface:SMTaxonomyClassicUserWeightsRemoves all weights.- Specified by:
removeAllWeightsin interfaceSMTaxonomyClassicUserWeights
-
setWeight
public void setWeight(AtomicObject nodeValue, Double weight)
- Specified by:
setWeightin interfaceSMTaxonomyClassicUserWeightsweight- must be between 0 and 1
-
initClassCaches
public void initClassCaches()
- Overrides:
initClassCachesin classSMTaxonomyClassicImpl
-
checkForDuplicateNodeNames
public void checkForDuplicateNodeNames()
This method checks if the taxonomy contains duplicate node entries. A duplicate in the taxonomy-structure is not allowed. A duplicate in the value-enumeration is eliminated because this value enumeration is internally stored as a set.
-
checkForDescendingWeightsTowardsRoot
public void checkForDescendingWeightsTowardsRoot()
This method checks if the weights of all nodes are descending towards the root. This is required by the definition of the taxonomy.
-
checkForMissingWeights
public void checkForMissingWeights()
This method checks if all defined inner nodes have an associated weight. Whereas the node itself is defined in the model, the similarity weight is defined in the similarity model.
-
-