All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softicar.platform.common.ui.wiki.token.AbstractUrlToken Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
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;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy