org.gedcomx.conversion.gedcom.dq55
Class CommonMapper

java.lang.Object
  extended by org.gedcomx.conversion.gedcom.dq55.CommonMapper

public class CommonMapper
extends Object


Method Summary
static String getContributorReference(String id)
           
static String getOrganizationReference(String id)
           
static String getPersonReference(String gedxPersonId)
           
static String getRelationshipReference(String id)
           
static String getSourceDescriptionReference(String gedxDescriptionId)
           
static boolean inCanonicalGlobalFormat(String telephoneNumber)
           
static Date parseDateString(String parsePattern, String value)
           
static void populateAgent(org.gedcomx.agent.Agent agent, String id, String name, org.folg.gedcom.model.Address address, String phone, String fax, String email, String www)
           
static org.gedcomx.types.ConfidenceLevel toConfidenceLevel(String dqQuality)
           
static Date toDate(org.folg.gedcom.model.Change dqChange)
           
static org.gedcomx.common.ResourceReference toReference(String gedxPersonId)
          Returns a GEDCOM X reference for the given person identifier.
static org.gedcomx.conclusion.Relationship toRelationship(String familyId, String personId1, String personId2, org.gedcomx.types.RelationshipType relationshipType)
          Creates a GEDCOM X relationship.
static List<org.gedcomx.source.SourceReference> toSourcesAndSourceReferences(List<org.folg.gedcom.model.SourceCitation> dqSources, GedcomxConversionResult result)
          Create a list of GedcomX SourceReference based on the ged5 SourceCitations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toSourcesAndSourceReferences

public static List<org.gedcomx.source.SourceReference> toSourcesAndSourceReferences(List<org.folg.gedcom.model.SourceCitation> dqSources,
                                                                                    GedcomxConversionResult result)
                                                                             throws IOException
Create a list of GedcomX SourceReference based on the ged5 SourceCitations.

Parameters:
dqSources - Gedcom 5 source citations
Returns:
GedcomX SourceReferences
Throws:
IOException

toDate

public static Date toDate(org.folg.gedcom.model.Change dqChange)

toConfidenceLevel

public static org.gedcomx.types.ConfidenceLevel toConfidenceLevel(String dqQuality)

parseDateString

public static Date parseDateString(String parsePattern,
                                   String value)
                            throws ParseException
Throws:
ParseException

getPersonReference

public static String getPersonReference(String gedxPersonId)
Parameters:
gedxPersonId - to be saved in zip file
Returns:
entry name in the zip file for the given resource

getRelationshipReference

public static String getRelationshipReference(String id)

getSourceDescriptionReference

public static String getSourceDescriptionReference(String gedxDescriptionId)
Parameters:
gedxDescriptionId - resource to be saved in zip file
Returns:
entry name in the zip file for the given resource

getContributorReference

public static String getContributorReference(String id)

getOrganizationReference

public static String getOrganizationReference(String id)

toRelationship

public static org.gedcomx.conclusion.Relationship toRelationship(String familyId,
                                                                 String personId1,
                                                                 String personId2,
                                                                 org.gedcomx.types.RelationshipType relationshipType)
Creates a GEDCOM X relationship.

Parameters:
familyId - the GEDCOM 5.5 identifier associated with the family to which this relationship belongs
personId1 - the GEDCOM 5.5 identifier associated with the person 1
personId2 - the GEDCOM 5.5 identifier associated with the person 1
relationshipType - the relationship type
Returns:
relationship that was added

toReference

public static org.gedcomx.common.ResourceReference toReference(String gedxPersonId)
Returns a GEDCOM X reference for the given person identifier.

Parameters:
gedxPersonId - the identifier of the GEDCOM X person
Returns:
a ResourceReference instance for the person entry of the identified person

inCanonicalGlobalFormat

public static boolean inCanonicalGlobalFormat(String telephoneNumber)

populateAgent

public static void populateAgent(org.gedcomx.agent.Agent agent,
                                 String id,
                                 String name,
                                 org.folg.gedcom.model.Address address,
                                 String phone,
                                 String fax,
                                 String email,
                                 String www)


Copyright © 2016. All rights reserved.