Package com.hp.hpl.jena.ontology

Examples of com.hp.hpl.jena.ontology.ObjectProperty


  public void testObjPropOwlToJena() {
    JenaToOwlConvert j2o = new JenaToOwlConvert();
    OWLOntologyManager mgr = OWLManager.createOWLOntologyManager();
    OWLDataFactory factory = mgr.getOWLDataFactory();
    OWLObjectProperty op = factory.getOWLObjectProperty(IRI.create(OP));
    ObjectProperty jop = null;
    try {
                    jop = j2o.ObjPropOwlToJena(op, RDFXML);
                    if(jop == null){
                        fail("Some errore occurs");
                    }else{
                        assertEquals(jop.getURI(), op.getIRI().toString());
                    }    
    } catch (Exception e) {
      e.printStackTrace();
      fail("Exception caught");
    } finally{
View Full Code Here


   
            JenaToOwlConvert j2o = new JenaToOwlConvert();
            OntModel model = ModelFactory.createOntologyModel();

            OntClass jenaclass = model.createClass(CLAZZ.toString());
            ObjectProperty jenaobprop = model.createObjectProperty(OP.toString());
            DatatypeProperty jenadataprop = model.createDatatypeProperty(DP.toString());
            Individual jenasub = model.createIndividual(SUBJECT.toString(), jenaclass);
            Individual jenaobj = model.createIndividual(OBJECT.toString(), jenaclass);
            AnnotationProperty jenaanno = model.createAnnotationProperty(label.toString());
            Literal value = model.createTypedLiteral(VALUE,DATATYPE.toString());
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.ontology.ObjectProperty

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.