-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1642 from spechub/1620_owl_http_redirects
1620 owl http redirects
- Loading branch information
Showing
5 changed files
with
1,016 additions
and
1,060 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
Oops, something went wrong.