Implementing new Solution refs #13207
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/social-networking/social-util-library@176768 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
98e2f8d715
commit
f38543e6ce
|
@ -7,7 +7,7 @@ import java.util.Map;
|
||||||
|
|
||||||
public class URLToken extends ReplaceableToken {
|
public class URLToken extends ReplaceableToken {
|
||||||
|
|
||||||
private static String FINAL_CHARACTERS_TO_REMOVE_FROM_LINK = "[\\.\\,\\;\\)]";
|
private static String FINAL_CHARACTERS_TO_REMOVE_FROM_LINK = "[\\.\\,\\;\\)\\:]";
|
||||||
|
|
||||||
public URLToken(String token, String delimiter, int start, int end) {
|
public URLToken(String token, String delimiter, int start, int end) {
|
||||||
super(token, delimiter, start, end);
|
super(token, delimiter, start, end);
|
||||||
|
|
|
@ -2,7 +2,6 @@ package org.gcube.social_networking.socialutillibrary;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.socialnetworking.token.Token;
|
|
||||||
import org.gcube.socialnetworking.token.URLToken;
|
import org.gcube.socialnetworking.token.URLToken;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -33,10 +32,9 @@ public class TestUnit {
|
||||||
@Test
|
@Test
|
||||||
public void test(){
|
public void test(){
|
||||||
String urlString = "http://2001:db8:0:1:1:1:1:1:8080/group/preeco/what-if?p_p_id=simul_WAR_simulfishgrowthportlet&p_p_lifecycle=0";
|
String urlString = "http://2001:db8:0:1:1:1:1:1:8080/group/preeco/what-if?p_p_id=simul_WAR_simulfishgrowthportlet&p_p_lifecycle=0";
|
||||||
String[] ends = new String[] {".", ",", ";", ")","]","}",""};
|
String[] ends = new String[] {".", ",", ";",":",")","]","}",""};
|
||||||
for(String s : ends) {
|
for(String s : ends) {
|
||||||
Token token = new Token(urlString+s, "\n", 0, 0);
|
URLToken urlToken = new URLToken(urlString+s, "\n", 0, 0);
|
||||||
URLToken urlToken = new URLToken(token);
|
|
||||||
logger.debug(urlToken.getTokenReplacement());
|
logger.debug(urlToken.getTokenReplacement());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue