public class MetricStore
extends java.lang.Object
The class also maintains the matrices, literature references, glossary entries, and word lists defined in the file, as well as custom defined metric, set, and rule procedures, and custom scalar, boolean, or set operations.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TL_ELEMENT
The name of the top level XML element in the metric definition file.
|
Constructor and Description |
---|
MetricStore(MetaModel metaModel)
Creates a new metric store.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Glossary> |
getGlossary()
Gets the list of all glossary terms defined in the metric definition
file.
|
java.util.Collection<Reference> |
getLiteratureReferences()
Gets the list of all literature references defined in the metric
definition file.
|
java.util.List<Matrix> |
getMatrices()
Gets the list of all relationship matrices defined in the metric
definition file.
|
MetaModel |
getMetaModel()
Gets the metamodel on which the metrics are based.
|
Metric |
getMetric(MetaModelElement type,
java.lang.String name)
Gets the metric for a given element type by its name.
|
java.util.Collection<Metric> |
getMetrics(MetaModelElement type)
Gets the list of all metrics for a given element type.
|
Rule |
getRule(MetaModelElement type,
java.lang.String name)
Gets the rule for a given element type by its name.
|
java.util.Collection<Rule> |
getRules(MetaModelElement type)
Gets the list of all rules for a given element type.
|
org.xml.sax.helpers.DefaultHandler |
getSAXParserHandler()
Gets a SAX handler to parse a metric definition file and store its
contents with this object.
|
Set |
getSet(MetaModelElement type,
java.lang.String name)
Gets the set for a given element type by its name.
|
java.util.Collection<Set> |
getSets(MetaModelElement type)
Gets the list of all sets for a given element type.
|
public static final java.lang.String TL_ELEMENT
public MetricStore(MetaModel metaModel)
metaModel
- Metamodel on which the metrics are based.public org.xml.sax.helpers.DefaultHandler getSAXParserHandler()
public MetaModel getMetaModel()
public Metric getMetric(MetaModelElement type, java.lang.String name)
type
- Element type for which the metric is defined.name
- Name of the metric.null
if no such metric was
found.public Set getSet(MetaModelElement type, java.lang.String name)
type
- Element type for which the set is defined.name
- Name of the set.null
if no such set was found.public Rule getRule(MetaModelElement type, java.lang.String name)
type
- Element type for which the rule is defined.name
- Name of the rule.null
if no such rule was
found.public java.util.Collection<Metric> getMetrics(MetaModelElement type)
type
- Element type for which to return the metrics.public java.util.Collection<Set> getSets(MetaModelElement type)
type
- Element type for which to return the sets.public java.util.Collection<Rule> getRules(MetaModelElement type)
type
- Element type for which to return the rules.public java.util.List<Matrix> getMatrices()
public java.util.Collection<Reference> getLiteratureReferences()
public java.util.Collection<Glossary> getGlossary()