git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-publishing/gCat-Feeder-Suite@178504 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7631769595
commit
0b2b6a6a19
|
@ -3,7 +3,7 @@ package org.gcube.data.publishing.gCatFeeder.crawlers.dm;
|
|||
import org.gcube.common.resources.gcore.GCoreEndpoint;
|
||||
import org.gcube.data.publishing.gCatFeeder.model.CatalogueInstanceDescriptor;
|
||||
import org.gcube.data.publishing.gCatFeeder.utils.ISUtils;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.CatalogueRetriever;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.CatalogueRetriever;
|
||||
|
||||
public class CKANRetriever implements CatalogueRetriever {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.Set;
|
|||
import org.gcube.data.publishing.gCatFeeder.crawlers.dm.model.CkanModel;
|
||||
import org.gcube.data.publishing.gCatFeeder.crawlers.dm.model.InternalAlgorithmDescriptor;
|
||||
import org.gcube.data.publishing.gCatFeeder.model.FormatData;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.DataTransformer;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.DataTransformer;
|
||||
|
||||
public class CKANTransformer implements DataTransformer<CkanModel, InternalAlgorithmDescriptor>{
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
|||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorCategory;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||
import org.gcube.data.publishing.gCatFeeder.crawlers.dm.model.InternalAlgorithmDescriptor;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.DataCollector;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.faults.CollectorFault;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.DataCollector;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.faults.CollectorFault;
|
||||
|
||||
|
||||
public class DMAlgorithmsInfoCollector implements DataCollector<InternalAlgorithmDescriptor> {
|
||||
|
|
|
@ -6,13 +6,13 @@ import java.util.Set;
|
|||
import org.gcube.data.publishing.gCatFeeder.crawlers.dm.model.CkanModel;
|
||||
import org.gcube.data.publishing.gCatFeeder.crawlers.dm.model.InternalAlgorithmDescriptor;
|
||||
import org.gcube.data.publishing.gCatFeeder.model.FormatData;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.CatalogueRetriever;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.CrawlerPlugin;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.DataCollector;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.DataTransformer;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.CustomData;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.PluginDescriptor;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.faults.CatalogueNotSupportedException;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.CatalogueRetriever;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.CrawlerPlugin;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.DataCollector;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.DataTransformer;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.CustomData;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.PluginDescriptor;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.faults.CatalogueNotSupportedException;
|
||||
|
||||
public class DataMinerCrawler implements CrawlerPlugin<InternalAlgorithmDescriptor> {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.crawlers.dm.model;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.model.FormatData;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.PublisherFormatData;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.PublisherFormatData;
|
||||
|
||||
public class CkanModel implements PublisherFormatData {
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.gcube.data.publishing.gCatFeeder.crawlers.dm.model;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.CustomData;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.CustomData;
|
||||
|
||||
public class InternalAlgorithmDescriptor implements CustomData {
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Manifest-Version: 1.0
|
||||
Built-By: fabio
|
||||
Build-Jdk: 1.8.0_201
|
||||
Created-By: Maven Integration for Eclipse
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#Generated by Maven Integration for Eclipse
|
||||
#Wed Mar 06 12:46:54 CET 2019
|
||||
version=1.0.0-SNAPSHOT
|
||||
groupId=org.gcube.data-publishing.gCat-Feeder
|
||||
m2e.projectName=DataMinerAlgorithmsCrawler
|
||||
m2e.projectLocation=/home/fabio/workspaces/DEV/gCat-Feeder-Suite/DataMinerAlgorithmsCrawler
|
||||
artifactId=DataMinerAlgorithmsCrawler
|
|
@ -0,0 +1,28 @@
|
|||
<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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.gcube.data-publishing.gCat-Feeder</groupId>
|
||||
<artifactId>gCat-Feeder-Suite</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>DataMinerAlgorithmsCrawler</artifactId>
|
||||
<name>DataMinerAlgorithmsCrawler</name>
|
||||
<description>Plugin for gCat-Feeder for DataMiner Algorithms publishing</description>
|
||||
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.data-publishing.gCat-Feeder</groupId>
|
||||
<artifactId>crawler-plugin-framework</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.data.analysis</groupId>
|
||||
<artifactId>data-miner-manager-cl</artifactId>
|
||||
<version>[1.6.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,5 @@
|
|||
Manifest-Version: 1.0
|
||||
Built-By: fabio
|
||||
Build-Jdk: 1.8.0_201
|
||||
Created-By: Maven Integration for Eclipse
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#Generated by Maven Integration for Eclipse
|
||||
#Wed Mar 06 12:46:42 CET 2019
|
||||
version=1.0.0-SNAPSHOT
|
||||
groupId=org.gcube.data-publishing.gCat-Feeder
|
||||
m2e.projectName=commons
|
||||
m2e.projectLocation=/home/fabio/workspaces/DEV/gCat-Feeder-Suite/commons
|
||||
artifactId=commons
|
|
@ -0,0 +1,33 @@
|
|||
<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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.gcube.data-publishing.gCat-Feeder</groupId>
|
||||
<artifactId>gCat-Feeder-Suite</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>commons</artifactId>
|
||||
<name>commons</name>
|
||||
<description>Common utilities for gCatFeeder logic</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.resourcemanagement</groupId>
|
||||
<artifactId>resourcemanager-client</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>authorization-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.model.CatalogueInstanceDescriptor;
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.model.FormatData;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.CustomData;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.PluginDescriptor;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.PublisherFormatData;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.faults.CatalogueNotSupportedException;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.CustomData;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.PluginDescriptor;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.PublisherFormatData;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.faults.CatalogueNotSupportedException;
|
||||
|
||||
public interface CrawlerPlugin<E extends CustomData>{
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.collectors;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.CustomData;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.faults.CollectorFault;
|
||||
|
||||
public interface DataCollector<T extends CustomData> {
|
||||
|
||||
|
||||
public Set<T> collect() throws CollectorFault;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.model.FormatData;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.CustomData;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.PublisherFormatData;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.CustomData;
|
||||
import org.gcube.data.publishing.gCatfeeder.collectors.model.PublisherFormatData;
|
||||
|
||||
public interface DataTransformer<T extends PublisherFormatData,E extends CustomData> {
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.collectors.model;
|
||||
|
||||
public interface CustomData {
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers.model;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers.model;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors.model;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.model.FormatData;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers.model.faults;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors.model.faults;
|
||||
|
||||
public class CatalogueNotFound extends CrawlerException {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers.model.faults;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors.model.faults;
|
||||
|
||||
public class CatalogueNotSupportedException extends CrawlerException {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers.model.faults;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors.model.faults;
|
||||
|
||||
public class CollectorFault extends CrawlerException {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers.model.faults;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors.model.faults;
|
||||
|
||||
public class CrawlerException extends Exception {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers.model.faults;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors.model.faults;
|
||||
|
||||
public class InvalidCustomData extends CrawlerException {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers.model.faults;
|
||||
package org.gcube.data.publishing.gCatfeeder.collectors.model.faults;
|
||||
|
||||
public class TransformException extends CrawlerException {
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.CustomData;
|
||||
import org.gcube.data.publishing.gCatfeeder.crawlers.model.faults.CollectorFault;
|
||||
|
||||
public interface DataCollector<T extends CustomData> {
|
||||
|
||||
|
||||
public Set<T> collect() throws CollectorFault;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
package org.gcube.data.publishing.gCatfeeder.crawlers.model;
|
||||
|
||||
public interface CustomData {
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
Manifest-Version: 1.0
|
||||
Built-By: fabio
|
||||
Build-Jdk: 1.8.0_201
|
||||
Created-By: Maven Integration for Eclipse
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#Generated by Maven Integration for Eclipse
|
||||
#Wed Mar 06 12:46:42 CET 2019
|
||||
version=1.0.0-SNAPSHOT
|
||||
groupId=org.gcube.data-publishing.gCat-Feeder
|
||||
m2e.projectName=crawler-plugin-framework
|
||||
m2e.projectLocation=/home/fabio/workspaces/DEV/gCat-Feeder-Suite/crawler-plugin-framework
|
||||
artifactId=crawler-plugin-framework
|
|
@ -0,0 +1,26 @@
|
|||
<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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.gcube.data-publishing.gCat-Feeder</groupId>
|
||||
<artifactId>gCat-Feeder-Suite</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>crawler-plugin-framework</artifactId>
|
||||
<name>crawler-plugin-framework</name>
|
||||
<description>Framework for crawler implementations</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.14.8</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.data-publishing.gCat-Feeder</groupId>
|
||||
<artifactId>commons</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -2,6 +2,10 @@ package org.gcube.data.publishing.gCatFeeder.service;
|
|||
|
||||
import javax.ws.rs.ApplicationPath;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.service.engine.FeederEngine;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.engine.impl.FeederEngineImpl;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.rest.Executions;
|
||||
import org.glassfish.hk2.utilities.binding.AbstractBinder;
|
||||
import org.glassfish.jersey.server.ResourceConfig;
|
||||
|
||||
@ApplicationPath(ServiceConstants.SERVICE_NAME)
|
||||
|
@ -10,8 +14,17 @@ public class GCatFeeder extends ResourceConfig{
|
|||
|
||||
public GCatFeeder() {
|
||||
super();
|
||||
|
||||
//
|
||||
AbstractBinder binder = new AbstractBinder() {
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(FeederEngineImpl.class).to(FeederEngine.class);
|
||||
// bind(ImporterImpl.class).to(Importer.class);
|
||||
// bind(PerformanceManagerImpl.class).to(PerformanceManager.class);
|
||||
}
|
||||
};
|
||||
register(binder);
|
||||
registerClasses(Executions.class);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.engine;
|
||||
|
||||
public interface CrawlersManager {
|
||||
public interface CollectorsManager {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.engine;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionDescriptor;
|
||||
|
||||
public interface ExecutionManager {
|
||||
|
||||
public void submit(ExecutionDescriptor desc);
|
||||
|
||||
public void stop();
|
||||
}
|
|
@ -3,12 +3,14 @@ package org.gcube.data.publishing.gCatFeeder.service.engine;
|
|||
import java.util.Collection;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionDescriptor;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionDescriptorFilter;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionRequest;
|
||||
|
||||
public interface FeederEngine {
|
||||
|
||||
public ExecutionDescriptor submit();
|
||||
public Collection<ExecutionDescriptor> get();
|
||||
public ExecutionDescriptor getById();
|
||||
public Collection<ExecutionDescriptor> get(ExecutionDescriptorFilter filter);
|
||||
public ExecutionDescriptor getById(String id);
|
||||
public ExecutionDescriptor submit(ExecutionRequest req);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.engine;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionDescriptor;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionDescriptorFilter;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionRequest;
|
||||
|
||||
public interface PersistenceManager {
|
||||
|
||||
public ExecutionDescriptor create(ExecutionRequest request);
|
||||
public ExecutionDescriptor getById(String id);
|
||||
public Collection<ExecutionDescriptor> get(ExecutionDescriptorFilter filter);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.engine.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.service.engine.CatalogueControllersManager;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.engine.CollectorsManager;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.engine.ExecutionManager;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.engine.FeederEngine;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.engine.PersistenceManager;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionDescriptor;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionDescriptorFilter;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionRequest;
|
||||
|
||||
|
||||
public class FeederEngineImpl implements FeederEngine {
|
||||
|
||||
@Inject
|
||||
private ExecutionManager executions;
|
||||
@Inject
|
||||
private CollectorsManager crawlers;
|
||||
@Inject
|
||||
private CatalogueControllersManager catalogues;
|
||||
@Inject
|
||||
private PersistenceManager persistence;
|
||||
|
||||
@Override
|
||||
public ExecutionDescriptor submit(ExecutionRequest req) {
|
||||
// verify request correctness
|
||||
// store in persistence : returns descriptor
|
||||
// pass it to executor
|
||||
// return the descriptor
|
||||
throw new RuntimeException("Not YET Implemented");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ExecutionDescriptor> get(ExecutionDescriptorFilter filter) {
|
||||
return persistence.get(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExecutionDescriptor getById(String id) {
|
||||
return persistence.getById(id);
|
||||
}
|
||||
|
||||
|
||||
private void verifyRequest(ExecutionRequest request) {
|
||||
// for each requested source check if available
|
||||
// for each requested target check if available
|
||||
//
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.model;
|
||||
|
||||
public class ExecutionDescriptorFilter {
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.model;
|
||||
|
||||
public class ExecutionRequest {
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.model.fault;
|
||||
|
||||
public class CollectorNotFound extends InternalError {
|
||||
|
||||
public CollectorNotFound() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public CollectorNotFound(String message) {
|
||||
super(message);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public CollectorNotFound(Throwable cause) {
|
||||
super(cause);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public CollectorNotFound(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public CollectorNotFound(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.model.fault;
|
||||
|
||||
public class DescriptorNotFound extends InternalError {
|
||||
|
||||
public DescriptorNotFound() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public DescriptorNotFound(String message) {
|
||||
super(message);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public DescriptorNotFound(Throwable cause) {
|
||||
super(cause);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public DescriptorNotFound(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public DescriptorNotFound(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.model.fault;
|
||||
|
||||
public class InternalError extends Exception {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 5814890947362301499L;
|
||||
|
||||
public InternalError() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public InternalError(String message) {
|
||||
super(message);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public InternalError(Throwable cause) {
|
||||
super(cause);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public InternalError(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public InternalError(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.model.fault;
|
||||
|
||||
public class PersistenceError extends InternalError {
|
||||
|
||||
public PersistenceError() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public PersistenceError(String message) {
|
||||
super(message);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public PersistenceError(Throwable cause) {
|
||||
super(cause);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public PersistenceError(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public PersistenceError(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package org.gcube.data.publishing.gCatFeeder.service.rest;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
|
@ -9,11 +10,15 @@ import javax.ws.rs.core.MediaType;
|
|||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.gcube.data.publishing.gCatFeeder.service.ServiceConstants;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.engine.FeederEngine;
|
||||
import org.gcube.data.publishing.gCatFeeder.service.model.ExecutionDescriptor;
|
||||
|
||||
@Path(ServiceConstants.Executions.PATH)
|
||||
public class Executions {
|
||||
|
||||
@Inject
|
||||
private FeederEngine engine;
|
||||
|
||||
|
||||
@POST
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
@ -25,6 +30,10 @@ public class Executions {
|
|||
@GET
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public Response getAll() {
|
||||
|
||||
|
||||
|
||||
|
||||
throw new WebApplicationException("Method Unavailable.", Response.Status.NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Manifest-Version: 1.0
|
||||
Built-By: fabio
|
||||
Build-Jdk: 1.8.0_201
|
||||
Created-By: Maven Integration for Eclipse
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#Generated by Maven Integration for Eclipse
|
||||
#Wed Mar 06 16:35:15 CET 2019
|
||||
version=1.0.0-SNAPSHOT
|
||||
groupId=org.gcube.data-publishing.gCat-Feeder
|
||||
m2e.projectName=gCat-Feeder
|
||||
m2e.projectLocation=/home/fabio/workspaces/DEV/gCat-Feeder-Suite/gCat-Feeder
|
||||
artifactId=gCat-Feeder
|
|
@ -0,0 +1,62 @@
|
|||
<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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.gcube.data-publishing.gCat-Feeder</groupId>
|
||||
<artifactId>gCat-Feeder-Suite</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>gCat-Feeder</artifactId>
|
||||
<name>gCat-Feeder</name>
|
||||
<description>Service implementation</description>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-smartgears-bom</artifactId>
|
||||
<version>LATEST</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId> org.glassfish.jersey </groupId>
|
||||
<artifactId>jersey-bom</artifactId>
|
||||
<version>2.25.1</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-smartgears-app</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-smartgears</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>javax.ws.rs-api</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.containers</groupId>
|
||||
<artifactId>jersey-container-servlet</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue