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
Prev Previous commit
Next Next commit
remove some cruft and change some translations
Atticus29 committed Dec 10, 2024
commit 20a3b08cc146a4ca8903f613a953f58fd17b9a0e
6 changes: 1 addition & 5 deletions classes/DwcArchiverCore.php
Original file line number Diff line number Diff line change
@@ -274,7 +274,7 @@ public function addCondition($field, $cond, $value = ''){
}

private function applyConditions(){
if($this->conditionSql) return true; // @TODO maybe here is different?
if($this->conditionSql) return true;
if ($this->customWhereSql) {
$this->conditionSql = trim($this->customWhereSql) . ' ';
}
@@ -2342,7 +2342,6 @@ public function hasAssociations($collid = false){
$sql = "(SELECT o.occid FROM omoccurrences o INNER JOIN omoccurassociations a ON o.occid = a.occid WHERE o.collid = ?) UNION (SELECT o.occid FROM omoccurrences o INNER JOIN omoccurassociations a ON o.occid = a.occidAssociate WHERE o.collid = ?) LIMIT 1;";
}
$stmt = $this->conn->stmt_init();
// $stmt->prepare($sql); // @TODO clean up
if (!$stmt->prepare($sql)) {
throw new Exception("SQL Error: " . $stmt->error);
}
@@ -2351,15 +2350,12 @@ public function hasAssociations($collid = false){
}
$stmt->execute();
$result = $stmt->get_result();
// $rs = $this->conn->query($sql);
// if ($rs->num_rows) $bool = true;
if ($result && $result->num_rows > 0) {
$bool = true;
}
$result->free();
$stmt->close();

// $rs->free();
return $bool;
}

2 changes: 1 addition & 1 deletion content/lang/collections/datasets/datapublisher.en.php
Original file line number Diff line number Diff line change
@@ -99,5 +99,5 @@
$LANG['NO_PUBLISHABLE'] = 'There are no publishable collections';
$LANG['ADDIT_SOURCES'] = 'Additional Data Sources within the Portal Network';
$LANG['EDIT'] = 'Edit';
$LANG['INCLUDE_ASSOCIATIONS'] = 'Include Associated Records';
$LANG['INCLUDE_ASSOCIATIONS'] = 'Include Resource Relationships (associations & linked resources)';
?>
2 changes: 1 addition & 1 deletion content/lang/collections/datasets/datapublisher.es.php
Original file line number Diff line number Diff line change
@@ -99,6 +99,6 @@
$LANG['NO_PUBLISHABLE'] = 'No existen colecciones publicables';
$LANG['ADDIT_SOURCES'] = 'Fuentes Adicionales de Datos en la Red del Portal';
$LANG['EDIT'] = 'Editar';
$LANG['INCLUDE_ASSOCIATIONS'] = 'Incluir Registros Asociados';
$LANG['INCLUDE_ASSOCIATIONS'] = 'Incluir Relaciones de Recursos (asociaciones y recursos vinculados)';

?>
2 changes: 1 addition & 1 deletion content/lang/collections/datasets/datapublisher.fr.php
Original file line number Diff line number Diff line change
@@ -99,6 +99,6 @@
$LANG['NO_PUBLISHABLE'] = "Il n'y a pas de collections publiables";
$LANG['ADDIT_SOURCES'] = "Sources de données supplémentaires au sein du Réseau de Portails";
$LANG['EDIT'] = 'Modifier';
$LANG['INCLUDE_ASSOCIATIONS'] = 'Inclure les Enregistrements Associés';
$LANG['INCLUDE_ASSOCIATIONS'] = 'Inclure les Relations entre Ressources (associations et ressources liées)';

?>
2 changes: 1 addition & 1 deletion content/lang/collections/download/index.en.php
Original file line number Diff line number Diff line change
@@ -46,6 +46,6 @@
$LANG['COMPRESSED_ZIP'] = 'Compressed ZIP file';
$LANG['DOWNLOAD_DATA'] = 'Download Data';
$LANG['LIMIT_NOTE'] = '* There is a 1,000,000 record limit to occurrence downloads';
$LANG['INCLUDE_ASSOCIATIONS'] = 'include Associated Records';
$LANG['INCLUDE_ASSOCIATIONS'] = 'include Resource Relationships (associations & linked resources)';

?>
2 changes: 1 addition & 1 deletion content/lang/collections/download/index.es.php
Original file line number Diff line number Diff line change
@@ -46,6 +46,6 @@
$LANG['COMPRESSED_ZIP'] = 'Archivo ZIP comprimido';
$LANG['DOWNLOAD_DATA'] = 'Descargar datos';
$LANG['LIMIT_NOTE'] = '* Hay un límite de 1.000.000 de registros para descargas de ocurrencias';
$LANG['INCLUDE_ASSOCIATIONS'] = 'incluir Registros Asociados';
$LANG['INCLUDE_ASSOCIATIONS'] = 'incluir Relaciones de Recursos (asociaciones y recursos vinculados)';

?>
2 changes: 1 addition & 1 deletion content/lang/collections/download/index.fr.php
Original file line number Diff line number Diff line change
@@ -46,6 +46,6 @@
$LANG['COMPRESSED_ZIP'] = 'Fichier ZIP compressé';
$LANG['DOWNLOAD_DATA'] = 'Télécharger les données';
$LANG['LIMIT_NOTE'] = '* Il existe une limite de 1 000 000 d\'enregistrements pour les téléchargements d\'occurrences';
$LANG['INCLUDE_ASSOCIATIONS'] = 'inclure les Enregistrements Associés';
$LANG['INCLUDE_ASSOCIATIONS'] = 'inclure les Relations entre Ressources (associations et ressources liées)';

?>
2 changes: 1 addition & 1 deletion content/lang/collections/specprocessor/exporter.en.php
Original file line number Diff line number Diff line change
@@ -74,6 +74,6 @@
$LANG['INCLUDE_ATTRIBUTES'] = 'include Occurrence Trait Attributes (MeasurementOrFact extension)';
$LANG['OUTPUT_COMPRESSED'] = 'Output must be a compressed archive';
$LANG['ACCESS_DENIED'] = 'Access denied';
$LANG['INCLUDE_ASSOCIATIONS'] = 'include Associated Records';
$LANG['INCLUDE_ASSOCIATIONS'] = 'include Resource Relationships (associations & linked resources)';

?>
2 changes: 1 addition & 1 deletion content/lang/collections/specprocessor/exporter.es.php
Original file line number Diff line number Diff line change
@@ -76,6 +76,6 @@
$LANG['INCLUDE_ATTRIBUTES'] = 'incluir Atributos de Características de Ocurrencia (extensión MeasurementOrFact)';
$LANG['OUTPUT_COMPRESSED'] = 'El archivo generado debe ser comprimido';
$LANG['ACCESS_DENIED'] = 'Acceso denegado';
$LANG['INCLUDE_ASSOCIATIONS'] = 'incluir Registros Asociados';
$LANG['INCLUDE_ASSOCIATIONS'] = 'incluir Relaciones de Recursos (asociaciones y recursos vinculados)';

?>
2 changes: 1 addition & 1 deletion content/lang/collections/specprocessor/exporter.fr.php
Original file line number Diff line number Diff line change
@@ -74,6 +74,6 @@
$LANG['INCLUDE_ATTRIBUTES'] = 'inclure Attributs de Trait d\'Occurrence (extension MeasurementOrFact)';
$LANG['OUTPUT_COMPRESSED'] = 'Sortie doit être une archive compressée';
$LANG['ACCESS_DENIED'] = 'Accès refusé';
$LANG['INCLUDE_ASSOCIATIONS'] = 'inclure les Enregistrements Associés';
$LANG['INCLUDE_ASSOCIATIONS'] = 'inclure les Relations entre Ressources (associations et ressources liées)';

?>