Examples of GedcomxConversionResult


Examples of org.gedcomx.conversion.GedcomxConversionResult

      }
      else {
        serializer = new DefaultXMLSerialization();
      }

      GedcomxConversionResult result = mapper.toGedcomx(gedcom);
      GedcomxOutputStream output = new GedcomxOutputStream(outputStream, serializer);

      output.addAttribute("User-Agent", "Gedcom To Gedcomx Java Conversion Utility/1.0");
      output.addAttribute("X-DC-conformsTo", "http://gedcomx.org/file/v1");
      output.addAttribute("X-DC-created", GedcomxTimeStampUtil.formatAsXmlUTC(new Date()));
      if (result.getDatasetContributor() != null && result.getDatasetContributor().getId() != null) {
        output.addAttribute("X-DC-creator", "tree.xml#" + result.getDatasetContributor().getId());
      }

      output.addResource("tree.xml", result.getDataset(), null);
      output.close();
    }
  }
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.