Implementing new Solution refs #13207

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/social-networking/social-util-library@176767 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2019-01-23 17:01:42 +00:00
parent d669f664d0
commit 98e2f8d715
3 changed files with 15 additions and 3 deletions

View File

@ -45,12 +45,16 @@ public class ReplaceableToken extends Token {
return stringBuilder.toString();
}
public ReplaceableToken(Token token) {
super(token.getToken(), token.getDelimiter(), token.getStart(), token.getEnd());
this.tokenReplacement = token.getToken();
public ReplaceableToken(String token, String delimiter, int start, int end) {
super(token, delimiter, start, end);
this.tokenReplacement = token;
replaced = false;
}
public ReplaceableToken(Token token) {
this(token.getToken(), token.getDelimiter(), token.getStart(), token.getEnd());
}
public ReplaceableToken(Token token, String tokenReplacement) {
this(token);
this.tokenReplacement = tokenReplacement;

View File

@ -4,6 +4,10 @@ import org.gcube.portal.databook.client.GCubeSocialNetworking;
public class TagToken extends ReplaceableToken {
public TagToken(String token, String delimiter, int start, int end) {
super(token, delimiter, start, end);
}
public TagToken(Token token) {
super(token);
}

View File

@ -9,6 +9,10 @@ public class URLToken extends ReplaceableToken {
private static String FINAL_CHARACTERS_TO_REMOVE_FROM_LINK = "[\\.\\,\\;\\)]";
public URLToken(String token, String delimiter, int start, int end) {
super(token, delimiter, start, end);
}
public URLToken(Token token) {
super(token);
}