Package com.hp.hpl.jena.ontology

Examples of com.hp.hpl.jena.ontology.OntProperty.addRange()


    for( int i = 0; i < datatypes.length; ) {
      Resource datatype = (Resource) datatypes[i++];
      OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );

      OntProperty p = model.createDatatypeProperty( ns + "prop" );
      p.addRange( datatype );

      int start = i;
      while( i < datatypes.length && datatypes[i] instanceof String ) {
        Individual ind = model.createIndividual( ns + "testInd" + i, OWL.Thing );
        Literal value = model.createTypedLiteral( (String) datatypes[i], datatype.getURI() );
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.