Project

General

Profile

« Previous | Next » 

Revision 27

Added pointer field name abbreviations to data2xml and NYBG mappings

View differences:

scripts/data2xml/NYBG-VegBank-VegX_mapping.csv
1 1
"NYBG","VegBank","VegX"
2 2
"key",,
3 3
"DateLastModified",,
4
"InstitutionCode","/taxonInterpretation/museum_ID->/party/OrganizationName/_name/firstName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept/partyWithRole/partyID->/parties/party/organizationName/_name/firstName"
5
"CollectionCode","/taxonInterpretation/museum_ID->/party/OrganizationName/_name/lastName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept/partyWithRole/partyID->/parties/party/organizationName/_name/lastName"
6
"CatalogNumber","/taxonInterpretation/museumAccessionNumber","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept/voucher"
7
"ScientificName","/plantName/plantName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/taxonNameID->/*s/taxonName/Simple"
4
"InstitutionCode","/taxonInterpretation/museum_ID->/party/OrganizationName/_name/firstName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName/_name/firstName"
5
"CollectionCode","/taxonInterpretation/museum_ID->/party/OrganizationName/_name/lastName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName/_name/lastName"
6
"CatalogNumber","/taxonInterpretation/museumAccessionNumber","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept/voucher"
7
"ScientificName","/plantName/plantName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/*ID->/*s/taxonName/Simple"
8 8
"BasisOfRecord",,
9
"Kingdom","/plantName[plantStatus/plantLevel=Kingdom]/plantName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/taxonConceptID->/*s/taxonConcept[Rank/@code=reg]/Name"
10
"Phylum","/plantName[plantStatus/plantLevel=Subkingdom]/plantName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/taxonConceptID->/*s/taxonConcept[Rank/@code=phyl_div]/Name"
11
"Class","/plantName[plantStatus/plantLevel=Class]/plantName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/taxonConceptID->/*s/taxonConcept[Rank/@code=cl]/Name"
12
"Order","/plantName[plantStatus/plantLevel=Order]/plantName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/taxonConceptID->/*s/taxonConcept[Rank/@code=ord]/Name"
13
"Family","/plantName[plantStatus/plantLevel=Family]/plantName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/taxonConceptID->/*s/taxonConcept[Rank/@code=fam]/Name"
14
"Genus","/plantName[plantStatus/plantLevel=Genus]/plantName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/taxonConceptID->/*s/taxonConcept[Rank/@code=gen]/Name"
15
"Species","/plantName[plantStatus/plantLevel=Species]/plantName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/taxonConceptID->/*s/taxonConcept[Rank/@code=sp]/Name"
16
"Subspecies","/plantName[plantStatus/plantLevel=Subspecies]/plantName","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/taxonConceptID->/*s/taxonConcept[Rank/@code=ssp]/Name"
17
"ScientificNameAuthor","/plantConcept/reference_ID->/referenceParty/{givenName,surname}","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/taxonConceptID->/*s/taxonConcept/AccordingTo/Simple"
18
"IdentifiedBy","/taxonInterpretation/PARTY_ID->/party/{givenName,middleName,surName}","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/partyWithRole[role=identifier]/partyID->/parties/party/individualName/{givenName,surName}"
19
"YearIdentified","/taxonInterpretation/interpretationDate/_date/year","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/date/_date/year"
20
"MonthIdentified","/taxonInterpretation/interpretationDate/_date/month","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/date/_date/month"
21
"DayIdentified","/taxonInterpretation/interpretationDate/_date/day","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/date/_date/day"
9
"Kingdom","/plantName[plantStatus/plantLevel=Kingdom]/plantName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/*ID->/*s/taxonConcept[Rank/@code=reg]/Name"
10
"Phylum","/plantName[plantStatus/plantLevel=Subkingdom]/plantName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/*ID->/*s/taxonConcept[Rank/@code=phyl_div]/Name"
11
"Class","/plantName[plantStatus/plantLevel=Class]/plantName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/*ID->/*s/taxonConcept[Rank/@code=cl]/Name"
12
"Order","/plantName[plantStatus/plantLevel=Order]/plantName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/*ID->/*s/taxonConcept[Rank/@code=ord]/Name"
13
"Family","/plantName[plantStatus/plantLevel=Family]/plantName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/*ID->/*s/taxonConcept[Rank/@code=fam]/Name"
14
"Genus","/plantName[plantStatus/plantLevel=Genus]/plantName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/*ID->/*s/taxonConcept[Rank/@code=gen]/Name"
15
"Species","/plantName[plantStatus/plantLevel=Species]/plantName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/*ID->/*s/taxonConcept[Rank/@code=sp]/Name"
16
"Subspecies","/plantName[plantStatus/plantLevel=Subspecies]/plantName","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/*ID->/*s/taxonConcept[Rank/@code=ssp]/Name"
17
"ScientificNameAuthor","/plantConcept/reference_ID->/referenceParty/{givenName,surname}","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/*s/taxonRelationshipAssertion!/assertion/*ID->/*s/taxonConcept/AccordingTo/Simple"
18
"IdentifiedBy","/taxonInterpretation/PARTY_ID->/party/{givenName,middleName,surName}","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/partyWithRole[role=identifier]/*ID->/parties/party/individualName/{givenName,surName}"
19
"YearIdentified","/taxonInterpretation/interpretationDate/_date/year","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/date/_date/year"
20
"MonthIdentified","/taxonInterpretation/interpretationDate/_date/month","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/date/_date/month"
21
"DayIdentified","/taxonInterpretation/interpretationDate/_date/day","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/date/_date/day"
22 22
"TypeStatus",,
23 23
"CollectorNumber",,
24
"FieldNumber","/taxonInterpretation/collectionNumber","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept/authorCode"
25
"Collector","/taxonInterpretation/collector_ID->/party/{givenName,middleName,surName}","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/partyWithRole[role=collector]/partyID->/parties/party/individualName/{givenName,surName}"
26
"YearCollected","/taxonInterpretation/collectionDate/_date/year","/*s/plotObservation/obsStartDate/_date/year"
27
"MonthCollected","/taxonInterpretation/collectionDate/_date/month","/*s/plotObservation/obsStartDate/_date/month"
28
"DayCollected","/taxonInterpretation/collectionDate/_date/day","/*s/plotObservation/obsStartDate/_date/day"
24
"FieldNumber","/taxonInterpretation/collectionNumber","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept/authorCode"
25
"Collector","/taxonInterpretation/collector_ID->/party/{givenName,middleName,surName}","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[taxonNameUsageConceptID]/partyWithRole[role=collector]/*ID->/parties/party/individualName/{givenName,surName}"
26
"YearCollected","/taxonInterpretation/collectionDate/_date/year","/*s/individualOrganismObservation/*ID->/*s/plotObservation/obsStartDate/_date/year"
27
"MonthCollected","/taxonInterpretation/collectionDate/_date/month","/*s/individualOrganismObservation/*ID->/*s/plotObservation/obsStartDate/_date/month"
28
"DayCollected","/taxonInterpretation/collectionDate/_date/day","/*s/individualOrganismObservation/*ID->/*s/plotObservation/obsStartDate/_date/day"
29 29
"JulianDay",,
30 30
"TimeOfDay",,
31 31
"ContinentOcean",,
32
"Country","/namedPlace[placeSystem=area|country|territory]/placeName","/*s/plot/country"
33
"StateProvince","/namedPlace[placeSystem=region|state|province]/placeName","/*s/plot/state"
34
"County","/namedPlace[placeSystem=county]/placeName","/*s/plot/county"
35
"Locality","/namedPlace/placeDescription","/*s/plot/simpleUserdefined[name=locality]/value"
36
"Longitude","/plot/realLongitude","/*s/plot/geospatial/DecimalLongitude"
37
"Latitude","/plot/realLatitude","/*s/plot/geospatial/DecimalLatitude"
38
"CoordinatePrecision","/plot/locationAccuracy","/*s/plot/geospatial/CoordinateUncertaintyInMeters"
39
"BoundingBox","/plot/dsgpoly","/*s/plot/geospatial/FootprintWKT"
40
"MinimumElevation","/plot/elevation/min,plot/elevationRange/from","/*s/plot/geospatial/minimumElevationInMeters"
41
"MaximumElevation","/plot/elevation/max,plot/elevationRange/to","/*s/plot/geospatial/maximumElevationInMeters"
42
"MinimumDepth","/observation/waterDepth/min","/*s/plot/geospatial/minimumDepthInMeters"
43
"MaximumDepth","/observation/waterDepth/max","/*s/plot/geospatial/maximumDepthInMeters"
44
"Sex","/userDefined[tableName=taxonInterpretation,userDefinedName=sex]/definedValue ","/*s/individualOrganismObservation/simpleUserdefined[name=sex]/value"
32
"Country","/namedPlace[placeSystem=area|country|territory]/placeName","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/country"
33
"StateProvince","/namedPlace[placeSystem=region|state|province]/placeName","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/state"
34
"County","/namedPlace[placeSystem=county]/placeName","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/county"
35
"Locality","/namedPlace/placeDescription","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=locality]/value"
36
"Longitude","/plot/realLongitude","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLongitude"
37
"Latitude","/plot/realLatitude","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLatitude"
38
"CoordinatePrecision","/plot/locationAccuracy","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/CoordinateUncertaintyInMeters"
39
"BoundingBox","/plot/dsgpoly","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/FootprintWKT"
40
"MinimumElevation","/plot/elevation/min,plot/elevationRange/from","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/minimumElevationInMeters"
41
"MaximumElevation","/plot/elevation/max,plot/elevationRange/to","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/maximumElevationInMeters"
42
"MinimumDepth","/observation/waterDepth/min","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/minimumDepthInMeters"
43
"MaximumDepth","/observation/waterDepth/max","/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/maximumDepthInMeters"
44
"Sex","/userDefined[tableName=taxonInterpretation,userDefinedName=sex]/definedValue ","/*s/individualOrganismObservation/individualOrganismID->/*s/individualOrganismObservation/simpleUserdefined[name=sex]/value"
45 45
"PreparationType",,
46 46
"IndividualCount",,
47 47
"PreviousCatalogNumber",,
48 48
"RelationshipType",,
49 49
"RelatedCatalogItem",,
50
"Notes","/taxonInterpretation/notes","/*s/individualOrganism/taxonNameUsageConceptsID->/*s/taxonNameUsageConcept/note/text"
51
"Habitat","/userDefined[tableName=stemLocation,userDefinedName=habitat]/definedValue ","/*s/individualOrganismObservation/simpleUserdefined[name=habitat]/value"
52
"PlantFungusDescription","/userDefined[tableName=stemLocation,userDefinedName=plantFungusDescription]/definedValue ","/*s/individualOrganismObservation/simpleUserdefined[name=plantFungusDescription]/value"
53
"Substrate","/userDefined[tableName=stemLocation,userDefinedName=substrate]/definedValue ","/*s/individualOrganismObservation/simpleUserdefined[name=substrate]/value"
54
"Vegetation","/userDefined[tableName=stemLocation,userDefinedName=vegetation]/definedValue ","/*s/individualOrganismObservation/simpleUserdefined[name=vegetation]/value"
50
"Notes","/taxonInterpretation/notes","/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept/note/text"
51
"Habitat","/userDefined[tableName=stemLocation,userDefinedName=habitat]/definedValue ","/*s/individualOrganismObservation/individualOrganismID->/*s/individualOrganismObservation/simpleUserdefined[name=habitat]/value"
52
"PlantFungusDescription","/userDefined[tableName=stemLocation,userDefinedName=plantFungusDescription]/definedValue ","/*s/individualOrganismObservation/individualOrganismID->/*s/individualOrganismObservation/simpleUserdefined[name=plantFungusDescription]/value"
53
"Substrate","/userDefined[tableName=stemLocation,userDefinedName=substrate]/definedValue ","/*s/individualOrganismObservation/individualOrganismID->/*s/individualOrganismObservation/simpleUserdefined[name=substrate]/value"
54
"Vegetation","/userDefined[tableName=stemLocation,userDefinedName=vegetation]/definedValue ","/*s/individualOrganismObservation/individualOrganismID->/*s/individualOrganismObservation/simpleUserdefined[name=vegetation]/value"
55 55
"UniqueNYInternalRecordNumber",,
scripts/data2xml/data2xml
33 33
            path = path.replace('<name>', name)
34 34
            path, repl_ct = re.subn(r'(?<=/)\*(?=s/(\w+))', r'\1', path)
35 35
            if repl_ct > 0: has_types = True # *s used for type elem
36
            path = re.sub(r'\*(?=\w*(?:->/\w+)?/(\w+))', r'\1', path)
36 37
            mappings[name] = xpath.XpathParser(path).parse()
37 38
    stream.close()
38 39
    

Also available in: Unified diff