diff --git a/src/main/java/br/gov/sibbr/api/controller/InterfaceController.java b/src/main/java/br/gov/sibbr/api/controller/InterfaceController.java index acbabda..78ed1d5 100644 --- a/src/main/java/br/gov/sibbr/api/controller/InterfaceController.java +++ b/src/main/java/br/gov/sibbr/api/controller/InterfaceController.java @@ -61,7 +61,7 @@ public String login(LoginForm loginForm, Model model) { } // Method responsible for managing occurrence requests - @RequestMapping(value = "/register", method = RequestMethod.POST) + @RequestMapping(value = "/registrar", method = RequestMethod.POST) public String register(LoginForm loginForm, Model model) { String email = loginForm.getEmail(); String password = loginForm.getPassword(); @@ -99,17 +99,17 @@ public String register(LoginForm loginForm, Model model) { return "register"; } - // Method responsible for managing admin password change - @RequestMapping(value = "/admin/changePassword", method = RequestMethod.POST) - public String adminChangePassword(LoginForm loginForm, Model model) { + // Method responsible for managing user password changes + @RequestMapping(value = "/alterarSenha", method = RequestMethod.POST) + public String changePassword(LoginForm loginForm, Model model) { String token = loginForm.getToken(); String password = loginForm.getPassword(); String passwordCheck = loginForm.getPasswordCheck(); if (password != null && passwordCheck != null) { if (token != null) { // Check if token is valid for admin: - String tokenCheck = authService.checkTokenAdmin(token); - // Token is valid for user admin, authorize operation to continue: + String tokenCheck = authService.checkToken(token); + // Token is valid for user, authorize operation to continue: if (tokenCheck == null) { // Check if both passwords are equal: if (password.equalsIgnoreCase(passwordCheck)) { @@ -143,20 +143,14 @@ public String adminChangePassword(LoginForm loginForm, Model model) { model.addAttribute("error", "You must provide a valid password and repeat it on the Veirification field. Please, try again."); } - return "admin_password_change"; + return "password_change"; } - + /* GET methods */ // Method responsible for calling the documentation on admin operations - @RequestMapping(value = "/admin/", method = RequestMethod.GET) - public String admin(@RequestParam(value = "token", defaultValue = "null") String token, Model model) { - String message = authService.checkTokenAdmin(token); - // Something went wrong. Display error message. - if (message != null) { - model.addAttribute("error", message); - } - // Proper admin identification, display + @RequestMapping(value = "/admin", method = RequestMethod.GET) + public String admin() { return "admin"; } @@ -166,6 +160,12 @@ public String greeting(Model model) { return "index"; } + // Method responsible for calling the login template + @RequestMapping(value = "/ocorrencia", method = RequestMethod.GET) + public String occurrences() { + return "occurrences"; + } + // Method responsible for calling the login template @RequestMapping(value = "/login", method = RequestMethod.GET) public String login() { @@ -173,19 +173,19 @@ public String login() { } // Method responsible for calling the user registration template - @RequestMapping(value = "/register", method = RequestMethod.GET) + @RequestMapping(value = "/registrar", method = RequestMethod.GET) public String register() { return "register"; } - // Method responsible for calling the admin password change template - @RequestMapping(value = "/admin/changePassword", method = RequestMethod.GET) - public String adminPasswordChange() { - return "admin_password_change"; + // Method responsible for calling the user password change template + @RequestMapping(value = "/alterarSenha", method = RequestMethod.GET) + public String changePassword() { + return "password_change"; } // Method responsible for displaying statistics documentation - @RequestMapping(value = "/stats", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas", method = RequestMethod.GET) public String stats() { return "stats"; } diff --git a/src/main/java/br/gov/sibbr/api/controller/StatisticsController.java b/src/main/java/br/gov/sibbr/api/controller/StatisticsController.java index fdffd87..1552b13 100644 --- a/src/main/java/br/gov/sibbr/api/controller/StatisticsController.java +++ b/src/main/java/br/gov/sibbr/api/controller/StatisticsController.java @@ -39,7 +39,7 @@ public class StatisticsController { AuthService authService = new AuthService(); // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalRegistros", method = RequestMethod.GET) + @RequestMapping(value = "/statisticas/totalRegistros", method = RequestMethod.GET) @Cacheable("total_records") public Object fetchTotalRecords(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token @@ -52,7 +52,7 @@ public Object fetchTotalRecords(@RequestParam(value = "token", defaultValue = "n } // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalRegistrosGeorreferenciados", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas/totalRegistrosGeorreferenciados", method = RequestMethod.GET) @Cacheable("total_geo_records") public Object fetchTotalGeoRecords(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token @@ -65,7 +65,7 @@ public Object fetchTotalGeoRecords(@RequestParam(value = "token", defaultValue = } // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalRegistrosRepatriados", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas/totalRegistrosRepatriados", method = RequestMethod.GET) @Cacheable("total_repatriados") public Object fetchTotalRepatriatedRecords(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token @@ -78,7 +78,7 @@ public Object fetchTotalRepatriatedRecords(@RequestParam(value = "token", defaul } // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalPublicadores", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas/totalPublicadores", method = RequestMethod.GET) public Object fetchTotalPublishers(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token String tokenCheck = authService.checkToken(token); @@ -90,7 +90,7 @@ public Object fetchTotalPublishers(@RequestParam(value = "token", defaultValue = } // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalRecursos", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas/totalRecursos", method = RequestMethod.GET) public Object fetchTotalResources(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token String tokenCheck = authService.checkToken(token); @@ -102,7 +102,7 @@ public Object fetchTotalResources(@RequestParam(value = "token", defaultValue = } // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalEspecies", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas/totalEspecies", method = RequestMethod.GET) @Cacheable("total_species") public Object fetchTotalSpecies(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token @@ -115,7 +115,7 @@ public Object fetchTotalSpecies(@RequestParam(value = "token", defaultValue = "n } // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalFilo", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas/totalFilo", method = RequestMethod.GET) @Cacheable("total_phylum") public Object fetchTotalPhylum(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token @@ -128,7 +128,7 @@ public Object fetchTotalPhylum(@RequestParam(value = "token", defaultValue = "nu } // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalClasse", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas/totalClasse", method = RequestMethod.GET) @Cacheable("total_class") public Object fetchTotalClass(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token @@ -141,7 +141,7 @@ public Object fetchTotalClass(@RequestParam(value = "token", defaultValue = "nul } // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalOrdem", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas/totalOrdem", method = RequestMethod.GET) @Cacheable("total_order") public Object fetchTotalOrder(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token @@ -154,7 +154,7 @@ public Object fetchTotalOrder(@RequestParam(value = "token", defaultValue = "nul } // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalGenero", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas/totalGenero", method = RequestMethod.GET) @Cacheable("total_genus") public Object fetchTotalGenus(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token @@ -167,7 +167,7 @@ public Object fetchTotalGenus(@RequestParam(value = "token", defaultValue = "nul } // Method responsible for managing occurrence requests - @RequestMapping(value = "/stats/totalFamilia", method = RequestMethod.GET) + @RequestMapping(value = "/estatisticas/totalFamilia", method = RequestMethod.GET) @Cacheable("total_family") public Object fetchTotalFamily(@RequestParam(value = "token", defaultValue = "null") String token) { // Check of the user has proper access grant token diff --git a/src/main/resources/static/stylesheets/style.css b/src/main/resources/static/stylesheets/style.css new file mode 100644 index 0000000..03ff818 --- /dev/null +++ b/src/main/resources/static/stylesheets/style.css @@ -0,0 +1,106 @@ +@charset "UTF-8"; +/* HTML5 ✰ Boilerplate + * + * What follows is the result of much research on cross-browser styling. + * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, + * Kroc Camen, and the H5BP dev community and team. + * + * Detailed information about this CSS: h5bp.com/css + * + * ==|== normalize ========================================================== */ +/* ============================================================================= + * HTML5 display definitions + * ========================================================================== */ +body { + font-size: 13px; + line-height: 1.231; + font-family: sans-serif; + color: #000000; + background-color: #f1f2f3; + padding: 0 5%; + text-align: justify; +} + +.loginbox { + position: absolute; + background-color: #9D97B6; + border: 1px thin; + float: center; + border-radius: 10px; + padding: 5% 10%; + margin: 5% 28%; +} + +positive { + color: green; +} + +negative { + color: red; +} + +h2 { + +} + +.container { + display: table; + width: 100%; + border-collapse: collapse; +} + +.heading { + font-weight: bold; + display: table-row; + background-color: #50D67B; + text-align: center; + line-height: 25px; + font-size: 14px; + font-family: georgia; + color: #fff; +} + +.table-row { + display: table-row; + text-align: center; +} + +.col { + display: table-cell; + border: 1px solid #CCC; + padding: 1% 1% 1% 1%; +} + +input:focus,textarea:focus { + outline: 0; + border-color: #c4ae30; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px #c4ae30; + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px + rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px #c4ae30; +} + +input,textarea { + margin: 0 0 0 10px; + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -ms-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); +} + +input { + display: inline-block; + height: 25px; + margin: 4px; + font-size: 13px; + line-height: 18px; + color: gray; + border: 1px solid #cccccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} \ No newline at end of file diff --git a/src/main/resources/templates/admin.html b/src/main/resources/templates/admin.html new file mode 100644 index 0000000..d95c00b --- /dev/null +++ b/src/main/resources/templates/admin.html @@ -0,0 +1,108 @@ + + + +Interface: SiBBr API - Administrative operations + + + + +

