Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

These web services uses use a JSON exchange format (ei-x) to allow external parties to create and update resources in an eagle-i repository. They are currently deployed in the development server:

http://montana.dev.eagle-i.net

Knowsn issues:

  • authentication is still to be implemented (this very first pass uses no authentication). This will most likely be HTTP BasicAuth over HTTPS
  •  

The ei-x

...

JSON request and response formats

ei-x is a comprised of two classes:

EIExchangeInstance --  a simplified container for the RDF of an eagle-i resource *and* its linked resources. It is the serialization of the following Java class:minimal information of directly  linked resources -- also referred to as primary resource and secondary resources. Information for secondary resources includes *only* text properties (i.e. no tertiary resources!)

InstanceUpdateResponse -- encapsulates the status of requested updates

Browse the Java code from which these are serialized: 

https://open.med.harvard.edu/svn/eagle-i-dev/apps/trunk/datatools/catalyst/src/main/java/org/eaglei/datatools/services/EIExchangeInstance.javaImage ModifiedField

EIExchangeInstance field descriptions:

instanceEntity (-- EIEntity)

A container for the primary resource's EIURI and Label; when requesting creation of a new resource, The ID field of the EIURI should be empty, in which case the 

specificTypeUri (-- EIURI)

The most specific ontology type assigned to the resource. The type EIURI can be obtained from the ontology browser (grab it from the URL bar), e.g. DNA Sequencer: http://purl.obolibrary.org/obo/OBI_0400103Image Removed

rootType (-- EIURI)

The root type of the resource (one of the eagle-i Primary Types), e.g. Instrument: http://purl.obolibrary.org/obo/ERO_0000004Image Removed

foreignKey (-- String)

A string that uniquely identifies the resource in its external location (format determined by the source)

source (-- String)

A string that uniquely identifies the source of the resource (format TBD)

linkedResources -- Map<String, EIExchangeInstance>

A map that contains minimal information of secondary resources. It is keyed on the URI of the ontology property that associates the secondary resource to the primary resource (the URI is a String and not an EIURI, as complex map keys are not well supported by GSON)

textProperties -- Map<String, String>

A map that contains the value of text properties, keyed on the URI of the ontology property used to capture them.

InstanceUpdateResponse field descriptions

All these maps are keyed on the resource's (primary or secondary) eagle-i URI.

newlyCreatedUriToForeignKey -- Map<String, String>

updatedUriToForeignKey -- Map<String, String>

failures -- Map<String, String> 

Obtain an ei-x representation of a resource

...