Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entityAttribute rule change #168

Closed
8 tasks done
stansmith907 opened this issue Oct 27, 2017 · 5 comments
Closed
8 tasks done

entityAttribute rule change #168

stansmith907 opened this issue Oct 27, 2017 · 5 comments
Labels
enhancement Improve or modify an existing feature mdEditor mdEditor update needed
Milestone

Comments

@stansmith907
Copy link
Contributor

stansmith907 commented Oct 27, 2017

New elements for entityAttribute:

  • attributeReference {citation}: "reference to a standard or external description of the entity attribute"
  • mustBeUnique (Boolean): "the attribute value is required to be unique; true for key values and possibly others"
  • unitsResolution {real}: "the smallest unit increment to which an attribute value is measured"
  • isCaseSensitive {Boolean}: "If the content of the data set is encoded in case-sensitive ASCII"
  • fieldWidth {integer}: "the number of characters of the data field"
  • missingValue {string}: "the code which represents missing data"
  • valueRange [{valueRange}]: "the minimum and maximum values of a continuum of valid values"
  • timePeriod [{timePeriod}]: ""

Removed elements from "entityAttribute":

  • allowMany {Boolean}" moved to foreignKey

Rules:

  • attributeReference optional
  • mustBeUnique required (default false)
  • unitsResolution if units, optional
  • isCaseSensitive required (default false)
  • fieldWidth optional
  • missingValue optional
  • valueRange optional
  • timePeriod optional

mdJson:

{
   "attribute": [
      {
         "commonName": "commonName",
         "codeName": "codeName",
         "alias": [],
         "definition": "definition",
         "attributeReference": {},
         "dataType": "dataType",
         "allowNull": true,
         "mustBeUnique": false,
         "units": "units",
         "unitsResolution": 9.9,
         "isCaseSensitive": false,
         "fieldWidth": 9,
         "missingValue": "",
         "domainId": "domainId",
         "minValue": "minValue",
         "maxValue": "maxValue",
         "valueRange": [],
         "timePeriod": []
      }
   ]
}

FGDC mapping:

  • attributeReference (CSDGM 'attrdefs'): attribute definition source
  • unitsResolution (CSGDM 'attrunit' and 'attrmres'): in CSGDM units resolution - and units - are part of the range domain. Each range domain can specify its own units and resolution. I have moved units and units resolution to the attribute level so there is only one value for the attribute. Note there can still be multiple range domains, however they will all inherit units and units resolution from the attribute.
  • isCaseSensitive (Bio 'casesens'): This is part of the ASCII file description embedded in file distribution.
  • fieldWidth (Bio 'dfwidth'): This is part of the ASCII file description embedded in file distribution.
  • missingValue (Bio 'missingv'): This is part of the ASCII file description embedded in file distribution.
  • valueRange (CSGDM 'rdom','rdommin', and 'rdommax'): This is handled as a range domain in CSGDM.
  • timePeriod (CSGDM 'begdatea' and 'enddatea'): This is a multiply occurring element pair in CSGDM.

FGDC mapping entity-attribute section

<metadata>
  <eainfo>
    <detailed>
      <attr>
        <attrdefs>attribute 1 definition source</attrdefs>
        <begdatea>20020501</begdatea>
        <enddatea>20020831</enddatea>
        <begdatea>20040501</begdatea>
        <enddatea>20040831</enddatea>
        <attrdomv>
          <rdom>
            <rdommin>0</rdommin>
            <rdommax>9</rdommax>
            <attrunit>units</attrunit>
            <attrmres>1</attrmres>
          </rdom>
        </attrdomv>
      </attr>
    </detailed>
  </eainfo>
</metadata>

FGDC mapping to distribution section
The items cannot be mapped from FGDC to mdTranslator because the Bio extension defines the entity-attribute structure inside distribution transfer option, outside of the entity-attribute section. I cannot reliably merge the two entity-attribute descriptions. However, I have added some of the Bio extension elements to mdTranslator and mdJson objects entity and entityAttribute.

