Package com.hp.hpl.jena.ontology

Examples of com.hp.hpl.jena.ontology.DatatypeProperty.addDomain()


   
    String resourceString = ns_ + goodName ;
    log.info("datatype Property created " + resourceString);
    DatatypeProperty p = newOntModel.createDatatypeProperty(resourceString);
    p.addProperty(RDFS.label, str);
    p.addDomain(classForTerms);
    return p;
  }

  private String getGoodName(String str, boolean allowColon) {
//    return finalUri + cleanStringforID(row.getString(id).trim());
View Full Code Here


                log.info("Source object type reference not found on property definition {}",
                    propertyDefinition.getLocalname());
            }

            for (Resource domain : domains) {
                datatypeProperty.addDomain(domain);
            }
            datatypeProperty.addRange(range);
        } else {
            // Add domains to union class
            OntResource domain = datatypeProperty.getDomain();
View Full Code Here

    String ns = Namespaces.KARMA;
    autoOntology.setNsPrefix("karma", ns);
    OntClass topClass = autoOntology.createClass( ns + worksheet.getTitle().replaceAll(" ", "_")); // replace blank spaces with undrscore
    for (HNode hNode : sortedLeafHNodes){
      DatatypeProperty dp = autoOntology.createDatatypeProperty(ns+hNode.getColumnName().trim().replaceAll(" ", "_"));
      dp.addDomain(topClass);
      dp.addRange(XSD.xstring);
    }
   
//    OntClass thingClass = autoOntology.createClass(Uris.THING_URI);
    ObjectProperty op = autoOntology.createObjectProperty(ns + "relatedTo");
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.