Package com.hp.hpl.jena.ontology

Examples of com.hp.hpl.jena.ontology.OntModel.createTypedLiteral()


    RDFNode lit12 = model.createTypedLiteral( 12.0f );
    RDFNode lit24 = model.createTypedLiteral( 24.0f );

    Model inferences = ModelFactory.createDefaultModel();
    PelletTestCase.addStatements( inferences, a, feet, model.createTypedLiteral( 1f ) );
    PelletTestCase.addStatements( inferences, b, feet, model.createTypedLiteral( 2f ) );       
    PelletTestCase.assertPropertyValues( model, feet, inferences );
   
    inferences = ModelFactory.createDefaultModel();
    PelletTestCase.addStatements( inferences, a, inches, lit12 );
    PelletTestCase.addStatements( inferences, b, inches, lit24 );       
View Full Code Here


            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());

            model.add(jenasub, jenaobprop, jenaobj);
            model.add(jenasub,jenadataprop,value);
            model.add(jenasub,jenaanno,"Lucy","en");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.