Skip to content

Commit

Permalink
Merge branch 'feature/setuprelease' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
goksel committed Sep 20, 2020
2 parents 5ac5705 + a43f75a commit dd81eff
Show file tree
Hide file tree
Showing 12 changed files with 145 additions and 86 deletions.
64 changes: 38 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
# libSBOLj
XML
```
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:sbol="http://sbols.org/v3#">
<sbol:Sequence rdf:about="http://myseq.org/seqabc">
<sbol:encoding rdf:resource="http://sbols.org/v3#iupacNucleicAcid"/>
<sbol:elements>aaaatttggg</sbol:elements>
<sbol:description>pTetR promoter</sbol:description>
<sbol:name>pTetR</sbol:name>
<sbol:displayId>pTetR</sbol:displayId>
</sbol:Sequence>
</rdf:RDF>
```
# libSBOLj3 - A Java library for the Synthetic Biology Open Language 3
The libSBOLj Java library has been developed for the [Synthetic Biology Open Language 3.0](https://sbolstandard.org/data-model-specification). The library is under development and is currently available as an alpha release.

Turtle:
```
SBOL represents data using RDF graphs, which can be serialised in different formats. The libSBOLj3 library supports the following RDF formats.
* RDF/XML
* Turtle
* N3
* JSON-LD
* RDF/JSON

@base <http://testbase.org> .
@prefix sbol: <http://sbols.org/v3#> .
## How to use libSBOLj3

<http://myseq.org/seqabc>
a sbol:Sequence ;
sbol:description "pTetR promoter" ;
sbol:displayId "pTetR" ;
sbol:elements "aaaatttggg" ;
sbol:encoding sbol:iupacNucleicAcid ;
sbol:name "pTetR" .
### As a Maven dependency in a Maven project
Use this option if you are developing a Java application using [Maven](https://maven.apache.org/). Add the following libSBOLj3 dependency to your Maven applications's POM file (pom.xml). Please also make sure that you include the Nexus' Snapshots repository URL in the POM file.
```
</dependencies>
...
<dependency>
<groupId>org.sbolstandard</groupId>
<artifactId>libSBOLj3</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
...
</dependencies>
<repositories>
<repository>
<id>oss-sonatype</id>
<name>oss-sonatype</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
```

### As a Java dependency in a non-Maven project
The libSBOLj3 library is available as a JAR file. Please download the file from the [releases page](https://github.com/goksel/libSBOLj3/tags). A single JAR file (with the "withDepencencies" suffix), which includes all the required libSBOLj3 related dependencies, is also available.

## SBOL Examples
[Several SBOL3 examples](https://github.com/goksel/libSBOLj3/tree/master/libSBOLj3/output) are available as part of the libSBOLj3 library. These examples have also been made available as part of the [SBOLTestSuite](https://github.com/SynBioDex/SBOLTestSuite/tree/master/SBOL3). Some of these examples have beeen explained in the recent SBOL3 paper, titled "[The Synthetic Biology Open Language (SBOL) Version 3: Simplified Data Exchange for Bioengineering]"(https://doi.org/10.3389/fbioe.2020.01009).
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@id" : "urn:uuid:d0accf73-2c60-11b2-80d9-acde48001122",
"@id" : "urn:uuid:d1ce016f-2c60-11b2-80b5-acde48001122",
"@type" : "sbol:Component",
"name" : "TetR",
"type" : "SBO:0000252",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<urn:uuid:d0accf73-2c60-11b2-80d9-acde48001122> <http://sbols.org/v3#name> "TetR" .
<urn:uuid:d0accf73-2c60-11b2-80d9-acde48001122> <http://sbols.org/v3#type> <https://identifiers.org/SBO:0000252> .
<urn:uuid:d0accf73-2c60-11b2-80d9-acde48001122> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://sbols.org/v3#Component> .
<urn:uuid:d1ce016f-2c60-11b2-80b5-acde48001122> <http://sbols.org/v3#name> "TetR" .
<urn:uuid:d1ce016f-2c60-11b2-80b5-acde48001122> <http://sbols.org/v3#type> <https://identifiers.org/SBO:0000252> .
<urn:uuid:d1ce016f-2c60-11b2-80b5-acde48001122> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://sbols.org/v3#Component> .
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
xmlns="https://sbolstandard.org/examples/"
xmlns:om="http://www.ontology-of-units-of-measure.org/resource/om-2/"
xml:base="https://sbolstandard.org/examples/">
<sbol:Component rdf:about="urn:uuid:d0accf73-2c60-11b2-80d9-acde48001122">
<sbol:Component rdf:about="urn:uuid:d1ce016f-2c60-11b2-80b5-acde48001122">
<sbol:name>TetR</sbol:name>
<sbol:type rdf:resource="https://identifiers.org/SBO:0000252"/>
</sbol:Component>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"urn:uuid:d0accf73-2c60-11b2-80d9-acde48001122" : {
"urn:uuid:d1ce016f-2c60-11b2-80b5-acde48001122" : {
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ {
"type" : "uri" ,
"value" : "http://sbols.org/v3#Component"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix om: <http://www.ontology-of-units-of-measure.org/resource/om-2/> .

<urn:uuid:d0accf73-2c60-11b2-80d9-acde48001122>
<urn:uuid:d1ce016f-2c60-11b2-80b5-acde48001122>
a sbol:Component ;
sbol:name "TetR" ;
sbol:type SBO:0000252 .
12 changes: 6 additions & 6 deletions libSBOLj3/output/provenance_entity/activity/activity.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"displayId" : "codon_optimization_activity",
"name" : "Codon optimization activity",
"type" : "sbol:design",
"endedAtTime" : "2020-08-30T17:16:29.495Z",
"endedAtTime" : "2020-08-30T17:48:04.765Z",
"qualifiedAssociation" : "codon_optimization_activity/association",
"qualifiedUsage" : [ "codon_optimization_activity/optimised_usage", "codon_optimization_activity/source_usage" ],
"startedAtTime" : "2019-07-29T17:16:29.495Z"
"startedAtTime" : "2019-07-29T17:48:04.765Z"
}, {
"@id" : "codon_optimization_activity/association",
"@type" : "prov:Association",
Expand Down Expand Up @@ -112,15 +112,15 @@
"@id" : "http://www.w3.org/ns/prov#qualifiedAssociation",
"@type" : "@id"
},
"endedAtTime" : {
"@id" : "http://www.w3.org/ns/prov#endedAtTime"
"startedAtTime" : {
"@id" : "http://www.w3.org/ns/prov#startedAtTime"
},
"qualifiedUsage" : {
"@id" : "http://www.w3.org/ns/prov#qualifiedUsage",
"@type" : "@id"
},
"startedAtTime" : {
"@id" : "http://www.w3.org/ns/prov#startedAtTime"
"endedAtTime" : {
"@id" : "http://www.w3.org/ns/prov#endedAtTime"
},
"@vocab" : "https://sbolstandard.org/examples/",
"SBO" : "https://identifiers.org/SBO:",
Expand Down
4 changes: 2 additions & 2 deletions libSBOLj3/output/provenance_entity/activity/activity.nt
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
<https://sbolstandard.org/examples/CodonOptimisationProtocol> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/prov#Plan> .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://sbols.org/v3#type> <http://sbols.org/v3#design> .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://www.w3.org/ns/prov#qualifiedAssociation> <https://sbolstandard.org/examples/codon_optimization_activity/association> .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://www.w3.org/ns/prov#endedAtTime> "2020-08-30T17:16:29.495Z" .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://www.w3.org/ns/prov#startedAtTime> "2019-07-29T17:48:04.765Z" .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://www.w3.org/ns/prov#qualifiedUsage> <https://sbolstandard.org/examples/codon_optimization_activity/optimised_usage> .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://sbols.org/v3#name> "Codon optimization activity" .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://sbols.org/v3#description> "An activity that is used to optimise codons" .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/prov#Activity> .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://sbols.org/v3#displayId> "codon_optimization_activity" .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://www.w3.org/ns/prov#startedAtTime> "2019-07-29T17:16:29.495Z" .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://www.w3.org/ns/prov#endedAtTime> "2020-08-30T17:48:04.765Z" .
<https://sbolstandard.org/examples/codon_optimization_activity> <http://www.w3.org/ns/prov#qualifiedUsage> <https://sbolstandard.org/examples/codon_optimization_activity/source_usage> .
4 changes: 2 additions & 2 deletions libSBOLj3/output/provenance_entity/activity/activity.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<sbol:displayId>association</sbol:displayId>
</prov:Association>
</prov:qualifiedAssociation>
<prov:endedAtTime>2020-08-30T17:16:29.495Z</prov:endedAtTime>
<prov:startedAtTime>2019-07-29T17:48:04.765Z</prov:startedAtTime>
<prov:qualifiedUsage>
<prov:Usage rdf:about="codon_optimization_activity/optimised_usage">
<prov:hadRole rdf:resource="https://identifiers.org/SBO:0000011"/>
Expand All @@ -66,7 +66,7 @@
<sbol:name>Codon optimization activity</sbol:name>
<sbol:description>An activity that is used to optimise codons</sbol:description>
<sbol:displayId>codon_optimization_activity</sbol:displayId>
<prov:startedAtTime>2019-07-29T17:16:29.495Z</prov:startedAtTime>
<prov:endedAtTime>2020-08-30T17:48:04.765Z</prov:endedAtTime>
<prov:qualifiedUsage>
<prov:Usage rdf:about="codon_optimization_activity/source_usage">
<prov:hadRole rdf:resource="https://identifiers.org/SBO:0000645"/>
Expand Down
12 changes: 6 additions & 6 deletions libSBOLj3/output/provenance_entity/activity/activity.rj
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,19 @@
] ,
"http://www.w3.org/ns/prov#endedAtTime" : [ {
"type" : "literal" ,
"value" : "2020-08-30T17:16:29.495Z"
"value" : "2020-08-30T17:48:04.765Z"
}
] ,
"http://www.w3.org/ns/prov#startedAtTime" : [ {
"type" : "literal" ,
"value" : "2019-07-29T17:48:04.765Z"
}
] ,
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ {
"type" : "uri" ,
"value" : "http://www.w3.org/ns/prov#Activity"
}
] ,
"http://www.w3.org/ns/prov#startedAtTime" : [ {
"type" : "literal" ,
"value" : "2019-07-29T17:16:29.495Z"
}
] ,
"http://sbols.org/v3#name" : [ {
"type" : "literal" ,
"value" : "Codon optimization activity"
Expand Down
4 changes: 2 additions & 2 deletions libSBOLj3/output/provenance_entity/activity/activity.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
sbol:displayId "codon_optimization_activity" ;
sbol:name "Codon optimization activity" ;
sbol:type sbol:design ;
prov:endedAtTime "2020-08-30T17:16:29.495Z" ;
prov:endedAtTime "2020-08-30T17:48:04.765Z" ;
prov:qualifiedAssociation <codon_optimization_activity/association> ;
prov:qualifiedUsage <codon_optimization_activity/optimised_usage> , <codon_optimization_activity/source_usage> ;
prov:startedAtTime "2019-07-29T17:16:29.495Z" .
prov:startedAtTime "2019-07-29T17:48:04.765Z" .
117 changes: 82 additions & 35 deletions libSBOLj3/pom.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sbolstandard</groupId>
<artifactId>libSBOLj3</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>libSBOLj3</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
<dependency>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sbolstandard</groupId>
<artifactId>libSBOLj3</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>libSBOLj3</name>
<url>https://github.com/goksel/libSBOLj3</url>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/goksel/libSBOLj3/issues</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-base</artifactId>
<version>3.14.0</version>
Expand All @@ -23,25 +28,67 @@
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>3.14.0</version>
</dependency>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>

</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>

</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>withDependencies</shadedClassifierName>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>


<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<source>1.8</source>
<target>1.8</target>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build></project>


</plugins>
</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

</project>

0 comments on commit dd81eff

Please sign in to comment.