All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.unife.ml.probowlapi.utilities.InfoOntology Maven / Gradle / Ivy

Go to download

This package encapsulates OWL API adding tools for managing DISPONTE probabilistic semantics. Used by the reasoner BUNDLE.

The newest version!
/**
 *  This file is part of BUNDLE.
 * 
 *  BUNDLE is a probabilistic reasoner for OWL 2 ontologies.
 * 
 *  BUNDLE can be used both as module and as standalone.
 * 
 *  LEAP was implemented as a plugin of DL-Learner http://dl-learner.org, 
 *  but some components can be used as stand-alone.
 * 
 *  BUNDLE and all its parts are 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 General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see .
 * 
 */
package it.unife.ml.probowlapi.utilities;

import java.io.File;
import org.semanticweb.owlapi.apibinding.OWLManager;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyManager;

import static it.unife.ml.probowlapi.utilities.OntologyUtils.printInfoOntology;

/**
 * Utility class that returns the number of individuals and the number of axioms
 * contained into a knowledge base
 *
 * @author Giuseppe Cota , Riccardo Zese
 * 
 */
public class InfoOntology {

    /**
     * @param args the command line arguments
     * @throws org.semanticweb.owlapi.model.OWLOntologyCreationException
     */
    public static void main(String[] args) throws OWLOntologyCreationException {
        if (args.length != 1) {
            System.out.println("ERROR: wrong number of arguments!");
            System.out.println("Usage: info_ontology.sh ");
            System.exit(1);
        }
        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        OWLOntology ontology = manager.loadOntologyFromOntologyDocument(new File(args[0]));
        printInfoOntology(ontology);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy