Ejemplo n.º 1
0
  public static GeopistaMap getResumeMap(String FileName) throws Exception {

    File file = new File(FileName);
    String basePath = file.getParent();
    String name = file.getName();

    String upperName = name.toUpperCase();
    String[] lstName = upperName.split(".DXF");
    upperName = lstName[0];
    GeopistaMap sourceMap = new GeopistaMap();

    sourceMap.setBasePath(basePath);
    sourceMap.setDescription(upperName);

    sourceMap.setName(name);

    return sourceMap;
  }
Ejemplo n.º 2
0
  public static void main(String args[]) throws Exception {
    StringWriter stringWriter = new StringWriter();
    GeopistaMap map = new GeopistaMap();
    map.setName("Prueba");
    map.setExtracted(true);
    map.setTimeStamp(new Date());
    try {
      Java2XML converter = new Java2XML();
      converter.addCustomConverter(
          Date.class, GeopistaMapCustomConverter.getMapDateCustomConverter());

      converter.write(map, "GEOPISTAMap", stringWriter);
    } finally {
      stringWriter.flush();
    }
    if (logger.isDebugEnabled()) {
      logger.debug("main(String)" + stringWriter.toString());
    }
  }