Package org.gedcomx
Class Gedcomx
java.lang.Object
org.gedcomx.common.ExtensibleData
org.gedcomx.links.HypermediaEnabledData
org.gedcomx.Gedcomx
- All Implemented Interfaces:
HasTransientProperties,SupportsLinks,HasFields,SupportsExtensionElements
The GEDCOM X data formats define the serialization formats of the GEDCOM X conceptual model. The canonical documentation is provided by the formal specification documents:
- The GEDCOM X Conceptual Model, Version 1.0
- The GEDCOM X JSON Format, Version 1.0
- The GEDCOM X XML Format, Version 1.0
This documentation is provided as a non-normative reference guide.
- Author:
- Ryan Heaton
-
Field Summary
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(GedcomxModelVisitor visitor) Accept a visitor.voidAdd a agent to the data set.voidaddCollection(Collection collection) Add a collection to the data set.voidaddDocument(Document document) Add a document to the data set.voidAdd a event to the data set.voidAdd a field to the data set.Add a description for the main person in this document.voidAdd a person to the data set.addPersonDescription(Person person, Date lastModified, DateFormat dateFormat, String version, URI collectionUri) Add a description for the person in this document.voidaddPlace(PlaceDescription place) Add a place to the data set.voidaddRecordDescriptor(RecordDescriptor recordDescriptor) Add a recordDescriptor to the data set.voidaddRelationship(Relationship relationship) Add a relationship to the data set.voidaddSourceDescription(SourceDescription sourceDescription) Add a source description to the data set.Build this out with a agent.agents()Create a stream of the agents in this data set.attribution(Attribution attribution) Build this out with an attribution.collection(Collection collection) Build this out with a collection.Create a stream of the collections in this data set.descriptionRef(URI descriptionRef) Build out this with a description ref.Build this out with a document.Create a stream of the documents in this data set.voidBuild this out with a event.events()Create a stream of the events in this data set.extensionElement(Object element) Build this out with a field.fields()Create a stream of the fields in this data set.Find a agent in the document by URI.findCoupleRelationship(ResourceReference person1, ResourceReference person2) Find the couple relationship (if any) that corresponds to the relationship between the people with the given IDs.findCoupleRelationship(FamilyView family) Find the couple relationship (if any) that corresponds to the relationship between the parents in the given family.Find the description of this record.findDescription(URI uri) Find a description in the document by URI.static <E extends HypermediaEnabledData>
EfindElement(List<E> items, URI ref) findParentChildRelationship(ResourceReference parent, ResourceReference child) Find the parent-child relationship between the given two persons.findPerson(URI uri) Find a person in the document by URI.Find a place in the document by URI.findRelationship(URI uri) Find a relationship in the document by URI.static <S extends Subject>
SfindSubject(List<S> items, URI ref) protected static voidfixId(ResourceReference ref, String localId) Fixes all references to entities that are in the document to be local references.protected static voidfixupSourceReferences(List<SourceDescription> sds, Subject local) The agents included in this genealogical data set.The attribution of this genealogical data.The collections included in this genealogical data set.Get the list of couple relationships in the document.A reference to a description of this data set.The documents included in this genealogical data set.The events included in this genealogical data set.The extracted fields included in this genealogical data set.getLang()The language of this genealogical data set.Get the list of parent-child relationships in the document.Get the first person in the document.The persons included in this genealogical data set.The places included in this genealogical data set.The record descriptors included in this genealogical data set.The relationships included in this genealogical data set.Get the first source description in the document.getSourceDescription(URI resourceType) Get the first source description in the document with the type that is specified.The descriptions of sources included in this genealogical data set.Build up this object with an id.Build out this envelope with a lang.Build up this data with a link.Build up this data with a link.Build this out with a person.persons()Create a stream for the persons in this data set.place(PlaceDescription place) Build this out with a place.places()Create a stream of the places in this data set.recordDescriptor(RecordDescriptor recordDescriptor) Build this out with a record descriptor.Create a stream of the record descriptors in this data set.relationship(Relationship relationship) Build this out with a relationship.Create a stream for the relationships in this data set.protected static booleansamePerson(ResourceReference ref1, ResourceReference ref2) Tell whether the given resource reference is referencing the current personvoidThe agents included in this genealogical data set.voidsetAttribution(Attribution attribution) The attribution of this genealogical data.voidsetCollections(List<Collection> collections) The collections included in this genealogical data set.voidsetDescriptionRef(URI descriptionRef) A reference to a description of this data set.voidsetDocuments(List<Document> documents) The documents included in this genealogical data set.voidThe events included in this genealogical data set.voidThe extracted fields included in this genealogical data set.voidThe language of this genealogical data set.voidsetPersons(List<Person> persons) The persons included in this genealogical data set.voidsetPlaces(List<PlaceDescription> places) The places included in this genealogical data set.voidsetRecordDescriptors(List<RecordDescriptor> recordDescriptors) The record descriptors included in this genealogical data set.voidsetRelationships(List<Relationship> relationships) The relationships included in this genealogical data set.voidsetSourceDescriptions(List<SourceDescription> sourceDescriptions) The descriptions of sources included in this genealogical data set.sourceDescription(SourceDescription sourceDescription) Build this out with a source description.Create a stream of the source descriptions in this document.subjects()Create a stream of all the subjects of this record.Methods inherited from class org.gedcomx.links.HypermediaEnabledData
addLink, addLink, addTemplatedLink, embed, getLink, getLinks, getLinks, setLinksMethods inherited from class org.gedcomx.common.ExtensibleData
addExtensionElement, embed, findExtensionOfType, findExtensionOfType, findExtensionsOfType, findExtensionsOfType, getExtensionElements, getId, getTransientProperties, getTransientProperty, removeExtensionElements, setExtensionElement, setExtensionElements, setId, setTransientProperty, toString
-
Constructor Details
-
Gedcomx
public Gedcomx() -
Gedcomx
-
-
Method Details
-
id
Description copied from class:ExtensibleDataBuild up this object with an id.- Overrides:
idin classExtensibleData- Parameters:
id- The id.- Returns:
- this.
-
extensionElement
- Overrides:
extensionElementin classExtensibleData
-
link
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classHypermediaEnabledData- Parameters:
link- The link.- Returns:
- this.
-
link
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classHypermediaEnabledData- Parameters:
rel- The rel.href- The href.- Returns:
- this.
-
getLang
The language of this genealogical data set. See http://www.w3.org/International/articles/language-tags/. Note that some language-enabled elements MAY override the language.- Returns:
- The language of the genealogical data.
-
setLang
The language of this genealogical data set. See http://www.w3.org/International/articles/language-tags/. Note that some language-enabled elements MAY override the language.- Parameters:
lang- The language of this genealogical data.
-
lang
Build out this envelope with a lang.- Parameters:
lang- The lang.- Returns:
- this.
-
getDescriptionRef
A reference to a description of this data set.- Returns:
- A reference to a description of this data set.
-
setDescriptionRef
A reference to a description of this data set.- Parameters:
descriptionRef- A reference to a description of this data set.
-
descriptionRef
Build out this with a description ref.- Parameters:
descriptionRef- The description ref.- Returns:
- this.
-
getAttribution
The attribution of this genealogical data.- Returns:
- The attribution of this genealogical data.
-
setAttribution
The attribution of this genealogical data.- Parameters:
attribution- The attribution of this genealogical data.
-
attribution
Build this out with an attribution.- Parameters:
attribution- The attribution.- Returns:
- this.
-
getPerson
Get the first person in the document.- Returns:
- The first person in the document.
-
findPerson
Find a person in the document by URI.- Parameters:
uri- the uri- Returns:
- The person, or null.
-
persons
Create a stream for the persons in this data set.- Returns:
- The stream of persons.
-
getPersons
The persons included in this genealogical data set.- Returns:
- The persons included in this genealogical data set.
-
setPersons
The persons included in this genealogical data set.- Parameters:
persons- The persons included in this genealogical data set.
-
person
Build this out with a person.- Parameters:
person- The person.- Returns:
- this.
-
addPerson
Add a person to the data set.- Parameters:
person- The person to be added.
-
getCoupleRelationships
Get the list of couple relationships in the document.- Returns:
- The list of couple relationships in the document.
-
getParentChildRelationships
Get the list of parent-child relationships in the document.- Returns:
- The list of parent-child relationships in the document.
-
findCoupleRelationship
Find the couple relationship (if any) that corresponds to the relationship between the parents in the given family.- Parameters:
family- - Family to find the couple relationship for.- Returns:
- the couple relationship for the parents in the family, if any, or null if there isn't one (or if there are not two parents).
-
findCoupleRelationship
Find the couple relationship (if any) that corresponds to the relationship between the people with the given IDs.- Parameters:
person1- - person1 to find (i.e., spouse1)person2- - person2 to find (i.e., spouse2)- Returns:
- the couple relationship for the parents in the family, if any, or null if there isn't one (or if there are not two parents).
-
findParentChildRelationship
Find the parent-child relationship between the given two persons.- Parameters:
parent- - Reference to the parent to find.child- - Reference to the child to find.- Returns:
- parent-child relationship for the given parent and child, or null if not found in the document.
-
samePerson
Tell whether the given resource reference is referencing the current person- Parameters:
ref1- - Local reference to a person URI.ref2- - Local reference to a person URI.- Returns:
- true if the personReference is referencing this person (or both are null). False otherwise.
-
findRelationship
Find a relationship in the document by URI.- Parameters:
uri- the uri- Returns:
- The relationship, or null.
-
relationships
Create a stream for the relationships in this data set.- Returns:
- a stream for the relationships in this data set.
-
getRelationships
The relationships included in this genealogical data set.- Returns:
- The relationships included in this genealogical data set.
-
setRelationships
The relationships included in this genealogical data set.- Parameters:
relationships- The relationships included in this genealogical data set.
-
relationship
Build this out with a relationship.- Parameters:
relationship- The relationship.- Returns:
- this.
-
addRelationship
Add a relationship to the data set.- Parameters:
relationship- The relationship to be added.
-
getSourceDescription
Get the first source description in the document.- Returns:
- The first source description in the document.
-
getSourceDescription
Get the first source description in the document with the type that is specified.- Parameters:
resourceType- The URI resource type of the SourceDescription you are trying to find.- Returns:
- The first source description in the document with the type that is specified..
-
findDescription
Find the description of this record.- Returns:
- The description, or null.
-
findDescription
Find a description in the document by URI.- Parameters:
uri- the uri- Returns:
- The description, or null.
-
sourceDescriptions
Create a stream of the source descriptions in this document.- Returns:
- a stream of the source descriptions in this document.
-
getSourceDescriptions
The descriptions of sources included in this genealogical data set.- Returns:
- The descriptions of sources included in this genealogical data set.
-
setSourceDescriptions
The descriptions of sources included in this genealogical data set.- Parameters:
sourceDescriptions- The descriptions of sources included in this genealogical data set.
-
sourceDescription
Build this out with a source description.- Parameters:
sourceDescription- The source description.- Returns:
- this.
-
addSourceDescription
Add a source description to the data set.- Parameters:
sourceDescription- The source description to be added.
-
findAgent
Find a agent in the document by URI.- Parameters:
uri- the uri- Returns:
- The agent, or null.
-
agents
Create a stream of the agents in this data set.- Returns:
- a stream of the agents in this data set.
-
getAgents
The agents included in this genealogical data set.- Returns:
- The agents included in this genealogical data set.
-
setAgents
The agents included in this genealogical data set.- Parameters:
agents- The agents included in this genealogical data set.
-
agent
Build this out with a agent.- Parameters:
agent- The agent.- Returns:
- this.
-
addAgent
Add a agent to the data set.- Parameters:
agent- The agent to be added.
-
events
Create a stream of the events in this data set.- Returns:
- a stream of the events in this data set.
-
getEvents
The events included in this genealogical data set.- Returns:
- The events included in this genealogical data set.
-
setEvents
The events included in this genealogical data set.- Parameters:
events- The events included in this genealogical data set.
-
event
Build this out with a event.- Parameters:
event- The event.- Returns:
- this.
-
addEvent
Add a event to the data set.- Parameters:
event- The event to be added.
-
findPlace
Find a place in the document by URI.- Parameters:
uri- the uri- Returns:
- The place, or null.
-
places
Create a stream of the places in this data set.- Returns:
- a stream of the places in this data set.
-
getPlaces
The places included in this genealogical data set.- Returns:
- The places included in this genealogical data set.
-
setPlaces
The places included in this genealogical data set.- Parameters:
places- The places included in this genealogical data set.
-
place
Build this out with a place.- Parameters:
place- The place.- Returns:
- this.
-
addPlace
Add a place to the data set.- Parameters:
place- The place to be added.
-
documents
Create a stream of the documents in this data set.- Returns:
- a stream of the documents in this data set.
-
getDocuments
The documents included in this genealogical data set.- Returns:
- The documents included in this genealogical data set.
-
setDocuments
The documents included in this genealogical data set.- Parameters:
documents- The documents included in this genealogical data set.
-
document
Build this out with a document.- Parameters:
document- The document.- Returns:
- this.
-
addDocument
Add a document to the data set.- Parameters:
document- The document to be added.
-
collections
Create a stream of the collections in this data set.- Returns:
- a stream of the collections in this data set.
-
getCollections
The collections included in this genealogical data set.- Returns:
- The collections included in this genealogical data set.
-
setCollections
The collections included in this genealogical data set.- Parameters:
collections- The collections included in this genealogical data set.
-
collection
Build this out with a collection.- Parameters:
collection- The collection.- Returns:
- this.
-
addCollection
Add a collection to the data set.- Parameters:
collection- The collection to be added.
-
fields
Create a stream of the fields in this data set. -
getFields
The extracted fields included in this genealogical data set. Fields that apply to a particular person, relationship or value should be included within that person or value, respectively. Remaining fields that did not have a place within the person or relationship structure can be included here. Also, fields that were extracted but not yet fit into a structure can also be included here. -
setFields
The extracted fields included in this genealogical data set. -
field
Build this out with a field.- Parameters:
field- The field.- Returns:
- this.
-
addField
Add a field to the data set.- Parameters:
field- The field to be added.
-
recordDescriptors
Create a stream of the record descriptors in this data set.- Returns:
- a stream of the record descriptors in this data set.
-
getRecordDescriptors
The record descriptors included in this genealogical data set.- Returns:
- The record descriptors included in this genealogical data set.
-
setRecordDescriptors
The record descriptors included in this genealogical data set.- Parameters:
recordDescriptors- The record descriptors included in this genealogical data set.
-
recordDescriptor
Build this out with a record descriptor.- Parameters:
recordDescriptor- The record descriptor.- Returns:
- this.
-
addRecordDescriptor
Add a recordDescriptor to the data set.- Parameters:
recordDescriptor- The recordDescriptor to be added.
-
accept
Accept a visitor.- Parameters:
visitor- The visitor.
-
embed
-
addMainPersonDescription
Add a description for the main person in this document.- Returns:
- this.
-
addPersonDescription
public Gedcomx addPersonDescription(Person person, Date lastModified, DateFormat dateFormat, String version, URI collectionUri) Add a description for the person in this document.- Parameters:
person- The personlastModified- When the person was last modified.dateFormat- The format for the date.version- The version of the person.collectionUri- The URI to the collection in which the person is found.- Returns:
- this.
-
fixLocalReferences
Fixes all references to entities that are in the document to be local references.- Returns:
- this
-
fixupSourceReferences
-
fixId
-
subjects
Create a stream of all the subjects of this record.- Returns:
- a stream of all the subjects of this record.
-
findSubject
-
findElement
-