Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Propuesta

Lo que se desea tener es una manera de poder conectar servicios a la información generada en CONABIO para esto proponemos generar un servicio de consulta que exponga la información que queremos. En esta implementación base consideramos que nuestros conjuntos de datos están relacionados y que cada uno de ellos es en algún sentido información atómica, esto es que cualquier proyección de la misma carece de relevancia.

Hay diversas maneras de generar este servicio de consulta, por ejemplo HATEOAS o GraphQL. Ambas maneras se encargan de proveer especificaciones para exponer y enlazar la información como nosotros buscamos hacerlo. En esta propuesta usaremos GraphQL, para esto definiremos el esquema de nuestros distintos tipos de datos para que sean implementados en el schema de GraphQL. Esta descripción de los datos puede ser consultada en los anexos Tipos de datos primitivos y Tipos de datos CONABIO.

Además de un bosquejo del esquema incial también se tomo la decisión de hacer la resolución de las consultas al servicio por medio de acceso compuesto, una breve discusión al respecto se puede leer en Resolución de búsquedas en GraphQL. Partiendo los distintos servicios conforme a nuestra propuesta de nodos de información.

Anexos

Consideraciones técnicas

Anchor
resolucionBusquedas
resolucionBusquedas
Resolución de búsquedas en GraphQL

Se pueden identificar tres distintas maneras de proceder en la resolución de las búsquedas en GraphQL: mediante un API REST, accesando directamente a la información via la base de datos y un acceso compuesto.

Resolver las consultas usando un API REST es muy útil si se tiene los servicios ya generados para desplegar los datos, aunque esto implica mantener dos aplicaciones, el API REST y la capa de GraphQL. Una gran ventaja de implementar las consultas de esta manera es que los servicios REST pueden ser microservicios y con esto se podrían segmentar los responsables de los mismos.

Si en cambio se usa el desarrollo de la intefaz de búsqueda se hace sobre las bases de datos en donde se encuentra la información se tendrá que definir y matener un esquema el cual agrupe toda las caracteríticas de los distintos tipos de información que se quiera publicar. Claro que el rendimiento de la aplicación será el óptimos pero se vuelve complicado la separación de responsabilidades.

El acceso compuesto lo que significa es el de unir pequeños desarrollos en GraphQL, esto al igual que el acceso por REST implica la posibilidad de tener responsables de pequeños desarrollos. A diferencia de la implementación con REST la resolución de las consultas son delegadas a los pequeños desarrollos y no tienen que se implementadas en el desarrollo principal. Lo único que se desarrolla en la aplicación principal son las uniones de los distintos esquemas.

Anchor
tiposDatosPri
tiposDatosPri
Tipos de datos primitivos

GeometryType

PointType

TemporalType

DCMI Period Encoding Scheme: specification of the limits of a time interval, and methods for encoding this in a text string.

CampoDescripciónURLTipo
nameA name for the time interval
String
startThe instant corresponding to the commencement of the time interval.
DateType
endThe instant corresponding to the termination of the time interval
DateType


UserType

CampoDescripciónURLTipo
loginNombre acceso del usuario
String
nameEl nombre completo del usuario
String
departmentNombre del departamento del usuario
String
emailCorreo electrónico de contacto
String
phoneNúmero telefónico de contacto
String
datasetsConjuntos de datos de los cuales es responsable
[DatasetType]


BoxEncodingType

DCMI Box Encoding Scheme: specification of the spatial limits of a place, and methods for encoding this in a text string.

CampoDescripciónURLTipo
nameA name for the place
String
northlimitThe constant coordinate for the nothernmost face or edge
Float
eastlimitThe constant coordinate for the easternmost face or edge
Float
southlimitThe constant coordinate for the southernmost face or edge
Float
westlimitThe constant coordinate for the westernmost face or edge
Float


Anchor
tiposDatosCONA
tiposDatosCONA
Tipos de datos CONABIO

Taxonómico (TaxonType)

