OWL API verification project - an accurate snapshot of all interfaces and public classes of OWL API versions, used to verify compatibility
Version 4 is still in flux, so this will change a bit until release
OWL API verification project - an accurate snapshot of all interfaces and public classes of OWL API versions, used to verify compatibility
this my code
package testowl;
import java.io.File;
import java.net.URI;
import java.net.URL;
import java.util.Set;
import org.semanticweb.HermiT.Reasoner;
import org.semanticweb.owlapi.apibinding.OWLManager;
import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLAnnotationSubject;
import org.semanticweb.owlapi.model.OWLClass;
import org.semanticweb.owlapi.model.OWLDataFactory;
import org.semanticweb.owlapi.model.OWLEntity;
import org.semanticweb.owlapi.model.OWLIndividual;
import org.semanticweb.owlapi.model.OWLNamedIndividual;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyManager;
import org.semanticweb.owlapi.reasoner.NodeSet;
import org.semanticweb.owlapi.reasoner.OWLReasoner;
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory;
import org.semanticweb.owlapi.reasoner.structural.StructuralReasonerFactory;
import org.semanticweb.owlapi.util.OWLEntityRemover;
public class myclass {
static OWLOntology myOntology ;
static OWLDataFactory df ;
static OWLOntologyManager manager ;
static IRI ontologyIRI ;
static File file = new File("C:/travel.owl");
private OWLOntologyManager manager2;
private static OWLOntology ontology;
private static OWLDataFactory factory;
private static Reasoner reasoner;
private OWLEntityRemover remover;
private static URL url;
private static URI uri;
public static IRI fileURI = IRI.create(file);
static OWLReasonerFactory reasonerFactory = new StructuralReasonerFactory();
@SuppressWarnings("deprecation")
public static void main(String args[]) throws OWLOntologyCreationException {
manager = OWLManager.createOWLOntologyManager();
myOntology = manager.loadOntology(fileURI);
ontologyIRI = IRI.create("the IRI of the onology");
df = manager.getOWLDataFactory();
System.out.println("Loading Ontology...\n" + myOntology);
System.out.println("-----------------------");
OWLAnnotationSubject enitity =fileURI;
System.out.println("all classes for travel antology"+ myOntology.getClassesInSignature());
Set<OWLClass> entity=myOntology.getClassesInSignature();
for (OWLClass c : myOntology.getClassesInSignature()) {
if (c.getIRI().getFragment().equals("Places")){
System.out.println("ASDAS");
NodeSet<OWLNamedIndividual> instances = reasoner.getInstances(c, false);
System.out.println("ASDYYY"+instances);
System.out.println("$%$#%$%"+c.getIRI().getFragment());
for (OWLNamedIndividual i : instances.getFlattened()) {
System.out.println(i.getIRI().getFragment());
}
}
}
// System.out.println("all classes "+OWLEntity.getIRI().getShortForm());
}
}
i have problem with null pointer exception
i need explore Places from http://www.travel.com/ontologies/travel.owl#Places
that's my owl file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.