Class SimilarHierarchyFilter
java.lang.Object
eu.sealsproject.platform.res.tool.impl.AbstractPlugin
de.uni_mannheim.informatik.dws.melt.matching_base.MatcherURL
de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAA
de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAAJena
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.filter.instance.SimilarHierarchyFilter
- All Implemented Interfaces:
Filter
,IMatcher<org.apache.jena.ontology.OntModel,
,Alignment, Properties> eu.sealsproject.platform.res.domain.omt.IOntologyMatchingToolBridge
,eu.sealsproject.platform.res.tool.api.IPlugin
,eu.sealsproject.platform.res.tool.api.IToolBridge
Check if already matched individuals have a similar hierarchy (class hierarchy).
For different computation methods see
SimilarHierarchyFilterApproach
.-
Field Summary
Modifier and TypeFieldDescriptionprotected SimilarHierarchyFilterApproach
Which approach to determine the confidence.protected MatcherYAAAJena
A matcher which selects or creates some correspondences which forms an alignment for the hierarchy nodes.protected org.apache.jena.rdf.model.Property
Property connecting the hierarchy together (usually rdfs:subClassOf).protected org.apache.jena.rdf.model.Property
Property connecting the instance to the hierarchy (usually rdf:type).private static final org.slf4j.Logger
Default loggerprotected double
The threshold to compare with the calculated confidence.Fields inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
FILE_PREFIX, FILE_SUFFIX
-
Constructor Summary
ConstructorDescriptionSimilarHierarchyFilter
(org.apache.jena.rdf.model.Property instanceToHierarchyProperty, org.apache.jena.rdf.model.Property hierarchyProperty, MatcherYAAAJena hierarchyMatcher, SimilarHierarchyFilterApproach approach, double threshold) -
Method Summary
Modifier and TypeMethodDescriptiongetNormalizedDepths
(org.apache.jena.ontology.Individual i) getNormalizedHierarchyLevels
(org.apache.jena.ontology.Individual i) Returns the hierarchy levels computed by the agony algorithm.protected List<org.apache.jena.rdf.model.Resource>
getObjectAsResource
(org.apache.jena.rdf.model.StmtIterator i) inverseAndNormalizeMapValues
(Map<org.apache.jena.rdf.model.Resource, Integer> map) match
(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment, Properties properties) Aligns two ontologies specified via a Jena OntModel, with an input alignment as Alignment object, and returns the mapping of the resulting alignment.toString()
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAAJena
getModelSpec, match, readOntology
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAA
match
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
match
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherURL
align, align, canExecute, getType
Methods inherited from class eu.sealsproject.platform.res.tool.impl.AbstractPlugin
getId, getVersion, setId, setVersion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface eu.sealsproject.platform.res.tool.api.IPlugin
getId, getVersion
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGERDefault logger -
instanceToHierarchyProperty
protected org.apache.jena.rdf.model.Property instanceToHierarchyPropertyProperty connecting the instance to the hierarchy (usually rdf:type). -
hierarchyProperty
protected org.apache.jena.rdf.model.Property hierarchyPropertyProperty connecting the hierarchy together (usually rdfs:subClassOf). -
hierarchyMatcher
A matcher which selects or creates some correspondences which forms an alignment for the hierarchy nodes. -
approach
Which approach to determine the confidence. -
threshold
protected double thresholdThe threshold to compare with the calculated confidence.
-
-
Constructor Details
-
SimilarHierarchyFilter
public SimilarHierarchyFilter() -
SimilarHierarchyFilter
public SimilarHierarchyFilter(org.apache.jena.rdf.model.Property instanceToHierarchyProperty, org.apache.jena.rdf.model.Property hierarchyProperty, MatcherYAAAJena hierarchyMatcher, SimilarHierarchyFilterApproach approach, double threshold)
-
-
Method Details
-
match
public Alignment match(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment, Properties properties) throws Exception Description copied from class:MatcherYAAAJena
Aligns two ontologies specified via a Jena OntModel, with an input alignment as Alignment object, and returns the mapping of the resulting alignment. Note: This method might be called multiple times in a row when using the evaluation framework. Make sure to return a mapping which is specific to the given inputs.- Specified by:
match
in interfaceIMatcher<org.apache.jena.ontology.OntModel,
Alignment, Properties> - Specified by:
match
in classMatcherYAAAJena
- Parameters:
source
- This OntModel represents the source ontology.target
- This OntModel represents the target ontology.inputAlignment
- This mapping represents the input alignment.properties
- Additional properties.- Returns:
- The resulting alignment of the matching process.
- Throws:
Exception
- Any exception which occurs during matching.
-
getNormalizedHierarchyLevels
Returns the hierarchy levels computed by the agony algorithm.- Parameters:
i
- the individual to start with.- Returns:
- map from hierarchical element uri to the normalized hierarchy level
-
getNormalizedDepths
-
inverseAndNormalizeMapValues
-
getObjectAsResource
protected List<org.apache.jena.rdf.model.Resource> getObjectAsResource(org.apache.jena.rdf.model.StmtIterator i) -
toString
-