CampoDescripciónURLTipo
modifiedThe most recent date-time on which the resource was changed.http://purl.org/dc/terms/
modif ied
modifiedDateType
taxonIDAn identifier for the set of taxon information (data associated with the Taxon class). May be a global unique identifier or an identifier specific to the data set.http://rs.tdwg.org/dwc/terms/t axonIDID
acceptedNameUsa geIDAn identifier for the name usage (documented meaning of the name according to a source) of the currently valid (zoological) or accepted (botanical) taxon.http://rs.tdwg.org/dwc/terms/a cceptedNameUsag eIDTaxonType
parentNameUsage IDAn identifier for the name usage (documented meaning of the name according to a source) of the direct, most proximate higher-rank parent taxon (in a classification) of the most specific element of the scientificName.http://rs.tdwg.org/dwc/terms/p arentNameUsageI DTaxonType
scientificNameThe full scientific name, with authorship and date information if known. When forming part of an Identification, this should be the name in lowest level taxonomic rank that can be determined. This term should not contain identification qualifications, which should instead be supplied in the IdentificationQ ualifier term.http://rs.tdwg.org/dwc/terms/
s cientificName
scientificNameString
nameAccordingToThe reference to the source in which the specific taxon concept circumscription is defined or implied - traditionally signified by the Latin "sensu" or "sec." (from secundum, meaning "according to"). For taxa that result from identifications , a reference to the keys, monographs, experts and other sources should be given.http://rs.tdwg.org/dwc/terms/
n ameAccordingTo
nameAccordingToString
namePublishedInA reference for the publication in which the scientificName was originally established under the rules of the associated nomenclaturalCo de.http://rs.tdwg.org/dwc/terms/
n amePublishedIn
namePublishedInString
namePublishedIn YearThe four-digit year in which the scientificName was published.http://rs.tdwg.org/dwc/terms/
n amePublishedInY
namePublishedInY earInt
taxonRankThe taxonomic rank of the most specific name in the scientificName.http://rs.tdwg.org/dwc/terms/
t axonRank
taxonRankEnum
scientificNameA uthorshipThe authorship information for the scientificName formatted according to the conventions of the applicable nomenclaturalCo de.http://rs.tdwg.org/dwc/terms/
s cientificNameAu
scientificNameAu thorshipString
taxonomicStatusThe status of the use of the scientificName as a label for a taxon. Requires taxonomic opinion to define the scope of a taxon. Rules of priority then are used to define the taxonomic status of the nomenclature contained in that scope, combined with the experts opinion. It must be linked to a specific taxonomic reference that defines the concept.http://rs.tdwg.org/dwc/terms/
t axonomicStatus
taxonomicStatusEnum


Individuos (OccurrenceType)

