diff --git a/emf-ws/README.md b/emf-ws/README.md index e23153960f2a317a69e04a58a32d85230444686a..45b53bf64463fb91c8307c98245230f535605921 100644 --- a/emf-ws/README.md +++ b/emf-ws/README.md @@ -17,7 +17,7 @@ This example shows how to serve an EMF instance in a REST API. There's two neat ### Generic EMF REST servlet -You can think of a REST API as a way of navigating from a set of root objects to some objects of interest and either reading or operating on them. Navigation is done along associations (references in Ecore terminologi) and you can typically filter and select while navigating. The result is typically serialized back as Json. +You can think of a REST API as a way of navigating from a set of root objects to some objects of interest and either reading or operating on them. Navigation is done along associations (references in Ecore terminologi) and you can typically filter and select while navigating. The result is typically serialized back as JSON. If you're doing this in pure Java, you can use a combination of reflection and annotations to do this generically. The **tdt4250.emf.*** bundles provide the same for EMF: generic REST API access to any EMF model instance driven by the model: @@ -27,13 +27,17 @@ If you're doing this in pure Java, you can use a combination of reflection and a ### Making EMF model bundles available for OSGi -To test the generic REST support, a resource allocation model (for university staff and courses) is used. This corresponding EMF model project (in general PDE bundle/plugin projects) is outside and in the same folder as the OSGi workspace. The layout is as follows +To test the generic REST support, a resource allocation model (for university staff and courses) is used. The corresponding EMF model project (in general PDE bundle/plugin projects) is outside and in the same folder as the OSGi workspace. The layout is as follows * **examples** - the git repo folder * **dict-ws** - the OSGi workspace * **cnf** - OSGi workspace configuration project * **tdt4250.emf.*** - bundle project providing REST servlet * **tdt4250.ra.resource - bundle providing a sample EMF resource (instance of ra model) to serve - * tdt4250.ra - EMF resource allocation model project - * tdt4250.ra.feature - features to publish in p2 repository - * tdt4250.ra.repository - p2 repository project + * **tdt4250.ra** - EMF resource allocation model project + * **tdt4250.ra.feature** - features to publish in p2 repository + * **tdt4250.ra.repository** - p2 repository project + +The key here is how we use the feature and repository projects to build a p2 repo that the Bnd Workspace can use. This makes bundles from plugin projects managed by Eclipse PDE available for use in OSGi projects managed by Bnd(tools). With the current setup the p2 repo must be manually built by opening the **site.xml** file in the repository project and using the **Build** button. + +The **build.bnd** file in the **cnf** folder configures the available repositories, including the p2 repositories for EMF, AQL and our locally built resource allocation model bundle. The reference to the latter is relative, so the location of the repository project is important.