SlideShare uma empresa Scribd logo
1 de 45
rafael.soto@
Orquestração
Banco de Dados Espacial
Motivação do Projeto ?
[M
   u lt
Banco de Dados Espacial
       idi
           sc
              ip l
                   ina
                       rid
                          ad
                             e]
Mobilidade de Equipe
Complexidade / Custo




                       Funcionalidade / Tempo de Projeto
JavaEE6
JSR 318 - EJB
JSR 315 – Servlet 3.0
JSR 314 - JSF2
JSR 317 - JPA2
JSR 330 - CDI
JSR 303 – Bean Validator
JSR 299 - CDI
outras......
Parênteses....
Escopo Atual da Iniciativa Demoiselle Spatial


                        Archetypes               Doc
  v1.0


Hibernate Spatial
                    DEMOISELLE FW              Examples
 JPA Extension




                                 Feature
Geocode      KML    Shapefile              OGC-WS   GeoRest
                                Commom
Arquétipo Demoiselle Spatial - Arquitetura
Interface Usuário



                                                       OSM

Servidor de Aplicação          HTTP



                          Apresentação        OL4JSF




                        Lógica de Negócio
JSR 318 - EJB
JSR 315 – Servlet 3.0
JSR 314 - JSF2
                                                       ...
JSR 317 - JPA2
JSR 330 - CDI            Acesso a Dados     Spatial
JSR 303 – Bean Valid
JSR 299 - CDI
outras......
Banco de Dados                SQL / JDBC




                                  Potsgis
Arquétipo Demoiselle Spatial - Features
 ●   Configuração do OL4JSF;
         <m:..../>
 ●   Configuração do Hibernate Spatial
     ●   Bibliotecas Dependentes;
     ●   Configuração do Contexto de persistencia;
 ●   Profile maven para JEE Containers;
 ●   [Opcional] inclusão de código exemplo;
 ●   [Opcional] configuração de todos os
     componentes do projeto

$mvn archetype:generate -DarchetypeGroupId=br.gov.frameworkdemoiselle.spatial.archetype
-DarchetypeArtifactId=demoiselle-spatial -DarchetypeVersion=1.0.0-SNAPSHOT
-DarchetypeRepository=https://github.com/rafaelsoto/demoiselle-spatial/raw/master
                          /mvn-repo/archetype-catalog-snapshot.xml
Arquétipo Demoiselle Spatial – Integração Eclipse




https://github.com/rafaelsoto/demoiselle-spatial/raw/master
                   /mvn-repo/archetype-catalog-snapshot.xml
Componente Demoiselle Spatial – Geocoding
br.gov.frameworkdemoiselle.spacial.component.
                                         geocoding
