Skip to content

Commit

Permalink
Merge pull request #1642 from spechub/1620_owl_http_redirects
Browse files Browse the repository at this point in the history
1620 owl http redirects
  • Loading branch information
jelmd committed Jun 2, 2016
2 parents c3ac0c4 + 47bb42d commit b33c67e
Show file tree
Hide file tree
Showing 5 changed files with 1,016 additions and 1,060 deletions.
97 changes: 38 additions & 59 deletions OWL2/java/de/unibremen/informatik/Fact/Fact.java
Original file line number Diff line number Diff line change
@@ -1,63 +1,42 @@
package de.unibremen.informatik.Fact;

import uk.ac.manchester.cs.factplusplus.owlapiv3.*;
import uk.ac.manchester.cs.factplusplus.*;
import org.semanticweb.owlapi.reasoner.*;

import org.semanticweb.owlapi.apibinding.OWLManager;
import org.semanticweb.owlapi.io.OWLXMLOntologyFormat;
import org.semanticweb.owlapi.model.*;
import org.semanticweb.owlapi.util.DefaultPrefixManager;

import java.net.URI;
import java.util.*;

class Fact
{

public static void main (String[] args)
{
if (args.length < 1)
{
System.out.println("owl_fact <Ontology>");
System.exit(1);
}

try
{
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();

FaCTPlusPlusReasonerFactory f = new FaCTPlusPlusReasonerFactory();

IRI physicalIRI = IRI.create(args[0]);
OWLOntology ontology = manager.loadOntologyFromOntologyDocument(physicalIRI);

OWLReasoner reasoner = f.createReasoner(ontology);

Boolean cons = reasoner.isConsistent();
if (cons)
{
System.out.println("consistent");
System.exit(10);
}
else
{
System.out.println("inconsistent");
System.exit(20);
}
}
catch (OWLOntologyCreationException e)
{
System.out.println("The ontology could not be created: " +
e.getMessage());
System.exit(1);
}
catch (Exception e)
{
System.out.println("Exception:" + e.getMessage());
System.exit(1);
}

}

import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyManager;
import org.semanticweb.owlapi.reasoner.OWLReasoner;

import uk.ac.manchester.cs.factplusplus.owlapiv3.FaCTPlusPlusReasonerFactory;

class Fact {
public static void main(String[] args) {
if (args.length < 1) {
System.out.println("owl_fact <Ontology>");
System.exit(1);
}
try {
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
FaCTPlusPlusReasonerFactory f = new FaCTPlusPlusReasonerFactory();
IRI physicalIRI = IRI.create(args[0]);
OWLOntology ontology =
manager.loadOntologyFromOntologyDocument(physicalIRI);
OWLReasoner reasoner = f.createReasoner(ontology);
Boolean cons = reasoner.isConsistent();
if (cons) {
System.out.println("consistent");
System.exit(10);
} else {
System.out.println("inconsistent");
System.exit(20);
}
} catch (OWLOntologyCreationException e) {
System.out.println("The ontology could not be created: "
+ e.getMessage());
System.exit(1);
} catch (Exception e) {
System.out.println("Exception:" + e.getMessage());
System.exit(1);
}
}
}
Loading

0 comments on commit b33c67e

Please sign in to comment.