The A2A Data Model and its application in WieWasWie Michel Brinckman michel@mindbus.nl @michelbrinckman
Overview Archive documents vs genealogy Need for abstraction A2A Entities Into the XML syntax How about semantics? The future of A2A Questions/discussion
Archive documents vs genealogy
Need for abstraction WieWasWie was to be a central search platform for 25+ organizations Not only 11 different sourcetypes, but also different versions of the same sourcetype Uniform template enforcement But also extensibility
A2A Entities (1/2)
A2A Entities (2/2) IsXML? IsA2A? IsSourceType?
Into the XML syntax (1/5) <!--The type of the main element--> <xsd:complextype name="a2atype"> <xsd:sequence> <xsd:element name="person" type="a2a:ctperson" minoccurs="0" maxoccurs="unbounded"></xsd:element> <xsd:element name="event" type="a2a:ctevent" minoccurs="0" maxoccurs="unbounded"></xsd:element> <xsd:element name="object" type="a2a:ctobject" minoccurs="0" maxoccurs="unbounded"></xsd:element> <xsd:element name="relationep" type="a2a:ctrelationep" minoccurs="0" maxoccurs="unbounded"></xsd:element> <xsd:element name="relationpp" type="a2a:ctrelationpp" minoccurs="0" maxoccurs="unbounded"></xsd:element> <xsd:element name="relationpo" type="a2a:ctrelationpo" minoccurs="0" maxoccurs="unbounded"></xsd:element> <xsd:element name="relationeo" type="a2a:ctrelationeo" minoccurs="0" maxoccurs="unbounded"></xsd:element> <xsd:element name="relationp" type="a2a:ctrelationp" minoccurs="0" maxoccurs="unbounded"></xsd:element> <xsd:element name="relationoo" type="a2a:ctrelationoo" minoccurs="0" maxoccurs="unbounded"></xsd:element> <xsd:element name="relationo" type="a2a:ctrelationo" minoccurs="0" maxoccurs="unbounded"></xsd:element> <xsd:element name="source" type="a2a:ctsource" minoccurs="1" maxoccurs="1"></xsd:element> </xsd:sequence> <xsd:attribute name="version" type="a2a:stversion" use="required"></xsd:attribute> </xsd:complextype> <?xml version="1.0"?> <A2A Version="1.7> <Person pid="person1">(...)</person> <Event eid="event1">(...)</event> <RelationEP> <PersonKeyRef>Person1</PersonKeyRef> <EventKeyRef>Event1</EventKeyRef> <RelationType>Kind</RelationType> </RelationEP> <Source>(...)</Source> </A2A> <xsd:complextype name ="ctrelationep"> <xsd:sequence> <xsd:element name ="PersonKeyRef" type="a2a:token100" minoccurs="1" maxoccurs="1"></xsd:element> <xsd:element name ="EventKeyRef" type="a2a:token100" minoccurs="1" maxoccurs="1"></xsd:element> <xsd:element name ="RelationType" type="a2a:strelationep" minoccurs="1" maxoccurs="1"></xsd:element> <xsd:element name ="ExtendedRelationType" type="a2a:cttransstring" minoccurs="0" maxoccurs="1"></xsd:element> </xsd:sequence> </xsd:complextype> <xsd:simpletype name="strelationep"> <xsd:restriction base="a2a:token100"> <xsd:pattern value="kind Dopeling (...) Partner other:.*"></xsd:pattern> </xsd:restriction> </xsd:simpletype>
Into the XML syntax (2/5) <xsd:complextype name="ctsource"> <xsd:sequence> <xsd:element name="sourceplace" type="a2a:ctplace" minoccurs="1" maxoccurs="1"></xsd:element> <xsd:element name="sourceindexdate" type="a2a:ctindexdate" minoccurs="1" maxoccurs="1"></xsd:element> <xsd:element name="sourcedate" type="a2a:cttransdate" minoccurs="0" maxoccurs="1"></xsd:element> <xsd:element name="sourcetype" type="a2a:stsourcetype" minoccurs="0" maxoccurs="1"></xsd:element> <xsd:element name="ead" type="a2a:ctead" minoccurs="0" maxoccurs="1"></xsd:element> <xsd:element name="eac" type="a2a:cteac" minoccurs="0" maxoccurs="1"></xsd:element> <xsd:element name="sourcereference" type="a2a:ctsourcereference" minoccurs="0" maxoccurs="1"></xsd:element> <xsd:element name="sourceavailablescans" type="a2a:ctscans" minoccurs="0" maxoccurs="1"></xsd:element> <xsd:element name="sourcedigitalizationdate" type="xsd:date" minoccurs="0" maxoccurs="1"></xsd:element> <xsd:element name="sourcelastchangedate" type="xsd:date" minoccurs="0" maxoccurs="1"></xsd:element> <xsd:element name="sourcedigitaloriginal" type="xsd:anyuri" minoccurs="0" maxoccurs="1"></xsd:element> <xsd:element name="recordidentifier" type="a2a:token100" minoccurs="0" maxoccurs="1"></xsd:element> <xsd:element name="recordguid" type="a2a:stguid" minoccurs="1" maxoccurs="1"></xsd:element> <xsd:element name="sourceremark" type="a2a:ctremarkpair" minoccurs="0" maxoccurs="unbounded"></xsd:element> </xsd:sequence> </xsd:complextype> <xsd:complextype name="ctindexdate"> <xsd:sequence> <xsd:element name="from" type="xsd:date" minoccurs="1" maxoccurs="1"></xsd:element> <xsd:element name="to" type="xsd:date" minoccurs="1" maxoccurs="1"></xsd:element> </xsd:sequence> </xsd:complextype> <Source> <SourcePlace> <Country>Netherlands</Country> <Place>Rotterdam</Place> </SourcePlace> <SourceIndexDate> <From>1832-05-16</From> <To>1832-05-16</To> </SourceIndexDate> (...) </Source> <xsd:simpletype name="stsourcetype"> <xsd:restriction base="a2a:token100"> <xsd:pattern value="dtb Dopen DTB Trouwen DTB Begraven BS Geboorte BS Huwelijk BS Overlijden Bevolkingsregister Notariële archieven VOC Opvarenden Kadaster Memories van Successie other:.*"> </xsd:pattern> </xsd:restriction> </xsd:simpletype>
Into the XML syntax (3/5) <xsd:complextype name="ctremarkpair"> <xsd:sequence> <xsd:element name ="Value" type="a2a:cttranslongstring" minoccurs="1" maxoccurs="1"> </xsd:element> </xsd:sequence> <xsd:attribute name="key" type="a2a:token100" use="required"></xsd:attribute> </xsd:complextype> <Source> (...) <SourceRemark Key="Bestemming"> <Value>Batavia</Value> </SourceRemark> <SourceRemark Key="Opmerking"> <Value>Schip is onderweg gezonken</value> </SourceRemark> </Source> <Object oid="schip1"> <Description>Spiering</Description> </Object> <RelationPO> <PersonKeyRef>Person1</PersonKeyRef> <ObjectKeyRef>Schip1</ObjectKeyRef> <RelationType>other:Opvarende</RelationType> </RelationPO> <RelationEO> <EventKeyRef>Event1</EventKeyRef> <ObjectKeyRef>Schip1</ObjectKeyRef> <RelationType>other:VertrekKamer</RelationType> </RelationEO> <Source> <SourceRemark Key="Rubriek;Trefwoord"> <Value>rampen;Brand</Value> </SourceRemark> <SourceRemark Key="Rubriek;Trefwoord"> <Value>cultuur;behangsel</Value> </SourceRemark> <SourceRemark Key="Rubriek;Trefwoord"> <Value>verkeer;paard</Value> </SourceRemark> </Source>
Into the XML syntax (4/5) <Person pid="person1"> <PersonName> <PersonNameFirstName TranscriptionRemark="stain prohibits clear reading, could also be Gretje">Grietje</PersonNameFirstName> <PersonNamePatronym>Jacobsdr</PersonNamePatronym> <PersonNamePrefixLastName>van</PersonNamePrefixLastName> <PersonNameLastName>Grootebroek</PersonNameLastName> </PersonName> <Age> <PersonAgeLiteral>20</PersonAgeLiteral> </Age> <Profession language="nl-be">naaister</profession> <Profession>koopvrouw</Profession> </Person>
Into the XML syntax (5/5) <xsd:element name="a2acollection"> <xsd:complextype> <xsd:sequence> <xsd:element ref="a2a:a2a" minoccurs="0" maxoccurs="unbounded" /> </xsd:sequence> </xsd:complextype> </xsd:element> <A2ACollection> <A2A Version="1.7" > <Person pid="kind">(...)</person> <Event eid="geboorte">(...)</event> <Source> (...) <RecordGUID>{05477CC8-2487-4189-9AE9-20001427767F}</RecordGUID> </Source> </A2A> <A2A Version="1.7" > <Person pid= vader">(...)</person> <Event eid="geboorte">(...)</event> <Source> (...) <RecordGUID>{EC89E531-2131-4C03-8CA8-83C7B215A65D}</RecordGUID> </Source> </A2A> </A2ACollection>
How about semantics? (1/2) Schematron definitions (.xml =>.xslt) <pattern name="person: geen apart Familyname veld"> <rule context="a2a:personname"> <report test="a2a:personnamefamilyname">gebruik van Familyname is niet toegestaan</report> </rule> </pattern> <pattern name="verplichte Bron gegevens"> <rule context="a2a:source"> <assert test="a2a:sourcetype and normalize-space(a2a:sourcetype)">er is geen bronsoort opgegeven</assert> </rule> </pattern> <pattern name="bronsoort"> <rule context="a2a:sourcetype"> <assert test=".='dtb Begraven'">Er mag geen andere Bronsoort zijn dan DTB Begraven</assert> </rule> </pattern>
How about semantics? (2/2) Form definitions xml based building blocks <Form xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" SourceType="BS Overlijden" MinPersons="1" MinEvents="1" MinObjects="0" RequiredFields="Place,InstitutionName" HiddenFields="" ShowEAC="false" ShowEAD="false" Remarks="Opmerking,AkteSoort"> <Persons> <Person ShowOptionalFields="WhenFilled" ShowDetails="WhenFilled" Reference="Overledene" Remarks="" Min="0" Max="1" RequiredFields="Gender" HiddenFields="FamilyName" RequiredOptionalFields="FirstName,Patronym,PrefixLastName,LastName" HasProfessions="true" ShowPersonNameDetails="WhenFilled" ShowPersonAgeDetails="WhenFilled"> <Required>false</Required> <Residence ShowDetails="WhenFilled" /> <Origin ShowDetails="WhenFilled" /> <BirthPlace ShowDetails="WhenFilled" /> <BirthDate ShowDetails="WhenFilled" /> </Person> <Person ShowOptionalFields="WhenFilled" ShowDetails="WhenFilled" Reference="Vader" Remarks="" Min="0" Max="1" RequiredFields="" HiddenFields="FamilyName" RequiredOptionalFields="" HasProfessions="true" ShowPersonNameDetails="WhenFilled" ShowPersonAgeDetails="WhenFilled"> <Required>false</Required> <Residence ShowDetails="WhenFilled" /> <Origin ShowDetails="WhenFilled" /> <BirthPlace ShowDetails="WhenFilled" /> <BirthDate ShowDetails="WhenFilled" /> </Person> </Persons> (...)
The future of A2A Maintenance A2A by CBG http://www.den.nl/standaard/386/ More SourceTypes, more EventTypes, more RelationPP and RelationEP types Changing max-lengths of some elements Removing or restructuring some oddities Better standard for Semantics (enforcing specific SourceType structure) Storing family trees?
Questions/discussion