Interface - v1.2

+

+ * * * Português * * * +

+

+ 3. /admin - Painel administrativo +

+

Esta interface permite a realização de operações administrativas + para a gestão da API.

+

+ Nota: Todas as consultas administrativas - com exceção da página raiz de documentação - devem fornecer um token de administrador válido como parâmetro da consulta +

+

Consultas

+ + +

+ * * * English * * * +

+

+ 3. /admin - Administrative dashboard +

+

This interface allows administrative operations to the API + management.

+

+ Note: All administrative queries - except the admin root documentation - must provide a valid admin + token as a query parameter +

+

Queries

+ + + \ No newline at end of file diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html index ebbc766..c496323 100644 --- a/src/main/resources/templates/error.html +++ b/src/main/resources/templates/error.html @@ -3,6 +3,7 @@ Interface: SiBBr API +

Interface

diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 4b8cfd8..cd9b922 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -1,180 +1,74 @@ - Interface: SiBBr API - - - -

Interface - v1.1

-

* * * Português * * *

-

Esta interface permite o acesso aos dados de registros de ocorrências de espécies do explorador do SiBBr. Para realizar consultas à interface, siga as orientações abaixo.

-

1. /ocorrencias - Registros de ocorrência

-

Estas consultas permitem buscar registros de ocorrência a partir da aplicação do filtro nome científico (scientificname).

