Package org.gedcomx.conclusion

Examples of org.gedcomx.conclusion.Name


    if (dqName == null) {
      return nameList;
    }

    Name gedxName = new Name();
    //gedxName.setId(); // no equivalent; probably system dependent anyway

    gedxName.setNameForms(new ArrayList<NameForm>());
    NameForm primaryForm = new NameForm();
    primaryForm.setFullText(getNameValue(dqName));
    List<NamePart> parts = getNameParts(dqName);
    if (parts != null) {
      primaryForm.setParts(parts);
    }
    gedxName.getNameForms().add(primaryForm);
    nameList.add(gedxName);

    if (dqName.getNickname() != null) {
      Name gedxNickname = new Name();
      gedxNickname.setKnownType(NameType.Nickname);
      NameForm nickname = new NameForm();
      nickname.setFullText(dqName.getNickname());
      gedxNickname.setNameForms(Arrays.asList(nickname));
      nameList.add(gedxNickname);
    }

    if (dqName.getMarriedName() != null) {
      Name gedxMarriedName = new Name();
      gedxMarriedName.setKnownType(NameType.MarriedName);
      NameForm marriedName = new NameForm();
      marriedName.setFullText(dqName.getMarriedName());
      gedxMarriedName.setNameForms(Arrays.asList(marriedName));
      nameList.add(gedxMarriedName);
    }

    if (dqName.getAka() != null) {
      Name gedxAka = new Name();
      gedxAka.setKnownType(NameType.AlsoKnownAs);
      NameForm alias = new NameForm();
      alias.setFullText(dqName.getMarriedName());
      gedxAka.setNameForms(Arrays.asList(alias));
      nameList.add(gedxAka);
    }

    if ((dqName.getSourceCitations() != null) && (dqName.getSourceCitations().size() > 0)) {
      List<SourceReference> sources = CommonMapper.toSourcesAndSourceReferences(dqName.getSourceCitations(), result);
View Full Code Here

TOP

Related Classes of org.gedcomx.conclusion.Name

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.