eec13dc764470fa9973b4666ba7f3f0947177bcc
[smartapi.git] / Common / Java / SmartAPI / README
1 Smart API Library
2 -------------------
3
4 A software library for making your applications Smart API compatible.
5
6 This library provides functionality for:
7     ** Creating and manipulating objects based on the semantic Smart API model
8     ** Serializing objects into RDF (turtle/json-ld/xml)
9     ** Parsing objects from RDF (turtle/json-ld/xml)
10     ** Sending  Smart API messages over the network with HTTP and MQTT
11     ** Receiving notifications based on subscriptions over MQTT
12     ** Registering entities on the  Smart API Registration Service
13     ** Searching for entities on the  Smart API Registration Service
14        (spatial, polygon, service type etc.)
15
16 For implementation details, see the ./docs folder.
17
18
19 Dependencies
20 ------------
21
22 Software requires some JENA, Apache Paho, Tomcat, and Gson libraries. Please download 
23 the libraries and copy all .jar files to ./lib folder, or use Maven (next section ), 
24 which will automatically handle dependencies.
25
26 Complete list of file versions used in development:
27
28 catalina.jar
29 commons-cli-1.3.jar
30 commons-codec-1.9.jar
31 commons-csv-1.0.jar
32 commons-lang3-3.3.2.jar
33 gson-2.4.jar
34 httpclient-4.2.6.jar
35 httpclient-cache-4.2.6.jar
36 httpcore-4.2.5.jar
37 jackson-annotations-2.3.0.jar
38 jackson-core-2.3.3.jar
39 jackson-databind-2.3.3.jar
40 javalib
41 jcl-over-slf4j-1.7.12.jar
42 jena-arq-3.0.0.jar
43 jena-base-3.0.0.jar
44 jena-core-3.0.0.jar
45 jena-iri-3.0.0.jar
46 jena-shaded-guava-3.0.0.jar
47 jena-tdb-3.0.0.jar
48 jsonld-java-0.5.1.jar
49 jsonorg.jar
50 libthrift-0.9.2.jar
51 log4j-1.2.17.jar
52 org.eclipse.paho.client.mqttv3-1.0.2.jar
53 org.eclipse.paho.mqtt.utility-1.0.2.jar
54 slf4j-api-1.7.12.jar
55 slf4j-log4j12-1.7.12.jar
56 tomcat-servlet-3.0-api.jar
57 xercesImpl-2.11.0.jar
58 xml-apis-1.4.01.jar
59
60
61 Maven
62 -----
63
64 If your project is a Maven project, you can let Maven automatically download and link 
65 the dependencies. To do this, please add the following XML snippets into your pom.xml 
66 file.
67
68 <repositories>
69         <repository>
70                         <releases>
71                                 <enabled>true</enabled>
72                                 <updatePolicy>always</updatePolicy>
73                                 <checksumPolicy>fail</checksumPolicy>
74                         </releases>
75 <<<<<<< HEAD
76                         <id>SmartAPI</id>
77 =======
78                         <id>SmartAPI</id>                       
79 >>>>>>> refs/remotes/origin/master
80                         <url>http://maven.smart-api.io</url>
81                         <layout>default</layout>
82                 </repository> 
83 </repositories>
84
85 <dependencies>
86         <dependency>
87                 <groupId>io.smart-api.smartapi</groupId>
88                 <artifactId>SmartAPI</artifactId>
89                 <version>1.0.0</version>
90         </dependency>
91 </dependencies>
92
93   
94 Creating Maven repository contents
95 ------------------------------------
96 First, build smartapi.jar with ./build.sh or by invoking ant manually
97
98 Then issue:
99 mvn deploy:deploy-file -Durl=file://maven.smart-api.io -DrepositoryId=local -Dfile=./dist/smartapi.jar -DpomFile=pom.xml