CampoDescripciónURLTipo
modifiedThe most recent date-time on which the resource was changed.http://purl.org/dc/terms/
modif ied
modifiedDateType
licenseA legal document giving official permission to do something with the resource.http://purl.org/dc/terms/
licen se
licenseString
rightsHolderA person or organization owning or managing rights over the resource.http://purl.org/dc/terms/
right sHolder
rightsHolderString
bibliographicCi tationA bibliographic reference for the resource as a statement indicating how this record should be cited (attributed) when used.http://purl.org/dc/terms/
bibli ographicCitatio
bibliographicCitatio nString
referencesA related resource that is referenced, cited, or otherwise pointed to by the described resource.http://purl.org/dc/terms/
refer ences
referencesString
collectionIDAn identifier for the collection or dataset from which the record was derived.http://rs.tdwg.org/dwc/terms/
c ollectionID
collectionIDString
institutionCodeThe name (or acronym) in use by the institution having custody of the object(s) or information referred to in the record.http://rs.tdwg.org/dwc/terms/
i nstitutionCode
institutionCodeString
collectionCodeThe name, acronym, coden, or initialism identifying the collection or data set from which the record was derived.http://rs.tdwg.org/dwc/terms/
c ollectionCode
collectionCodeString
basisOfRecordThe specific nature of the data record.http://rs.tdwg.org/dwc/terms/
b asisOfRecord
basisOfRecordEnum
occurrenceIDAn identifier for the Occurrence (as opposed to a particular digital record of the occurrence). In the absence of a persistent global unique identifier, construct one from a combination of identifiers in the record that will most closely make the occurrenceID globally unique.http://rs.tdwg.org/dwc/terms/
o ccurrenceID
occurrenceIDID
recordedByA list (concatenated and separated) of names of people, groups, or organizations responsible for recording the original Occurrence. The primary collector or observer, especially one who applies a personal identifier (recordNumber), should be listed first.http://rs.tdwg.org/dwc/terms/
r ecordedBy
recordedByString
sexThe sex of the biological individual(s) represented in the Occurrence.http://rs.tdwg.org/dwc/terms/
s ex
sexString
lifeStageThe age class or life stage of the biological individual(s) at the time the Occurrence was recorded.http://rs.tdwg.org/dwc/terms/
l ifeStage
lifeStageString
occurrenceRemar ksComments or notes about the Occurrence.http://rs.tdwg.org/dwc/terms/
o ccurrenceRemark s
occurrenceRemarksString
eventDateThe date-time or interval during which an Event occurred. For occurrences, this is the date-time when the event was recorded. Not suitable for a time in a geological context.http://rs.tdwg.org/dwc/terms/
e ventDate
eventDateDateType
yearThe four-digit year in which the Event occurred, according to the Common Era Calendar.http://rs.tdwg.org/dwc/terms/
y ear
yearInt
monthThe ordinal month in which the Event occurred.http://rs.tdwg.org/dwc/terms/
m onth
monthInt
dayThe integer day of the month on which the Event occurred.http://rs.tdwg.org/dwc/terms/
d ay
dayInt
habitatA category or description of the habitat in which the Event occurred.http://rs.tdwg.org/dwc/terms/
h abitat
habitatString
higherGeographyA list (concatenated and separated) of geographic names less specific than the information captured in the locality term.http://rs.tdwg.org/dwc/terms/
h igherGeography
higherGeographyString
countryThe name of the country or major administrative unit in which the Location occurs.http://rs.tdwg.org/dwc/terms/
c ountry
countryString
countryCodeThe standard code for the country in which the Location occurs.http://rs.tdwg.org/dwc/terms/
c ountryCode
countryCodeString
stateProvinceThe name of the next smaller administrative region than country (state, province, canton, department, region, etc.) in which the Location occurs.http://rs.tdwg.org/dwc/terms/
s tateProvince
stateProvinceString
countyThe full, unabbreviated name of the next smaller administrative region than stateProvince (county, shire, department, etc.) in which the Location occurs.http://rs.tdwg.org/dwc/terms/
c ounty
countyString
municipalityThe full, unabbreviated name of the next smaller administrative region than county (city, municipality, etc.) in which the Location occurs. Do not use this term for a nearby named place that does not contain the actual location.http://rs.tdwg.org/dwc/terms/
m unicipality
municipalityString
localityThe specific description of the place. Less specific geographic information can be provided in other geographic terms (higherGeograph y, continent, country, stateProvince, county, municipality, waterBody, island, islandGroup). This term may contain information modified from the original to correct perceived errors or standardize the description.http://rs.tdwg.org/dwc/terms/
l ocality
localityString
verbatimLocalit yThe original textual description of the place.http://rs.tdwg.org/dwc/terms/v erbatimLocalityString
minimumElevatio nInMetersThe lower limit of the range of elevation (altitude, usually above sea level), in meters.http://rs.tdwg.org/dwc/terms/
m inimumElevation
minimumElevation InMetersInt
maximumElevatio nInMetersThe upper limit of the range of elevation (altitude, usually above sea level), in meters.http://rs.tdwg.org/dwc/terms/
m aximumElevation
maximumElevation InMetersInt
minimumDepthInM etersThe lesser depth of a range of depth below the local surface, in meters.http://rs.tdwg.org/dwc/terms/
m inimumDepthInMe
minimumDepthInMe tersInt
maximumDepthInM etersThe greater depth of a range of depth below the local surface, in meters.http://rs.tdwg.org/dwc/terms/
m aximumDepthInMe
maximumDepthInMe tersInt
decimalLatitudeThe geographic latitude (in decimal degrees, using the spatial reference system given in geodeticDatum) of the geographic center of a Location. Positive values are north of the Equator, negative values are south of it. Legal values lie between -90 and 90, inclusive.http://rs.tdwg.org/dwc/terms/
d ecimalLatitude
decimalLatitudeFloat
decimalLongitud eThe geographic longitude (in decimal degrees, using the spatial reference system given in geodeticDatum) of the geographic center of a Location. Positive values are east of the Greenwich Meridian, negative values are west of it. Legal values lie between -180 and 180, inclusive.http://rs.tdwg.org/dwc/terms/
d ecimalLongitude
decimalLongitudeFloat
geodeticDatumThe ellipsoid, geodetic datum, or spatial reference system (SRS) upon which the geographic coordinates given in decimalLatitude and decimalLongitud e as based.http://rs.tdwg.org/dwc/terms/
g eodeticDatum
geodeticDatumFloat
coordinateUncer taintyInMetersThe horizontal distance (in meters) from the given decimalLatitude and decimalLongitud e describing the smallest circle containing the whole of the Location. Leave the value empty if the uncertainty is unknown, cannot be estimated, or is not applicable (because there are no coordinates). Zero is not a valid value for this term.http://rs.tdwg.org/dwc/terms/
c oordinateUncert aintyInMeters
coordinateUncertaintyInMetersInt
coordinatePreci sionA decimal representation of the precision of the coordinates given in the decimalLatitude and decimalLongitud e.http://rs.tdwg.org/dwc/terms/
c oordinatePrecis ion
coordinatePrecisionFloat
identifiedByA list (concatenated and separated) of names of people, groups, or organizations who assigned the Taxon to the subject.http://rs.tdwg.org/dwc/terms/
i dentifiedBy
identifiedByString
dateIdentifiedThe date on which the subject was identified as representing the Taxon.http://rs.tdwg.org/dwc/terms/
d ateIdentified
dateIdentifiedDateType
taxonIDAn identifier for the set of taxon information (data associated with the Taxon class). May be a global unique identifier or an identifier specific to the data set.http://rs.tdwg.org/dwc/terms/
t axonID
taxonIDID
scientificNameI DAn identifier for the nomenclatural (not taxonomic) details of a scientific name.http://rs.tdwg.org/dwc/terms/
s cientificNameID
scientificNameIDTaxonType
scientificNameThe full scientific name, with authorship and date information if known. When forming part of an Identification, this should be the name in lowest level taxonomic rank that can be determined. This term should not contain identification qualifications, which should instead be supplied in the IdentificationQ ualifier term.http://rs.tdwg.org/dwc/terms/
s cientificName
scientificNameString
acceptedNameUsa geThe full name, with authorship and date information if known, of the currently valid (zoological) or accepted (botanical) taxon.http://rs.tdwg.org/dwc/terms/
a cceptedNameUsag
acceptedNameUsag eString
kingdomThe full scientific name of the kingdom in which the taxon is classified.http://rs.tdwg.org/dwc/terms/
k ingdom
kingdomString
phylumThe full scientific name of the phylum or division in which the taxon is classified.http://rs.tdwg.org/dwc/terms/
p hylum
phylumString
classThe full scientific name of the class in which the taxon is classified.http://rs.tdwg.org/dwc/terms/
c lass
classString
orderThe full scientific name of the order in which the taxon is classified.http://rs.tdwg.org/dwc/terms/
o rder
orderString
familyThe full scientific name of the family in which the taxon is classified.http://rs.tdwg.org/dwc/terms/
f amily
familyString
genusThe full scientific name of the genus in which the taxon is classified.http://rs.tdwg.org/dwc/terms/
g enus
genusString
subgenusThe full scientific name of the subgenus in which the taxon is classified. Values should include the genus to avoid homonym confusion.http://rs.tdwg.org/dwc/terms/
s ubgenus
subgenusString
specificEpithetThe name of the first or species epithet of the scientificName.http://rs.tdwg.org/dwc/terms/
s pecificEpithet
specificEpithetString
infraspecificEp ithet
infraspecificEpithetThe name of the lowest or terminal infraspecific epithet of the scientificName, excluding any rank designation.http://rs.tdwg.org/dwc/terms/
i nfraspecificEpi
infraspecificEpi thetString
taxonRankThe taxonomic rank of the most specific name in the scientificName.http://rs.tdwg.org/dwc/terms/
t axonRank
taxonRankEnum
taxonomicStatusThe status of the use of the scientificName as a label for a taxon. Requires taxonomic opinion to define the scope of a taxon. Rules of priority then are used to define the taxonomic status of the nomenclature contained in that scope, combined with the experts opinion. It must be linked to a specific taxonomic reference that defines the concept.http://rs.tdwg.org/dwc/terms/
t axonomicStatus
taxonomicStatusEnum


Dataset (DatasetType)

CampoDescripciónURLTipo
idA property reserved for globally unique identifiers.
ID
titlea title or label for the resource.
String
descriptionA description for the resource. Markdown formated
String
person_in_charg e

UserType
licenses

Enum
pathThe location of resource data.
URL
temporalTemporal characteristics of the resource datahttp://purl.org /dc/terms/tempo ralTemporalType
spatialSpatial characteristics of the resource data.http://purl.org /dc/terms/spati alBoxEncodingType
keywordsAn Array of string keywords to assist users searching for the package in catalogs.
[String]