OW2 Consortium mobiot

Rev

Rev 2 | Blame | Compare with Previous | Last modification | View Log | RSS feed

RegistryManager
===============

The RegistryManager web project provides the RESTful API for managing the sensor device base. 


#Use
Deploy on a tomcat server.

#API calls
Available methods:
1. Get all devices around a point offering the specified service(s):                                    
        [GET]   http://{registryURL}/rest/devices-around-point
                                ?center_X={lat}
                                &center_Y={lon}
                                &range={range_in_meters}
                                &concept={concept}
        -> Responds with a JSON array

2. Register a service for a specific device:    
        [POST]: http://{registryURL}/rest/register_service
                        ?address={serviceAddress}
                        &device_id={deviceID}
                        &name={serviceName}
                        &type={serviceType}
                        &accuracy={serviceAccuracy}
                        &sensor{sensorType}
                        &range={sensorRange}
                        &unit={sensorReturningValueUnit}
                        &global_region={globalRegionName}
                        &concept={conceptName}
                        &coordinateX={lat}
                        &coordinateY={lon}
                        &dataType={returningDataType}
                        &expiry_date={expiryDate}
                        &estimated_path={estimatedCoveragePathArray}

3. Register a service for a specific device after deviding if it should be registered according to the result probabilistic mechanism:  
        [POST]: http://{registryURL}/rest/decide_and_register_service
                        ?address={serviceAddress}
                        &device_id={deviceID}
                        &name={serviceName}
                        &type={serviceType}
                        &accuracy={serviceAccuracy}
                        &sensor{sensorType}
                        &range={sensorRange}
                        &unit={sensorReturningValueUnit}
                        &global_region={globalRegionName}
                        &concept={conceptName}
                        &coordinateX={lat}
                        &coordinateY={lon}
                        &dataType={returningDataType}
                        &expiry_date={expiryDate}
                        &estimated_path={estimatedCoveragePathArray}
                        &time_of_request={time}
                        &threshold={probabilityThreshold}

4. Remove a registered service for a specific device:   
        [POST]: http://{registryURL}/rest/remove_service
                                ?address={serviceAddress}

5. Get number of services per concept on a specified device:                                    
        [GET]   http://{registryURL}/rest/find_number_of_services
                                ?device_id={deviceID}
                                &global_region={globalRegionName}
                                &concept={concept}
                                &bottom_left_point_of_interest_x={lat}
                        &bottom_left_point_of_interest_y={lon}
                        &upper_right_point_of_interest_x={lat}
                        &upper_right_point_of_interest_y={lon}
        -> Responds with a JSON object containing an array of concepts and the respective number of services 

6. Get number of services per concept on a specified device at a specified area:                                        
        [GET]   http://{registryURL}/rest/find_number_of_services_in_area
                                ?device_id={deviceID}
                                &global_region={globalRegionName}
                                &concept={concept}
        -> Responds with a JSON object containing an array of concepts and the respective number of services 

7. Execute a lookup query:                                      
        [GET]   http://{registryURL}/rest/execute_lookup_query
                                ?global_region={globalRegionName}
                                &concept={concept}
        -> Responds with an array of the services found

8. Execute a lookup query around a point:                                       
        [GET]   http://{registryURL}/rest/execute_lookup_query_around_point
                                ?global_region={globalRegionName}
                        &point_of_interest_x={lat}
                        &point_of_interest_y={lon}
                        &distribution={distributionType}
                        &distance={distanceInMeters}
                        &size={subsetSize}
                        &time={time}
                        &concept={concept}
        -> Responds with an array of the services found

9. Execute a lookup query in sub-region:                                        
        [GET]   http://{registryURL}/rest/execute_lookup_query_in_subregion
                                ?global_region={globalRegionName}
                                &bottom_left_point_of_interest_x={lat}
                        &bottom_left_point_of_interest_y={lon}
                        &upper_right_point_of_interest_x={lat}
                        &upper_right_point_of_interest_y={lon}
                        &concept={concept}
        -> Responds with an array of the services found

10. Execute a lookup query in area:                                     
        [GET]   http://{registryURL}/rest/execute_lookup_query_in_area
                                ?global_region={globalRegionName}
                        &bottom_left_point_of_interest_x={lat}
                        &bottom_left_point_of_interest_y={lon}
                        &bottom_right_point_of_interest_x={lat}
                        &bottom_right_point_of_interest_y={lon}
                        &upper_left_point_of_interest_x={lat}
                        &upper_left_point_of_interest_y={lon}
                        &upper_right_point_of_interest_x={lat}
                        &upper_right_point_of_interest_y={lon}
                        &distribution={distributionType}
                        &subset_size={subsetSize}
                        &concept={concept}
        -> Responds with an array of the services found

11. Updates the expiry date of a service:       
        [POST]: http://{registryURL}/rest/keep_service
                                ?address={serviceAddress}
                                &expiry_date={expiryDate}

12. Remove all registered services:     
        [POST]: http://{registryURL}/rest/remove_all_services

13. Update the status of a specified device
        [POST]: http://{registryURL}/rest/updatedevice
                                ?device_id={deviceID}
                                &location_x={lat}
                                &location_y={lon}

#Dependencies
1. IotsCommonObjects <org.ow2.choreos.iots.IotsCommonObjects>
2. Sweep <org.ow2.choreos.iots.Sweep>
3. Jena <com.hp.hpl.jena>
4. JSONsimple <com.googlecode.json-simple>
5. Apache commons Mathematics (math3) <org.apache.commons>

Generated by GNU Enscript 1.6.5.90.