| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is a sample OSLC PROMCODE server, that is based on the OASIS OSLC PROMCODE Specification 1.0.
Follow the 3 sections below to:
You will set up an RDF data store to store the OSLC PROMCODE resources.
We will utilize the Apache Jena Fuseki that is an open source RDF server. You can select either Docker Compose, Docker version, or Java version.
The easiest way to run both the PROMCODE server and Fuseki together:
docker-compose up --buildTo stop the services:
docker-compose downTo view logs:
docker-compose logs -fPre-built Docker images are available from GitHub Container Registry for both x86_64 (amd64) and ARM64 architectures:
# Run the latest version
docker run -p 8080:8080 ghcr.io/oslc/promcode-lyo-server:latest
# Run a specific version
docker run -p 8080:8080 ghcr.io/oslc/promcode-lyo-server:0.1.0Note: Images are automatically rebuilt weekly to ensure the latest security updates from base images.
There are multiple options to run the OSLC Server. Below are the simplest options if you don't want to use anything except JDK and a Maven installation. Prerequisites:
Follow these steps to start the server:
cd promcode-lyo-server
mvn clean jetty:run-warNow proceed to the steps listed in the next section Navigating OSLC servers.
Follow these steps to start the server:
cd promcode-lyo-server
mvn clean cargo:runIf you prefer to use Docker, you can run both the PROMCODE server and Fuseki using Docker Compose:
docker-compose up --buildThis will:
The OSLC server is available at the following URL:
From that point, you can navigate through the Service Provider Catalog, or using the built-in Swagger Editor.
THe server contains no data at startup. You can add resources to the server by performing resource operations on their creation factories.
This can be done through the built-in Swagger editor, or using the command line.
Bash/Linux/macOS:
curl -i --data-raw '@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix oslc_promcode: <http://open-services.net/ns/promcode#> .
<> a oslc_promcode:Artifact ;
dcterms:identifier "1" ;
dcterms:title "A1" ;
dcterms:description "UI for making a reservation" .' \
-H "Accept: text/turtle;" \
-H "Content-type: text/turtle" \
http://localhost:8080/oslc/service1/artifacts/createPowerShell/Windows:
curl -i --data-raw '@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix oslc_promcode: <http://open-services.net/ns/promcode#> .
<> a oslc_promcode:Artifact ;
dcterms:identifier "1" ;
dcterms:title "A1" ;
dcterms:description "UI for making a reservation" .' `
-H "Accept: text/turtle;" `
-H "Content-type: text/turtle" `
http://localhost:8080/oslc/service1/artifacts/createcurl -H "Accept: text/turtle;" http://localhost:8080/oslc/artifact/1This server is modelled and generated using Lyo Designer.
It is recommended that any changes to the code should be done using LyoDesigner to maintain traceability between the model and the code. Below are some instructions on how to open the projects in this repository with LyoDesigner.
It is recommended you get familiar with the LyoDesigner tool before you perform any changes.
To open the relevant projects for the OSLC PROMCODE server, you need to follow the steps below.
The first step is to install Lyo Designer.
The PROMCODE domain model is already modelled and made available to be used by any PROMCODE server installation.
This project contains the PROMCODE model, and all other OSLC Domain Specifications.
In LyoDesigner, import the Modelling project under the "promcode-lyo-server-model" folder.
This model depends on the PROMCODE domain model, imported in the previous step. It is important the domain model is imported first.
This models a simple PROMCODE server, which can be used as a basis for your own extensions and modifications.
This maven project is generated from the server model imported above.
| Back | FazBrowse Home | New Git URL |