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

[3.3] 1924 export associations as resource relationship #1933

Open
wants to merge 40 commits into
base: Development
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1f00e00
create DwcArchiverAssociation.php and implement mapping in setFieldAr…
Atticus29 Dec 3, 2024
b12ac39
finish implementing first version of classes/DwcArchiverAssociation.php
Atticus29 Dec 3, 2024
fa08ff9
silence association sql print
Atticus29 Dec 3, 2024
31843c8
add translations, include Resource Relationship extension checkbox, a…
Atticus29 Dec 3, 2024
1204989
fix minor bug
Atticus29 Dec 3, 2024
bc9520e
make association download work. Populate? No.
Atticus29 Dec 4, 2024
a356238
allow writeOutRecordBlock to handle the union required for two-way as…
Atticus29 Dec 4, 2024
4320a0a
add symbiota native columns to the export
Atticus29 Dec 4, 2024
0976003
make it so there is no data cutoff for xdebugger
Atticus29 Dec 10, 2024
8e8464f
fix bug where download was not working when association search was be…
Atticus29 Dec 10, 2024
50604f5
comment out associatedOccurrences
Atticus29 Dec 10, 2024
5db000b
remove appendSpecimenDuplicateAssociations, getAssociationJSON, and g…
Atticus29 Dec 10, 2024
20a3b08
remove some cruft and change some translations
Atticus29 Dec 10, 2024
439e119
fix bug where occurrence download was not respecting association cons…
Atticus29 Dec 10, 2024
ba6a9c4
fix bug where ->associationManager->getAssociatedRecords was being ru…
Atticus29 Dec 11, 2024
229be08
begin to implement the changes where omoccurassociations is joined to…
Atticus29 Dec 12, 2024
33ed860
association export mod
egbot Dec 12, 2024
44fc6f8
Merge pull request #1961 from BioKIC/associations-export-egbot
egbot Dec 18, 2024
77948ac
cherry pick copy changes and resolve merge conflicts
Atticus29 Jan 15, 2025
5015abf
resolve merge conflicts with Development
Atticus29 Jan 15, 2025
af00f35
add warning to users about uniqueness of occurrenceId over other iden…
Atticus29 Jan 15, 2025
894fa64
fix typo in recordID
Atticus29 Jan 15, 2025
572d440
add temporary columns to aid in troubleshooting
Atticus29 Jan 16, 2025
5bf4767
fix typos and minor bugs in collections/search/js/searchform.js
Atticus29 Jan 16, 2025
e8e2138
resolve merge conflicts with Development
Atticus29 Jan 16, 2025
61db6fa
fix bug where was not targeting the correct keys for DWC-formatted d…
Atticus29 Jan 17, 2025
9bcbfc6
rename DwcArchiverAssociation to DwcArchiverResourceRelationship
Atticus29 Jan 17, 2025
b50ad33
remove renamed class file
Atticus29 Jan 21, 2025
3b44f25
comment out appendSpecimenDuplicateAssociations call per ticket issue…
Atticus29 Jan 21, 2025
e3fdff9
remove no-longer-needed schema change
Atticus29 Jan 21, 2025
d7c609f
remove unnecessary TODO
Atticus29 Jan 21, 2025
5451d3c
get more things from the omoccurrences table. Fix bug in setSqlBase l…
Atticus29 Jan 22, 2025
8b2f361
add left join of the object omoccurrences entry to fetch relatedResou…
Atticus29 Jan 22, 2025
8c5128d
refine relatedResourceID and resourceRelationshipID
Atticus29 Jan 22, 2025
70076ea
make relatedResourceID refer to the object
Atticus29 Jan 22, 2025
de7712a
continue improvements to resourceRelationshipID and relatedResourceID
Atticus29 Jan 22, 2025
f266105
add missing translations
Atticus29 Jan 22, 2025
2f8bb6d
resolve merge conflicts
Atticus29 Jan 28, 2025
d961163
1924 pt2 external and observational occurrences (#2135)
Atticus29 Jan 29, 2025
7587072
resolve merge conflicts with Development
Atticus29 Feb 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
create DwcArchiverAssociation.php and implement mapping in setFieldAr…
…r method
Atticus29 committed Dec 3, 2024
commit 1f00e009e3bc0f53b346972bf3eedebf439522d1
47 changes: 47 additions & 0 deletions classes/DwcArchiverAssociation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
include_once($SERVER_ROOT . '/classes/DwcArchiverBaseManager.php');

class DwcArchiverAssociation extends DwcArchiverBaseManager{
public function __construct($connOverride){
parent::__construct('write', $connOverride);
}

public function __destruct(){
parent::__destruct();
}

public function initiateProcess($filePath){
$this->setFieldArr();
$this->setSqlBase();

$this->setFileHandler($filePath);
}

//Based on https://rs.gbif.org/extension/gbif/1.0/identifier.xml
private function setFieldArr(){
$columnArr = array();
$columnArr['coreid'] = 'occid';
$termArr['resourceRelationshipID'] = 'https://dwc.tdwg.org/terms/#dwc:resourceRelationshipID';
$columnArr['resourceRelationshipID'] = 'instanceID';
$termArr['resourceID'] = 'https://dwc.tdwg.org/terms/#dwc:resourceID';
$columnArr['resourceID'] = 'occurrenceID';
$termArr['relationshipOfResourceID'] = 'https://dwc.tdwg.org/terms/#dwc:relationshipOfResourceID';
$columnArr['relationshipOfResourceID'] = 'relationshipID';
$termArr['relatedResourceID'] = 'https://dwc.tdwg.org/terms/#dwc:relatedResourceID';
$columnArr['relatedResourceID'] = 'occidAssociate'; // @TODO make this also work resourceUrl or objectId.. what is the objectID alias about?
$termArr['relationshipOfResource'] = 'https://dwc.tdwg.org/terms/#dwc:relationshipOfResource';
$columnArr['relationshipOfResource'] = 'relationship';
$termArr['relationshipAccordingTo'] = 'https://dwc.tdwg.org/terms/#dwc:relationshipAccordingTo';
$columnArr['relationshipAccordingTo'] = 'accordingTo';
$termArr['relationshipEstablishedDate'] = 'https://dwc.tdwg.org/terms/#dwc:relationshipEstablishedDate';
$columnArr['relationshipEstablishedDate'] = 'establishedDate';
$termArr['relationshipRemarks'] = 'https://dwc.tdwg.org/terms/#dwc:relationshipRemarks';
$columnArr['relationshipRemarks'] = 'notes';

$this->fieldArr['terms'] = $this->trimBySchemaType($termArr);
$this->fieldArr['fields'] = $this->trimBySchemaType($columnArr);
}

}

?>