Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ICO2S/polen
Browse files Browse the repository at this point in the history
  • Loading branch information
Goksel Misirli committed Mar 29, 2017
2 parents dc7cbea + 95412fd commit 6e91fe9
Showing 1 changed file with 38 additions and 6 deletions.
44 changes: 38 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,37 @@ The messaging system is identified with a URI which is used to publish messages
Similarly the messaging system can be queried for types of messages with additional querying parameters. The example code below is used to poll messages that are for Datasheets, and are published on or after 01/12/2013. The maximum number of messages to poll is specified as 2.

List messages = messagingSystem.poll("Datasheet", new Date(2013, 12, 1), 2);

## Example Messages
The example below shows message created for the SBML model of a biological part. Its publisher is set to the Virtual Parts Repository.

Message message=new Message();
message.setTopic("Model");
message.setName("SlrR SBML model");
message.setDescription("An SBML model for the SlrR part");
message.setResourceUri("http://www.virtualparts.org/part/BO_28778/sbml");
message.setPublisher("http://www.virtualparts.org");
message.addProperty("type", "SBML");

Here, a new Datasheet message is created for a newly characterised promoter part. The publisher property is set to the SynBIS repository.

Message message=new Message();
message.setTopic("Datasheet");
message.setName("pNlpD");
message.setDescription("Genetic description of the pNlpD promoter");
message.setResourceUri("http://synbis.bg.ic.ac.uk/webapi/rest/datasheet/sbol/28");
message.setPublisher("http://synbis.bg.ic.ac.uk");

Data repositories can also be registered with POLEN. This registry can then be queried by tools to access various information from different repositories. In this example, a new Repository message for the the SynBioHub repository created.

Message message=new Message();
message.setTopic("Repository");
message.setName("SynBioHub");
message.setDescription("A repository for biological designs");
message.setResourceUri("http://synbiohub.org");
message.setPublisher("http://synbiohub.org");
message.addProperty("type", "SBOL");


## Download the Client API
[Click here](https://bitbucket.org/ncl-intbio/polen/downloads/polen-client-1.0-withDependencies.jar) to download the JAR file.
Expand All @@ -40,12 +71,12 @@ Although the Client library is the advised method of access for messages, POLEN
## REST-based HTTP-POST interface
The following URL is used to submit POLEN messages.
```
http://w3id.org/synbio/polen/publish/
https://w3id.org/synbio/polen/publish/
```
This URL expects three different POST parameters:
- topic: The topic of the message. E.g. "Part" or "Model"
- publisher: Publisher of the message
- content: a JSON object with other details
- content: a JSON object with details as below:
* name : The name of the message
* description: The description of the message
* uri : The uri pointing to where the actual data are
Expand All @@ -55,18 +86,19 @@ This URL expects three different POST parameters:
## REST-based HTTP-GET interface
The GET URLs has the following format:
```
http://w3id.org/synbio/polen/publish/messagesByTopic/{TOPIC}/{TIMESTAMP}/{NUMBER_OF_MESSAGES}
https://w3id.org/synbio/polen/publish/messagesByTopic/{TOPIC}/{TIMESTAMP}/
{NUMBER_OF_MESSAGES}
```
The TOPIC, TIMESTAMP and NUMBER_OF_MESSAGES parameters can be used to create URLs to query the POLEN infrastructure. For example, the following URL returns the first two messages that are published since 1st Jan 2014 for the "Part" topic.

http://w3id.org/synbio/polen/messagesByTopic/Part/1388538000/2
https://w3id.org/synbio/polen/messagesByTopic/Part/1388538000/2

## Retrieving messages using RSS feeds
Recent messages can also be retrieved using RSS feeds. These feeds have the following URL format:
```
http://w3id.org/synbio/polen/{TOPIC}.rss
https://w3id.org/synbio/polen/{TOPIC}.rss
```
For example, http://w3id.org/synbio/polen/Part.rss feed can be used to receive he recentlt published messages for the "Part" topic.
For example, https://w3id.org/synbio/polen/Part.rss feed can be used to receive he recentlt published messages for the "Part" topic.



Expand Down

0 comments on commit 6e91fe9

Please sign in to comment.