/*
 * Annotation.java
 *
 */

package de.uni_stuttgart.vis.vowl.owl2vowl.parser.container;

/**
 *
 */
public class Annotation {
	private String identifier;
	private String language;
	private String value;

	public Annotation(String identifier, String value) {
		this.identifier = extractIdentifier(identifier);
		this.value = value;
	}

	public String getIdentifier() {
		return identifier;
	}

	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}

	private String extractIdentifier(String identifier) {
		return identifier.substring(identifier.lastIndexOf("/") + 1, identifier.lastIndexOf(">"));
	}

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Override
	public String toString() {
		return "Annotation{" +
				"identifier='" + identifier + '\'' +
				", language='" + language + '\'' +
				", value='" + value + '\'' +
				'}';
	}
}

@@ -122,16 +122,112 @@
 ation %7B%0A
+%09public static final String TYPE_IRI = %22iri%22;%0A%09public static final String TYPE_LABEL = %22label%22;%0A
 %09private
@@ -294,16 +294,38 @@
 g value;
+%0A%09private String type;
 %0A%0A%09publi
@@ -437,32 +437,325 @@
 .value = value;%0A
+%09%09this.type = %22unset%22;%0A%09%7D%0A%0A%09public Annotation(String identifier, String value, String type) %7B%0A%09%09this.identifier = extractIdentifier(identifier);%0A%09%09this.value = value;%0A%09%09this.type = type;%0A%09%7D%0A%0A%09public String getType() %7B%0A%09%09return type;%0A%09%7D%0A%0A%09public void setType(String type) %7B%0A%09%09this.type = type;%0A
 %09%7D%0A%0A%09public Stri
@@ -945,36 +945,110 @@
 %7B%0A%09%09
-return identifier.substring(
+int slash = identifier.lastIndexOf(%22/%22);%0A%09%09int arrow = identifier.lastIndexOf(%22%3E%22);%0A%09%09int doubleDot = 
 iden
@@ -1071,16 +1071,25 @@
 Of(%22
-/%22) + 1,
+:%22);%0A%09%09int hash =
  ide
@@ -1109,19 +1109,391 @@
 ndexOf(%22
-%3E
+#
 %22)
+;%0A%0A%09%09int lastCut = identifier.length() - 1;%0A%09%09int firstCut = 0;%0A%0A%09%09if (arrow != -1) %7B%0A%09%09%09lastCut = arrow;%0A%09%09%7D%0A%0A%09%09if (slash != -1 && firstCut %3C slash) %7B%0A%09%09%09firstCut = slash;%0A%09%09%7D%0A%0A%09%09if (doubleDot != -1 && firstCut %3C doubleDot) %7B%0A%09%09%09firstCut = doubleDot;%0A%09%09%7D%0A%0A%09%09if (hash != -1 && firstCut %3C hash) %7B%0A%09%09%09firstCut = hash;%0A%09%09%7D%0A%0A%09%09return identifier.substring(firstCut + 1, lastCut
 );%0A%09%7D%0A%0A%09

Improve identifier cutting.