diff --git a/json-converter/pom.xml b/json-converter/pom.xml
index 882767328..58a99ff3b 100644
--- a/json-converter/pom.xml
+++ b/json-converter/pom.xml
@@ -15,58 +15,12 @@
HEAD
-
-
-
- maven-assembly-plugin
-
-
- jar-with-dependencies
-
-
-
-
- make-assembly
- package
-
- single
-
-
-
-
-
-
-
org.apache.jena
apache-jena-libs
+ 4.9.0
pom
- 3.2.0
-
-
- log4j
- log4j
-
-
- org.slf4j
- slf4j-log4j12
-
-
-
-
- com.hp.hpl.jena
- jena
-
-
- log4j
- log4j
-
-
- org.slf4j
- slf4j-log4j12
-
-
org.biopax.paxtools
diff --git a/json-converter/src/test/java/org/biopax/paxtools/io/jsonld/JsonldBiopaxConverterTest.java b/json-converter/src/test/java/org/biopax/paxtools/io/jsonld/JsonldBiopaxConverterTest.java
index c8cfcb2fc..d6496fd7d 100644
--- a/json-converter/src/test/java/org/biopax/paxtools/io/jsonld/JsonldBiopaxConverterTest.java
+++ b/json-converter/src/test/java/org/biopax/paxtools/io/jsonld/JsonldBiopaxConverterTest.java
@@ -19,8 +19,7 @@ public final void test() throws IOException {
JsonldConverter intf = new JsonldBiopaxConverter();
// convert owl test file in resource directory to jsonld format
- InputStream in = getClass().getResourceAsStream(
- "/PC2v5test-Signaling-By-BMP-Pathway-REACT_12034.2.owl");
+ InputStream in = getClass().getResourceAsStream("/PC2v5test-Signaling-By-BMP-Pathway-REACT_12034.2.owl");
intf.convertToJsonld(in, new FileOutputStream(jsonldTestFileName));
// convert jsonld test file back to rdf format
diff --git a/pattern/src/main/java/org/biopax/paxtools/pattern/miner/SIFEnum.java b/pattern/src/main/java/org/biopax/paxtools/pattern/miner/SIFEnum.java
index dc0ba74b2..9e1407e76 100644
--- a/pattern/src/main/java/org/biopax/paxtools/pattern/miner/SIFEnum.java
+++ b/pattern/src/main/java/org/biopax/paxtools/pattern/miner/SIFEnum.java
@@ -1,5 +1,7 @@
package org.biopax.paxtools.pattern.miner;
+import org.apache.commons.lang3.StringUtils;
+
import java.util.Arrays;
import java.util.List;
@@ -107,10 +109,12 @@ public List> getMiners()
public static SIFEnum typeOf(String tag)
{
- tag = tag.toUpperCase().replaceAll("-", "_");
+ if(StringUtils.isBlank(tag))
+ return null;
+
SIFEnum type = null;
- try
- {
+ try {
+ tag = tag.toUpperCase().replaceAll("-", "_");
type = valueOf(tag);
}
catch (IllegalArgumentException e){}
diff --git a/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/Direction.java b/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/Direction.java
index 051092263..e01269547 100644
--- a/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/Direction.java
+++ b/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/Direction.java
@@ -1,5 +1,7 @@
package org.biopax.paxtools.query.algorithm;
+import org.apache.commons.lang3.StringUtils;
+
/**
* Direction is used for specifying upstream, downstream or both. Neighborhood and CommonStream
* queries use this enum as parameter.
@@ -28,7 +30,7 @@ public enum Direction
* Constructor with description.
* @param description Description
*/
- private Direction(String description)
+ Direction(String description)
{
this.description = description;
}
@@ -41,4 +43,18 @@ public String getDescription()
{
return description;
}
+
+ public static Direction typeOf(String tag)
+ {
+ if(StringUtils.isBlank(tag))
+ return null;
+
+ Direction type = null;
+ try {
+ type = valueOf(tag.toUpperCase());
+ }
+ catch (IllegalArgumentException e){}
+
+ return type;
+ }
}
diff --git a/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/LimitType.java b/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/LimitType.java
index 8d62bd461..cde938949 100644
--- a/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/LimitType.java
+++ b/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/LimitType.java
@@ -1,5 +1,7 @@
package org.biopax.paxtools.query.algorithm;
+import org.apache.commons.lang3.StringUtils;
+
/**
* Specifies whether the length limit is a normal limit or shortest_plus_k limit. PathsFromToQuery
* use this as a parameter.
@@ -9,5 +11,20 @@
public enum LimitType
{
NORMAL,
- SHORTEST_PLUS_K
+ SHORTEST_PLUS_K;
+
+ public static LimitType typeOf(String tag)
+ {
+ if(StringUtils.isBlank(tag))
+ return null;
+
+ LimitType type = null;
+ try {
+ tag = tag.toUpperCase().replaceAll("-", "_");
+ type = valueOf(tag);
+ }
+ catch (IllegalArgumentException e){}
+
+ return type;
+ }
}