[#62] Add new fields to the ISO parser
* Metadata standard name / version * Unique resource identifier (reenabled and fixed) * Presentation form * Purpose * Maintenance note * Access constraints * Distributor * Usage * Aggregation info
This commit is contained in:
parent
e9c7bbcabe
commit
dc37867d7a
|
@ -402,6 +402,63 @@ class ISOKeyword(ISOElement):
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class ISOUsage(ISOElement):
|
||||||
|
|
||||||
|
elements = [
|
||||||
|
ISOElement(
|
||||||
|
name="usage",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:specificUsage/gco:CharacterString/text()",
|
||||||
|
],
|
||||||
|
multiplicity="1",
|
||||||
|
),
|
||||||
|
ISOResponsibleParty(
|
||||||
|
name="contact-info",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:userContactInfo/gmd:CI_ResponsibleParty",
|
||||||
|
],
|
||||||
|
multiplicity="1",
|
||||||
|
),
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class ISOAggregationInfo(ISOElement):
|
||||||
|
|
||||||
|
elements = [
|
||||||
|
ISOElement(
|
||||||
|
name="aggregate-dataset-name",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:aggregateDatasetName/gmd:CI_Citation/gmd:title/gco:CharacterString/text()",
|
||||||
|
],
|
||||||
|
multiplicity="0..1",
|
||||||
|
),
|
||||||
|
ISOElement(
|
||||||
|
name="aggregate-dataset-identifier",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:aggregateDatasetIdentifier/gmd:MD_Identifier/gmd:code/gco:CharacterString/text()",
|
||||||
|
],
|
||||||
|
multiplicity="0..1",
|
||||||
|
),
|
||||||
|
ISOElement(
|
||||||
|
name="association-type",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:associationType/gmd:DS_AssociationTypeCode/@codeListValue",
|
||||||
|
"gmd:associationType/gmd:DS_AssociationTypeCode/text()",
|
||||||
|
],
|
||||||
|
multiplicity="0..1",
|
||||||
|
),
|
||||||
|
ISOElement(
|
||||||
|
name="initiative-type",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:initiativeType/gmd:DS_InitiativeTypeCode/@codeListValue",
|
||||||
|
"gmd:initiativeType/gmd:DS_InitiativeTypeCode/text()",
|
||||||
|
],
|
||||||
|
multiplicity="0..1",
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class ISODocument(MappedXmlDocument):
|
class ISODocument(MappedXmlDocument):
|
||||||
|
|
||||||
# Attribute specifications from "XPaths for GEMINI" by Peter Parslow.
|
# Attribute specifications from "XPaths for GEMINI" by Peter Parslow.
|
||||||
|
@ -420,6 +477,16 @@ class ISODocument(MappedXmlDocument):
|
||||||
],
|
],
|
||||||
multiplicity="0..1",
|
multiplicity="0..1",
|
||||||
),
|
),
|
||||||
|
ISOElement(
|
||||||
|
name="metadata-standard-name",
|
||||||
|
search_paths="gmd:metadataStandardName/gco:CharacterString/text()",
|
||||||
|
multiplicity="0..1",
|
||||||
|
),
|
||||||
|
ISOElement(
|
||||||
|
name="metadata-standard-version",
|
||||||
|
search_paths="gmd:metadataStandardVersion/gco:CharacterString/text()",
|
||||||
|
multiplicity="0..1",
|
||||||
|
),
|
||||||
ISOElement(
|
ISOElement(
|
||||||
name="resource-type",
|
name="resource-type",
|
||||||
search_paths=[
|
search_paths=[
|
||||||
|
@ -475,15 +542,25 @@ class ISODocument(MappedXmlDocument):
|
||||||
],
|
],
|
||||||
multiplicity="1..*",
|
multiplicity="1..*",
|
||||||
),
|
),
|
||||||
## Todo: Suggestion from PP not to bother pulling this into the package.
|
ISOElement(
|
||||||
#ISOElement(
|
name="unique-resource-identifier",
|
||||||
# name="unique-resource-identifier",
|
search_paths=[
|
||||||
# search_paths=[
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString/text()",
|
||||||
# "gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier",
|
"gmd:identificationInfo/gmd:SV_ServiceIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString/text()",
|
||||||
# "gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier",
|
],
|
||||||
# ],
|
multiplicity="0..1",
|
||||||
# multiplicity="1",
|
),
|
||||||
#),
|
ISOElement(
|
||||||
|
name="presentation-form",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:presentationForm/gmd:CI_PresentationFormCode/text()",
|
||||||
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:presentationForm/gmd:CI_PresentationFormCode/@codeListValue",
|
||||||
|
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:citation/gmd:CI_Citation/gmd:presentationForm/gmd:CI_PresentationFormCode/text()",
|
||||||
|
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:citation/gmd:CI_Citation/gmd:presentationForm/gmd:CI_PresentationFormCode/@codeListValue",
|
||||||
|
|
||||||
|
],
|
||||||
|
multiplicity="*",
|
||||||
|
),
|
||||||
ISOElement(
|
ISOElement(
|
||||||
name="abstract",
|
name="abstract",
|
||||||
search_paths=[
|
search_paths=[
|
||||||
|
@ -492,6 +569,14 @@ class ISODocument(MappedXmlDocument):
|
||||||
],
|
],
|
||||||
multiplicity="1",
|
multiplicity="1",
|
||||||
),
|
),
|
||||||
|
ISOElement(
|
||||||
|
name="purpose",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:purpose/gco:CharacterString/text()",
|
||||||
|
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:purpose/gco:CharacterString/text()",
|
||||||
|
],
|
||||||
|
multiplicity="1",
|
||||||
|
),
|
||||||
ISOResponsibleParty(
|
ISOResponsibleParty(
|
||||||
name="responsible-organisation",
|
name="responsible-organisation",
|
||||||
search_paths=[
|
search_paths=[
|
||||||
|
@ -506,12 +591,19 @@ class ISODocument(MappedXmlDocument):
|
||||||
search_paths=[
|
search_paths=[
|
||||||
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceMaintenance/gmd:MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode/@codeListValue",
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceMaintenance/gmd:MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode/@codeListValue",
|
||||||
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:resourceMaintenance/gmd:MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode/@codeListValue",
|
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:resourceMaintenance/gmd:MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode/@codeListValue",
|
||||||
|
|
||||||
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceMaintenance/gmd:MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode/text()",
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceMaintenance/gmd:MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode/text()",
|
||||||
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:resourceMaintenance/gmd:MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode/text()",
|
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:resourceMaintenance/gmd:MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode/text()",
|
||||||
],
|
],
|
||||||
multiplicity="0..1",
|
multiplicity="0..1",
|
||||||
),
|
),
|
||||||
|
ISOElement(
|
||||||
|
name="maintenance-note",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceMaintenance/gmd:MD_MaintenanceInformation/gmd:maintenanceNote/gco:CharacterString/text()",
|
||||||
|
"gmd:identificationInfo/gmd:SV_ServiceIdentification/gmd:resourceMaintenance/gmd:MD_MaintenanceInformation/gmd:maintenanceNote/gco:CharacterString/text()",
|
||||||
|
],
|
||||||
|
multiplicity="0..1",
|
||||||
|
),
|
||||||
ISOElement(
|
ISOElement(
|
||||||
name="progress",
|
name="progress",
|
||||||
search_paths=[
|
search_paths=[
|
||||||
|
@ -546,14 +638,33 @@ class ISODocument(MappedXmlDocument):
|
||||||
],
|
],
|
||||||
multiplicity="*",
|
multiplicity="*",
|
||||||
),
|
),
|
||||||
|
ISOUsage(
|
||||||
|
name="usage",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceSpecificUsage/gmd:MD_Usage",
|
||||||
|
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:resourceSpecificUsage/gmd:MD_Usage",
|
||||||
|
],
|
||||||
|
multiplicity="*"
|
||||||
|
),
|
||||||
ISOElement(
|
ISOElement(
|
||||||
name="limitations-on-public-access",
|
name="limitations-on-public-access",
|
||||||
search_paths=[
|
search_paths=[
|
||||||
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:otherConstraints/gco:CharacterString/text()",
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:otherConstraints/gco:CharacterString/text()",
|
||||||
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:otherConstraints/gco:CharacterString/text()",
|
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:otherConstraints/gco:CharacterString/text()",
|
||||||
],
|
],
|
||||||
multiplicity="1..*",
|
multiplicity="*",
|
||||||
),
|
),
|
||||||
|
ISOElement(
|
||||||
|
name="access-constraints",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue",
|
||||||
|
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue",
|
||||||
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:accessConstraints/gmd:MD_RestrictionCode/text()",
|
||||||
|
"gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:accessConstraints/gmd:MD_RestrictionCode/text()",
|
||||||
|
],
|
||||||
|
multiplicity="*",
|
||||||
|
),
|
||||||
|
|
||||||
ISOElement(
|
ISOElement(
|
||||||
name="use-constraints",
|
name="use-constraints",
|
||||||
search_paths=[
|
search_paths=[
|
||||||
|
@ -562,6 +673,14 @@ class ISODocument(MappedXmlDocument):
|
||||||
],
|
],
|
||||||
multiplicity="*",
|
multiplicity="*",
|
||||||
),
|
),
|
||||||
|
ISOAggregationInfo(
|
||||||
|
name="aggregation-info",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:identificationInfo/gmd:MD_DataIdentification/gmd:aggregationInfo/gmd:MD_AggregateInformation",
|
||||||
|
"gmd:identificationInfo/gmd:SV_ServiceIdentification/gmd:aggregationInfo/gmd:MD_AggregateInformation",
|
||||||
|
],
|
||||||
|
multiplicity="*"
|
||||||
|
),
|
||||||
ISOElement(
|
ISOElement(
|
||||||
name="spatial-data-service-type",
|
name="spatial-data-service-type",
|
||||||
search_paths=[
|
search_paths=[
|
||||||
|
@ -678,6 +797,13 @@ class ISODocument(MappedXmlDocument):
|
||||||
],
|
],
|
||||||
multiplicity="*",
|
multiplicity="*",
|
||||||
),
|
),
|
||||||
|
ISOResponsibleParty(
|
||||||
|
name="distributor",
|
||||||
|
search_paths=[
|
||||||
|
"gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorContact/gmd:CI_ResponsibleParty",
|
||||||
|
],
|
||||||
|
multiplicity="*",
|
||||||
|
),
|
||||||
ISOResourceLocator(
|
ISOResourceLocator(
|
||||||
name="resource-locator",
|
name="resource-locator",
|
||||||
search_paths=[
|
search_paths=[
|
||||||
|
|
Loading…
Reference in New Issue