Package org.ontoware.rdfreactor.generator.java

Examples of org.ontoware.rdfreactor.generator.java.JPackage


        m.addAll(modelWithSchemaData.iterator());
       
        // prepare JModel
        JModel jm = Semantics.getbuiltIns_RDFS();
       
        JPackage jp = new JPackage(packagename);
        jm.getPackages().add(jp);
       
        // set local ontology root
        JClass localRoot = new JClass(jp, "Thing1", RDFS.Class);
        localRoot
View Full Code Here


        m.addStatement(OWL.InverseFunctionalProperty, RDFS.subClassOf, RDF.Property);
        m.addStatement(OWL.ObjectProperty, RDFS.subClassOf, RDF.Property);
        m.addStatement(OWL.OntologyProperty, RDFS.subClassOf, RDF.Property);
       
        log.debug("MODEL after inferencing, found " + m.size() + " statements");
        JPackage jp = new JPackage(packagename);
        jm.getPackages().add(jp);
       
        log.info("Creating a class called 'Thing1' for all properties with no given domain");
        JClass localClass = new JClass(jp, "Thing1", RDFS.Class);
        localClass.addSuperclass(jm.getRoot());
View Full Code Here

        // // DEBUG
        // File debugOut = new File(outDir, packagename + "/schema.nt");
        // debugOut.mkdir();
        // jenaModel.write(new FileWriter(debugOut), "N-TRIPLES");
       
        JPackage jp = new JPackage(packagename);
       
        // bootstrapping?
       
        JModel jm = Semantics.getbuiltIns_OWL();
        jm.addPackage(jp);
View Full Code Here

        + ".TransitiveProperty", OWL.TransitiveProperty));
    // XML Schema

    //////////////////// java.net
    // IDs
    jm.addMapping(XSD._anyURI, new JClass(new JPackage("java.net"),
        URI.class.getName() + "", XSD._anyURI));

    /////////////////// java.lang
    // primitive types
    jm.addMapping(XSD._byte, new JClass(JPackage.JAVA_LANG, Byte.class
View Full Code Here

public class TestJModel {
 
  @Test
  public void testMapping() {
   
    JPackage jp = new JPackage("Package");
    JClass root = new JClass(jp,"Rootclass", new URIImpl("urn:java:class.Rootclass"));
    JModel jm = new JModel(root);
   
    URI testURI = new URIImpl("urn:test:classX");
    JClass testClass = new JClass(jp,"Testclass", testURI);
View Full Code Here

  public static final String outdir = "./target/test-gen";

  @Test
  public void testWrite() throws Exception {
    JModel jm = new JModel(JClass.RDFS_CLASS);
    JPackage jp = new JPackage("test");
    jm.addPackage(jp);
    JClass jc1 = new JClass(jp, "Person", new URIImpl("urn:ex:Person"));
    jc1.setComment("All persons in the world");
    jc1.setJavaSuperclass(new JClass(new JPackage(""),"org.ontoware.rdfreactor.runtime.ReactorRuntimeEntity",new URIImpl("urn:ex:object")));
    jp.getClasses().add(jc1);

    // deprecated
    // JProperty jprop1 = new JProperty("age", new
    // JAttribute(Integer.class),
    // URIUtils.createURI("schema://age"), 1, 1);
View Full Code Here

TOP

Related Classes of org.ontoware.rdfreactor.generator.java.JPackage

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.