Skip to content

Commit d7f20e5

Browse files
author
GMarupilla
authored
Merge pull request #60 from virtualcell/validate
Validate
2 parents 273bbad + 380b4ad commit d7f20e5

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

vcell-core/src/main/java/org/jlibsedml/execution/ArchiveModelResolver.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package org.jlibsedml.execution;
22

3-
import java.io.File;
43
import java.net.URI;
54
import java.util.List;
65

7-
import cbit.vcell.resource.OperatingSystemInfo;
86
import org.jlibsedml.ArchiveComponents;
97
import org.jlibsedml.IModelContent;
108

@@ -14,19 +12,10 @@ public ArchiveModelResolver(ArchiveComponents ac) {
1412
this.ac=ac;
1513
}
1614
public String getModelXMLFor(URI modelURI) {
17-
String rc = null;
18-
// Considering the import for nested SED-ML document
19-
String regExp = null;
15+
String rc=null;
2016
List<IModelContent> children = ac.getModelFiles();
2117
for (IModelContent imc: children) {
22-
if (OperatingSystemInfo.getInstance().isWindows()) {
23-
regExp = "\\\\";
24-
} else {
25-
regExp = "/";
26-
}
27-
String[] splitURI = modelURI.toString().split(regExp);
28-
String filename = splitURI[splitURI.length-1];
29-
if(imc.getName().equals(filename)){
18+
if(imc.getName().equals(modelURI.toString())){
3019
rc= imc.getContents();
3120
}
3221
}

0 commit comments

Comments
 (0)