Initial import.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/gcubedatacatalogue-metadata-discovery@129003 82a268e6-3cf1-43bd-a215-b396298e98cffeature/17423
parent
80809d1c98
commit
5bbf34ed13
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry including="**/*.java" kind="src" output="target/gcubedatacatalogue-metadata-discovery-0.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/gcubedatacatalogue-metadata-discovery-0.1.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
</classpath>
|
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>gcubedatacatalogue-metadata-discovery</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
|
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" path="src/main/webapp"/>
|
||||||
|
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="hide" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||||
|
<classpathentry kind="output" path=""/>
|
||||||
|
</classpath>
|
@ -0,0 +1,2 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
filesCopiedToWebInfLib=
|
@ -0,0 +1,6 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding//src/main/java=UTF-8
|
||||||
|
encoding//src/main/resources=UTF-8
|
||||||
|
encoding//src/test/java=UTF-8
|
||||||
|
encoding//src/test/resources=UTF-8
|
||||||
|
encoding/<project>=UTF-8
|
@ -0,0 +1,8 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.7
|
@ -0,0 +1,4 @@
|
|||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
<wb-module deploy-name="gcubedatacatalogue-metadata-discovery">
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
<property name="context-root" value="gcubedatacatalogue-metadata-discovery"/>
|
||||||
|
<property name="java-output-path" value="/gcubedatacatalogue-metadata-discovery/target/gcubedatacatalogue-metadata-discovery-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
</wb-module>
|
||||||
|
</project-modules>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<faceted-project>
|
||||||
|
<fixed facet="wst.jsdt.web"/>
|
||||||
|
<installed facet="java" version="1.7"/>
|
||||||
|
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||||
|
</faceted-project>
|
@ -0,0 +1 @@
|
|||||||
|
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
@ -0,0 +1 @@
|
|||||||
|
Window
|
@ -0,0 +1,2 @@
|
|||||||
|
disabled=06target
|
||||||
|
eclipse.preferences.version=1
|
@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<metadataformat>
|
||||||
|
<metadatafield>
|
||||||
|
<fieldName>Name</fieldName>
|
||||||
|
<mandatory>true</mandatory>
|
||||||
|
<isBoolean>false</isBoolean>
|
||||||
|
<defaulValue>default value</defaulValue>
|
||||||
|
<note>shown as suggestions in the insert/update metadata form of CKAN</note>
|
||||||
|
<vocabulary>
|
||||||
|
<vocabularyField>field1</vocabularyField>
|
||||||
|
<vocabularyField>field2</vocabularyField>
|
||||||
|
<vocabularyField>field3</vocabularyField>
|
||||||
|
</vocabulary>
|
||||||
|
<validator>
|
||||||
|
<regularExpression>a regular expression for validating values</regularExpression>
|
||||||
|
</validator>
|
||||||
|
</metadatafield>
|
||||||
|
<metadatafield>
|
||||||
|
<fieldName>Accessibility</fieldName>
|
||||||
|
<mandatory>true</mandatory>
|
||||||
|
<isBoolean>false</isBoolean>
|
||||||
|
<defaulValue>virtual/public</defaulValue>
|
||||||
|
<note>shown as suggestions in the insert metadata form of CKAN</note>
|
||||||
|
<vocabulary>
|
||||||
|
<vocabularyField>virtual/public</vocabularyField>
|
||||||
|
<vocabularyField>virtual/private</vocabularyField>
|
||||||
|
<vocabularyField>transactional</vocabularyField>
|
||||||
|
</vocabulary>
|
||||||
|
<validator>
|
||||||
|
<regularExpression>a regular expression for validating values</regularExpression>
|
||||||
|
</validator>
|
||||||
|
</metadatafield>
|
||||||
|
</metadataformat>
|
@ -0,0 +1,219 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>maven-parent</artifactId>
|
||||||
|
<groupId>org.gcube.tools</groupId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<relativePath />
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.gcube.data-catalogue</groupId>
|
||||||
|
<artifactId>gcubedatacatalogue-metadata-discovery</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
|
<name>The gCube data catalogue metadata discovery library</name>
|
||||||
|
<description>The gCube data catalogue metadata discovery library</description>
|
||||||
|
<scm>
|
||||||
|
<url>https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</url>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<name>Francesco Mangiacrapa</name>
|
||||||
|
<email>francesco.mangiacrapa@isti.cnr.it</email>
|
||||||
|
<organization>CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"</organization>
|
||||||
|
<roles>
|
||||||
|
<role>architect</role>
|
||||||
|
<role>developer</role>
|
||||||
|
</roles>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.distribution</groupId>
|
||||||
|
<artifactId>maven-bom</artifactId>
|
||||||
|
<version>LATEST</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
||||||
|
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
||||||
|
<distroDirectory>distro</distroDirectory>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<!-- GWT needs at least java 1.6 -->
|
||||||
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-core</artifactId>
|
||||||
|
<version>2.2.11</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-impl</artifactId>
|
||||||
|
<version>2.2.11</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- LOGGER -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>log4j</groupId>
|
||||||
|
<artifactId>log4j</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JUNIT -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.8.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<!-- Generate compiled stuff in the folder used for developing mode -->
|
||||||
|
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/java</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.*</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>${maven.compiler.source}</source>
|
||||||
|
<target>${maven.compiler.target}</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>test-jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.16</version>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>true</skipTests>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-profile</id>
|
||||||
|
<phase>install</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>target</outputDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>${distroDirectory}</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
<includes>
|
||||||
|
<include>profile.xml</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<mainClass>fully.qualified.MainClass</mainClass>
|
||||||
|
</manifest>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>servicearchive</id>
|
||||||
|
<phase>install</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<!-- <plugin> -->
|
||||||
|
<!-- <artifactId>maven-clean-plugin</artifactId> -->
|
||||||
|
<!-- <version>2.5</version> -->
|
||||||
|
<!-- <configuration> -->
|
||||||
|
<!-- <filesets> -->
|
||||||
|
<!-- <fileset> -->
|
||||||
|
<!-- <directory>${distroDirectory}</directory> -->
|
||||||
|
<!-- <includes> -->
|
||||||
|
<!-- <include>**</include> -->
|
||||||
|
<!-- </includes> -->
|
||||||
|
<!-- <followSymlinks>false</followSymlinks> -->
|
||||||
|
<!-- </fileset> -->
|
||||||
|
<!-- <fileset> -->
|
||||||
|
<!-- <directory>${configDirectory}</directory> -->
|
||||||
|
<!-- <includes> -->
|
||||||
|
<!-- <include>**</include> -->
|
||||||
|
<!-- </includes> -->
|
||||||
|
<!-- <followSymlinks>false</followSymlinks> -->
|
||||||
|
<!-- </fileset> -->
|
||||||
|
<!-- </filesets> -->
|
||||||
|
<!-- </configuration> -->
|
||||||
|
<!-- </plugin> -->
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
@ -0,0 +1,10 @@
|
|||||||
|
package org.gcube.datacatalogue.metadatadiscovery;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Entry point classes define <code>onModuleLoad()</code>.
|
||||||
|
*/
|
||||||
|
public class DataCalogueDiscovery {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,104 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.datacatalogue.metadatadiscovery;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBContext;
|
||||||
|
import javax.xml.bind.JAXBException;
|
||||||
|
import javax.xml.bind.Marshaller;
|
||||||
|
import javax.xml.bind.Unmarshaller;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* May 27, 2016
|
||||||
|
*/
|
||||||
|
public class MainJaxb {
|
||||||
|
|
||||||
|
static MetadataField ckanMetadata;
|
||||||
|
static MetadataFormat metadatas;
|
||||||
|
static String tmpFileXML = "." + File.separator + "CkanMetadatas.xml";
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
metadatas = new MetadataFormat();
|
||||||
|
|
||||||
|
ckanMetadata = new MetadataField();
|
||||||
|
ckanMetadata.setFieldName("Name");
|
||||||
|
ckanMetadata.setMandatory(true);
|
||||||
|
ckanMetadata.setDefaulValue("default value");
|
||||||
|
List<String> vocabulary = new ArrayList<String>();
|
||||||
|
vocabulary.add("field1");
|
||||||
|
vocabulary.add("field2");
|
||||||
|
vocabulary.add("field3");
|
||||||
|
MetadataVocabulary cvc = new MetadataVocabulary(vocabulary);
|
||||||
|
ckanMetadata.setVocabulary(cvc);
|
||||||
|
ckanMetadata.setNote("shown as suggestions in the insert/update metadata form of CKAN");
|
||||||
|
MetadataValidator validator = new MetadataValidator("a regular expression for validating values");
|
||||||
|
ckanMetadata.setValidator(validator);
|
||||||
|
metadatas.addMetadata(ckanMetadata);
|
||||||
|
|
||||||
|
ckanMetadata = new MetadataField();
|
||||||
|
ckanMetadata.setFieldName("Accessibility");
|
||||||
|
ckanMetadata.setMandatory(true);
|
||||||
|
ckanMetadata.setDefaulValue("virtual/public");
|
||||||
|
List<String> vocabulary2 = new ArrayList<String>();
|
||||||
|
vocabulary2.add("virtual/public");
|
||||||
|
vocabulary2.add("virtual/private");
|
||||||
|
vocabulary2.add("transactional");
|
||||||
|
MetadataVocabulary cvc2 = new MetadataVocabulary(vocabulary2);
|
||||||
|
ckanMetadata.setVocabulary(cvc2);
|
||||||
|
ckanMetadata.setNote("shown as suggestions in the insert metadata form of CKAN");
|
||||||
|
MetadataValidator validator2 = new MetadataValidator("a regular expression for validating values");
|
||||||
|
ckanMetadata.setValidator(validator2);
|
||||||
|
|
||||||
|
metadatas.addMetadata(ckanMetadata);
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
marshalingExample();
|
||||||
|
unMarshalingExample();
|
||||||
|
}
|
||||||
|
catch (JAXBException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void marshalingExample() throws JAXBException
|
||||||
|
{
|
||||||
|
JAXBContext jaxbContext = JAXBContext.newInstance(MetadataFormat.class);
|
||||||
|
Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
|
||||||
|
|
||||||
|
jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
|
||||||
|
|
||||||
|
//Marshal the employees list in console
|
||||||
|
// jaxbMarshaller.marshal(employees, System.out);
|
||||||
|
|
||||||
|
//Marshal the employees list in file
|
||||||
|
jaxbMarshaller.marshal(metadatas, new File(tmpFileXML));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void unMarshalingExample() throws JAXBException
|
||||||
|
{
|
||||||
|
JAXBContext jaxbContext = JAXBContext.newInstance(MetadataFormat.class);
|
||||||
|
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
|
||||||
|
|
||||||
|
//We had written this file in marshalling example
|
||||||
|
MetadataFormat mtds = (MetadataFormat) jaxbUnmarshaller.unmarshal(new File(tmpFileXML));
|
||||||
|
|
||||||
|
for(MetadataField mtd : mtds.getMetadataFields())
|
||||||
|
{
|
||||||
|
System.out.println(mtd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,217 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.datacatalogue.metadatadiscovery;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* May 27, 2016
|
||||||
|
*/
|
||||||
|
@XmlRootElement(name="metadatafield")
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
public class MetadataField {
|
||||||
|
|
||||||
|
private String fieldName;
|
||||||
|
private Boolean mandatory = false;
|
||||||
|
private Boolean isBoolean = false;
|
||||||
|
private String defaulValue;
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
//It's the list of eligible values;
|
||||||
|
@XmlElement(name = "vocabulary")
|
||||||
|
private MetadataVocabulary vocabulary;
|
||||||
|
|
||||||
|
@XmlElement(name = "validator")
|
||||||
|
private MetadataValidator validator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public MetadataField() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param fieldName
|
||||||
|
* @param mandatory
|
||||||
|
* @param isBoolean
|
||||||
|
* @param defaulValue
|
||||||
|
* @param note
|
||||||
|
* @param vocabulary
|
||||||
|
* @param validator
|
||||||
|
*/
|
||||||
|
public MetadataField(
|
||||||
|
String fieldName, Boolean mandatory, Boolean isBoolean,
|
||||||
|
String defaulValue, String note, MetadataVocabulary vocabulary,
|
||||||
|
MetadataValidator validator) {
|
||||||
|
|
||||||
|
this.fieldName = fieldName;
|
||||||
|
this.mandatory = mandatory;
|
||||||
|
this.isBoolean = isBoolean;
|
||||||
|
this.defaulValue = defaulValue;
|
||||||
|
this.note = note;
|
||||||
|
this.vocabulary = vocabulary;
|
||||||
|
this.validator = validator;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the fieldName
|
||||||
|
*/
|
||||||
|
public String getFieldName() {
|
||||||
|
|
||||||
|
return fieldName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the mandatory
|
||||||
|
*/
|
||||||
|
public Boolean getMandatory() {
|
||||||
|
|
||||||
|
return mandatory;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the isBoolean
|
||||||
|
*/
|
||||||
|
public Boolean isBoolean() {
|
||||||
|
|
||||||
|
return isBoolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the defaulValue
|
||||||
|
*/
|
||||||
|
public String getDefaulValue() {
|
||||||
|
|
||||||
|
return defaulValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the note
|
||||||
|
*/
|
||||||
|
public String getNote() {
|
||||||
|
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the vocabulary
|
||||||
|
*/
|
||||||
|
public MetadataVocabulary getVocabulary() {
|
||||||
|
|
||||||
|
return vocabulary;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the validator
|
||||||
|
*/
|
||||||
|
public MetadataValidator getValidator() {
|
||||||
|
|
||||||
|
return validator;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param fieldName the fieldName to set
|
||||||
|
*/
|
||||||
|
public void setFieldName(String fieldName) {
|
||||||
|
|
||||||
|
this.fieldName = fieldName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mandatory the mandatory to set
|
||||||
|
*/
|
||||||
|
public void setMandatory(Boolean mandatory) {
|
||||||
|
|
||||||
|
this.mandatory = mandatory;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param isBoolean the isBoolean to set
|
||||||
|
*/
|
||||||
|
public void setIsBoolean(Boolean isBoolean) {
|
||||||
|
|
||||||
|
this.isBoolean = isBoolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param defaulValue the defaulValue to set
|
||||||
|
*/
|
||||||
|
public void setDefaulValue(String defaulValue) {
|
||||||
|
|
||||||
|
this.defaulValue = defaulValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param note the note to set
|
||||||
|
*/
|
||||||
|
public void setNote(String note) {
|
||||||
|
|
||||||
|
this.note = note;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param vocabulary the vocabulary to set
|
||||||
|
*/
|
||||||
|
public void setVocabulary(MetadataVocabulary vocabulary) {
|
||||||
|
|
||||||
|
this.vocabulary = vocabulary;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param validator the validator to set
|
||||||
|
*/
|
||||||
|
public void setValidator(MetadataValidator validator) {
|
||||||
|
|
||||||
|
this.validator = validator;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see java.lang.Object#toString()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("CkanMetadata [fieldName=");
|
||||||
|
builder.append(fieldName);
|
||||||
|
builder.append(", mandatory=");
|
||||||
|
builder.append(mandatory);
|
||||||
|
builder.append(", isBoolean=");
|
||||||
|
builder.append(isBoolean);
|
||||||
|
builder.append(", defaulValue=");
|
||||||
|
builder.append(defaulValue);
|
||||||
|
builder.append(", note=");
|
||||||
|
builder.append(note);
|
||||||
|
builder.append(", vocabulary=");
|
||||||
|
builder.append(vocabulary);
|
||||||
|
builder.append(", validator=");
|
||||||
|
builder.append(validator);
|
||||||
|
builder.append("]");
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.datacatalogue.metadatadiscovery;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class MetadataFormat.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* May 27, 2016
|
||||||
|
*/
|
||||||
|
@XmlRootElement(name="metadataformat")
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
public class MetadataFormat {
|
||||||
|
|
||||||
|
@XmlElement(name = "metadatafield")
|
||||||
|
private List<MetadataField> metadataFields;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the metadataFields
|
||||||
|
*/
|
||||||
|
public List<MetadataField> getMetadataFields() {
|
||||||
|
|
||||||
|
return metadataFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param metadataFields the metadataFields to set
|
||||||
|
*/
|
||||||
|
public void setMetadataFields(List<MetadataField> metadataFields) {
|
||||||
|
|
||||||
|
this.metadataFields = metadataFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the metadatas.
|
||||||
|
*
|
||||||
|
* @param metadatas the metadatas to set
|
||||||
|
*/
|
||||||
|
public void setMetadatas(List<MetadataField> metadatas) {
|
||||||
|
|
||||||
|
this.metadataFields = metadatas;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the metadata.
|
||||||
|
*
|
||||||
|
* @param metadata the metadata
|
||||||
|
*/
|
||||||
|
public void addMetadata(MetadataField metadata){
|
||||||
|
if(this.metadataFields==null)
|
||||||
|
this.metadataFields = new ArrayList<MetadataField>();
|
||||||
|
|
||||||
|
this.metadataFields.add(metadata);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see java.lang.Object#toString()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("MetadataFormat [metadataFields=");
|
||||||
|
builder.append(metadataFields);
|
||||||
|
builder.append("]");
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,74 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.datacatalogue.metadatadiscovery;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* May 27, 2016
|
||||||
|
*/
|
||||||
|
@XmlRootElement(name = "metadatavalidator")
|
||||||
|
@XmlAccessorType (XmlAccessType.FIELD)
|
||||||
|
public class MetadataValidator {
|
||||||
|
|
||||||
|
private String regularExpression;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public MetadataValidator() {
|
||||||
|
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param regularExpression
|
||||||
|
*/
|
||||||
|
public MetadataValidator(String regularExpression) {
|
||||||
|
|
||||||
|
super();
|
||||||
|
this.regularExpression = regularExpression;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the regularExpression
|
||||||
|
*/
|
||||||
|
public String getRegularExpression() {
|
||||||
|
|
||||||
|
return regularExpression;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param regularExpression the regularExpression to set
|
||||||
|
*/
|
||||||
|
public void setRegularExpression(String regularExpression) {
|
||||||
|
|
||||||
|
this.regularExpression = regularExpression;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see java.lang.Object#toString()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("MetadataValidator [regularExpression=");
|
||||||
|
builder.append(regularExpression);
|
||||||
|
builder.append("]");
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.datacatalogue.metadatadiscovery;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class MetadataVocabulary.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* May 27, 2016
|
||||||
|
*/
|
||||||
|
@XmlRootElement(name = "metadatavocabulary")
|
||||||
|
@XmlAccessorType (XmlAccessType.FIELD)
|
||||||
|
public class MetadataVocabulary {
|
||||||
|
|
||||||
|
private List<String> vocabularyField;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new metadata vocabulary.
|
||||||
|
*/
|
||||||
|
public MetadataVocabulary() {
|
||||||
|
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new metadata vocabulary.
|
||||||
|
*
|
||||||
|
* @param vocabularyFields the vocabulary fields
|
||||||
|
*/
|
||||||
|
public MetadataVocabulary(List<String> vocabularyFields) {
|
||||||
|
|
||||||
|
super();
|
||||||
|
this.vocabularyField = vocabularyFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the vocabulary fields.
|
||||||
|
*
|
||||||
|
* @return the vocabularyField
|
||||||
|
*/
|
||||||
|
public List<String> getVocabularyFields() {
|
||||||
|
|
||||||
|
return vocabularyField;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the vocabulary field.
|
||||||
|
*
|
||||||
|
* @param vocabularyField the vocabularyField to set
|
||||||
|
*/
|
||||||
|
public void setVocabularyField(List<String> vocabularyField) {
|
||||||
|
|
||||||
|
this.vocabularyField = vocabularyField;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see java.lang.Object#toString()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("MetadataVocabulary [vocabularyField=");
|
||||||
|
builder.append(vocabularyField);
|
||||||
|
builder.append("]");
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module rename-to='DataCalogueDiscovery'>
|
||||||
|
<!-- Inherit the core Web Toolkit stuff. -->
|
||||||
|
<inherits name='com.google.gwt.user.User' />
|
||||||
|
|
||||||
|
<!-- Inherit the default GWT style sheet. You can change -->
|
||||||
|
<!-- the theme of your GWT application by uncommenting -->
|
||||||
|
<!-- any one of the following lines. -->
|
||||||
|
<inherits name='com.google.gwt.user.theme.standard.Standard' />
|
||||||
|
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||||
|
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||||
|
|
||||||
|
<!-- Other module inherits -->
|
||||||
|
|
||||||
|
<!-- Specify the app entry point class. -->
|
||||||
|
<entry-point class='org.gcube.datacatalogue.metadatadiscovery.client.DataCalogueDiscovery' />
|
||||||
|
|
||||||
|
<!-- Specify the paths for translatable code -->
|
||||||
|
<source path='client' />
|
||||||
|
<source path='shared' />
|
||||||
|
|
||||||
|
</module>
|
@ -0,0 +1,2 @@
|
|||||||
|
sendButton = Envoyer
|
||||||
|
nameField = Entrez votre nom
|
@ -0,0 +1,34 @@
|
|||||||
|
/** Add css rules here for your application. */
|
||||||
|
|
||||||
|
|
||||||
|
/** Example rules used by the template application (remove for your app) */
|
||||||
|
h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #777777;
|
||||||
|
margin: 40px 0px 70px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sendButton {
|
||||||
|
display: block;
|
||||||
|
font-size: 16pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Most GWT widgets already have a style name defined */
|
||||||
|
.gwt-DialogBox {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogVPanel {
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.serverResponseLabelError {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set ids using widget.getElement().setId("idOfElement") */
|
||||||
|
#closeButton {
|
||||||
|
margin: 15px 6px 6px;
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<!-- The DOCTYPE declaration above will set the -->
|
||||||
|
<!-- browser's rendering engine into -->
|
||||||
|
<!-- "Standards Mode". Replacing this declaration -->
|
||||||
|
<!-- with a "Quirks Mode" doctype may lead to some -->
|
||||||
|
<!-- differences in layout. -->
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<!-- Consider inlining CSS to reduce the number of requested files -->
|
||||||
|
<!-- -->
|
||||||
|
<link type="text/css" rel="stylesheet" href="DataCalogueDiscovery.css">
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<!-- Any title is fine -->
|
||||||
|
<!-- -->
|
||||||
|
<title>Web Application Starter Project</title>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<!-- This script loads your compiled module. -->
|
||||||
|
<!-- If you add any GWT meta tags, they must -->
|
||||||
|
<!-- be added before this line. -->
|
||||||
|
<!-- -->
|
||||||
|
<script type="text/javascript" language="javascript" src="DataCalogueDiscovery/DataCalogueDiscovery.nocache.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<!-- The body can have arbitrary html, or -->
|
||||||
|
<!-- you can leave the body empty if you want -->
|
||||||
|
<!-- to create a completely dynamic UI. -->
|
||||||
|
<!-- -->
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- OPTIONAL: include this if you want history support -->
|
||||||
|
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
|
||||||
|
|
||||||
|
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
|
||||||
|
<noscript>
|
||||||
|
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
|
||||||
|
Your web browser must have JavaScript enabled
|
||||||
|
in order for this application to display correctly.
|
||||||
|
</div>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
<h1>Web Application Starter Project</h1>
|
||||||
|
|
||||||
|
<table align="center">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" style="font-weight:bold;">Please enter your name:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id="nameFieldContainer"></td>
|
||||||
|
<td id="sendButtonContainer"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" style="color:red;" id="errorLabelContainer"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE web-app
|
||||||
|
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||||
|
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||||
|
|
||||||
|
<web-app>
|
||||||
|
|
||||||
|
<!-- Servlets -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>greetServlet</servlet-name>
|
||||||
|
<servlet-class>org.gcube.datacatalogue.metadatadiscovery.server.GreetingServiceImpl</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>greetServlet</servlet-name>
|
||||||
|
<url-pattern>/DataCalogueDiscovery/greet</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- Default page to serve -->
|
||||||
|
<welcome-file-list>
|
||||||
|
<welcome-file>DataCalogueDiscovery.html</welcome-file>
|
||||||
|
</welcome-file-list>
|
||||||
|
|
||||||
|
</web-app>
|
Loading…
Reference in New Issue