Skip to content

Latest commit

 

History

History
65 lines (57 loc) · 8.49 KB

README.md

File metadata and controls

65 lines (57 loc) · 8.49 KB

D2S Web Directory

discover2share, discover2share-EJB, discover2share-Persistence and discover2share-Web are the projects representing the Java EE application. The initial D2S web directory user that is created at database setup has the username "sa" and the password "admin".

discover2share-scripts contains additional scripts, e.g. the Excel to RDF transformation and an Alexa user distribution parser.

Setup

Setting up the web directory under Windows

  • As a preliminary, JDK 8 needs to be installed.
  • Download WildFly (tested with version 8.2.0 Final) and extract the archive’s contents to a path which must not contain spaces (e.g. C:\wildfly)
  • Run the server using the <WildFly directory>\bin\standalone.bat script. It should then be accessible via http://localhost:8080.
    • Click the “Administration Console” link and follow the instructions to create a management user.
    • Afterwards, revisit the Administration Console and go to “Deployments”. Add the hsqldb.jar which can be found in the repository’s lib directory via “Add Content”. Copying it to <WildFly directory>\standalone\deployments beforehand might be beneficial to prevent certain errors in the future.
    • Go to “Configuration” > “Connector” > “Datasources” > “Add” to create a new data source with the following information. Enable it afterwards.
      • Name: DefaultDS
      • JNDI Name: java:/DefaultDS
      • Choose hsqldb.jar as the driver
      • Connection URL: jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB;shutdown=true
      • Username: sa
    • Optional: Add the discover2share.ear from the bin directory as another deployment if you want to run the web directory in standalone mode and not via eclipse. The application is then available at http://localhost:8080/discover2share-Web/

Setting up the triplestore server under Windows

  • Download Apache Jena Fuseki (tested with version 2.0.0) and extract the archive’s content to a folder on your hard drive.
  • Run the server using the <Fuseki directory>\fuseki-server.bat. It should then be accessible via http://localhost:3030/ .
    • Go to “manage datasets” > “add new dataset”, name it d2s-ont and choose the type „Persistent“.
    • Afterwards, go to “existing datasets” and select the “upload data” button for the new dataset. Using the “select files…” button select the required .owl files from the ontology directory in this repository. Then click “upload all”.
    • The Fuseki server needs to be running in the future in order to have the web directory function properly.

Setting up the web directory under Ubuntu

  • Again, JDK 8 is required.
  • To install wildfly and register it as a service and then run it, follow these instructions.
    • It is not necessary to use the standalone-full.xml instead of the standalone.xml in the config.
    • The step to replace 127.0.0.1 by 0.0.0.0 is also unnecessary to generally run the server.
  • Create an administration user and configure the deployments and data source in the same way as explained above.

Setting up the triplestore server under Ubuntu

  • Download Apache Jena Fuseki (tested with version 2.0.0) and extract the archive’s content to a folder on your hard drive.
  • Run the server using the ./fuseki-server command from the extracted folder. It should then be accessible via http://localhost:3030/.
  • Create the dataset and import the ontology data in the same way as explained above.

Optional: Setting up the web directory in eclipse

  • Download Eclipse (tested with Eclipse Java EE IDE for Web Developers, Luna Service Release 2 (4.4.2)) and extract it to a folder on your hard drive and run it.
    • Select “Help” > “Eclipse Marketplace…” and choose “Eclipse Marketplace” as the marketplace catalogue. Search for “JBoss Tools” and install “JBoss Tools 4.2.x". After all requirements have been checked, select all features and confirm. Accept the license agreements and click “Finish”. Warnings regarding unsigned content can be closed via “OK”. Afterwards, confirm the restart of eclipse.
    • Choose the “Java EE” perspective from the upper right corner of eclipse. If it’s not visible, add it via “Window” > “Open Perspective” > “Other…”.
    • Choose the “Servers” view tab in the lower part of the eclipse window. Right-click the empty area and select “New” > “Server”. Select “WildFly 8.x” from the “JBoss Community” category and click “Next” twice. Set the “Home directory” to the installation directory of WildFly (e.g. C:\wildfly) and click “Finish”.
    • If the discover2share.ear was added as explained above. The server can now be run by selecting it and clicking the green start button.
  • Import all projects from the repository via “File” > “Import” > “Existing Projects into Workspace”. They should then appear in the projects explorer. It might be necessary to exchange the JRE System Library in the build paths of the projects to match the installed Java version.
  • Right-click the previously created WildFly server entry and select “Add and Remove…”. Select the “discover2share” project and click “Add >”, then “Finish”.
  • The project will now be automatically deployed when starting the server in eclipse. It is then available at http://localhost:8080/discover2share-Web/.

Running the Alexa Parser script

This script retrieves all platforms from the ontology and tries to find user distribution data for them on Alexa.com. If found, it is added to the ontology or written to a file.

Running the Excel Table Transformation script

This script converts the P2P SCC descriptions in the provided Excel table to RDF data according to the D2S ontology's structure.

  • From within eclipse the script can be run by executing the de.wwu.d2s.transformation.Start.java file in the discover2share-scripts project.
  • Alternatively, the script can be run using the bin/ExcelTransformation.jar using the command java -jar ExcelTransformation.jar. It then prompts for the full paths and filenames of the Excel table and the desired output file. Optionally, the path to countries.json on the D2S server, which is required, can be provided as a command line variable. E.g. java -jar ExcelTransformation.jar http://www.example.org/countries.json. By default http://localhost:8080/discover2share-Web/resources/js/countries.json is assumed.