This commit is contained in:
Fabio Sinibaldi 2013-03-06 14:49:52 +00:00
parent 69da352dd6
commit 32b2fca18d
10 changed files with 153 additions and 2 deletions

1
distro/INSTALL Normal file
View File

@ -0,0 +1 @@
Used as library to communicate with Geonetwork

6
distro/LICENSE Normal file
View File

@ -0,0 +1,6 @@
gCube System - License
------------------------------------------------------------
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
The software and documentation is provided by its authors/distributors "as is" and no expressed or
implied warranty is given for its use, quality or fitness for a particular case.

2
distro/MAINTAINERS Normal file
View File

@ -0,0 +1,2 @@
* Sinibaldi Fabio (fabio.sinibaldi@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".

46
distro/README Normal file
View File

@ -0,0 +1,46 @@
The gCube System - MetadataManager
------------------------------------------------------------
This work has been partially supported by the following European projects: iMarine (FP7-INFRASTRUCTURES-2011-2), and EUBrazilOpenBio (FP7-ICT-2011-EU-Brazil).
Authors
-------
* Sinibaldi Fabio (fabio.sinibaldi@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".
Version and Release Date
------------------------
v. 1.0.0 (2013-03-01)
* Geonetwwork interaction
Description
-----------
Geonetwork communication layer
Download information
--------------------
Source code is available from SVN:
http://svn.d4science.research-infrastructures.eu/gcube/trunk/spatial-data/geonetwork
Documentation
-------------
Documentation is available on-line from the Projects Documentation Wiki:
https://technical.wiki.d4science.research-infrastructures.eu/documentation/index.php
Licensing
---------
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

6
distro/changelog.xml Normal file
View File

@ -0,0 +1,6 @@
<ReleaseNotes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="xsd/changelog.xsd">
<Changeset component="org.gcube.spatial-data.geonetowrk.1-0-0" date="2013-03-01">
<Change>First Release</Change>
</Changeset>
</ReleaseNotes>

42
distro/descriptor.xml Normal file
View File

@ -0,0 +1,42 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>servicearchive</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>/</baseDirectory>
<fileSets>
<fileSet>
<directory>${distroDirectory}</directory>
<outputDirectory>/</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>README</include>
<include>LICENSE</include>
<include>INSTALL</include>
<include>MAINTAINERS</include>
<include>changelog.xml</include>
</includes>
<fileMode>755</fileMode>
<filtered>true</filtered>
</fileSet>
</fileSets>
<files>
<file>
<source>${distroDirectory}/profile.xml</source>
<outputDirectory>/</outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>target/${build.finalName}.jar</source>
<outputDirectory>/${artifactId}</outputDirectory>
</file>
<file>
<source>${distroDirectory}/svnpath.txt</source>
<outputDirectory>/${artifactId}</outputDirectory>
<filtered>true</filtered>
</file>
</files>
</assembly>

25
distro/profile.xml Normal file
View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID />
<Type>Service</Type>
<Profile>
<Description>${description}</Description>
<Class>SpatialData</Class>
<Name>${artifactId}</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Name>${artifactId}</Name>
<Version>${version}</Version>
<MavenCoordinates>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
</MavenCoordinates>
<Files>
<File>${build.finalName}.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

1
distro/svnpath.txt Normal file
View File

@ -0,0 +1 @@
${scm.url}

14
pom.xml
View File

@ -9,6 +9,20 @@
<artifactId>gis-interface</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>gis-interface</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<geotools.version>8.0-M4</geotools.version>
<distroDirectory>distro</distroDirectory>
</properties>
<scm>
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/spatial-data/${project.artifactId}</connection>
<developerConnection>scm:svn:https://svn.d4science.research-infrastructures.eu/gcube/trunk/spatial-data/${project.artifactId}</developerConnection>
<url>http://svn.d4science.research-infrastructures.eu/gcube/trunk/spatial-data/${project.artifactId}</url>
</scm>
<dependencies>
<dependency>
<groupId>org.gcube.spatial.data</groupId>

View File

@ -3,7 +3,12 @@ package org.gcube.spatial.data.gis;
import it.geosolutions.geoserver.rest.GeoServerRESTManager;
import it.geosolutions.geoserver.rest.GeoServerRESTPublisher;
import it.geosolutions.geoserver.rest.GeoServerRESTReader;
import it.geosolutions.geoserver.rest.encoder.GSResourceEncoder.ProjectionPolicy;
import org.opengis.metadata.Metadata;
import java.io.File;
import java.io.FileNotFoundException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.SortedSet;
@ -126,10 +131,13 @@ public class GISInterface {
//******************* Complex logic
public void addGeoTIFF() throws Exception{
public void addGeoTIFF(String workspace, String storeName, String coverageName,
File geotiff,String srs,
ProjectionPolicy policy,String defaultStyle, double[] bbox,
Metadata geoNetworkMeta) throws FileNotFoundException, IllegalArgumentException, MalformedURLException,Exception{
GeoServerDescriptor desc=getGeoServerSet(false).last();
GeoServerRESTPublisher publisher=getGeoServerManager(desc.getUrl(), desc.getUser(), desc.getPassword()).getPublisher();
publisher.
boolean publishResult = publisher.publishGeoTIFF(workspace, storeName, coverageName, geotiff, srs, policy, defaultStyle, bbox);
}