Removed useless fields in IndexFields class. Tests class added and pom dependencies fixed

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/social-networking/social-data-indexing-common@124023 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-02-09 17:59:47 +00:00
parent bebd50b4c3
commit b581010e2f
3 changed files with 64 additions and 24 deletions

32
pom.xml
View File

@ -49,11 +49,21 @@
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.socialnetworking</groupId>
<artifactId>social-data-indexing-common</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticSearchVersion}</version>
</dependency>
<dependency>
<groupId>org.gcube.common.portal</groupId>
<artifactId>portal-manager</artifactId>
@ -73,6 +83,11 @@
<artifactId>aslsocial</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>social-networking-library</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>notifications-common-library</artifactId>
@ -87,23 +102,24 @@
<groupId>org.gcube.dvos</groupId>
<artifactId>usermanagement-core</artifactId>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.resources.discovery</groupId>
<artifactId>ic-client</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.astyanax</groupId>
<artifactId>astyanax</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-encryption</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
<build>

View File

@ -11,28 +11,15 @@ public class IndexFields {
// name of the index
public static final String INDEX_NAME = "social";
// table for comments
public static final String COMMENT_TABLE = "comments";
// table for feeds
public static final String FEED_TABLE = "feeds";
// table for enhanced feeds
public static final String EF_FEEDS_TABLE = "enhanced_feeds";
// comment table's fields
public static final String COMMENT_TEXT = "description";
public static final String COMMENT_PARENT_ID = "parent_id";
// feed table's fields
public static final String FEED_TEXT = "description";
public static final String FEED_TYPE = "type";
public static final String FEED_VRE_ID = "vre_id";
// enhanced feeds' fields
// enhanced feeds' fields of interest
public static final String EF_ATTACHMENT_NAME = "attachments.name";
public static final String EF_FEED_TEXT = "feed.description";
public static final String EF_COMMENT_TEXT = "comments.text";
public static final String EF_PREVIEW_DESCRIPTION = "feed.linkTitle";
public static final String EF_FEED_AUTHOR = "feed.fullName";
public static final String EF_FEED_VRE_ID = "feed.vreid";
}

View File

@ -0,0 +1,37 @@
package org.gcube.socialnetworking.social_data_indexing_common;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.socialnetworking.social_data_indexing_common.utils.ElasticSearchRunningCluster;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Tests {
/**
* Logger
*/
private static Logger _log = LoggerFactory.getLogger(Tests.class);
@Before
public void beforeTest(){
// set security token
SecurityTokenProvider.instance.set("422d795b-d978-41d5-abac-b1c8be90a632");
}
@Test
public void retrieveElasticSearchInformation() throws Exception{
ElasticSearchRunningCluster es = new ElasticSearchRunningCluster("gcube");
_log.debug("Result is " + es.getClusterName() + " " + es.getHosts() + " " + es.getPorts());
}
@After
public void after(){
}
}