| 1 | = REP deployment Quick Start = |
| 2 | |
| 3 | == Software requirements == |
| 4 | |
| 5 | To build and run the REP example code you need to meet following requirements: |
| 6 | |
| 7 | * Java 6.0 SDK http://java.sun.com/javase/downloads/index.jsp |
| 8 | * eclipse http://eclipse.org/downloads/ |
| 9 | * REP example code: eclipse project 'REP' |
| 10 | |
| 11 | The project makes use of the Java REST framework 'restlet' by http://www.restlet.org/. The required libraries are part of the eclipse project. |
| 12 | |
| 13 | == run the Example REP Project == |
| 14 | In order to run the code samples please follow the steps below: |
| 15 | 1. Import the eclipse project into your eclipse workspace |
| 16 | 2. fix missing class path errors if required (e.g. if eclipse could not find a Java Sdk) |
| 17 | 3. the project structure should look like this: |
| 18 | |
| 19 | |
| 20 | 4. run uk.ac.surrey.sensei.rep.test.REPTest.java |
| 21 | |
| 22 | The REPTest class provides a couple of test cases. Please uncomment the sections you want to have tested. |
| 23 | |
| 24 | By default REPTest.java creates a REP listening on HTTP port 8185. It attaches a RAIHandler of type SensorType for a dummy light sensor. |
| 25 | The hard coded light value is read from the file xml/sensors/light.rdf. It can be requested by a REST GET method call on http://localhost:8185/rep/s/light. |
| 26 | |
| 27 | The response is the Observation and Measurement value in XML-RDF syntax. |