<metadata>
  <distinfo>
    <stdorder>
      <nondig>option for obtaining non-digital data 1</nondig>
      <digform>
        <digtinfo>
          <asciistr>
            <recdel>\n</recdel>
            <numheadl>1</numheadl>
            <deschead>column names</deschead>
            <orienta>columnmajor</orienta>
            <casesens>N</casesens>
            <authent>12ad155ee845d5c4</authent>
            <quotech>"'"</quotech>
            <datafiel>
              <dfieldnm>field1</dfieldnm>
              <missingv>-1</missingv>
              <dfwidth>12</dfwidth>
            </datafiel>
            <datafiel>
              <dfieldnm>field2</dfieldnm>
              <missingv>-1</missingv>
              <dfwidthd>;</dfwidthd>
            </datafiel>
          </asciistr>
        </digtinfo>
      </digform>
    </stdorder>
  </distinfo>
</metadata>

ISO 19110-2 mapping:
Of the new fields, only attributeReference is mapped to ISO 19110-2

<gfc:carrierOfCharacteristics>
  <gfc:FC_FeatureAttribute>
    <gfc:featureType></gfc:featureType>
    <gfc:constrainedBy></gfc:constrainedBy>
    <gfc:memberName></gfc:memberName>
    <gfc:definition></gfc:definition>
    <gfc:cardinality></gfc:cardinality>
    <gfc:definitionReference>
      <gfc:FC_DefinitionReference>
        <gfc:definitionSource>
          <gfc:FC_DefinitionSource>
            <gfc:source>
              <gmd:CI_Citation>
                <gmd:title></gmd:title>
                <gmd:date></gmd:date>
              </gmd:CI_Citation>
            </gfc:source>
          </gfc:FC_DefinitionSource>
        </gfc:definitionSource>
      </gfc:FC_DefinitionReference>
    </gfc:definitionReference>
    <gfc:code></gfc:code>
    <gfc:valueMeasurementUnit></gfc:valueMeasurementUnit>
    <gfc:valueType></gfc:valueType>
    <gfc:listedValue/>
    <gfc:listedValue/>
  </gfc:FC_FeatureAttribute>
</gfc:carrierOfCharacteristics>
@stansmith907 stansmith907 added the enhancement Improve or modify an existing feature label Oct 27, 2017
@jlblcc jlblcc added this to the 2.4.0 milestone Dec 22, 2017
@jlblcc
Copy link
Member

jlblcc commented Dec 22, 2017

Can we change timePeriodOfValues to a non-pluralized form? I think just timePeriod is probably good enough.

Can we change the name of rangeOfValues to valueRange, or something that is not pluralized?

@jlblcc
Copy link
Member

jlblcc commented Dec 27, 2017

Note, isCaseSensitive is not required in the JSON schema. I assume the translator will default this to false?

jlblcc added a commit that referenced this issue Dec 27, 2017
- Split entityAttribute into separate file
- Add definition for valueRange

Closes #168, #165.
@stansmith907
Copy link
Contributor Author

TRUE. It defaults to false.

jlblcc added a commit that referenced this issue Dec 27, 2017
- Split entityAttribute into separate file
- Add definition for valueRange

Closes #168, Closes #165.
@jlblcc jlblcc closed this as completed Dec 27, 2017
@stansmith907 stansmith907 reopened this Feb 13, 2018
@stansmith907
Copy link
Contributor Author

Removed element allowMany and moved it to entity.foreignKey as discussed in #84. Moved to new issue #184.

@jlblcc jlblcc modified the milestones: 2.4.0, 2.5.0 Apr 12, 2018
@stansmith907
Copy link
Contributor Author

Although most of this issue is implemented in 2.4.8, allowMany is not deprecated and mustBeUnique has not been implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve or modify an existing feature mdEditor mdEditor update needed
Projects
None yet
Development

No branches or pull requests

2 participants