Code redesign
Refs #11756: Refactor DataHArvesterPlugin to support scheduled execution from smart-executor Task-Url: https://support.d4science.org/issues/11756 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-dashboard-harvester-se-plugin@167596 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a91ece8a0f
commit
9db4794c16
|
@ -24,6 +24,10 @@ import org.gcube.vremanagement.executor.plugin.Plugin;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class AccountingDataHarvesterPlugin extends Plugin<DataHarvestPluginDeclaration> {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(AccountingDataHarvesterPlugin.class);
|
||||
|
@ -70,15 +74,6 @@ public class AccountingDataHarvesterPlugin extends Plugin<DataHarvestPluginDecla
|
|||
|
||||
}
|
||||
|
||||
private static final InheritableThreadLocal<ContextAuthorization> contextAuthorization = new InheritableThreadLocal<ContextAuthorization>() {
|
||||
|
||||
@Override
|
||||
protected ContextAuthorization initialValue() {
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public void launch(Map<String,Object> inputs) throws Exception {
|
||||
|
|
|
@ -9,9 +9,14 @@ import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class DataHarvestPluginDeclaration implements PluginDeclaration {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(DataHarvestPluginDeclaration.class);
|
||||
|
||||
public static final String NAME = "AccountingDataHarvester";
|
||||
public static final String DESCRIPTION = "Data Harvest for Accounting Summary Dashboard";
|
||||
public static final String VERSION = "1.0.0";
|
||||
|
|
|
@ -15,6 +15,10 @@ import org.postgresql.util.PSQLException;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class Dao {
|
||||
private Connection conn = null;
|
||||
private static Logger logger = LoggerFactory.getLogger(Dao.class);
|
||||
|
|
|
@ -4,7 +4,6 @@ package org.gcube.dataharvest.dao;
|
|||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
|
||||
public class DatabaseConnectionData {
|
||||
|
||||
protected String uri;
|
||||
|
|
|
@ -7,6 +7,10 @@ import org.gcube.dataharvest.datamodel.HarvestedData;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class DatabaseManager {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(DatabaseManager.class);
|
||||
|
|
|
@ -40,7 +40,8 @@ public class DatabaseParameterRetriever {
|
|||
|
||||
protected void checkParameter(String parameter, String parameterName, boolean localDB) throws DaoException {
|
||||
if(parameter == null || parameter.isEmpty()) {
|
||||
throw new DaoException("DB " + parameterName + " cannot be null nor empty. Please check your " + (localDB ? "local configuration." : "ServiceEndpoint"));
|
||||
throw new DaoException("DB " + parameterName + " cannot be null nor empty. Please check your "
|
||||
+ (localDB ? "local configuration." : "ServiceEndpoint"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,7 +67,8 @@ public class DatabaseParameterRetriever {
|
|||
query.addCondition(
|
||||
String.format("$resource/Profile/Category/text() eq '%s'", SERVICE_ENDPOINT_CATEGORY));
|
||||
query.addCondition(String.format("$resource/Profile/Name/text() eq '%s'", SERVICE_ENDPOINT_NAME));
|
||||
query.addCondition(String.format("$resource/Profile/AccessPoint/Interface/Endpoint/@EntryName eq '%s'", className));
|
||||
query.addCondition(String.format("$resource/Profile/AccessPoint/Interface/Endpoint/@EntryName eq '%s'",
|
||||
className));
|
||||
|
||||
DiscoveryClient<ServiceEndpoint> client = ICFactory.clientFor(ServiceEndpoint.class);
|
||||
List<ServiceEndpoint> serviceEndpoints = client.submit(query);
|
||||
|
|
|
@ -3,6 +3,10 @@ package org.gcube.dataharvest.datamodel;
|
|||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class HarvestedData implements Serializable {
|
||||
|
||||
/**
|
||||
|
@ -46,7 +50,6 @@ public class HarvestedData implements Serializable {
|
|||
this.measure = measure;
|
||||
}
|
||||
|
||||
|
||||
public void setDataType(int dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@ public abstract class BasicHarvester {
|
|||
public Date startDate;
|
||||
public Date endDate;
|
||||
|
||||
|
||||
|
||||
public BasicHarvester(Date start, Date end) throws ParseException {
|
||||
startDate = start;
|
||||
endDate = end;
|
||||
|
@ -33,7 +31,6 @@ public abstract class BasicHarvester {
|
|||
return context;
|
||||
}
|
||||
|
||||
|
||||
public static void setContext(String token) throws Exception {
|
||||
SecurityTokenProvider.instance.set(token);
|
||||
ScopeProvider.instance.set(getCurrentContext(token));
|
||||
|
|
|
@ -15,6 +15,10 @@ import org.json.JSONObject;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class SocialHarvester extends BasicHarvester {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(SocialHarvester.class);
|
||||
|
|
|
@ -14,9 +14,12 @@ import org.json.JSONObject;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class VreUsersHarvester extends BasicHarvester {
|
||||
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(VreUsersHarvester.class);
|
||||
|
||||
public VreUsersHarvester(Date start, Date end) throws ParseException {
|
||||
|
|
|
@ -22,6 +22,10 @@ import org.gcube.dataharvest.utils.Utils;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class DataMethodDownloadHarvester extends BasicHarvester {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(DataMethodDownloadHarvester.class);
|
||||
|
@ -45,6 +49,7 @@ public class DataMethodDownloadHarvester extends BasicHarvester {
|
|||
|
||||
String user = getVREName(context) + "-Manager";
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
Home home = manager.getHome(user);
|
||||
|
||||
JCRWorkspace ws = (JCRWorkspace) home.getWorkspace();
|
||||
|
@ -69,7 +74,6 @@ public class DataMethodDownloadHarvester extends BasicHarvester {
|
|||
|
||||
}
|
||||
|
||||
|
||||
private void getStats(WorkspaceItem root, Date start, Date end) throws InternalErrorException {
|
||||
List<? extends WorkspaceItem> children;
|
||||
if(root.isFolder()) {
|
||||
|
@ -87,7 +91,8 @@ public class DataMethodDownloadHarvester extends BasicHarvester {
|
|||
case UPDATE:
|
||||
case READ:
|
||||
Calendar calendar = entry.getDate();
|
||||
if (calendar.after(Utils.dateToCalendar(start)) && calendar.before(Utils.dateToCalendar(end))) {
|
||||
if(calendar.after(Utils.dateToCalendar(start))
|
||||
&& calendar.before(Utils.dateToCalendar(end))) {
|
||||
count++;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@ import org.gcube.dataharvest.harvester.BasicHarvester;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class MethodInvocationHarvester extends BasicHarvester {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(MethodInvocationHarvester.class);
|
||||
|
|
|
@ -16,6 +16,10 @@ import org.json.JSONObject;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class ResourceCatalogueHarvester extends BasicHarvester {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(ResourceCatalogueHarvester.class);
|
||||
|
@ -91,8 +95,8 @@ public class ResourceCatalogueHarvester extends BasicHarvester {
|
|||
JSONObject response = jsonObject.getJSONObject("response");
|
||||
|
||||
int numFound = response.getInt("numFound");
|
||||
HarvestedData h = new HarvestedData(dataType, "/d4science.research-infrastructures.eu/SoBigData/ResourceCatalogue",
|
||||
numFound);
|
||||
HarvestedData h = new HarvestedData(dataType,
|
||||
"/d4science.research-infrastructures.eu/SoBigData/ResourceCatalogue", numFound);
|
||||
logger.debug(h.toString());
|
||||
data.add(h);
|
||||
if(numFound > 0) {
|
||||
|
|
|
@ -20,6 +20,9 @@ import org.gcube.resourcemanagement.support.server.managers.scope.ScopeManager;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class ContextAuthorization {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(ContextAuthorization.class);
|
||||
|
@ -43,9 +46,6 @@ public class ContextAuthorization {
|
|||
*/
|
||||
protected Map<String,String> tokenToContext;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Contains Properties used to generate tokens
|
||||
*/
|
||||
|
@ -57,7 +57,8 @@ public class ContextAuthorization {
|
|||
|
||||
public File getVOFile() {
|
||||
try {
|
||||
String voFileName = AccountingDataHarvesterPlugin.getProperties().get().getProperty(VO_FILE, DEFAULT_VO_FILENAME);
|
||||
String voFileName = AccountingDataHarvesterPlugin.getProperties().get().getProperty(VO_FILE,
|
||||
DEFAULT_VO_FILENAME);
|
||||
URL url = ContextAuthorization.class.getClassLoader().getResource(voFileName);
|
||||
File voFile = new File(url.toURI());
|
||||
logger.trace("VO file is {}", voFile);
|
||||
|
@ -84,10 +85,12 @@ public class ContextAuthorization {
|
|||
String context = map.get(scope).toString();
|
||||
System.out.println("Going to generate Token for Context " + context);
|
||||
logger.info("Going to generate Token for Context {}", context);
|
||||
UserInfo userInfo = new UserInfo(properties.getProperty(USERNAME, DEFAULT_USERNAME), new ArrayList<>());
|
||||
UserInfo userInfo = new UserInfo(properties.getProperty(USERNAME, DEFAULT_USERNAME),
|
||||
new ArrayList<>());
|
||||
String userToken = authorizationService().generateUserToken(userInfo, context);
|
||||
SecurityTokenProvider.instance.set(userToken);
|
||||
String generatedToken = authorizationService().generateExternalServiceToken(properties.getProperty(SERVICE_NAME, DEFAULT_SERVICE_NAME));
|
||||
String generatedToken = authorizationService()
|
||||
.generateExternalServiceToken(properties.getProperty(SERVICE_NAME, DEFAULT_SERVICE_NAME));
|
||||
|
||||
logger.trace("Token for Context {} is {}", context, generatedToken);
|
||||
|
||||
|
@ -121,6 +124,4 @@ public class ContextAuthorization {
|
|||
return new TreeSet<String>(contextToToken.keySet());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,9 @@ import java.util.TimeZone;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class DateUtils {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(DateUtils.class);
|
||||
|
@ -72,7 +75,6 @@ public class DateUtils {
|
|||
|
||||
}
|
||||
|
||||
|
||||
public static Calendar getStartCalendar(int year, int month, int day) {
|
||||
Calendar aggregationStartCalendar = getUTCCalendarInstance();
|
||||
aggregationStartCalendar.set(Calendar.YEAR, year);
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.text.DateFormat;
|
|||
import java.util.Calendar;
|
||||
|
||||
/**
|
||||
* @author Alessandro Pieve (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public enum MeasureType {
|
||||
|
|
|
@ -19,6 +19,10 @@ import org.gcube.common.scope.api.ScopeProvider;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class Utils {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(Utils.class);
|
||||
|
|
|
@ -6,12 +6,12 @@ import java.util.Map;
|
|||
|
||||
import org.gcube.dataharvest.utils.DateUtils;
|
||||
import org.gcube.dataharvest.utils.MeasureType;
|
||||
import org.gcube.dataharvest.utils.ScopedTest;
|
||||
import org.gcube.dataharvest.utils.ContextTest;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AccountingDataHarvesterPluginTest extends ScopedTest {
|
||||
public class AccountingDataHarvesterPluginTest extends ContextTest {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(AccountingDataHarvesterPluginTest.class);
|
||||
|
||||
|
|
|
@ -19,8 +19,14 @@ import org.gcube.dataharvest.harvester.sobigdata.ResourceCatalogueHarvester;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Eric Perrone (ISTI - CNR)
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class Harvester {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(Harvester.class);
|
||||
|
||||
public static final String PARAMETER_FROM = "from";
|
||||
public static final String PARAMETER_TO = "to";
|
||||
public static final String TEST = "test";
|
||||
|
|
|
@ -9,7 +9,10 @@ import org.junit.Test;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ContextAuthorizationTest extends ScopedTest {
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class ContextAuthorizationTest extends ContextTest {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(ContextAuthorizationTest.class);
|
||||
|
||||
|
|
|
@ -7,9 +7,6 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.gcube.common.authorization.client.Constants;
|
||||
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
||||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.junit.AfterClass;
|
||||
|
@ -19,11 +16,10 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*
|
||||
*/
|
||||
public class ScopedTest {
|
||||
public class ContextTest {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ScopedTest.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(ContextTest.class);
|
||||
|
||||
protected static final String PROPERTIES_FILENAME = "token.properties";
|
||||
|
||||
|
@ -51,8 +47,11 @@ public class ScopedTest {
|
|||
public static final String TAGME;
|
||||
|
||||
static {
|
||||
|
||||
logger.trace("Retrieving Tokens from {}", PROPERTIES_FILENAME);
|
||||
|
||||
Properties properties = new Properties();
|
||||
InputStream input = ScopedTest.class.getClassLoader().getResourceAsStream(PROPERTIES_FILENAME);
|
||||
InputStream input = ContextTest.class.getClassLoader().getResourceAsStream(PROPERTIES_FILENAME);
|
||||
|
||||
try {
|
||||
// load the properties file
|
|
@ -1,393 +0,0 @@
|
|||
package org.gcube.dataharvest.utils;
|
||||
|
||||
public class DataFiller {
|
||||
|
||||
protected static String[] data10 = {
|
||||
"/d4science.research-infrastructures.eu/FARM/AlieiaVRE","12",
|
||||
"/d4science.research-infrastructures.eu/D4Research/AnalyticsLab","83",
|
||||
"/d4science.research-infrastructures.eu/FARM/Aquabiotech","8",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureAtlasGeneration","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureTrainingLab","71",
|
||||
"/d4science.research-infrastructures.eu/FARM/ARDAG_Aquaculture","5",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BOBLME_HilsaAWG","3",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab","374",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiOnym","112",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueCommons","37",
|
||||
"/d4science.research-infrastructures.eu/D4Research/Blue-Datathon","44",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueUptake","36",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-EAB","19",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBridgeProject","100",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-PSC","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BlueBRIDGEReview","15",
|
||||
"/d4science.research-infrastructures.eu/D4Research/DRuMFISH","27",
|
||||
"/d4science.research-infrastructures.eu/FARM/EllinikaPsariaVRE","11",
|
||||
"/d4science.research-infrastructures.eu/FARM/ForkysVRE","12",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","0",
|
||||
"/d4science.research-infrastructures.eu/FARM/GALAXIDI","6",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF","13",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF_Admin","28",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICCAT_BFT-E","37",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_AbundanceEstimationFromAcoustic","36",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DALSA","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DASC","17",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_FIACO","28",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_IntroStockAssessment","34",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCRE","30",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSE","27",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSY","84",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_StockAssessmentAdvanced","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCSSM","29",
|
||||
"/d4science.research-infrastructures.eu/FARM/iLKNAK_Aquaculture","5",
|
||||
"/d4science.research-infrastructures.eu/D4Research/InfraTraining","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/IOTC_SS3","31",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/iSearch","56",
|
||||
"/d4science.research-infrastructures.eu/FARM/MARKELLOS_Aquaculture","5",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/PerformanceEvaluationInAquaculture","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ProtectedAreaImpactMaps","30",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab","99",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RStudioLab","68",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ScalableDataMining","152",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/SIASPA","19",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StockAssessment","62",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StrategicInvestmentAnalysis","26",
|
||||
"/d4science.research-infrastructures.eu/FARM/STRATOS_AQUACULTURES","6",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/TabularDataLab","182",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","38",
|
||||
"/d4science.research-infrastructures.eu/FARM/VME-DB","18",
|
||||
"/d4science.research-infrastructures.eu/FARM/WECAFC-FIRMS","20"
|
||||
};
|
||||
|
||||
protected static String[] data11 = {
|
||||
"/d4science.research-infrastructures.eu/FARM/AlieiaVRE","12",
|
||||
"/d4science.research-infrastructures.eu/D4Research/AnalyticsLab","93",
|
||||
"/d4science.research-infrastructures.eu/FARM/Aquabiotech","8",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureAtlasGeneration","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureTrainingLab","136",
|
||||
"/d4science.research-infrastructures.eu/FARM/ARDAG_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BOBLME_HilsaAWG","3",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab","387",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiOnym","116",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueCommons","35",
|
||||
"/d4science.research-infrastructures.eu/D4Research/Blue-Datathon","45",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueUptake","33",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-EAB","22",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBridgeProject","98",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-PSC","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BlueBRIDGEReview","15",
|
||||
"/d4science.research-infrastructures.eu/D4Research/DRuMFISH","27",
|
||||
"/d4science.research-infrastructures.eu/FARM/EllinikaPsariaVRE","11",
|
||||
"/d4science.research-infrastructures.eu/FARM/ForkysVRE","12",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","0",
|
||||
"/d4science.research-infrastructures.eu/FARM/GALAXIDI","4",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF","13",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF_Admin","28",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICCAT_BFT-E","37",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_AbundanceEstimationFromAcoustic","36",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DALSA","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DASC","17",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_FIACO","28",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_IntroStockAssessment","34",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCRE","31",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSE","27",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSY","84",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_StockAssessmentAdvanced","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCSSM","29",
|
||||
"/d4science.research-infrastructures.eu/FARM/iLKNAK_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/D4Research/InfraTraining","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/IOTC_SS3","34",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/iSearch","58",
|
||||
"/d4science.research-infrastructures.eu/FARM/MARKELLOS_Aquaculture","5",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/PerformanceEvaluationInAquaculture","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ProtectedAreaImpactMaps","56",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab","110",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RStudioLab","73",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ScalableDataMining","161",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/SIASPA","22",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StockAssessment","63",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StrategicInvestmentAnalysis","26",
|
||||
"/d4science.research-infrastructures.eu/FARM/STRATOS_AQUACULTURES","5",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/TabularDataLab","186",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","40",
|
||||
"/d4science.research-infrastructures.eu/FARM/VME-DB","18",
|
||||
"/d4science.research-infrastructures.eu/FARM/WECAFC-FIRMS","20"
|
||||
};
|
||||
|
||||
protected static String[] data12 = {
|
||||
"/d4science.research-infrastructures.eu/FARM/AlieiaVRE","12",
|
||||
"/d4science.research-infrastructures.eu/D4Research/AnalyticsLab","99",
|
||||
"/d4science.research-infrastructures.eu/FARM/Aquabiotech","8",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureAtlasGeneration","28",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureTrainingLab","273",
|
||||
"/d4science.research-infrastructures.eu/FARM/ARDAG_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BOBLME_HilsaAWG","3",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab","392",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiOnym","118",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueCommons","35",
|
||||
"/d4science.research-infrastructures.eu/D4Research/Blue-Datathon","45",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueUptake","33",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-EAB","22",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBridgeProject","98",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-PSC","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BlueBRIDGEReview","15",
|
||||
"/d4science.research-infrastructures.eu/D4Research/DRuMFISH","27",
|
||||
"/d4science.research-infrastructures.eu/FARM/EllinikaPsariaVRE","11",
|
||||
"/d4science.research-infrastructures.eu/FARM/ForkysVRE","12",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","0",
|
||||
"/d4science.research-infrastructures.eu/FARM/GALAXIDI","4",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF","13",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF_Admin","30",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICCAT_BFT-E","37",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_AbundanceEstimationFromAcoustic","36",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DALSA","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DASC","17",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_FIACO","28",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_IntroStockAssessment","34",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCRE","31",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSE","27",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSY","84",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_StockAssessmentAdvanced","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCSSM","29",
|
||||
"/d4science.research-infrastructures.eu/FARM/iLKNAK_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/D4Research/InfraTraining","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/IOTC_SS3","36",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/iSearch","59",
|
||||
"/d4science.research-infrastructures.eu/FARM/MARKELLOS_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/PerformanceEvaluationInAquaculture","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ProtectedAreaImpactMaps","57",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab","114",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RStudioLab","74",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ScalableDataMining","164",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/SIASPA","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StockAssessment","63",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StrategicInvestmentAnalysis","26",
|
||||
"/d4science.research-infrastructures.eu/FARM/STRATOS_AQUACULTURES","5",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/TabularDataLab","188",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","40",
|
||||
"/d4science.research-infrastructures.eu/FARM/VME-DB","18",
|
||||
"/d4science.research-infrastructures.eu/FARM/WECAFC-FIRMS","20"
|
||||
};
|
||||
|
||||
public static String[] data01 = {
|
||||
"/d4science.research-infrastructures.eu/FARM/AlieiaVRE","12",
|
||||
"/d4science.research-infrastructures.eu/D4Research/AnalyticsLab","103",
|
||||
"/d4science.research-infrastructures.eu/FARM/Aquabiotech","8",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureAtlasGeneration","35",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureTrainingLab","278",
|
||||
"/d4science.research-infrastructures.eu/FARM/ARDAG_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BOBLME_HilsaAWG","3",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab","400",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiOnym","121",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueCommons","35",
|
||||
"/d4science.research-infrastructures.eu/D4Research/Blue-Datathon","45",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueUptake","33",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-EAB","22",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBridgeProject","99",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-PSC","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BlueBRIDGEReview","15",
|
||||
"/d4science.research-infrastructures.eu/D4Research/DRuMFISH","27",
|
||||
"/d4science.research-infrastructures.eu/FARM/EllinikaPsariaVRE","11",
|
||||
"/d4science.research-infrastructures.eu/FARM/ForkysVRE","12",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","5",
|
||||
"/d4science.research-infrastructures.eu/FARM/GALAXIDI","4",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF","13",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF_Admin","31",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICCAT_BFT-E","38",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_AbundanceEstimationFromAcoustic","36",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DALSA","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DASC","17",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_FIACO","28",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_IntroStockAssessment","34",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCRE","31",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSE","27",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSY","84",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_StockAssessmentAdvanced","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCSSM","29",
|
||||
"/d4science.research-infrastructures.eu/FARM/iLKNAK_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/D4Research/InfraTraining","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/IOTC_SS3","37",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/iSearch","59",
|
||||
"/d4science.research-infrastructures.eu/FARM/MARKELLOS_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/PerformanceEvaluationInAquaculture","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ProtectedAreaImpactMaps","68",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab","123",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RStudioLab","80",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ScalableDataMining","167",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/SIASPA","31",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StockAssessment","63",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StrategicInvestmentAnalysis","26",
|
||||
"/d4science.research-infrastructures.eu/FARM/STRATOS_AQUACULTURES","5",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/TabularDataLab","191",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","44",
|
||||
"/d4science.research-infrastructures.eu/FARM/VME-DB","18",
|
||||
"/d4science.research-infrastructures.eu/FARM/WECAFC-FIRMS","20",
|
||||
};
|
||||
|
||||
public static String[] data02 = {
|
||||
"/d4science.research-infrastructures.eu/FARM/AlieiaVRE","12",
|
||||
"/d4science.research-infrastructures.eu/D4Research/AnalyticsLab","106",
|
||||
"/d4science.research-infrastructures.eu/FARM/Aquabiotech","8",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureAtlasGeneration","35",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureTrainingLab","279",
|
||||
"/d4science.research-infrastructures.eu/FARM/ARDAG_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BOBLME_HilsaAWG","3",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab","402",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiOnym","124",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueCommons","35",
|
||||
"/d4science.research-infrastructures.eu/D4Research/Blue-Datathon","45",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueUptake","33",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-EAB","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBridgeProject","99",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-PSC","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BlueBRIDGEReview","15",
|
||||
"/d4science.research-infrastructures.eu/D4Research/DRuMFISH","27",
|
||||
"/d4science.research-infrastructures.eu/FARM/EllinikaPsariaVRE","11",
|
||||
"/d4science.research-infrastructures.eu/FARM/ForkysVRE","12",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","5",
|
||||
"/d4science.research-infrastructures.eu/FARM/GALAXIDI","4",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF","13",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF_Admin","32",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICCAT_BFT-E","38",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_AbundanceEstimationFromAcoustic","36",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DALSA","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DASC","17",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_FIACO","28",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_IntroStockAssessment","34",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCRE","31",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSE","27",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSY","84",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_StockAssessmentAdvanced","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCSSM","29",
|
||||
"/d4science.research-infrastructures.eu/FARM/iLKNAK_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/D4Research/InfraTraining","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/IOTC_SS3","38",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/iSearch","60",
|
||||
"/d4science.research-infrastructures.eu/FARM/MARKELLOS_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/PerformanceEvaluationInAquaculture","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ProtectedAreaImpactMaps","71",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab","127",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RStudioLab","81",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ScalableDataMining","171",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/SIASPA","32",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StockAssessment","63",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StrategicInvestmentAnalysis","26",
|
||||
"/d4science.research-infrastructures.eu/FARM/STRATOS_AQUACULTURES","5",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/TabularDataLab","193",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","49",
|
||||
"/d4science.research-infrastructures.eu/FARM/VME-DB","18",
|
||||
"/d4science.research-infrastructures.eu/FARM/WECAFC-FIRMS","24"
|
||||
};
|
||||
|
||||
public static String[] data03 = {
|
||||
"/d4science.research-infrastructures.eu/FARM/AlieiaVRE","12",
|
||||
"/d4science.research-infrastructures.eu/D4Research/AnalyticsLab","107",
|
||||
"/d4science.research-infrastructures.eu/FARM/Aquabiotech","8",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureAtlasGeneration","35",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/AquacultureTrainingLab","278",
|
||||
"/d4science.research-infrastructures.eu/FARM/ARDAG_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BOBLME_HilsaAWG","3",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab","403",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BiOnym","124",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueCommons","35",
|
||||
"/d4science.research-infrastructures.eu/D4Research/Blue-Datathon","45",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueUptake","33",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-EAB","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBridgeProject","99",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-PSC","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/BlueBRIDGEReview","15",
|
||||
"/d4science.research-infrastructures.eu/D4Research/DRuMFISH","27",
|
||||
"/d4science.research-infrastructures.eu/FARM/EllinikaPsariaVRE","11",
|
||||
"/d4science.research-infrastructures.eu/FARM/ForkysVRE","12",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","5",
|
||||
"/d4science.research-infrastructures.eu/FARM/GALAXIDI","4",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF","13",
|
||||
"/d4science.research-infrastructures.eu/FARM/GRSF_Admin","32",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICCAT_BFT-E","38",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_AbundanceEstimationFromAcoustic","36",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DALSA","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_DASC","17",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_FIACO","28",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_IntroStockAssessment","34",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCRE","32",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSE","29",
|
||||
"/d4science.research-infrastructures.eu/D4Research/ICES_MSY","84",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_StockAssessmentAdvanced","26",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ICES_TCSSM","29",
|
||||
"/d4science.research-infrastructures.eu/FARM/iLKNAK_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/D4Research/InfraTraining","10",
|
||||
"/d4science.research-infrastructures.eu/D4Research/IOTC_SS3","38",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/iSearch","61",
|
||||
"/d4science.research-infrastructures.eu/FARM/MARKELLOS_Aquaculture","6",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/PerformanceEvaluationInAquaculture","27",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ProtectedAreaImpactMaps","71",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab","127",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/RStudioLab","81",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/ScalableDataMining","171",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/SIASPA","32",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StockAssessment","63",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/StrategicInvestmentAnalysis","26",
|
||||
"/d4science.research-infrastructures.eu/FARM/STRATOS_AQUACULTURES","5",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/TabularDataLab","191",
|
||||
"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas","49",
|
||||
"/d4science.research-infrastructures.eu/FARM/VME-DB","18",
|
||||
"/d4science.research-infrastructures.eu/FARM/WECAFC-FIRMS","24"
|
||||
};
|
||||
|
||||
|
||||
public static String[] data04 = {
|
||||
"/d4science.research-infrastructures.eu/FARM/CWP_Secretariat", "8"
|
||||
};
|
||||
|
||||
public static String[] vals = {
|
||||
"2017", "1", "0", "2", "80",
|
||||
"2017", "2", "0", "2", "80",
|
||||
"2017", "3", "0", "2", "80",
|
||||
"2017", "4", "0", "2", "80",
|
||||
"2017", "5", "0", "2", "80",
|
||||
"2017", "6", "0", "2", "80",
|
||||
"2017", "7", "4", "2", "80",
|
||||
"2017", "8", "4", "2", "80",
|
||||
"2017", "9", "4", "2", "80",
|
||||
"2017", "10", "4", "2", "80",
|
||||
"2017", "11", "4", "2", "80",
|
||||
"2017", "12", "4", "2", "80",
|
||||
"2018", "1", "4", "2", "80",
|
||||
"2018", "2", "4", "2", "80",
|
||||
"2018", "3", "4", "2", "80"
|
||||
};
|
||||
|
||||
public static void main(String[] args) {
|
||||
// for(int i=0; i<data03.length; i+=2) {
|
||||
// String insert = "insert into monthly_measure (year, month, measure, measure_type_id, context_id, day) " +
|
||||
// "values(2018,3," + data03[i+1] + ",2,(select id from context where dname='" + data03[i] + "'),'2018-03-01');";
|
||||
// System.out.println(insert);
|
||||
// }
|
||||
insertMeasures();
|
||||
}
|
||||
|
||||
private static void insertMeasures() {
|
||||
String im = "insert into monthly_measure (year, month, measure, measure_type_id, context_id, day) values ";
|
||||
String val = "(%Y, %M, %m, %T, %C, '%D')";
|
||||
|
||||
for(int i=0; i<vals.length; i+=5) {
|
||||
String item = new String(val);
|
||||
item = item.replace("%Y", vals[i]);
|
||||
item = item.replace("%M", vals[i+1]);
|
||||
item = item.replace("%m", vals[i+2]);
|
||||
item = item.replace("%T", vals[i+3]);
|
||||
item = item.replace("%C", vals[i+4]);
|
||||
item = item.replace("%D", getDay(vals[i], vals[i+1]));
|
||||
im += item + ",";
|
||||
}
|
||||
im = im.substring(0, im.length()-1);
|
||||
System.out.println(im);
|
||||
}
|
||||
|
||||
private static String getDay(String year, String month) {
|
||||
String day = year + "-";
|
||||
if(month.length() < 2)
|
||||
day += "0" + month + "-01";
|
||||
else day += month + "-01";
|
||||
|
||||
return day;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue