ipt icon indicating copy to clipboard operation
ipt copied to clipboard

When using a star schema it's not possible to edit the base mappings

Open auspex opened this issue 7 years ago • 1 comments

I have a dataset that consists of core Events and extension Occurrences. There are 17 fields mapped to the event, and 7 mapped to the occurrence. I can edit the mappings for the occurrence, but not the event.

Clicking on the Edit button for event results in a 302 (Redirect) response for the URL http://doi.sahfos.ac.uk/manage/mapping.do?r=ez-samples&id=http%3A%2F%2Frs.tdwg.org%2Fdwc%2Fterms%2FEvent&mid=0, while clicking on the edit button for the occurrence (http://doi.sahfos.ac.uk/manage/mapping.do?r=ez-samples&id=http%3A%2F%2Frs.tdwg.org%2Fdwc%2Fterms%2FOccurrence&mid=0) returns the mapping page.

In case this was an artifact of proxying the IPT server behind Apache, I tried using the direct link to http://doi.sahfos.ac.uk:8090,with the same result.

This is the actual request, as reported by Chrome: curl "http://doi.sahfos.ac.uk/manage/mapping.do?r=ez-samples^&id=http^%^3A^%^2F^%^2Frs.tdwg.org^%^2Fdwc^%^2Fterms^%^2FEvent^&mid=0" -H "DNT: 1" -H "Accept-Encoding: gzip, deflate" -H "Accept-Language: en-GB,en-US;q=0.9,en;q=0.8" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" -H "Referer: http://doi.sahfos.ac.uk/manage/resource.do?r=ez-samples" -H "Cookie: _ga=GA1.3.33458482.1487677692; JSESSIONID=756A00FF57C564C0131E3B3126C9C35E; CSRFtoken=8X4rChUTxD3MIy3IQ8nX1MJh7747WI8N" -H "Connection: keep-alive" --compressed

auspex avatar Jan 30 '18 10:01 auspex

The resource.xml file:

<resource>
  <coreType>SAMPLINGEVENT</coreType>
  <status>PUBLIC</status>
  <publicationMode>AUTO_PUBLISH_OFF</publicationMode>
  <citationAutoGenerated>true</citationAutoGenerated>
  <emlVersion>2.0</emlVersion>
  <replacedEmlVersion>1.3</replacedEmlVersion>
  <lastPublished>2018-01-26 14:40:43.815 UTC</lastPublished>
  <recordsPublished>70760</recordsPublished>
  <recordsByExtension>
    <entry>
      <string>http://rs.tdwg.org/dwc/terms/Event</string>
      <int>70760</int>
    </entry>
    <entry>
      <string>http://rs.tdwg.org/dwc/terms/Occurrence</string>
      <int>527545</int>
    </entry>
  </recordsByExtension>
  <organisation>09b17aee-d3fb-48ca-a30b-303d671a8155</organisation>
  <creator>[email protected]</creator>
  <created>2018-01-12 11:44:56.727 UTC</created>
  <modifier reference="../creator"/>
  <modified>2018-01-26 14:40:11.3 UTC</modified>
  <metadataModified>2018-01-12 12:48:58.469 UTC</metadataModified>
  <mappingsModified>2018-01-12 16:16:54.952 UTC</mappingsModified>
  <sourcesModified>2018-01-12 14:09:03.219 UTC</sourcesModified>
  <managers/>
  <sources>
    <sqlsource>
      <resource reference="../../.."/>
      <name>ez-sampledata</name>
      <encoding>UTF-8</encoding>
      <multiValueFieldsDelimitedBy></multiValueFieldsDelimitedBy>
      <dateFormat>YYYY-MM-DD</dateFormat>
      <columns>10</columns>
      <readable>true</readable>
      <sql>select * from canada_data.sample</sql>
      <rdbms>mssql</rdbms>
      <host>cprdatabase.mba.ac.uk</host>
      <database>cpr_prod</database>
      <username>dfo_user</username>
      <password>***</password>
    </sqlsource>
    <sqlsource>
      <resource reference="../../.."/>
      <name>ez-measurements</name>
      <encoding>UTF-8</encoding>
      <multiValueFieldsDelimitedBy></multiValueFieldsDelimitedBy>
      <dateFormat>YYYY-MM-DD</dateFormat>
      <columns>6</columns>
      <readable>true</readable>
      <sql>select * from canada_data.measurement</sql>
      <rdbms reference="../../sqlsource/rdbms"/>
      <host>cprdatabase.mba.ac.uk</host>
      <database>cpr_prod</database>
      <username>dfo_user</username>
      <password>***</password>
    </sqlsource>
  </sources>
  <mappings>
    <mapping>
      <source class="sqlsource" reference="../../../sources/sqlsource"/>
      <extension>http://rs.tdwg.org/dwc/terms/Event</extension>
      <fields class="sorted-set">
        <field>
          <index>10</index>
          <term>http://purl.org/dc/terms/modified</term>
          <type>string</type>
        </field>
        <field>
          <term>http://purl.org/dc/terms/rightsHolder</term>
          <defaultValue>Sir Alister Hardy Foundation for Ocean Science (SAHFOS)</defaultValue>
          <type>string</type>
        </field>
        <field>
          <term>http://purl.org/dc/terms/type</term>
          <defaultValue>Collection</defaultValue>
          <type>string</type>
        </field>
        <field>
          <term>http://rs.tdwg.org/dwc/terms/datasetID</term>
          <type>string</type>
        </field>
        <field>
          <term>http://rs.tdwg.org/dwc/terms/datasetName</term>
          <defaultValue>CPR</defaultValue>
          <type>string</type>
        </field>
        <field>
          <index>3</index>
          <term>http://rs.tdwg.org/dwc/terms/decimalLatitude</term>
          <type>string</type>
        </field>
        <field>
          <index>4</index>
          <term>http://rs.tdwg.org/dwc/terms/decimalLongitude</term>
          <type>string</type>
        </field>
        <field>
          <index>5</index>
          <term>http://rs.tdwg.org/dwc/terms/eventDate</term>
          <type>string</type>
        </field>
        <field>
          <index>0</index>
          <term>http://rs.tdwg.org/dwc/terms/eventID</term>
          <defaultValue></defaultValue>
          <type>string</type>
        </field>
        <field>
          <index>1</index>
          <term>http://rs.tdwg.org/dwc/terms/fieldNumber</term>
          <type>string</type>
        </field>
        <field>
          <term>http://rs.tdwg.org/dwc/terms/geodeticDatum</term>
          <defaultValue>EPSG:4326</defaultValue>
          <type>string</type>
        </field>
        <field>
          <term>http://rs.tdwg.org/dwc/terms/institutionCode</term>
          <defaultValue>SAHFOS</defaultValue>
          <type>string</type>
        </field>
        <field>
          <term>http://rs.tdwg.org/dwc/terms/institutionID</term>
          <defaultValue>http://seadatanet.maris2.nl/v_edmo/print.asp?n_code=50</defaultValue>
          <type>string</type>
        </field>
        <field>
          <term>http://rs.tdwg.org/dwc/terms/maximumDepthInMeters</term>
          <defaultValue>10</defaultValue>
          <type>string</type>
        </field>
        <field>
          <term>http://rs.tdwg.org/dwc/terms/minimumDepthInMeters</term>
          <defaultValue>5</defaultValue>
          <type>string</type>
        </field>
        <field>
          <term>http://rs.tdwg.org/dwc/terms/sampleSizeUnit</term>
          <defaultValue>cubic_metre</defaultValue>
          <type>string</type>
        </field>
        <field>
          <term>http://rs.tdwg.org/dwc/terms/sampleSizeValue</term>
          <defaultValue>3</defaultValue>
          <type>string</type>
        </field>
      </fields>
      <idColumn>0</idColumn>
      <idSuffix></idSuffix>
      <filter>
        <param></param>
        <filterTime>AfterTranslation</filterTime>
      </filter>
      <doiUsedForDatasetId>true</doiUsedForDatasetId>
      <lastModified reference="../../../mappingsModified"/>
    </mapping>
    <mapping>
      <source class="sqlsource" reference="../../../sources/sqlsource[2]"/>
      <extension>http://rs.tdwg.org/dwc/terms/Occurrence</extension>
      <fields class="sorted-set">
        <field>
          <term>http://rs.tdwg.org/dwc/terms/basisOfRecord</term>
          <defaultValue>HumanObservation</defaultValue>
          <type>string</type>
        </field>
        <field>
          <index>0</index>
          <term>http://rs.tdwg.org/dwc/terms/catalogNumber</term>
          <type>string</type>
        </field>
        <field>
          <term>http://rs.tdwg.org/dwc/terms/datasetID</term>
          <type>string</type>
        </field>
        <field>
          <index>1</index>
          <term>http://rs.tdwg.org/dwc/terms/eventID</term>
          <type>string</type>
        </field>
        <field>
          <index>5</index>
          <term>http://rs.tdwg.org/dwc/terms/individualCount</term>
          <type>string</type>
        </field>
        <field>
          <index>0</index>
          <term>http://rs.tdwg.org/dwc/terms/occurrenceID</term>
          <type>string</type>
        </field>
        <field>
          <index>2</index>
          <term>http://rs.tdwg.org/dwc/terms/taxonID</term>
          <type>string</type>
        </field>
      </fields>
      <idColumn>1</idColumn>
      <idSuffix></idSuffix>
      <filter>
        <param></param>
        <filterTime>AfterTranslation</filterTime>
      </filter>
      <doiUsedForDatasetId>true</doiUsedForDatasetId>
      <lastModified>2018-01-12 16:07:38.352 UTC</lastModified>
    </mapping>
  </mappings>
  <changeSummary>Publishing dataset</changeSummary>
  <versionHistory class="linked-list">
    <versionhistory>
      <doi>
        <prefix>10.7487</prefix>
        <suffix>2soemj</suffix>
      </doi>
      <version>2.0</version>
      <released>2018-01-26 14:40:46.994 UTC</released>
      <status>PUBLIC</status>
      <publicationStatus>PUBLIC</publicationStatus>
      <modifiedBy>[email protected]</modifiedBy>
      <changeSummary>Publishing dataset</changeSummary>
      <recordsPublished>70760</recordsPublished>
      <recordsByExtension reference="../../../recordsByExtension"/>
    </versionhistory>
    <versionhistory>
      <doi reference="../../versionhistory/doi"/>
      <version>1.3</version>
      <released>2018-01-26 14:31:42.396 UTC</released>
      <status>PUBLIC_PENDING_PUBLICATION</status>
      <publicationStatus>PRIVATE</publicationStatus>
      <modifiedBy reference="../../versionhistory/modifiedBy"/>
      <changeSummary>Really fix sample size</changeSummary>
      <recordsPublished>70760</recordsPublished>
      <recordsByExtension>
        <entry>
          <string>http://rs.tdwg.org/dwc/terms/Event</string>
          <int>70760</int>
        </entry>
        <entry>
          <string>http://rs.tdwg.org/dwc/terms/Occurrence</string>
          <int>527545</int>
        </entry>
      </recordsByExtension>
    </versionhistory>
    <versionhistory>
      <doi reference="../../versionhistory/doi"/>
      <version>1.2</version>
      <released>2018-01-26 14:20:21.844 UTC</released>
      <status>PUBLIC_PENDING_PUBLICATION</status>
      <publicationStatus>PRIVATE</publicationStatus>
      <modifiedBy reference="../../../creator"/>
      <changeSummary>Fix sample size</changeSummary>
      <recordsPublished>70760</recordsPublished>
      <recordsByExtension>
        <entry>
          <string>http://rs.tdwg.org/dwc/terms/Event</string>
          <int>70760</int>
        </entry>
        <entry>
          <string>http://rs.tdwg.org/dwc/terms/Occurrence</string>
          <int>527545</int>
        </entry>
      </recordsByExtension>
    </versionhistory>
    <versionhistory>
      <doi reference="../../versionhistory/doi"/>
      <version>1.1</version>
      <released>2018-01-12 16:18:51.704 UTC</released>
      <status>PUBLIC_PENDING_PUBLICATION</status>
      <publicationStatus>PRIVATE</publicationStatus>
      <modifiedBy reference="../../../creator"/>
      <recordsPublished>70760</recordsPublished>
      <recordsByExtension>
        <entry>
          <string>http://rs.tdwg.org/dwc/terms/Event</string>
          <int>70760</int>
        </entry>
        <entry>
          <string>http://rs.tdwg.org/dwc/terms/Occurrence</string>
          <int>527545</int>
        </entry>
      </recordsByExtension>
    </versionhistory>
    <versionhistory>
      <version>1.0</version>
      <released>2018-01-12 15:46:24.923 UTC</released>
      <status>UNRESERVED</status>
      <publicationStatus>PRIVATE</publicationStatus>
      <modifiedBy reference="../../../creator"/>
      <recordsPublished>70760</recordsPublished>
      <recordsByExtension>
        <entry>
          <string>http://rs.tdwg.org/dwc/terms/Event</string>
          <int>70760</int>
        </entry>
        <entry>
          <string>http://rs.tdwg.org/dwc/terms/Occurrence</string>
          <int>530673</int>
        </entry>
      </recordsByExtension>
    </versionhistory>
  </versionHistory>
  <identifierStatus>PUBLIC</identifierStatus>
  <doi reference="../versionHistory/versionhistory/doi"/>
  <doiOrganisationKey>09b17aee-d3fb-48ca-a30b-303d671a8155</doiOrganisationKey>
</resource>

auspex avatar Jan 30 '18 10:01 auspex

related https://github.com/gbif/ipt/issues/1812 https://github.com/gbif/ipt/issues/1815

mike-podolskiy90 avatar Nov 20 '22 19:11 mike-podolskiy90

Awesome. I'd completely forgotten this. And however I worked around it.

auspex avatar Nov 21 '22 12:11 auspex