diff --git a/html/relnotes.html b/html/relnotes.html index 3857a7161f84aeffe8b9daca51334ee1ea0fc2d4..2704cdccff307dd963e5614b03a5d10df8bffb81 100644 --- a/html/relnotes.html +++ b/html/relnotes.html @@ -69,6 +69,10 @@ with a warning: <!--h2>Version 4.9 (1xxx): ??/??/201X - Letraset</h2--> <!--h2>Version 4.8 (1xxx): ??/??/201x - AntÊsine</h2--> +<p><ul compact="1"> +<li>Added interface <tt>AlignmentRepairer</tt> (api)</tt> +<li>Implemented <tt>AbstractRepairer</tt> (impl)</tt> +</ul></p> <h2>Version 4.7 (2014): 06/12/2014 - Al pesto</h2> diff --git a/src/fr/inrialpes/exmo/align/impl/AbstractRepairer.java b/src/fr/inrialpes/exmo/align/impl/AbstractRepairer.java new file mode 100644 index 0000000000000000000000000000000000000000..3a985a471a40c68c333666e2d7368a13aae90f69 --- /dev/null +++ b/src/fr/inrialpes/exmo/align/impl/AbstractRepairer.java @@ -0,0 +1,47 @@ +/* + * $$ + * + * Copyright (C) INRIA, 2014 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package fr.inrialpes.exmo.align.impl; + +import org.semanticweb.owl.align.Alignment; +import org.semanticweb.owl.align.AlignmentRepairer; +import org.semanticweb.owl.align.AlignmentException; +import org.semanticweb.owl.align.OntologyNetwork; + +import java.util.Properties; + +public abstract class AbstractRepairer implements AlignmentRepairer { + + public void init( Properties param ) {}; + + /** + * Performs a <i>local</i> repair of a network of ontology by + * repairing all its alignments. + */ + public OntologyNetwork repair( OntologyNetwork network, Properties param ) throws AlignmentException { + // Clone the alignment without ontologies + OntologyNetwork result = ((BasicOntologyNetwork)network).copyOnto(); + // repair alignments + for ( Alignment al : network.getAlignments() ) { + result.addAlignment( repair( al, param ) ); + } + return result; + } +} diff --git a/src/org/semanticweb/owl/align/AlignmentRepairer.java b/src/org/semanticweb/owl/align/AlignmentRepairer.java new file mode 100644 index 0000000000000000000000000000000000000000..94e8299f88f08508562d6a805c4e3ff42ef5015c --- /dev/null +++ b/src/org/semanticweb/owl/align/AlignmentRepairer.java @@ -0,0 +1,71 @@ +/* + * $Id$ + * + * Copyright (C) INRIA, 2014 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.semanticweb.owl.align; + +import java.util.Properties; + +import org.semanticweb.owl.align.Alignment; +import org.semanticweb.owl.align.OntologyNetwork; + + +/** + * Represents an operator for repairing alignments and networks of alignments. + * + * @author Jérôme Euzenat + * @version $Id$ + */ + +public interface AlignmentRepairer { + + /** + * Has to be invoked before using repair. + * May be used for initialising global structures. + * + * Known parameters (for both alignments and networks): + * - reasoner (hermit|pellet|elk): which reasoner is used + */ + public void init( Properties param ) throws AlignmentException; + + /** Repairing **/ + + /** + * Perform repair on the alignment. + * The ontology may be obtained from the values of getOntology1() and getOntology2() + * These are objects that may be URI, instance of Ontowrap or + * instances of OWLOntologies. + * + * Known parameters (for both alignments and networks): + * - postSATCheck (boolean): does the repairer performs a satisfiability check after repair + * - extractModules (boolean): does the repairer first extract modules + * - completeness (complete|efficient|bruteforce): is the reasoning complete or approximate + * - optimality (global|local|greedy|greedymin|globaliso): does the repairer look for particular optimum + * - entities (concepts|properties|conceptproperties): types of correspondences taken into account + * - + */ + public Alignment repair( Alignment alignment, Properties param ) throws AlignmentException; + + /** + * Perform repair on a whole network of ontologies. + */ + public OntologyNetwork repair( OntologyNetwork network, Properties param ) throws AlignmentException; + +} +