Package org.semanticweb.owl.model

Examples of org.semanticweb.owl.model.OWLClassAssertionAxiom


        List<OWLClass> classes = new Vector<OWLClass>(vManager.getConceptSet());
       
        List<OWLAxiomChange> toAdd = new Vector<OWLAxiomChange>();
        for (int i = 0; i < instances; i++) {
          int rnd = m_random.nextInt(classes.size());
          OWLClassAssertionAxiom newAxiom = factory.getOWLClassAssertionAxiom(newIndividual(factory), classes.get(rnd));
          toAdd.add(new AddAxiom(ontology,newAxiom))
          System.out.println((i+1)+"- new axiom: "+newAxiom.toString());
        }       
        manager.applyChanges(toAdd);
        OutputStreamWriter sw = new FileWriter(new File(outputFile));
        OWLOntologyOutputTarget target = new WriterOutputTarget(sw);
        manager.saveOntology(ontology, target);
View Full Code Here

TOP

Related Classes of org.semanticweb.owl.model.OWLClassAssertionAxiom

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.