Componente Geocoding
class TesteGeocoding{
@Inject
private Geocoding geocode;
public void geocodeDummy()
{

 geocode
     .setAddress(“Rua Marechal Deodoro, Foz do Iguacu”)
     .setPostalCode(“85851-030”)
     .setLanguage(Language.Arabic)                        DSL
     .search();
                        GeocodeResponse

                          GeocodeResult
                    Point
                    Address
                    AddressParts
Componente ReverseGeocoding
class ReverseGeocoding{
@Inject
private ReverseGeocoding reverseGeocode;
public void geocodeDummy()
{

 reverse
     .setLocation("-12.9710208", "-38.4876078")
     .search();
Implementações Nativas / Extensões

                                             ();
                                    e.search
                          seG eocod
                     Rever                         OpenStreetMap



                          Geoc
                              od   e.sea
                                        rch()
                                             ;




@Alternative
class MyGeocodingProvider implements ReverseGeocoding;


   <alternatives>
      <class>my.package.geocode.impl</class>
   </alternatives
Demoiselle Spatial – Componente FeatureCommom
br.gov.frameworkdemoiselle.spacial.component.
                                            feature
Entendendo o Componente

class Aerodromo {

    private String icao;

    private String nome;

    private Point localizacao;

    /** Metodos de Acesso **/
}

BeanSimpleFeatureConverter.beanToSimpleFeature(aerodromo);
                               SimpleFeature

                           Attributes: icao, nome;

                           Geometry: localizacao
Modificando a Serialização

class Aerodromo {

    @FeatureAttributeName(name="Codigo_Aeroporto")
    private String icao;

    @FeatureName(compositeName="Aeroporto $")
    private String nome;

    private Point localizacao;

    /** Metodos de Acesso **/
}

BeanSimpleFeatureConverter.beanToSimpleFeature(aerodromo);
Demoiselle Spatial – Componente KML
Componente KML em Ação
class TesteKML{
@Inject
private KMLBuilder kml;
public void kmlDummy()
{

 Kml.buildKmlAsFile(aerodromo, file);
      .buildKmlAsStream(aerodromo, inputstream);
      .buildKmlFromSimpleFeature(aerodromoSimpleFeature);
      .buildKml(aerodromo)
Demoiselle Spatial – Componente Shapefile




SHP


SHX


DBF
Componente Shapefile em Ação
class TesteShapefile{
@Inject
private ShapefileReader readerSHP;

@Inject
private ShapefileWriter writerSHP;
public void shapefileDummy()
{

 writerSHP.writeBeanShapefile(aerodromo);
      .writeBeanShapefileToInputStream(aerodromo);
      .writeSimpleFeatureShapefile(aerodromoSimpleFeature);

 readerSHP.readShapefile(file);
Demoiselle Spatial – Componente OGC-WS




                            Base de Dados
Componente OGC-WS em Ação
class TesteOGCWSMetadata{
@Inject
private ServiceMetadataLookup ogcLookup;
public void lookupOGCDummy()
{

 ogcLookup.lookup(URL_WMS,URL_WFS);

                                           WMS

  Service             Capabilities

                                           WFS
Componente OGC-WS em Ação
class TesteOGCWFSGetFeatures{
@Inject
private WFSClient wfsClient;
public void getFeaturesToKMLDummy()
{

 wfsClient.getFeature(SERVICE,LAYER_WFS);
Extensão Hibernate Spatial JPA
●   Query nativa com argumentos Espaciais;


     Query.set(parameter,Geometry);


Hibernate Query object.
        org.hibernate.Query hibernateQuery =
((org.hibernate.ejb.QueryImpl)query).getHibernateQuery();
Type geometryType = new CustomType(GeometryUserType.class, null);
        hibernateQuery.setParameter("filter", filter, geometryType);
Extensão Hibernate Spatial JPA
●   Criação das Colunas Geométricas do Postgis;




     @Loader → Demoiselle
     @SRID("4326") → Demoiselle Spatial
Extensão Hibernate Spatial JPA
●   Template JPASpatialDAO;
extends JPASpatialDAO<Entidade, Long>

●   Consultas Espaciais com Argumentos:
●   private DemoiselleSpatialEnvelope extentFilter;
●   private Integer outputSRID;




DAO.contains(GEOMETRY);
Extensão Hibernate Spatial JPA
T load(I id, SpatialQueryArgument spatialArgument);

List<T> findAll(SpatialQueryArgument spatialArgument);

List<T> intersects(Geometry geometry);

List<T> intersects(Geometry geometry,SpatialQueryArgument spatialArgument);

boolean verifyIntersects(Geometry geometry);

boolean verifyIntersects(Geometry geometry,SpatialQueryArgument spatialArgument);

List<T> equals(Geometry geometry);

List<T> equals(Geometry geometry,SpatialQueryArgument spatialArgument);

boolean verifyEquals(Geometry geometry);

boolean verifyEquals(Geometry geometry,SpatialQueryArgument spatialArgument);

List<T> disjoint(Geometry geometry);

List<T> disjoint(Geometry geometry,SpatialQueryArgument spatialArgument);

boolean verifyDisjoint(Geometry geometry);

boolean verifyDisjoint(Geometry geometry,SpatialQueryArgument spatialArgument);

List<T> touches(Geometry geometry);

List<T> touches(Geometry geometry,SpatialQueryArgument spatialArgument);

boolean verifyTouches(Geometry geometry);

boolean verifyTouches(Geometry geometry,SpatialQueryArgument spatialArgument);
Extensão Hibernate Spatial JPA
    List<T> crosses(Geometry geometry);

     List<T> crosses(Geometry geometry,SpatialQueryArgument spatialArgument);

     boolean verifyCrosses(Geometry geometry);

     boolean verifyCrosses(Geometry geometry,SpatialQueryArgument spatialArgument);

     List<T> within(Geometry geometry);

     List<T> within(Geometry geometry,SpatialQueryArgument spatialArgument);

     boolean verifyWithin(Geometry geometry);

     boolean verifyWithin(Geometry geometry,SpatialQueryArgument spatialArgument);

     List<T> contains(Geometry geometry);

     List<T> contains(Geometry geometry,SpatialQueryArgument spatialArgument);

     boolean verifyContains(Geometry geometry);

     boolean verifyContains(Geometry geometry,SpatialQueryArgument spatialArgument);

     List<T> overlaps(Geometry geometry);

     List<T> overlaps(Geometry geometry,SpatialQueryArgument spatialArgument);

     boolean verifyOverlaps(Geometry geometry);

     boolean verifyOverlaps(Geometry geometry,SpatialQueryArgument spatialArgument);

     List<T> relate(Geometry geometry,String relation);

     List<T> relate(Geometry geometry,SpatialQueryArgument spatialArgument,String
relation);

     boolean verifyRelate(Geometry geometry,String relation);
Extensão Hibernate Spatial JPA
●   Geometry Bean Validator;
@ExtentValidator(extent=”12.2121, -5.1212,15.123,-7.3213”)

@Projection(srid=4326)
Demoiselle Spatial – Componente GeoRest
●   Implementação da Especificação GeoJSON;
    { "type": "FeatureCollection",
      "features": [
        { "type": "Feature",
          "geometry": {"type": "Point", "coordinates": [102.0,
    0.5]},
          "properties": {"prop0": "value0"}
          },
        { "type": "Feature",
          "geometry": {
            "type": "LineString",
            "coordinates": [
              [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
              ]
            },
          "properties": {
            "prop0": "value0",
            "prop1": 0.0
            }
          },
        { "type": "Feature",
           "geometry": {
             "type": "Polygon",
             "coordinates": [
               [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
                 [100.0, 1.0], [100.0, 0.0] ]
               ]
           },
           "properties": {
             "prop0": "value0",
             "prop1": {"this": "that"}
             }
           }
         ]
       }
Demoiselle Spatial – Componente GeoRest
●   Parser SimpleFeature2GeoJSON;
                   SimpleFeature

                Attributes: icao, nome;

                Geometry: localizacao




               @Inject         GeoJSONBuilder
Demoiselle Spatial – Componente GeoRest
●   Template Rest - DelegateGeoRest;

extends DelegateGeoREST<Entidade, Long, EntidadeDAO>

    void delete(I id);
    list(bbox,outputSrid);
    void insert(feature);
    GeoJSONFeatureCollection load(I id);
    void update(GeoJSONFeature feature);
Template GeoREST na Pratica
●   Implementação de um template Rest;

extends DelegateGeoREST<Entidade, Long, EntidadeDAO>

http://localhost:8081/contact-list-
spatial/georest/contact/list?bbox=-73.125,40.078125,-
5.625,37.96875,-73.125,40.078125,-5.625,37.96875



http://localhost:8081/contact-list-
spatial/georest/contact/list?SRID=900913
Escopo Atual da Iniciativa Demoiselle Spatial


                        Archetypes               Doc
  v1.0


Hibernate Spatial
                    DEMOISELLE FW              Examples
 JPA Extension




                                 Feature
Geocode      KML    Shapefile              OGC-WS   GeoRest
                                Commom
Como contribuir
Listas Brazucas!
                          /geoserver
Informações sobre o
grupo
Associados: 479
Criado em: May 13,
2007
Idioma: Português




                          /geojava
Informações sobre o
grupo
Associados: 355
Criado em: Fev 25, 2006
Idioma: Português
rafael.soto@

Mais conteúdo relacionado

Mais procurados

개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)
개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)
개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)changehee lee
 
JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)Anders Jönsson
 
Building High Perf Web Apps - IE8 Firestarter
Building High Perf Web Apps - IE8 FirestarterBuilding High Perf Web Apps - IE8 Firestarter
Building High Perf Web Apps - IE8 FirestarterMithun T. Dhar
 
Aspect Mining for Large Systems
Aspect Mining for Large SystemsAspect Mining for Large Systems
Aspect Mining for Large SystemsThomas Zimmermann
 
No JS and DartCon
No JS and DartConNo JS and DartCon
No JS and DartConanandvns
 
Qt Memory Management & Signal and Slots
Qt Memory Management & Signal and SlotsQt Memory Management & Signal and Slots
Qt Memory Management & Signal and SlotsJussi Pohjolainen
 
Collections&Generics
Collections&GenericsCollections&Generics
Collections&Genericshortis
 
Mongoskin - Guilin
Mongoskin - GuilinMongoskin - Guilin
Mongoskin - GuilinJackson Tian
 
响应式编程及框架
响应式编程及框架响应式编程及框架
响应式编程及框架jeffz
 
Using Reflections and Automatic Code Generation
Using Reflections and Automatic Code GenerationUsing Reflections and Automatic Code Generation
Using Reflections and Automatic Code GenerationIvan Dolgushin
 

Mais procurados (17)

개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)
개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)
개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)
 
Clojure And Swing
Clojure And SwingClojure And Swing
Clojure And Swing
 
J slider
J sliderJ slider
J slider
 
JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)
 
Building High Perf Web Apps - IE8 Firestarter
Building High Perf Web Apps - IE8 FirestarterBuilding High Perf Web Apps - IE8 Firestarter
Building High Perf Web Apps - IE8 Firestarter
 
Why Sifu
Why SifuWhy Sifu
Why Sifu
 
Aspect Mining for Large Systems
Aspect Mining for Large SystemsAspect Mining for Large Systems
Aspect Mining for Large Systems
 
No JS and DartCon
No JS and DartConNo JS and DartCon
No JS and DartCon
 
Qt Memory Management & Signal and Slots
Qt Memory Management & Signal and SlotsQt Memory Management & Signal and Slots
Qt Memory Management & Signal and Slots
 
EMFPath
EMFPathEMFPath
EMFPath
 
Collections&Generics
Collections&GenericsCollections&Generics
Collections&Generics
 
Say It With Javascript
Say It With JavascriptSay It With Javascript
Say It With Javascript
 
Mongoskin - Guilin
Mongoskin - GuilinMongoskin - Guilin
Mongoskin - Guilin
 
响应式编程及框架
响应式编程及框架响应式编程及框架
响应式编程及框架
 
Codemash-Clojure.pdf
Codemash-Clojure.pdfCodemash-Clojure.pdf
Codemash-Clojure.pdf
 
Using Reflections and Automatic Code Generation
Using Reflections and Automatic Code GenerationUsing Reflections and Automatic Code Generation
Using Reflections and Automatic Code Generation
 
Google Guava
Google GuavaGoogle Guava
Google Guava
 

Semelhante a Demoiselle Spatial Latinoware 2011

JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing UpDavid Padbury
 
Application devevelopment with open source libraries
Application devevelopment with open source librariesApplication devevelopment with open source libraries
Application devevelopment with open source librariesAllan Laframboise
 
Training: Day Four - Struts, Tiles, Renders and Faces
Training: Day Four - Struts, Tiles, Renders and FacesTraining: Day Four - Struts, Tiles, Renders and Faces
Training: Day Four - Struts, Tiles, Renders and FacesArtur Ventura
 
Mobile webapplication development
Mobile webapplication developmentMobile webapplication development
Mobile webapplication developmentGanesh Gembali
 
OSCON july 2011
OSCON july 2011OSCON july 2011
OSCON july 2011chelm
 
Scripting GeoServer with GeoScript
Scripting GeoServer with GeoScriptScripting GeoServer with GeoScript
Scripting GeoServer with GeoScriptJustin Deoliveira
 
2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locatorAlberto Paro
 
2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locatorAlberto Paro
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech ProjectsJody Garnett
 
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Oliver Gierke
 
Saving Gaia with GeoDjango
Saving Gaia with GeoDjangoSaving Gaia with GeoDjango
Saving Gaia with GeoDjangoCalvin Cheng
 
Functional, Type-safe, Testable Microservices with ZIO and gRPC
Functional, Type-safe, Testable Microservices with ZIO and gRPCFunctional, Type-safe, Testable Microservices with ZIO and gRPC
Functional, Type-safe, Testable Microservices with ZIO and gRPCNadav Samet
 
Django101 geodjango
Django101 geodjangoDjango101 geodjango
Django101 geodjangoCalvin Cheng
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 
The Past Year in Spring for Apache Geode
The Past Year in Spring for Apache GeodeThe Past Year in Spring for Apache Geode
The Past Year in Spring for Apache GeodeVMware Tanzu
 
Introduction To Groovy 2005
Introduction To Groovy 2005Introduction To Groovy 2005
Introduction To Groovy 2005Tugdual Grall
 

Semelhante a Demoiselle Spatial Latinoware 2011 (20)

JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
 
Application devevelopment with open source libraries
Application devevelopment with open source librariesApplication devevelopment with open source libraries
Application devevelopment with open source libraries
 
Scripting GeoServer
Scripting GeoServerScripting GeoServer
Scripting GeoServer
 
Training: Day Four - Struts, Tiles, Renders and Faces
Training: Day Four - Struts, Tiles, Renders and FacesTraining: Day Four - Struts, Tiles, Renders and Faces
Training: Day Four - Struts, Tiles, Renders and Faces
 
Mobile webapplication development
Mobile webapplication developmentMobile webapplication development
Mobile webapplication development
 
OSCON july 2011
OSCON july 2011OSCON july 2011
OSCON july 2011
 
Scripting GeoServer with GeoScript
Scripting GeoServer with GeoScriptScripting GeoServer with GeoScript
Scripting GeoServer with GeoScript
 
dojo.Patterns
dojo.Patternsdojo.Patterns
dojo.Patterns
 
2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator
 
2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator2017 02-07 - elastic & spark. building a search geo locator
2017 02-07 - elastic & spark. building a search geo locator
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech Projects
 
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!
 
Saving Gaia with GeoDjango
Saving Gaia with GeoDjangoSaving Gaia with GeoDjango
Saving Gaia with GeoDjango
 
Functional, Type-safe, Testable Microservices with ZIO and gRPC
Functional, Type-safe, Testable Microservices with ZIO and gRPCFunctional, Type-safe, Testable Microservices with ZIO and gRPC
Functional, Type-safe, Testable Microservices with ZIO and gRPC
 
huhu
huhuhuhu
huhu
 
ES6 is Nigh
ES6 is NighES6 is Nigh
ES6 is Nigh
 
Django101 geodjango
Django101 geodjangoDjango101 geodjango
Django101 geodjango
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
The Past Year in Spring for Apache Geode
The Past Year in Spring for Apache GeodeThe Past Year in Spring for Apache Geode
The Past Year in Spring for Apache Geode
 
Introduction To Groovy 2005
Introduction To Groovy 2005Introduction To Groovy 2005
Introduction To Groovy 2005
 

Último

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Último (20)

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Demoiselle Spatial Latinoware 2011

  • 3.
  • 4. Motivação do Projeto ? [M u lt Banco de Dados Espacial idi sc ip l ina rid ad e]
  • 6. Complexidade / Custo Funcionalidade / Tempo de Projeto
  • 7. JavaEE6 JSR 318 - EJB JSR 315 – Servlet 3.0 JSR 314 - JSF2 JSR 317 - JPA2 JSR 330 - CDI JSR 303 – Bean Validator JSR 299 - CDI outras......
  • 8.
  • 9.
  • 10.
  • 11.
  • 13. Escopo Atual da Iniciativa Demoiselle Spatial Archetypes Doc v1.0 Hibernate Spatial DEMOISELLE FW Examples JPA Extension Feature Geocode KML Shapefile OGC-WS GeoRest Commom
  • 14. Arquétipo Demoiselle Spatial - Arquitetura Interface Usuário OSM Servidor de Aplicação HTTP Apresentação OL4JSF Lógica de Negócio JSR 318 - EJB JSR 315 – Servlet 3.0 JSR 314 - JSF2 ... JSR 317 - JPA2 JSR 330 - CDI Acesso a Dados Spatial JSR 303 – Bean Valid JSR 299 - CDI outras...... Banco de Dados SQL / JDBC Potsgis
  • 15. Arquétipo Demoiselle Spatial - Features ● Configuração do OL4JSF; <m:..../> ● Configuração do Hibernate Spatial ● Bibliotecas Dependentes; ● Configuração do Contexto de persistencia; ● Profile maven para JEE Containers; ● [Opcional] inclusão de código exemplo; ● [Opcional] configuração de todos os componentes do projeto $mvn archetype:generate -DarchetypeGroupId=br.gov.frameworkdemoiselle.spatial.archetype -DarchetypeArtifactId=demoiselle-spatial -DarchetypeVersion=1.0.0-SNAPSHOT -DarchetypeRepository=https://github.com/rafaelsoto/demoiselle-spatial/raw/master /mvn-repo/archetype-catalog-snapshot.xml
  • 16. Arquétipo Demoiselle Spatial – Integração Eclipse https://github.com/rafaelsoto/demoiselle-spatial/raw/master /mvn-repo/archetype-catalog-snapshot.xml
  • 17. Componente Demoiselle Spatial – Geocoding br.gov.frameworkdemoiselle.spacial.component. geocoding
  • 18. Componente Geocoding class TesteGeocoding{ @Inject private Geocoding geocode; public void geocodeDummy() { geocode .setAddress(“Rua Marechal Deodoro, Foz do Iguacu”) .setPostalCode(“85851-030”) .setLanguage(Language.Arabic) DSL .search(); GeocodeResponse GeocodeResult Point Address AddressParts
  • 19. Componente ReverseGeocoding class ReverseGeocoding{ @Inject private ReverseGeocoding reverseGeocode; public void geocodeDummy() { reverse .setLocation("-12.9710208", "-38.4876078") .search();
  • 20.
  • 21. Implementações Nativas / Extensões (); e.search seG eocod Rever OpenStreetMap Geoc od e.sea rch() ; @Alternative class MyGeocodingProvider implements ReverseGeocoding; <alternatives> <class>my.package.geocode.impl</class> </alternatives
  • 22. Demoiselle Spatial – Componente FeatureCommom br.gov.frameworkdemoiselle.spacial.component. feature
  • 23. Entendendo o Componente class Aerodromo { private String icao; private String nome; private Point localizacao; /** Metodos de Acesso **/ } BeanSimpleFeatureConverter.beanToSimpleFeature(aerodromo); SimpleFeature Attributes: icao, nome; Geometry: localizacao
  • 24. Modificando a Serialização class Aerodromo { @FeatureAttributeName(name="Codigo_Aeroporto") private String icao; @FeatureName(compositeName="Aeroporto $") private String nome; private Point localizacao; /** Metodos de Acesso **/ } BeanSimpleFeatureConverter.beanToSimpleFeature(aerodromo);
  • 25. Demoiselle Spatial – Componente KML
  • 26. Componente KML em Ação class TesteKML{ @Inject private KMLBuilder kml; public void kmlDummy() { Kml.buildKmlAsFile(aerodromo, file); .buildKmlAsStream(aerodromo, inputstream); .buildKmlFromSimpleFeature(aerodromoSimpleFeature); .buildKml(aerodromo)
  • 27. Demoiselle Spatial – Componente Shapefile SHP SHX DBF
  • 28. Componente Shapefile em Ação class TesteShapefile{ @Inject private ShapefileReader readerSHP; @Inject private ShapefileWriter writerSHP; public void shapefileDummy() { writerSHP.writeBeanShapefile(aerodromo); .writeBeanShapefileToInputStream(aerodromo); .writeSimpleFeatureShapefile(aerodromoSimpleFeature); readerSHP.readShapefile(file);
  • 29. Demoiselle Spatial – Componente OGC-WS Base de Dados
  • 30. Componente OGC-WS em Ação class TesteOGCWSMetadata{ @Inject private ServiceMetadataLookup ogcLookup; public void lookupOGCDummy() { ogcLookup.lookup(URL_WMS,URL_WFS); WMS Service Capabilities WFS
  • 31. Componente OGC-WS em Ação class TesteOGCWFSGetFeatures{ @Inject private WFSClient wfsClient; public void getFeaturesToKMLDummy() { wfsClient.getFeature(SERVICE,LAYER_WFS);
  • 32. Extensão Hibernate Spatial JPA ● Query nativa com argumentos Espaciais; Query.set(parameter,Geometry); Hibernate Query object. org.hibernate.Query hibernateQuery = ((org.hibernate.ejb.QueryImpl)query).getHibernateQuery(); Type geometryType = new CustomType(GeometryUserType.class, null); hibernateQuery.setParameter("filter", filter, geometryType);
  • 33. Extensão Hibernate Spatial JPA ● Criação das Colunas Geométricas do Postgis; @Loader → Demoiselle @SRID("4326") → Demoiselle Spatial
  • 34. Extensão Hibernate Spatial JPA ● Template JPASpatialDAO; extends JPASpatialDAO<Entidade, Long> ● Consultas Espaciais com Argumentos: ● private DemoiselleSpatialEnvelope extentFilter; ● private Integer outputSRID; DAO.contains(GEOMETRY);
  • 35. Extensão Hibernate Spatial JPA T load(I id, SpatialQueryArgument spatialArgument); List<T> findAll(SpatialQueryArgument spatialArgument); List<T> intersects(Geometry geometry); List<T> intersects(Geometry geometry,SpatialQueryArgument spatialArgument); boolean verifyIntersects(Geometry geometry); boolean verifyIntersects(Geometry geometry,SpatialQueryArgument spatialArgument); List<T> equals(Geometry geometry); List<T> equals(Geometry geometry,SpatialQueryArgument spatialArgument); boolean verifyEquals(Geometry geometry); boolean verifyEquals(Geometry geometry,SpatialQueryArgument spatialArgument); List<T> disjoint(Geometry geometry); List<T> disjoint(Geometry geometry,SpatialQueryArgument spatialArgument); boolean verifyDisjoint(Geometry geometry); boolean verifyDisjoint(Geometry geometry,SpatialQueryArgument spatialArgument); List<T> touches(Geometry geometry); List<T> touches(Geometry geometry,SpatialQueryArgument spatialArgument); boolean verifyTouches(Geometry geometry); boolean verifyTouches(Geometry geometry,SpatialQueryArgument spatialArgument);
  • 36. Extensão Hibernate Spatial JPA List<T> crosses(Geometry geometry); List<T> crosses(Geometry geometry,SpatialQueryArgument spatialArgument); boolean verifyCrosses(Geometry geometry); boolean verifyCrosses(Geometry geometry,SpatialQueryArgument spatialArgument); List<T> within(Geometry geometry); List<T> within(Geometry geometry,SpatialQueryArgument spatialArgument); boolean verifyWithin(Geometry geometry); boolean verifyWithin(Geometry geometry,SpatialQueryArgument spatialArgument); List<T> contains(Geometry geometry); List<T> contains(Geometry geometry,SpatialQueryArgument spatialArgument); boolean verifyContains(Geometry geometry); boolean verifyContains(Geometry geometry,SpatialQueryArgument spatialArgument); List<T> overlaps(Geometry geometry); List<T> overlaps(Geometry geometry,SpatialQueryArgument spatialArgument); boolean verifyOverlaps(Geometry geometry); boolean verifyOverlaps(Geometry geometry,SpatialQueryArgument spatialArgument); List<T> relate(Geometry geometry,String relation); List<T> relate(Geometry geometry,SpatialQueryArgument spatialArgument,String relation); boolean verifyRelate(Geometry geometry,String relation);
  • 37. Extensão Hibernate Spatial JPA ● Geometry Bean Validator; @ExtentValidator(extent=”12.2121, -5.1212,15.123,-7.3213”) @Projection(srid=4326)
  • 38. Demoiselle Spatial – Componente GeoRest ● Implementação da Especificação GeoJSON; { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type": "Point", "coordinates": [102.0, 0.5]}, "properties": {"prop0": "value0"} }, { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0] ] }, "properties": { "prop0": "value0", "prop1": 0.0 } }, { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }, "properties": { "prop0": "value0", "prop1": {"this": "that"} } } ] }
  • 39. Demoiselle Spatial – Componente GeoRest ● Parser SimpleFeature2GeoJSON; SimpleFeature Attributes: icao, nome; Geometry: localizacao @Inject GeoJSONBuilder
  • 40. Demoiselle Spatial – Componente GeoRest ● Template Rest - DelegateGeoRest; extends DelegateGeoREST<Entidade, Long, EntidadeDAO> void delete(I id); list(bbox,outputSrid); void insert(feature); GeoJSONFeatureCollection load(I id); void update(GeoJSONFeature feature);
  • 41. Template GeoREST na Pratica ● Implementação de um template Rest; extends DelegateGeoREST<Entidade, Long, EntidadeDAO> http://localhost:8081/contact-list- spatial/georest/contact/list?bbox=-73.125,40.078125,- 5.625,37.96875,-73.125,40.078125,-5.625,37.96875 http://localhost:8081/contact-list- spatial/georest/contact/list?SRID=900913
  • 42. Escopo Atual da Iniciativa Demoiselle Spatial Archetypes Doc v1.0 Hibernate Spatial DEMOISELLE FW Examples JPA Extension Feature Geocode KML Shapefile OGC-WS GeoRest Commom
  • 44. Listas Brazucas! /geoserver Informações sobre o grupo Associados: 479 Criado em: May 13, 2007 Idioma: Português /geojava Informações sobre o grupo Associados: 355 Criado em: Fev 25, 2006 Idioma: Português