diff --git a/.gitignore b/.gitignore
index abd2c763..97b02af0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,13 @@ target/
src/test/resources/biocreative_chemprot/
src/test/resources/concepts+assertions/
/src/test/resources/biocreative_chemprot_small/
+/.clj-kondo/
+/node_modules/
+/.shadow-cljs/
+/resources/public/
+/.lein-failures
+/.dir-locals.el
+/.nrepl-port
+/.idea/libraries/
+/.idea/knowtator.iml
+/.attach_pid272926
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index b26911bd..af673e73 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -2,5 +2,7 @@
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 00000000..947ef884
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_jgoodies_jgoodies_common_1_6_0.xml b/.idea/libraries/Maven__com_jgoodies_jgoodies_common_1_6_0.xml
deleted file mode 100644
index 1183961c..00000000
--- a/.idea/libraries/Maven__com_jgoodies_jgoodies_common_1_6_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_jgoodies_jgoodies_looks_2_5_3.xml b/.idea/libraries/Maven__com_jgoodies_jgoodies_looks_2_5_3.xml
deleted file mode 100644
index 94d282e3..00000000
--- a/.idea/libraries/Maven__com_jgoodies_jgoodies_looks_2_5_3.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__edu_stanford_protege_org_protege_common_5_0_0_beta_17.xml b/.idea/libraries/Maven__edu_stanford_protege_org_protege_common_5_0_0_beta_17.xml
deleted file mode 100644
index 7cc1cffb..00000000
--- a/.idea/libraries/Maven__edu_stanford_protege_org_protege_common_5_0_0_beta_17.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__edu_stanford_protege_org_protege_editor_core_application_5_0_0_beta_17.xml b/.idea/libraries/Maven__edu_stanford_protege_org_protege_editor_core_application_5_0_0_beta_17.xml
deleted file mode 100644
index d8fc52be..00000000
--- a/.idea/libraries/Maven__edu_stanford_protege_org_protege_editor_core_application_5_0_0_beta_17.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__edu_stanford_protege_org_protege_editor_owl_5_0_0_beta_17.xml b/.idea/libraries/Maven__edu_stanford_protege_org_protege_editor_owl_5_0_0_beta_17.xml
deleted file mode 100644
index f621f006..00000000
--- a/.idea/libraries/Maven__edu_stanford_protege_org_protege_editor_owl_5_0_0_beta_17.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__edu_stanford_protege_org_protege_xmlcatalog_1_0_5.xml b/.idea/libraries/Maven__edu_stanford_protege_org_protege_xmlcatalog_1_0_5.xml
deleted file mode 100644
index 602cd043..00000000
--- a/.idea/libraries/Maven__edu_stanford_protege_org_protege_xmlcatalog_1_0_5.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__edu_stanford_protege_protege_common_5_0_0_RC1.xml b/.idea/libraries/Maven__edu_stanford_protege_protege_common_5_0_0_RC1.xml
deleted file mode 100644
index 847bd125..00000000
--- a/.idea/libraries/Maven__edu_stanford_protege_protege_common_5_0_0_RC1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__edu_stanford_protege_protege_editor_core_5_0_0_RC1.xml b/.idea/libraries/Maven__edu_stanford_protege_protege_editor_core_5_0_0_RC1.xml
deleted file mode 100644
index 143b30f9..00000000
--- a/.idea/libraries/Maven__edu_stanford_protege_protege_editor_core_5_0_0_RC1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__edu_stanford_protege_protege_editor_owl_5_0_0_RC1.xml b/.idea/libraries/Maven__edu_stanford_protege_protege_editor_owl_5_0_0_RC1.xml
deleted file mode 100644
index 0f420972..00000000
--- a/.idea/libraries/Maven__edu_stanford_protege_protege_editor_owl_5_0_0_RC1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__edu_stanford_protege_protege_owlapi_extensions_3_2_6.xml b/.idea/libraries/Maven__edu_stanford_protege_protege_owlapi_extensions_3_2_6.xml
deleted file mode 100644
index 893047d7..00000000
--- a/.idea/libraries/Maven__edu_stanford_protege_protege_owlapi_extensions_3_2_6.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__log4j_log4j_1_2_17.xml b/.idea/libraries/Maven__log4j_log4j_1_2_17.xml
deleted file mode 100644
index e383c1bf..00000000
--- a/.idea/libraries/Maven__log4j_log4j_1_2_17.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__net_sourceforge_owlapi_jfact_1_0_0.xml b/.idea/libraries/Maven__net_sourceforge_owlapi_jfact_1_0_0.xml
deleted file mode 100644
index a98c30bf..00000000
--- a/.idea/libraries/Maven__net_sourceforge_owlapi_jfact_1_0_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_felix_org_apache_felix_framework_4_4_1.xml b/.idea/libraries/Maven__org_apache_felix_org_apache_felix_framework_4_4_1.xml
deleted file mode 100644
index 568d2ce8..00000000
--- a/.idea/libraries/Maven__org_apache_felix_org_apache_felix_framework_4_4_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_felix_org_apache_felix_main_4_4_1.xml b/.idea/libraries/Maven__org_apache_felix_org_apache_felix_main_4_4_1.xml
deleted file mode 100644
index 045e14f3..00000000
--- a/.idea/libraries/Maven__org_apache_felix_org_apache_felix_main_4_4_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__xml_resolver_xml_resolver_1_2.xml b/.idea/libraries/Maven__xml_resolver_xml_resolver_1_2.xml
deleted file mode 100644
index 3c94b040..00000000
--- a/.idea/libraries/Maven__xml_resolver_xml_resolver_1_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
index a6eb9493..d4c1b7df 100644
--- a/.idea/uiDesigner.xml
+++ b/.idea/uiDesigner.xml
@@ -152,6 +152,9 @@
-
+
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 1d53947a..35eb1ddf 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -2,7 +2,5 @@
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index a2d7cdb0..416bb6f2 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,13 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
@@ -16,313 +42,77 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Knowtator-2.0.iml b/Knowtator-2.0.iml
index c4c84312..2166d006 100644
--- a/Knowtator-2.0.iml
+++ b/Knowtator-2.0.iml
@@ -1,5 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -8,11 +28,15 @@
+
+
+
+
@@ -71,31 +95,27 @@
-
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
-
-
-
-
-
diff --git a/pom.xml b/pom.xml
index aff3b57d..3ed3c4ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,28 +53,23 @@
edu.stanford.protege
protege-common
- 5.0.0-RC1
+ 5.5.0
edu.stanford.protege
protege-editor-core
- 5.0.0-RC1
+ 5.5.0
edu.stanford.protege
protege-editor-owl
- 5.0.0-RC1
+ 5.5.0
org.slf4j
slf4j-api
1.7.10
-
- edu.stanford.protege
- org.protege.editor.owl
- 5.0.0-beta-17
-
com.github.vlsi.mxgraph
jgraphx
diff --git a/src/main/java/edu/ucdenver/ccp/knowtator/KnowtatorStandalone.java b/src/main/java/edu/ucdenver/ccp/knowtator/KnowtatorStandalone.java
index f6d64545..2085d59e 100644
--- a/src/main/java/edu/ucdenver/ccp/knowtator/KnowtatorStandalone.java
+++ b/src/main/java/edu/ucdenver/ccp/knowtator/KnowtatorStandalone.java
@@ -29,9 +29,7 @@
import java.awt.event.WindowEvent;
import java.io.File;
import java.io.IOException;
-import javax.swing.JButton;
import javax.swing.JFrame;
-import javax.swing.JLabel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.apache.commons.cli.CommandLine;
diff --git a/src/main/java/edu/ucdenver/ccp/knowtator/iaa/Iaa.java b/src/main/java/edu/ucdenver/ccp/knowtator/iaa/Iaa.java
index 4da384e6..ea71a509 100644
--- a/src/main/java/edu/ucdenver/ccp/knowtator/iaa/Iaa.java
+++ b/src/main/java/edu/ucdenver/ccp/knowtator/iaa/Iaa.java
@@ -274,7 +274,7 @@ void setConceptAnnotations(Set conceptAnnotations) {
for (ConceptAnnotation conceptAnnotation : conceptAnnotations) {
String setName = conceptAnnotation.getAnnotator().getId();
- String annotationClass = conceptAnnotation.getOwlClassLabel();
+ String annotationClass = conceptAnnotation.getOwlClassRendering();
annotationClasses.add(annotationClass);
// throw exception here if there is a setName in the conceptAnnotations
// that was not passed in.
@@ -290,7 +290,7 @@ void setConceptAnnotations(Set conceptAnnotations) {
class2AnnotationsMap.put(setName, classAnnotations);
for (ConceptAnnotation setConceptAnnotation : setConceptAnnotations) {
- String annotationClass = setConceptAnnotation.getOwlClassLabel();
+ String annotationClass = setConceptAnnotation.getOwlClassRendering();
if (!classAnnotations.containsKey(annotationClass)) {
classAnnotations.put(annotationClass, new HashSet<>());
}
@@ -506,7 +506,7 @@ private Set match(
*/
public Set getAnnotationsOfSameType(
ConceptAnnotation conceptAnnotation, String compareSetName) {
- String annotationClass = conceptAnnotation.getOwlClassLabel();
+ String annotationClass = conceptAnnotation.getOwlClassRendering();
return safeReturn(class2AnnotationsMap.get(compareSetName).get(annotationClass));
}
diff --git a/src/main/java/edu/ucdenver/ccp/knowtator/iaa/KnowtatorIaa.java b/src/main/java/edu/ucdenver/ccp/knowtator/iaa/KnowtatorIaa.java
index 0705a025..14a223be 100644
--- a/src/main/java/edu/ucdenver/ccp/knowtator/iaa/KnowtatorIaa.java
+++ b/src/main/java/edu/ucdenver/ccp/knowtator/iaa/KnowtatorIaa.java
@@ -31,30 +31,30 @@
import edu.ucdenver.ccp.knowtator.iaa.matcher.Matcher;
import edu.ucdenver.ccp.knowtator.iaa.matcher.SpanMatcher;
import edu.ucdenver.ccp.knowtator.model.KnowtatorModel;
-import edu.ucdenver.ccp.knowtator.model.collection.ConceptAnnotationCollection;
-import edu.ucdenver.ccp.knowtator.model.collection.TextSourceCollection;
import edu.ucdenver.ccp.knowtator.model.object.ConceptAnnotation;
-import edu.ucdenver.ccp.knowtator.model.object.Profile;
import edu.ucdenver.ccp.knowtator.model.object.TextSource;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
+import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
-/** The type Knowtator iaa. */
+/**
+ * The type Knowtator iaa.
+ */
public class KnowtatorIaa {
private final File outputDirectory;
// KnowtatorFilter filter;
- private final TextSourceCollection textSources;
-
// Project project;
- private final KnowtatorModel controller;
+ private final KnowtatorModel model;
// KnowtatorProjectUtil kpu;
@@ -66,7 +66,7 @@ public class KnowtatorIaa {
private final Map annotationTextNames;
- private Map textSourceAnnotationsMap;
+ private Map> textSourceAnnotationsMap;
private PrintStream html;
@@ -76,28 +76,42 @@ public class KnowtatorIaa {
* Instantiates a new Knowtator iaa.
*
* @param outputDirectory the output directory
- * @param controller the controller
+ * @param model the model
* @throws IaaException the iaa exception
*/
@SuppressWarnings("unused")
- public KnowtatorIaa(File outputDirectory, KnowtatorModel controller) throws IaaException {
+ public KnowtatorIaa(File outputDirectory, KnowtatorModel model,
+ Collection textSources,
+ Collection profiles,
+ Collection owlClasses) throws IaaException {
this.outputDirectory = outputDirectory;
// this.filter = filter;
- this.textSources = controller.getTextSources();
- this.controller = controller;
+ HashSet owlClasses1 = new HashSet<>(owlClasses);
+ this.model = model;
annotationTexts = new HashMap<>();
annotationTextNames = new HashMap<>();
- initSetNames();
- initTextSourceAnnotations();
+ setNames = new HashSet<>(profiles);
+ textSourceAnnotationsMap = new HashMap<>();
+ textSources.stream()
+ .map(id -> model.getTextSources().get(id))
+ .filter(Optional::isPresent)
+ .map(Optional::get)
+ .forEach(textSource -> {
+
+ Collection conceptAnnotations = textSource.getConceptAnnotations().stream()
+ .filter(conceptAnnotation -> owlClasses1.contains(conceptAnnotation.getOwlClass()))
+ .collect(Collectors.toList());
+
+ textSourceAnnotationsMap.put(textSource, conceptAnnotations);
+ });
initHtml();
}
private void initSetNames() {
- setNames = controller.getProfiles().stream().map(Profile::getId).collect(Collectors.toSet());
- setNames.remove("Default");
+
}
private void initHtml() throws IaaException {
@@ -110,7 +124,9 @@ private void initHtml() throws IaaException {
}
}
- /** Close html. */
+ /**
+ * Close html.
+ */
public void closeHtml() {
html.println("");
html.println("