-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb90e1c
commit 9f33ad0
Showing
16 changed files
with
318 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from typing import Any | ||
|
||
from .base import Base | ||
|
||
|
||
class CoordinatePrecision(Base): | ||
label = "dwc:coordinatePrecision" | ||
aliases = Base.case(label) | ||
|
||
@classmethod | ||
def reconcile( | ||
cls, traiter: dict[str, Any], other: dict[str, Any] | ||
) -> dict[str, str]: | ||
if o_val := cls.search(other, cls.aliases): | ||
return {cls.label: o_val} | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from typing import Any | ||
|
||
from .. import darwin_core as dwc | ||
from .base import Base | ||
|
||
|
||
class CoordinateUncertainty(Base): | ||
label = "dwc:coordinateUncertaintyInMeters" | ||
aliases = Base.case(label, "") | ||
|
||
@classmethod | ||
def reconcile( | ||
cls, traiter: dict[str, Any], other: dict[str, Any] | ||
) -> dict[str, str]: | ||
o_val = cls.search(other, cls.aliases) | ||
|
||
if isinstance(o_val, list): | ||
return {cls.label: dwc.SEP.join(o_val)} | ||
elif o_val: | ||
return {cls.label: o_val} | ||
elif t_val := traiter.get(cls.label): | ||
return {cls.label: t_val} | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from typing import Any | ||
|
||
from .base import Base | ||
|
||
|
||
class DecimalLatitude(Base): | ||
label = "dwc:decimalLatitude" | ||
aliases = Base.case(label, "dwc:latitude dwc:verbatimLatitude") | ||
|
||
@classmethod | ||
def reconcile( | ||
cls, traiter: dict[str, Any], other: dict[str, Any] | ||
) -> dict[str, str]: | ||
if o_val := cls.search(other, cls.aliases): | ||
return {cls.label: o_val} | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from typing import Any | ||
|
||
from .base import Base | ||
|
||
|
||
class DecimalLongitude(Base): | ||
label = "dwc:decimalLongitude" | ||
aliases = Base.case(label, "dwc:longitude dwc:verbatimLongitude") | ||
|
||
@classmethod | ||
def reconcile( | ||
cls, traiter: dict[str, Any], other: dict[str, Any] | ||
) -> dict[str, str]: | ||
if o_val := cls.search(other, cls.aliases): | ||
return {cls.label: o_val} | ||
return {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from typing import Any | ||
|
||
from .base import Base | ||
|
||
|
||
class GeodeticDatum(Base): | ||
label = "dwc:geodeticDatum" | ||
aliases = Base.case(label, "datum") | ||
|
||
@classmethod | ||
def reconcile( | ||
cls, traiter: dict[str, Any], other: dict[str, Any] | ||
) -> dict[str, str]: | ||
if o_val := cls.search(other, cls.aliases): | ||
return {cls.label: o_val} | ||
elif t_val := traiter.get(cls.label): | ||
return {cls.label: t_val} | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.