public class DocMap extends Object
| Modifier and Type | Method and Description |
|---|---|
Agent |
getAgent(String agentId)
Find the Agent with the given local id.
|
Agent |
getAgent(URI agentId)
Find the Agent with the given local id.
|
static Map<String,Agent> |
getAgentMap(Gedcomx doc)
Create a map of local id (and "#" + id) to the Agent that has that id.
|
Gedcomx |
getDocument()
Get the Gedcomx document that was used to create this DocMap.
|
Person |
getMainPerson()
Get the Person described by the main SourceDescription.
|
SourceDescription |
getMainSourceDescription()
Get the SourceDescription referenced by the GedcomX document's descriptionRef.
|
Person |
getPerson(ResourceReference resourceReference)
Get the person from the GedcomX document that has the id given in the URI of the given ResourceReference.
|
Person |
getPerson(String idOrUrl)
Get the person from the GedcomX document that has the given id (with or without "#") or an identifier
that matches the given idOrUrl.
|
Person |
getPerson(URI uri)
Get the person from the GedcomX document that has the given id (with or without "#") or identifier.
|
static Map<String,Person> |
getPersonMap(Gedcomx doc)
Create a map of local id (and "#" + id) as well as all person identifiers to the local Person object
with that id or identifier.
|
PlaceDescription |
getPlaceDescription(PlaceReference placeReference)
Find the PlaceDescription with the given PlaceReference.
|
PlaceDescription |
getPlaceDescription(String idOrUri)
Find the PlaceDescription with the given local id (or "#" + local id) or the given URI.
|
PlaceDescription |
getPlaceDescription(URI placeDescriptionUri)
Find the PlaceDescription with the given local id (or "#" + local id) or the given URI.
|
static Map<String,PlaceDescription> |
getPlaceMap(Gedcomx doc)
Create a map of local id (and "#" + id) and identifier URIs to the PlaceDescription that has that id or URL.
|
RecordDescriptor |
getRecordDescriptor(String recordDescriptorIdOrUrl)
Find the RecordDescriptor referenced by the given id (with or without a "#"), or URL (with "#" and a local id).
|
RecordDescriptor |
getRecordDescriptor(URI recordDescriptorId)
Find the RecordDescriptor referenced by the given id (with or without a "#").
|
static Map<String,RecordDescriptor> |
getRecordDescriptorMap(Gedcomx doc)
Create a map of local id (and "#" + id) to the RecordDescriptor that has that id.
|
SourceDescription |
getSourceDescription(SourceReference sourceReference)
Get the SourceDescription referenced by the given SourceReference.
|
SourceDescription |
getSourceDescription(String idOrUrl)
Get the SourceDescription from the GedcomX document that has the given id (with or without "#") or an identifier
that matches the given idOrUrl.
|
SourceDescription |
getSourceDescription(URI uri)
Get the SourceDescription from the GedcomX document that has the given id (with or without "#") or an identifier
that matches the given idOrUrl.
|
static Map<String,SourceDescription> |
getSourceDescriptionMap(Gedcomx doc)
Create a map of id (and "#" + id) and all identifier URI strings to SourceDescription with that ID,
to make it easier to look up SourceDescriptions that are referenced elsewhere.
|
void |
update(Gedcomx doc)
Update the maps with the given GedcomX document (e.g., when the document has changed).
|
public DocMap(Gedcomx doc)
doc - - GedcomX document to build maps for.public void update(Gedcomx doc)
doc - - GedcomX document to rebuild maps for.public Gedcomx getDocument()
public SourceDescription getMainSourceDescription()
public Person getMainPerson()
public Person getPerson(String idOrUrl)
idOrUrl - - local person id (with or without "#") or any person identifierpublic Person getPerson(URI uri)
uri - - local person id (with or without "#") or any person identifierpublic Person getPerson(ResourceReference resourceReference)
resourceReference - - local person id (with or without "#") or any person identifierpublic SourceDescription getSourceDescription(String idOrUrl)
idOrUrl - - local person id (with or without "#") or any person identifierpublic SourceDescription getSourceDescription(URI uri)
uri - - local source description id (with or without "#") or any identifier in the source description.public SourceDescription getSourceDescription(SourceReference sourceReference)
sourceReference - - SourceReference that points to a SourceDescription.public RecordDescriptor getRecordDescriptor(String recordDescriptorIdOrUrl)
recordDescriptorIdOrUrl - - local id of a RecordDescriptor (with or without a "#"), or URL of recordDescriptor (with "#" + local id at end).public RecordDescriptor getRecordDescriptor(URI recordDescriptorId)
recordDescriptorId - - URI containing the local id of a RecordDescriptor (with or without a "#").public Agent getAgent(String agentId)
agentId - - id of an agent (with or without an initial "#").public Agent getAgent(URI agentId)
agentId - - URI containing the id of an agent (with or without an initial "#").public PlaceDescription getPlaceDescription(String idOrUri)
idOrUri - - local id (with or without "#") or full identifier URI of a PlaceDescription.public PlaceDescription getPlaceDescription(URI placeDescriptionUri)
placeDescriptionUri - - local id (with or without "#") or full identifier URI of a PlaceDescription.public PlaceDescription getPlaceDescription(PlaceReference placeReference)
placeReference - - PlaceReference that contains the (probably local) id of a PlaceDescription.public static Map<String,SourceDescription> getSourceDescriptionMap(Gedcomx doc)
doc - - GedcomX document to create a map for.public static Map<String,Person> getPersonMap(Gedcomx doc)
doc - - GedcomX document to create a map for.public static Map<String,Agent> getAgentMap(Gedcomx doc)
doc - - document to find agents forpublic static Map<String,RecordDescriptor> getRecordDescriptorMap(Gedcomx doc)
doc - - document to find record descriptors forpublic static Map<String,PlaceDescription> getPlaceMap(Gedcomx doc)
doc - - document to find place descriptions forCopyright © 2016. All rights reserved.