diff --git a/src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java b/src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
index 4a4f15d..5ae6dc2 100644
--- a/src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
+++ b/src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
@@ -9,22 +9,29 @@ public class Annotation {
public static final String TYPE_IRI = "iri";
public static final String TYPE_LABEL = "label";
private String identifier;
+ private String fullIri;
private String language = Vowl_Lang.LANG_UNSET;
private String value;
private String type;
public Annotation(String identifier, String value) {
+ this.fullIri = identifier;
this.identifier = extractIdentifier(identifier);
this.value = value;
this.type = "unset";
}
public Annotation(String identifier, String value, String type) {
+ this.fullIri = identifier;
this.identifier = extractIdentifier(identifier);
this.value = value;
this.type = type;
}
+ public String getFullIri() {
+ return fullIri;
+ }
+
public String getType() {
return type;
}
diff --git a/src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotations.java b/src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotations.java
index f0210ed..218fb16 100644
--- a/src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotations.java
+++ b/src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotations.java
@@ -37,13 +37,13 @@ public class Annotations {
}
public void addAnnotation(Annotation annotation) {
- String identifier = annotation.getIdentifier();
+ String key = annotation.getFullIri() != null ? annotation.getFullIri() : annotation.getIdentifier();
- if (!identifierToAnnotation.containsKey(identifier)) {
- identifierToAnnotation.put(identifier, new ArrayList<>());
+ if (!identifierToAnnotation.containsKey(key)) {
+ identifierToAnnotation.put(key, new ArrayList<>());
}
- identifierToAnnotation.get(identifier).add(annotation);
+ identifierToAnnotation.get(key).add(annotation);
}
public void fillAnnotations(Set<Annotation> annotations) {
@@ -68,11 +68,13 @@ public class Annotations {
continue;
}
- if (!identifierToAnnotation.containsKey(annotation.getIdentifier())) {
- identifierToAnnotation.put(annotation.getIdentifier(), new ArrayList<>());
+ String key = annotation.getFullIri() != null ? annotation.getFullIri() : annotation.getIdentifier();
+
+ if (!identifierToAnnotation.containsKey(key)) {
+ identifierToAnnotation.put(key, new ArrayList<>());
}
- identifierToAnnotation.get(annotation.getIdentifier()).add(annotation);
+ identifierToAnnotation.get(key).add(annotation);
}
}