public class Gedcomx extends HypermediaEnabledData implements HasFields
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:
This documentation is provided as a non-normative reference guide.
extensionElements, transientProperties| Constructor and Description |
|---|
Gedcomx() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(GedcomxModelVisitor visitor)
Accept a visitor.
|
void |
addAgent(Agent agent)
Add a agent to the data set.
|
void |
addCollection(Collection collection)
Add a collection to the data set.
|
void |
addDocument(Document document)
Add a document to the data set.
|
void |
addEvent(Event event)
Add a event to the data set.
|
void |
addField(Field field)
Add a field to the data set.
|
Gedcomx |
addMainPersonDescription()
Add a description for the main person in this document.
|
void |
addPerson(Person person)
Add a person to the data set.
|
Gedcomx |
addPersonDescription(Person person,
Date lastModified,
DateFormat dateFormat,
String version,
URI collectionUri)
Add a description for the person in this document.
|
void |
addPlace(PlaceDescription place)
Add a place to the data set.
|
void |
addRecordDescriptor(RecordDescriptor recordDescriptor)
Add a recordDescriptor to the data set.
|
void |
addRelationship(Relationship relationship)
Add a relationship to the data set.
|
void |
addSourceDescription(SourceDescription sourceDescription)
Add a source description to the data set.
|
Gedcomx |
agent(Agent agent)
Build this out with a agent.
|
Stream<Agent> |
agents()
Create a stream of the agents in this data set.
|
Gedcomx |
attribution(Attribution attribution)
Build this out with an attribution.
|
Gedcomx |
collection(Collection collection)
Build this out with a collection.
|
Stream<Collection> |
collections()
Create a stream of the collections in this data set.
|
Gedcomx |
descriptionRef(URI descriptionRef)
Build out this with a description ref.
|
Gedcomx |
document(Document document)
Build this out with a document.
|
Stream<Document> |
documents()
Create a stream of the documents in this data set.
|
void |
embed(Gedcomx gedcomx) |
Gedcomx |
event(Event event)
Build this out with a event.
|
Stream<Event> |
events()
Create a stream of the events in this data set.
|
Gedcomx |
field(Field field)
Build this out with a field.
|
Stream<Field> |
fields()
Create a stream of the fields in this data set.
|
Agent |
findAgent(URI uri)
Find a agent in the document by URI.
|
Relationship |
findCoupleRelationship(FamilyView family)
Find the couple relationship (if any) that corresponds to the relationship between the parents in the given family.
|
Relationship |
findCoupleRelationship(ResourceReference person1,
ResourceReference person2)
Find the couple relationship (if any) that corresponds to the relationship between the people with the given IDs.
|
SourceDescription |
findDescription()
Find the description of this record.
|
SourceDescription |
findDescription(URI uri)
Find a description in the document by URI.
|
static <E extends HypermediaEnabledData> |
findElement(List<E> items,
URI ref) |
Relationship |
findParentChildRelationship(ResourceReference parent,
ResourceReference child)
Find the parent-child relationship between the given two persons.
|
Person |
findPerson(URI uri)
Find a person in the document by URI.
|
PlaceDescription |
findPlace(URI uri)
Find a place in the document by URI.
|
Relationship |
findRelationship(URI uri)
Find a relationship in the document by URI.
|
static <S extends Subject> |
findSubject(List<S> items,
URI ref) |
protected static void |
fixId(ResourceReference ref,
String localId) |
Gedcomx |
fixLocalReferences()
Fixes all references to entities that are in the document to be local references.
|
protected static void |
fixupSourceReferences(List<SourceDescription> sds,
Subject local) |
List<Agent> |
getAgents()
The agents included in this genealogical data set.
|
Attribution |
getAttribution()
The attribution of this genealogical data.
|
List<Collection> |
getCollections()
The collections included in this genealogical data set.
|
List<Relationship> |
getCoupleRelationships()
Get the list of couple relationships in the document.
|
URI |
getDescriptionRef()
A reference to a description of this data set.
|
List<Document> |
getDocuments()
The documents included in this genealogical data set.
|
List<Event> |
getEvents()
The events included in this genealogical data set.
|
List<Field> |
getFields()
The extracted fields included in this genealogical data set.
|
String |
getLang()
The language of this genealogical data set.
|
List<Relationship> |
getParentChildRelationships()
Get the list of parent-child relationships in the document.
|
Person |
getPerson()
Get the first person in the document.
|
List<Person> |
getPersons()
The persons included in this genealogical data set.
|
List<PlaceDescription> |
getPlaces()
The places included in this genealogical data set.
|
List<RecordDescriptor> |
getRecordDescriptors()
The record descriptors included in this genealogical data set.
|
List<Relationship> |
getRelationships()
The relationships included in this genealogical data set.
|
SourceDescription |
getSourceDescription()
Get the first source description in the document.
|
SourceDescription |
getSourceDescription(URI resourceType)
Get the first source description in the document with the type that is specified.
|
List<SourceDescription> |
getSourceDescriptions()
The descriptions of sources included in this genealogical data set.
|
Gedcomx |
lang(String lang)
Build out this envelope with a lang.
|
Gedcomx |
person(Person person)
Build this out with a person.
|
Stream<Person> |
persons()
Create a stream for the persons in this data set.
|
Gedcomx |
place(PlaceDescription place)
Build this out with a place.
|
Stream<PlaceDescription> |
places()
Create a stream of the places in this data set.
|
Gedcomx |
recordDescriptor(RecordDescriptor recordDescriptor)
Build this out with a record descriptor.
|
Stream<RecordDescriptor> |
recordDescriptors()
Create a stream of the record descriptors in this data set.
|
Gedcomx |
relationship(Relationship relationship)
Build this out with a relationship.
|
Stream<Relationship> |
relationships()
Create a stream for the relationships in this data set.
|
protected static boolean |
samePerson(ResourceReference ref1,
ResourceReference ref2)
Tell whether the given resource reference is referencing the current person
|
void |
setAgents(List<Agent> agents)
The agents included in this genealogical data set.
|
void |
setAttribution(Attribution attribution)
The attribution of this genealogical data.
|
void |
setCollections(List<Collection> collections)
The collections included in this genealogical data set.
|
void |
setDescriptionRef(URI descriptionRef)
A reference to a description of this data set.
|
void |
setDocuments(List<Document> documents)
The documents included in this genealogical data set.
|
void |
setEvents(List<Event> events)
The events included in this genealogical data set.
|
void |
setFields(List<Field> fields)
The extracted fields included in this genealogical data set.
|
void |
setLang(String lang)
The language of this genealogical data set.
|
void |
setPersons(List<Person> persons)
The persons included in this genealogical data set.
|
void |
setPlaces(List<PlaceDescription> places)
The places included in this genealogical data set.
|
void |
setRecordDescriptors(List<RecordDescriptor> recordDescriptors)
The record descriptors included in this genealogical data set.
|
void |
setRelationships(List<Relationship> relationships)
The relationships included in this genealogical data set.
|
void |
setSourceDescriptions(List<SourceDescription> sourceDescriptions)
The descriptions of sources included in this genealogical data set.
|
Gedcomx |
sourceDescription(SourceDescription sourceDescription)
Build this out with a source description.
|
Stream<SourceDescription> |
sourceDescriptions()
Create a stream of the source descriptions in this document.
|
Stream<Subject> |
subjects()
Create a stream of all the subjects of this record.
|
addLink, addLink, addTemplatedLink, embed, getLink, getLinks, getLinks, link, link, setLinksaddExtensionElement, embed, extensionElement, findExtensionOfType, findExtensionOfType, findExtensionsOfType, findExtensionsOfType, getExtensionElements, getId, getTransientProperties, getTransientProperty, id, removeExtensionElements, setExtensionElement, setExtensionElements, setId, setTransientProperty, toStringpublic String getLang()
public void setLang(String lang)
lang - The language of this genealogical data.public Gedcomx lang(String lang)
lang - The lang.public URI getDescriptionRef()
public void setDescriptionRef(URI descriptionRef)
descriptionRef - A reference to a description of this data set.public Gedcomx descriptionRef(URI descriptionRef)
descriptionRef - The description ref.public Attribution getAttribution()
public void setAttribution(Attribution attribution)
attribution - The attribution of this genealogical data.public Gedcomx attribution(Attribution attribution)
attribution - The attribution.public Person getPerson()
public Person findPerson(URI uri)
uri - the uripublic Stream<Person> persons()
public List<Person> getPersons()
public void setPersons(List<Person> persons)
persons - The persons included in this genealogical data set.public Gedcomx person(Person person)
person - The person.public void addPerson(Person person)
person - The person to be added.public List<Relationship> getCoupleRelationships()
public List<Relationship> getParentChildRelationships()
public Relationship findCoupleRelationship(FamilyView family)
family - - Family to find the couple relationship for.public Relationship findCoupleRelationship(ResourceReference person1, ResourceReference person2)
person1 - - person1 to find (i.e., spouse1)person2 - - person2 to find (i.e., spouse2)public Relationship findParentChildRelationship(ResourceReference parent, ResourceReference child)
parent - - Reference to the parent to find.child - - Reference to the child to find.protected static boolean samePerson(ResourceReference ref1, ResourceReference ref2)
ref1 - - Local reference to a person URI.ref2 - - Local reference to a person URI.public Relationship findRelationship(URI uri)
uri - the uripublic Stream<Relationship> relationships()
public List<Relationship> getRelationships()
public void setRelationships(List<Relationship> relationships)
relationships - The relationships included in this genealogical data set.public Gedcomx relationship(Relationship relationship)
relationship - The relationship.public void addRelationship(Relationship relationship)
relationship - The relationship to be added.public SourceDescription getSourceDescription()
public SourceDescription getSourceDescription(URI resourceType)
resourceType - The URI resource type of the SourceDescription you are trying to find.public SourceDescription findDescription()
public SourceDescription findDescription(URI uri)
uri - the uripublic Stream<SourceDescription> sourceDescriptions()
public List<SourceDescription> getSourceDescriptions()
public void setSourceDescriptions(List<SourceDescription> sourceDescriptions)
sourceDescriptions - The descriptions of sources included in this genealogical data set.public Gedcomx sourceDescription(SourceDescription sourceDescription)
sourceDescription - The source description.public void addSourceDescription(SourceDescription sourceDescription)
sourceDescription - The source description to be added.public Agent findAgent(URI uri)
uri - the uripublic Stream<Agent> agents()
public List<Agent> getAgents()
public void setAgents(List<Agent> agents)
agents - The agents included in this genealogical data set.public Gedcomx agent(Agent agent)
agent - The agent.public void addAgent(Agent agent)
agent - The agent to be added.public Stream<Event> events()
public List<Event> getEvents()
public void setEvents(List<Event> events)
events - The events included in this genealogical data set.public Gedcomx event(Event event)
event - The event.public void addEvent(Event event)
event - The event to be added.public PlaceDescription findPlace(URI uri)
uri - the uripublic Stream<PlaceDescription> places()
public List<PlaceDescription> getPlaces()
public void setPlaces(List<PlaceDescription> places)
places - The places included in this genealogical data set.public Gedcomx place(PlaceDescription place)
place - The place.public void addPlace(PlaceDescription place)
place - The place to be added.public Stream<Document> documents()
public List<Document> getDocuments()
public void setDocuments(List<Document> documents)
documents - The documents included in this genealogical data set.public Gedcomx document(Document document)
document - The document.public void addDocument(Document document)
document - The document to be added.public Stream<Collection> collections()
public List<Collection> getCollections()
public void setCollections(List<Collection> collections)
collections - The collections included in this genealogical data set.public Gedcomx collection(Collection collection)
collection - The collection.public void addCollection(Collection collection)
collection - The collection to be added.public List<Field> getFields()
public void setFields(List<Field> fields)
public Gedcomx field(Field field)
field - The field.public void addField(Field field)
field - The field to be added.public Stream<RecordDescriptor> recordDescriptors()
public List<RecordDescriptor> getRecordDescriptors()
public void setRecordDescriptors(List<RecordDescriptor> recordDescriptors)
recordDescriptors - The record descriptors included in this genealogical data set.public Gedcomx recordDescriptor(RecordDescriptor recordDescriptor)
recordDescriptor - The record descriptor.public void addRecordDescriptor(RecordDescriptor recordDescriptor)
recordDescriptor - The recordDescriptor to be added.public void accept(GedcomxModelVisitor visitor)
visitor - The visitor.public void embed(Gedcomx gedcomx)
public Gedcomx addMainPersonDescription()
public Gedcomx addPersonDescription(Person person, Date lastModified, DateFormat dateFormat, String version, URI collectionUri)
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.public Gedcomx fixLocalReferences()
protected static void fixupSourceReferences(List<SourceDescription> sds, Subject local)
protected static void fixId(ResourceReference ref, String localId)
public Stream<Subject> subjects()
public static <E extends HypermediaEnabledData> E findElement(List<E> items, URI ref)
Copyright © 2020. All rights reserved.