-

Os resultados serão exibidos no formato JSON, com os seguintes campos:

- - -

Parâmetros

- - -

2. /recursos - Recursos

-

Esta consulta permite a listagem dos recursos disponíveis e a filtragem de ocorrências por recurso.

-

Os resultados serão exibidos no formato JSON, com os seguintes campos:

- -

Parâmetros

- - -

* * * English * * *

-

This interface allows access to species occurrence data records from the SiBBr explorer. To query the interface, please follow the instructions:

-

1. /ocorrencias - Occurrence records

-

These queries allow the search for occurrence records based on the usage of the scientific name filter (scientificname).

-

Results will be returned in the JSON format, with the following fields:

- -

Parameters

- - -

2. /recursos - Resources

-

This query allows the listing of the available resources.

-

Results will be returned in the JSON format, with the following fields:

- -

Parameters

- - +Interface: SiBBr API + + + + +

SiBBr API - v1.2

+

+ * * * Português * * * +

+

Esta interface permite o acesso aos dados de registros de + ocorrências de espécies do explorador do SiBBr. Para realizar + consultas à interface, siga as orientações abaixo.

+

Autenticação e autorização

+

+ Para ter acesso aos dados, é necessário ter um usuário cadastrado no + sistema com e-mail e senha. Qualquer pessoa pode realizar o + cadastro aqui. +

