com.softicar.platform.common.ui.wiki.token.AbstractUrlToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
package com.softicar.platform.common.ui.wiki.token;
public class AbstractUrlToken extends WikiToken {
private final String url;
private final String label;
public AbstractUrlToken(WikiTokenType tokenType, String consumedText) {
super(tokenType, consumedText);
int pipeIndex = consumedText.indexOf('|', 2);
if (pipeIndex > 0) {
this.url = consumedText.substring(2, pipeIndex);
this.label = consumedText.substring(pipeIndex + 1, consumedText.length() - 2);
} else {
this.url = consumedText.substring(2, consumedText.length() - 2);
this.label = "";
}
}
public String getUrl() {
return url;
}
public String getLabel() {
return label;
}
}