Package com.hp.hpl.jena.rdf.model

Examples of com.hp.hpl.jena.rdf.model.Resource.addProperty()


    map.addProperty(RDF.type, DbMap.Map);

    Resource serverR = model.createResource(server);
    serverR.addProperty(RDF.type, DbMap.Database);
    serverR.addProperty(DbMap.user, user);
    serverR.addProperty(DbMap.pass, pass);
    serverR.addProperty(DbMap.driver, driver);

    ResultSet rs = null;
    if (tables != null) {
View Full Code Here


    map.addProperty(RDF.type, DbMap.Map);

    Resource serverR = model.createResource(server);
    serverR.addProperty(RDF.type, DbMap.Database);
    serverR.addProperty(DbMap.user, user);
    serverR.addProperty(DbMap.pass, pass);
    serverR.addProperty(DbMap.driver, driver);

    ResultSet rs = null;
    if (tables != null) {
      for (int i = 0; i < tables.length; i++)
View Full Code Here

    Resource serverR = model.createResource(server);
    serverR.addProperty(RDF.type, DbMap.Database);
    serverR.addProperty(DbMap.user, user);
    serverR.addProperty(DbMap.pass, pass);
    serverR.addProperty(DbMap.driver, driver);

    ResultSet rs = null;
    if (tables != null) {
      for (int i = 0; i < tables.length; i++)
      {
View Full Code Here

    while (rs.next()) {
      String tableName = rs.getString("TABLE_NAME");
      Resource tableRes = model
          .createResource(ex + tableName, RDFS.Class);
      map.addProperty(DbMap.mapsClass, tableRes);
      tableRes.addProperty(DbMap.database, serverR);
      tableRes.addProperty(DbMap.table, tableName);

      ResultSet cols = md.getColumns(null, null, tableName, null);
      while (cols.next()) {
        String colName = cols.getString("COLUMN_NAME");
View Full Code Here

      String tableName = rs.getString("TABLE_NAME");
      Resource tableRes = model
          .createResource(ex + tableName, RDFS.Class);
      map.addProperty(DbMap.mapsClass, tableRes);
      tableRes.addProperty(DbMap.database, serverR);
      tableRes.addProperty(DbMap.table, tableName);

      ResultSet cols = md.getColumns(null, null, tableName, null);
      while (cols.next()) {
        String colName = cols.getString("COLUMN_NAME");
        String type = cols.getString("TYPE_NAME");
View Full Code Here

      while (cols.next()) {
        String colName = cols.getString("COLUMN_NAME");
        String type = cols.getString("TYPE_NAME");
        Resource col = model.createResource(ex + tableName + "_"
            + colName, RDF.Property);
        col.addProperty(RDFS.domain, tableRes);
        col.addProperty(DbMap.col, colName);
        col.addProperty(DbMap.colType, type);
      }
      cols.close();
     
View Full Code Here

        String colName = cols.getString("COLUMN_NAME");
        String type = cols.getString("TYPE_NAME");
        Resource col = model.createResource(ex + tableName + "_"
            + colName, RDF.Property);
        col.addProperty(RDFS.domain, tableRes);
        col.addProperty(DbMap.col, colName);
        col.addProperty(DbMap.colType, type);
      }
      cols.close();
     
      ResultSet forkeys = md.getExportedKeys(null, null, tableName);
View Full Code Here

        String type = cols.getString("TYPE_NAME");
        Resource col = model.createResource(ex + tableName + "_"
            + colName, RDF.Property);
        col.addProperty(RDFS.domain, tableRes);
        col.addProperty(DbMap.col, colName);
        col.addProperty(DbMap.colType, type);
      }
      cols.close();
     
      ResultSet forkeys = md.getExportedKeys(null, null, tableName);
      while (forkeys.next()) {
View Full Code Here

        // the new resource, o, becomes the subject
       
        if (is_nillable()
         && elem.hasAttributeNS(schema.XSI,"nil")
         && elem.getAttributeNS(schema.XSI,"nil").equals("true"))
          o.addProperty(RDF.value,RDF.nil);
       
        Seq subSeq = null;
        if (ctx.isSequenced() && elem.hasChildNodes() && c.needSeq(new HashSet<String>(), ctx))
          subSeq = m.getSeq(o.addProperty(RDF.type, RDF.Seq));
 
View Full Code Here

         && elem.getAttributeNS(schema.XSI,"nil").equals("true"))
          o.addProperty(RDF.value,RDF.nil);
       
        Seq subSeq = null;
        if (ctx.isSequenced() && elem.hasChildNodes() && c.needSeq(new HashSet<String>(), ctx))
          subSeq = m.getSeq(o.addProperty(RDF.type, RDF.Seq));
 
        int index = c.toRDF(o, elem, 0, subSeq,null,true,ctx);
        // mop up remaining values in sequence
        produceMixed(subSeq, index, elem);
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.