+

+ Após o cadastro, o usuário é criado no sistema e permanece como um + usuário não autorizado até que um administrador autorize o seu + acesso através das operações + administrativas. +

+

+ Os usuários podem se identificar no sistema através da página de login. +

+

+ Ao se identificarem corretamente, recebem um token válido, que + deve ser utilizado em todas as chamadas a consultas de dados da API. +

+

Este token não deve ser compartilhado com outros usuários, uma + vez que representa a identificação do acesso autorizado do usuário ao + consumo dos dados.

+

A restrição de acesso às operações se aplica a ambos o usuário + comum e o usuário administrador.

+

+ O token possui uma validade de 7 dias a partir de sua criação. + Após este período, ele perde a validade e o usuário recebe a notificação de que precisa realizar + um novo login, para receber um novo token e poder seguir realizando consultas. +

+

Operações

+ + \ No newline at end of file diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index 8423cfa..6f26dcb 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -3,6 +3,7 @@ xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"> Login page + Login in order to request and verify your API access token: diff --git a/src/main/resources/templates/login_fail.html b/src/main/resources/templates/login_fail.html index 6faabeb..7bdafa6 100644 --- a/src/main/resources/templates/login_fail.html +++ b/src/main/resources/templates/login_fail.html @@ -2,7 +2,8 @@ - Login page + Login fail + diff --git a/src/main/resources/templates/login_success.html b/src/main/resources/templates/login_success.html index 84efe6c..94e8a1a 100644 --- a/src/main/resources/templates/login_success.html +++ b/src/main/resources/templates/login_success.html @@ -3,6 +3,7 @@ xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"> Login realizado com sucesso || Login success +

Português

diff --git a/src/main/resources/templates/occurrences.html b/src/main/resources/templates/occurrences.html new file mode 100644 index 0000000..47be951 --- /dev/null +++ b/src/main/resources/templates/occurrences.html @@ -0,0 +1,297 @@ + + + +Interface: SiBBr API + + + + +

Interface - v1.1

+

+ * * * Português * * * +

+

Esta interface permite o acesso aos dados de registros de + ocorrências de espécies do explorador do SiBBr. Para realizar + consultas à interface, siga as orientações abaixo.

+

+ 1. /ocorrencias - Registros de ocorrência +

+

+ Estas consultas permitem buscar registros de ocorrência a partir da + aplicação do filtro nome científico (scientificname). +

+

Os resultados serão exibidos no formato JSON, com os seguintes + campos:

+ + +

Parâmetros

+ + +

+ * * * English * * * +

+

This interface allows access to species occurrence data records + from the SiBBr explorer. To query the interface, please follow the + instructions:

+

1. /ocorrencias - Occurrence records

+

+ These queries allow the search for occurrence records based on the + usage of the scientific name filter (scientificname). +

+

Results will be returned in the JSON format, with the following + fields:

+ +

Parameters

+ + + + \ No newline at end of file diff --git a/src/main/resources/templates/admin_password_change.html b/src/main/resources/templates/password_change.html similarity index 66% rename from src/main/resources/templates/admin_password_change.html rename to src/main/resources/templates/password_change.html index 43a9aef..25c2fcc 100644 --- a/src/main/resources/templates/admin_password_change.html +++ b/src/main/resources/templates/password_change.html @@ -3,21 +3,22 @@ xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"> -SiBBr API - Admin password change +SiBBr API - User password change +

- Por favor, forneça a nova senha para a conta do admin: + Por favor, forneça a nova senha para a conta:

- Please, Provide the new password to the admin account: + Please, Provide the new password to the account:

-
+
- +
diff --git a/src/main/resources/templates/register.html b/src/main/resources/templates/register.html index d9bfb82..3465842 100644 --- a/src/main/resources/templates/register.html +++ b/src/main/resources/templates/register.html @@ -3,13 +3,14 @@ xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"> Registration page +

Please provide a valid e-mail account and a password with at least 8 characters to create your account:

- +
diff --git a/src/main/resources/templates/resources.html b/src/main/resources/templates/resources.html new file mode 100644 index 0000000..569218e --- /dev/null +++ b/src/main/resources/templates/resources.html @@ -0,0 +1,426 @@ + + + +Interface: SiBBr API + + + + +

Interface - v1.1

+

+ * * * Português * * * +

+

Esta interface permite o acesso aos dados de registros de + ocorrências de espécies do explorador do SiBBr. Para realizar + consultas à interface, siga as orientações abaixo.

+ +

+ /recursos - Recursos +

+

Esta consulta permite a listagem dos recursos disponíveis e a + filtragem de ocorrências por recurso.

+

Os resultados serão exibidos no formato JSON, com os seguintes + campos:

+
    +
  • count - Número total de recursos disponíveis.
  • +
  • resources - Lista de recursos, com os seguintes + campos:
  • +
      +
    • id - Identificador único de um recurso dentro do + sistema do explorador de dados de biodiversidade.
    • +
    • name - Nome do recurso.
    • +
    • archiveurl - O link do DwC-A na instalação de IPT + (Integrated Publishing Toolkit) que está servindo o recurso na + internet.
    • +
    • gbifpackageid - Identificador único do recurso no + GBIF (Global Biodiversity Information Facility), caso exista, ou + algum identificador alternativo para o recurso + (alternateIdentifier).
    • +
    • recordcount - Número de registros de ocorrência + pertencentes ao recurso no sistema.
    • +
    • publisherid - Identificador único do publicador do + recuso dentro do sistema.
    • +
    +
+

Parâmetros

+
    +
  • Listar os recursos disponíveis:
  • +

    + Uso: http://gbif.sibbr.gov.br/api/v1.1/recursos +

    +
  • Filtrar registros de ocorrência de um dado recurso, + utilizando parâmetros análogos aos da consulta de ocorrências:
  • +

    + Uso: http://gbif.sibbr.gov.br/api/v1.1/recursos/{id_do_recurso}/ocorrencias +

    +
  • scientificname - Nome científico do taxon a ser + procurado. (Valor padrão é vazio(""). Observe que é comum registros + sem nenhum valor para este campo.)
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/recursos/12/ocorrencias?scientificname=Speothos + venaticus +

    +
  • fields - Indica o conjunto de campos a serem + retornados. O valor 1 retorna todos os campos disponíveis, enquanto o + valor 0 retorna apenas o subconjunto de campos {auto_id, + decimalLatitude, decimallongitude}. (Valor padrão é 0).
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/recursos/3/ocorrencias?scientificname=Rhipidomys%20mastacalis&fields=1 +

    +
  • ignoreNullCoordinates - Filtrar registros que não + possuam informação sobre as coordenadas (Valor padrão é false).
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/recursos/20/ocorrencias?scientificname=Verbena + lobata&ignoreNullCoordinates=true +

    +
  • limit - Limitar o número máximo de resultados + retornados pela consulta (Valor padrão é sem limites). Este campo + aceita apenas números naturais.
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/recursos/1/ocorrencias?scientificname=Aeschynomene%20falcata&ignoreNullCoordinates=true&limit=50 +

    +
+ +

+ Estas consultas permitem buscar registros de ocorrência de um dado + recurso a partir da aplicação do filtro nome científico (scientificname). +

+

Os resultados serão exibidos no formato JSON, com os seguintes + campos:

+
    +
  • count - Número de registros retornados pela constula.
  • +
  • occurrences - Lista de registros retornados pela + consulta, com os seguintes campos:
  • +
      +
    • auto_id - Identificador único de uma ocorrência + dentro do sistema do explorador de dados de biodiversidade.
    • +
    • resourcename - Nome do recurso ao qual a ocorrência + pertence.
    • +
    • publishername - Nome do publicador ao qual a + ocorrência pertence.
    • +
    • kingdom - O nome científico completo do reino em que + o táxon é classificado.
    • +
    • phylum - O nome científico completo do filo em que o + táxon é classificado.
    • +
    • _class - O nome científico completo da classe em que + o táxon está classificado.
    • +
    • _order - O nome científico completo da ordem em que o + táxon está classificado.
    • +
    • family - O nome científico completo da família em que + o táxon é classificado.
    • +
    • genus - O nome científico completo do gênero em que o + táxon está classificado.
    • +
    • specificepithet - O nome do epíteto específico do + scientificName.
    • +
    • infraspecificepithet - O nome do epíteto de menor + categoria ou hierarquia do scientificName, excluindo qualquer + designação de categoria taxonômica.
    • +
    • species - Nome taxonômico completo da espécie à qual + o registro de ocorrência pertence.
    • +
    • scientificname - O nome científico completo, com + autoria e informações atualizadas se conhecido. Ao formar parte de + uma identificação, este deve ser o nome em nível mais baixo da + classificação taxonômica que pode ser determinado. Este termo não + deve conter qualificações de identificação, que devem antes ser + fornecidos no termo IdentificationQualifier.
    • +
    • taxonrank - O nível taxonômico do nome mais + específico em scientificName. A prática recomendada é a utilização + de um vocabulário controlado.
    • +
    • typestatus - Uma lista de tipos nomenclaturais + (concatenada e separada) (status do tipo, nome científico + tipificado, publicação) aplicada ao espécime.
    • +
    • recordedby - Uma lista de nomes de pessoas, grupos ou + organizações (concatenados e separados) responsáveis ​​pelo registro + da ocorrência original. O coletor ou observador primário, + especialmente aquele que dá um identificador pessoal (recordNumber), + deve ser o primeiro da lista.
    • +
    • eventdate - A data ou intervalo durante o qual + ocorreu um evento. Para ocorrências, esta é a data quando o evento + foi registrado. Não é adequado para um tempo em um contexto + geológico. A prática recomendada é a utilização de um esquema de + codificação, como a ISO 8601:2004 (E).
    • +
    • continent -O nome do continente em que a localização + ocorre. A prática recomendada é a utilização de um vocabulário + controlado, como o Getty Thesaurus of Geographic Names ou o código + ISO 3166 Continent.
    • +
    • country - O nome do país ou maior unidade + administrativa em que o local ocorre. A prática recomendada é a + utilização de um vocabulário controlado, como o Getty Thesaurus of + Geographic Names.
    • +
    • stateprovince - O nome da região administrativa menor + do que país (estado, província, cantão, departamento, região, etc), + em que ocorrre a localização.
    • +
    • municipality - O nome completo e não abreviado da + próxima região administrativa menor do county (cidade, município, + etc), em que a localização ocorre. Não use este termo para um + incluir um nome de um lugar próximo que não contém a localização + real.
    • +
    • county - O nome completo e não abreviado da próxima + região administrativa menor do county (cidade, município, etc), em + que a localização ocorre. Não use este termo para um incluir um nome + de um lugar próximo que não contém a localização real.
    • +
    • minimumelevationinmeters - O limite inferior do + intervalo de elevação (altitude, geralmente acima do nível do mar), + em metros.
    • +
    • maximumelevationinmeters - O limite superior do + intervalo de elevação (altitude, geralmente acima do nível do mar), + em metros.
    • +
    • hascoordinates - Indica se o registro de ocorrência + possui ou não coordenadas.
    • +
    • decimallatitude - A latitude geográfica (em graus + decimais, utilizando o sistema de referência espacial dado em + geodeticDatum) do centro geográfico de uma localização. Os valores + positivos são ao norte do Equador, os valores negativos são ao sul. + Os valores corretos ficam entre -90 e 90.
    • +
    • decimallongitude - A longitude geográfica (em graus + decimais, utilizando o sistema de referência espacial dada em + geodeticDatum) do centro geográfico de uma localização. Os valores + positivos estão a leste do meridiano de Greenwich, valores negativos + são a oeste dela. Os valores legais encontram-se entre -180 e 180.
    • +
    • hasmedia - Indica se o registro possui ou não dados + multimedia.
    • +
    • associatedmedia - Uma lista de identificadores + (concatenados e separados) (publicação, identificador único global, + URI) da mídia associada com a ocorrência.
    • +
    +
  • scientificName - Nome utilizado como filtro para + consulta.
  • +
  • queryLength - Duração, em milissegundos, do tempo + necessário para realizar a consulta.
  • +
