added Goksel's model generator jar to conversion module
This commit is contained in:
parent
73550b6c5a
commit
cfa00c90e8
3 changed files with 75 additions and 1 deletions
|
|
@ -12,6 +12,30 @@
|
|||
<packaging>jar</packaging>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Install dependencies to local repository -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<!-- Update SBOL JAR name here. NOTE: Make sure to update the DEPENDENCY tag down below for SBOL as well. -->
|
||||
<id>install-libSBOLj</id>
|
||||
<phase>clean</phase>
|
||||
<configuration>
|
||||
<file>${basedir}/../lib/vpr.data-2.0.0-withDependencies.jar</file>
|
||||
<repositoryLayout>default</repositoryLayout>
|
||||
<groupId>uk.ac.ncl.ico2s</groupId>
|
||||
<artifactId>vpr-data</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<generatePom>true</generatePom>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>install-file</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Build an executable JAR -->
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
|
|
@ -66,7 +90,11 @@
|
|||
<groupId>edu.utah.ece.async</groupId>
|
||||
<artifactId>iBioSim-dataModels</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>uk.ac.ncl.ico2s</groupId>
|
||||
<artifactId>vpr-data</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
package edu.utah.ece.async.ibiosim.conversion;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
||||
import org.sbolstandard.core2.SBOLConversionException;
|
||||
import org.sbolstandard.core2.SBOLDocument;
|
||||
import org.sbolstandard.core2.SBOLReader;
|
||||
import org.sbolstandard.core2.SBOLValidationException;
|
||||
|
||||
import uk.ac.ncl.ico2s.VPRException;
|
||||
import uk.ac.ncl.ico2s.VPRTripleStoreException;
|
||||
import uk.ac.ncl.ico2s.sbolstack.SBOLInteractionAdder_GeneCentric;
|
||||
|
||||
public class ModelGenerator {
|
||||
|
||||
public SBOLDocument generateModel(String inputFileDir, String inputFileName)
|
||||
{
|
||||
SBOLDocument doc = null;
|
||||
|
||||
try {
|
||||
doc = SBOLReader.read(new File(inputFileDir + inputFileName));
|
||||
String endpoint="http://synbiohub.org/sparql";
|
||||
SBOLInteractionAdder_GeneCentric interactionAdder = new SBOLInteractionAdder_GeneCentric(URI.create(endpoint));
|
||||
interactionAdder.addInteractions(doc);
|
||||
} catch (SBOLValidationException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SBOLConversionException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (VPRException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (VPRTripleStoreException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return doc;
|
||||
}
|
||||
}
|
||||
BIN
lib/vpr.data-2.0.0-withDependencies.jar
Normal file
BIN
lib/vpr.data-2.0.0-withDependencies.jar
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue