Modification of the WebProtégé ontology editor to support ontology attestation by implementing a custom portlet. See the original readme below for instructions for WebProtégé in general. To run a pre-built docker image see the section "Running from docker".
- For further documentation see the Attestation library module and its readme
- Attestation portlet usage guide
- Dataset and results used for publication
- Development requirements of the attestation module for compiling and deploying smart contracts:
- solc 7.1.0+
- web3j-cli
- Node and NPM
- Metamask (or other wallet plugin) for client blockchain interaction
- Docker Compose
- Java 8 and Maven
To build WebProtégé from source
- Clone the github repository
- Open a terminal in the directory where you clone the repository
- Use maven to package WebProtégé
To ignore tests use
mvn clean package
mvn clean package -DskipTests=True
- The WebProtege .war file will be built into the webprotege-server directory
- first, consider following the instructions of the attestation module to set up an Ethereum test network
- start the database with
docker-compose up -d wpmongo
- start the GWT code server with
mvn gwt:codeserver
- in a different terminal start a tomcat server instance with
mvn -P dev -Denv=dev tomcat7:run
. The maven profile-P dev
will result in WebProtégé storing its data in.devdata
instead of the default directory (/srv/webprotege
). - first time starting up (or after resetting the database) an admin user has to be created.
Executed the webprotege-cli JAR (compile it, if not already done). E.g.,
java -jar webprotege-cli/target/webprotege-cli-{version}.jar create-admin-account
- by default, WebProtégé is available on http://localhost:8080.
- After the first start, some application settings need to be configured. Login to [localhost:8080/#application/settings](the settings page) with the previously created admin account.
Detailed installation instructions can be found in the official wiki.
A pre-built docker image is available. To run the project stack from docker:
-
Enter this following command in the Terminal to start the docker container in the background. This will start containers for all dependand services as well, i.e., MongoDB and Ganache.
docker-compose up -d
-
Deploy the smart contracts (e.g., to Ganache). Follow the instructions here.
-
Create the admin user (follow the questions prompted to provider username, email and password)
docker exec -it webprotege java -jar /webprotege-cli.jar create-admin-account
-
Browse to WebProtégé Settings page in a Web browser by navigating to http://localhost:5000/#application/settings
- Define the
System notification email address
andapplication host URL
- Enable
User creation
,Project creation
andProject import
- Define the
To stop WebProtégé, MongoDB and the Ganache test instance:
docker-compose down
Sharing the volumes used by the WebProtégé app and MongoDB allows for keeping persistent data, even when the containers stop. Default shared data storage:
- WebProtégé will store its data in the source code folder at
./.protegedata/protege
where you rundocker-compose
- MongoDB will store its data in the source code folder at
./.protegedata/mongodb
where you rundocker-compose
Path to the shared volumes can be changed in the
docker-compose.yml
file.
By default, a Ganache test blockchain will be started. WebProtégé is pre-configured to use this chain. It is possible to change the chain by setting environment variables in docker-compose.yml
(of the servcie webprotege-attestation
):
environment:
- webprotege.mongodb.host=wpmongo
- ADDRESS_ATTESTATION=<the smart contract address>
- PROVIDER_HOST=<host name of the RPC endpoint provider>
- PROVIDER_PORT=<port of the RPC endpoint provider>
Some key classes were altered to integrate an attestation portlet in the editor. The portlet can be added by choosing 'Attestation' from the list of available portlets, e.g. when adding a new tab. In the graphic below the altered classes are marked in red and the added packages in green.