Package org.gedcomx.conversion.gedcom.dq55

Examples of org.gedcomx.conversion.gedcom.dq55.PersonMapper


    ModelParser modelParser = new ModelParser();
    Gedcom gedcom = modelParser.parseGedcom(inFile);
    gedcom.createIndexes();

    if (outputStream != null) {
      GedcomMapper mapper = new GedcomMapper();
      GedcomxEntrySerializer serializer;

      if (json) {
        serializer = new JacksonJsonSerialization();
      }
      else if (bson) {
        serializer = new JacksonJsonSerialization(new SmileFactory());
      }
      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()));
View Full Code Here

TOP

Related Classes of org.gedcomx.conversion.gedcom.dq55.PersonMapper

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.