Beispiel #1
0
  public static boolean writeMapping(DataSourceMapping mapping) {
    // writeMappingOld(type);

    // save to database
    String value = Zip.encode(mapping.toText());
    String name = mapping.getName();
    String space = IndusBasis.user.name;
    String format = "XML1.0";

    Map<String, String> values = new HashMap<String, String>();

    values.put("name", name);
    values.put("value", value);
    values.put("space", space);
    values.put("ont1", mapping.schemaMapping.from);
    values.put("ont2", mapping.schemaMapping.to);
    values.put("format", format);

    Connection db = IndusBasis.indusSystemDB.db;
    return JDBCUtils.insertOrUpdateDatabase(db, "mappings", values, "name");
  }
Beispiel #2
0
 /**
  * @deprecated
  * @param mapping
  * @return
  */
 public static boolean writeMappingOld(DataSourceMapping mapping) {
   return write(CMD_UPDATE_MAPPING, mapping.getName(), mapping);
 }