+ +

Parâmetros

+
    +
  • scientificname - Nome científico do taxon a ser + procurado. (Valor padrão é vazio. Observe que é comum registros sem + nenhum valor para este campo.)
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/ocorrencias?scientificname=Speothos + venaticus +

    +
  • fields - Indica o conjunto de campos a serem + retornados. O valor 1 retorna todos os campos disponíveis, enquanto o + valor 0 retorna apenas o subconjunto de campos {auto_id, + decimalLatitude, decimallongitude}. (Valor padrão é 0).
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/ocorrencias?scientificname=Rhipidomys%20mastacalis&fields=1 +

    +
  • ignoreNullCoordinates - Filtrar registros que não + possuam informação sobre as coordenadas (Valor padrão é false).
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/ocorrencias?scientificname=Verbena + lobata&ignoreNullCoordinates=true +

    +
  • limit - Limitar o número máximo de resultados + retornados pela consulta (Valor padrão é sem limites). Este campo + aceita apenas números naturais.
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/ocorrencias?scientificname=Aeschynomene%20falcata&ignoreNullCoordinates=true&limit=50 +

    +
+ +

+ * * * English * * * +

+

This interface allows access to species occurrence data records + from the SiBBr explorer. To query the interface, please follow the + instructions:

+

+ /recursos - Resources +

+

This query allows the listing of the available resources.

+

Results will be returned in the JSON format, with the following + fields:

+
    +
  • count - Total number of available resources.
  • +
  • resources - List of resources, with the following + fields:
  • +
      +
    • id - Unique identifier to a resource inside the biodiversity + data explorer.
    • +
    • name - Resource name.
    • +
    • archiveurl - The DwC-A link in the IPT (Integrated + Publishing Toolkit) installation that is serving the resource on the + internet.
    • +
    • gbifpackageid - Unique identifier to the resource in + GBIF (Global Biodiversity Information Facility), when it exists, or + some alternate identifier to the resource (alternateIdentifier).
    • +
    • recordcount - Number of occurrence records in the + system that belong to this resource.
    • +
    • publisherid - Unique identifier to the resource's + publisher whithin the system.
    • +
    +
+

Parameters

