From 459e87168c7bab0afa89cfcc54a2ed8c7e42b452 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 3 Feb 2016 17:32:47 +0000 Subject: [PATCH] Initial import. git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/social-networking/social-data-indexer-se-plugin@122817 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 36 ++++++ .project | 23 ++++ .settings/org.eclipse.core.resources.prefs | 6 + .settings/org.eclipse.jdt.core.prefs | 5 + .settings/org.eclipse.m2e.core.prefs | 4 + pom.xml | 113 ++++++++++++++++++ .../SocialDataIndexerPlugin.java | 40 +++++++ .../SocialDataIndexerPluginDeclaration.java | 67 +++++++++++ ...nagement.executor.plugin.PluginDeclaration | 1 + src/test/resources/logback-test.xml | 16 +++ 10 files changed, 311 insertions(+) create mode 100644 .classpath create mode 100644 .project create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 .settings/org.eclipse.jdt.core.prefs create mode 100644 .settings/org.eclipse.m2e.core.prefs create mode 100644 pom.xml create mode 100644 src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPlugin.java create mode 100644 src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPluginDeclaration.java create mode 100644 src/main/resources/META-INF/services/org.gcube.vremanagement.executor.plugin.PluginDeclaration create mode 100644 src/test/resources/logback-test.xml diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..e43402f --- /dev/null +++ b/.classpath @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..5811150 --- /dev/null +++ b/.project @@ -0,0 +1,23 @@ + + + social-data-indexer-se-plugin + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..29abf99 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -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/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec4300d --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..2d5a995 --- /dev/null +++ b/pom.xml @@ -0,0 +1,113 @@ + + 4.0.0 + + org.gcube.tools + maven-parent + 1.0.0 + + org.gcube.socialnetworking + social-data-indexer-se-plugin + 1.0.0-SNAPSHOT + Social Data Indexer Smart Executor Plugin + Social Data Indexer Smart Executor Plugin + + + scm:https://svn.d4science.research-infrastructures.eu/gcube/trunk/${serviceClass}/${project.artifactId} + scm:https://svn.d4science.research-infrastructures.eu/gcube/trunk/${serviceClass}/${project.artifactId} + https://svn.d4science.research-infrastructures.eu/gcube/trunk/${serviceClass}/${project.artifactId} + + + + UTF-8 + src/main/resources/META-INF/services + distro + social-networking + + + + + + org.gcube.distribution + maven-smartgears-bom + LATEST + pom + import + + + + + + + org.gcube.vremanagement + smart-executor-api + [1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT) + + + org.slf4j + slf4j-api + provided + + + + + junit + junit + 4.11 + test + + + ch.qos.logback + logback-classic + 1.0.13 + test + + + + + + + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + + + + org.apache.maven.plugins + maven-assembly-plugin + + + ${distroDirectory}/descriptor.xml + + + + + servicearchive + install + + single + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + jar-with-dependencies + + + + + package + + single + + + + + + + \ No newline at end of file diff --git a/src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPlugin.java b/src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPlugin.java new file mode 100644 index 0000000..aa2112c --- /dev/null +++ b/src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPlugin.java @@ -0,0 +1,40 @@ +/** + * + */ +package org.gcube.socialnetworking.socialdataindexer; + +import java.util.Map; + +import org.gcube.vremanagement.executor.plugin.Plugin; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class SocialDataIndexerPlugin extends Plugin{ + + /** + * Logger + */ + private static Logger logger = LoggerFactory.getLogger(SocialDataIndexerPlugin.class); + + public SocialDataIndexerPlugin(SocialDataIndexerPluginDeclaration pluginDeclaration) { + super(pluginDeclaration); + logger.debug("contructor"); + } + + /**{@inheritDoc}*/ + @Override + public void launch(Map inputs) throws Exception { + // TODO Auto-generated method stub + } + + /**{@inheritDoc}*/ + @Override + protected void onStop() throws Exception { + logger.debug("onStop()"); + + Thread.currentThread().interrupt(); + } + + +} diff --git a/src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPluginDeclaration.java b/src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPluginDeclaration.java new file mode 100644 index 0000000..5524fa3 --- /dev/null +++ b/src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPluginDeclaration.java @@ -0,0 +1,67 @@ +/** + * + */ +package org.gcube.socialnetworking.socialdataindexer; + +import java.util.HashMap; +import java.util.Map; + +import org.gcube.vremanagement.executor.plugin.Plugin; +import org.gcube.vremanagement.executor.plugin.PluginDeclaration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class SocialDataIndexerPluginDeclaration implements PluginDeclaration { + + /** + * Logger + */ + private static Logger logger = LoggerFactory.getLogger(SocialDataIndexerPluginDeclaration.class); + + /** + * Plugin name used by the Executor to retrieve this class + */ + public static final String NAME = ""; + public static final String DESCRIPTION = ""; + public static final String VERSION = "1.0.0"; + + /**{@inheritDoc}*/ + @Override + public void init() { + logger.debug(String.format("%s initialized", SocialDataIndexerPluginDeclaration.class.getSimpleName())); + } + + /**{@inheritDoc}*/ + @Override + public String getName() { + return NAME; + } + + /**{@inheritDoc}*/ + @Override + public String getDescription() { + return DESCRIPTION; + } + + /**{@inheritDoc}*/ + @Override + public String getVersion() { + return VERSION; + } + + /**{@inheritDoc}*/ + @Override + public Map getSupportedCapabilities() { + Map discoveredCapabilities = new HashMap(); + // No capabilities to discover + return discoveredCapabilities; + } + + /**{@inheritDoc}*/ + @Override + public Class> getPluginImplementation() { + return SocialDataIndexerPlugin.class; + } + +} diff --git a/src/main/resources/META-INF/services/org.gcube.vremanagement.executor.plugin.PluginDeclaration b/src/main/resources/META-INF/services/org.gcube.vremanagement.executor.plugin.PluginDeclaration new file mode 100644 index 0000000..a369147 --- /dev/null +++ b/src/main/resources/META-INF/services/org.gcube.vremanagement.executor.plugin.PluginDeclaration @@ -0,0 +1 @@ +org.gcube.socialnetworking.socialdataindexer.SocialDataIndexerPluginDeclaration \ No newline at end of file diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml new file mode 100644 index 0000000..9325e37 --- /dev/null +++ b/src/test/resources/logback-test.xml @@ -0,0 +1,16 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}: %msg%n + + + + + + + + + + + \ No newline at end of file