+
    +
  • List available resources:
  • +

    + Usage: http://gbif.sibbr.gov.br/api/v1.1/recursos +

    +
  • Filter occurrence records from a given resource, with + analogous parameters to the occurrence search:
  • +

    + Usage: http://gbif.sibbr.gov.br/api/v1.1/recursos/{id_do_recurso}/ocorrencias +

    +
  • scientificname - Scientific name of the taxon to be + queried.(Default is null. Observe that it is not unusual to have + records without a value for this field.
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/recursos/12/ocorrencias?scientificname=Speothos + venaticus +

    +
  • fields - Indicates the set of fields to be returned. + Value 1 retorns all available fields, while value 0 returns only the + subset of fields {auto_id, decimalLatitude, decimallongitude}. (Default + value is 0).
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/recursos/3/ocorrencias?scientificname=Rhipidomys%20mastacalis&fields=1 +

    +
  • ignoreNullCoordinates - Filter records that do not + possess coordinate information (Default value is false).
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/recursos/20/ocorrencias?scientificname=Verbena + lobata&ignoreNullCoordinates=true +

    +
  • limit - Limit the maximum amount of results returned + by the query (Default value is without limit). This field supports + only natural numbers.
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/recursos/1/ocorrencias?scientificname=Aeschynomene%20falcata&ignoreNullCoordinates=true&limit=50 +

    +
+

+ These queries allow the search for occurrence records based on the + usage of the scientific name filter (scientificname). +

+

Results will be returned in the JSON format, with the following + fields:

+
    +
  • count - Amount of records returned by the query.
  • +
  • occurrences - List of records returned by the query, + with the following fields:
  • +
      +
    • auto_id - Unique identifier of an occurrence within + the biodiversity + data explorer.
    • +
    • resourcename - Name of the resource to which the + occurrence belongs.
    • +
    • publishername - name of the publisher to which the + occurrence belongs.
    • +
    • kingdom - The full scientific name of the kingdom in + which the taxon is classified.
    • +
    • phylum - The full scientific name of the phylum or + division in which the taxon is classified.
    • +
    • _class - The full scientific name of the class in + which the taxon is classified.
    • +
    • _order - The full scientific name of the order in + which the taxon is classified.
    • +
    • family - The full scientific name of the family in + which the taxon is classified.
    • +
    • genus - The full scientific name of the genus in + which the taxon is classified.
    • +
    • specificepithet - The name of the first or species + epithet of the scientificName.
    • +
    • infraspecificepithet - The name of the lowest or + terminal infraspecific epithet of the scientificName, excluding any + rank designation.
    • +
    • species - The complete scientific name of the species + which the the taxon is classified.
    • +
    • scientificname - The 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 IdentificationQualifier term.
    • +
    • taxonrank - The taxonomic rank of the most specific + name in the scientificName. Recommended best practice is to use a + controlled vocabulary.
    • +
    • typestatus - A list (concatenated and separated) of + nomenclatural types (type status, typified scientific name, + publication) applied to the subject.
    • +
    • recordedby - The number of individuals represented + present at the time of the Occurrence.
    • +
    • eventdate - The 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. + Recommended best practice is to use an encoding scheme, such as ISO + 8601:2004(E).
    • +
    • continent - The name of the continent in which the + Location occurs. Recommended best practice is to use a controlled + vocabulary such as the Getty Thesaurus of Geographic Names.
    • +
    • country - The name of the country or major + administrative unit in which the Location occurs. Recommended best + practice is to use a controlled vocabulary such as the Getty + Thesaurus of Geographic Names.
    • +
    • stateprovince - The name of the next smaller + administrative region than country (state, province, canton, + department, region, etc.) in which the Location occurs.
    • +
    • municipality - The 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.
    • +
    • county - The full, unabbreviated name of the next + smaller administrative region than stateProvince (county, shire, + department, etc.) in which the Location occurs.
    • +
    • minimumelevationinmeters - The lower limit of the + range of elevation (altitude, usually above sea level), in meters.
    • +
    • maximumelevationinmeters - The upper limit of the + range of elevation (altitude, usually above sea level), in meters.
    • +
    • hascoordinates - Indicates weather the occurrence + record has coordinates or not.
    • +
    • decimallatitude - The 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.
    • +
    • decimallongitude - The 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.
    • +
    • hasmedia - indicates if the record has or not + multimedia information.
    • +
    • associatedmedia - A list (concatenated and separated) + of identifiers (publication, global unique identifier, URI) of media + associated with the Occurrence.
    • +
    +
  • scientificName - The name that was used as the query + filter.
  • +
  • queryLength - Length, in milliseconds, of the amount + of time required to fetch the results.
  • +
+

Parameters

+
    +
  • scientificname - Scientific name of the taxon to be + queried.(Default is null. Observe that it is not unusual to have + records without a value for this field.
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/ocorrencias?scientificname=Speothos + venaticus +

    +
  • fields - Indicates the set of fields to be returned. + Value 1 retorns all available fields, while value 0 returns only the + subset of fields {auto_id, decimalLatitude, decimallongitude}. (Default + value is 0).
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/ocorrencias?scientificname=Rhipidomys%20mastacalis&fields=1 +

    +
  • ignoreNullCoordinates - Filter records that do not + possess coordinate information (Default value is false).
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/ocorrencias?scientificname=Verbena + lobata&ignoreNullCoordinates=true +

    +
  • limit - Limit the maximum amount of results returned + by the query (Default value is without limit). This field supports + only natural numbers.
  • +

    + Ex.: http://gbif.sibbr.gov.br/api/v1.1/ocorrencias?scientificname=Aeschynomene + falcata&ignoreNullCoordinates=true&limit=50 +

    +
+ + \ No newline at end of file diff --git a/src/main/resources/templates/stats.html b/src/main/resources/templates/stats.html index d7f5cd1..cca3265 100644 --- a/src/main/resources/templates/stats.html +++ b/src/main/resources/templates/stats.html @@ -3,6 +3,7 @@ Interface: SiBBr API +

Interface - v1.1