View Javadoc

1   /*
2   	Copyright 2008-2014 Fraunhofer IGD, http://www.igd.fraunhofer.de
3   	Fraunhofer-Gesellschaft - Institute for Computer Graphics Research
4   	
5   	See the NOTICE file distributed with this work for additional 
6   	information regarding copyright ownership
7   	
8   	Licensed under the Apache License, Version 2.0 (the "License");
9   	you may not use this file except in compliance with the License.
10  	You may obtain a copy of the License at
11  	
12  	  http://www.apache.org/licenses/LICENSE-2.0
13  	
14  	Unless required by applicable law or agreed to in writing, software
15  	distributed under the License is distributed on an "AS IS" BASIS,
16  	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  	See the License for the specific language governing permissions and
18  	limitations under the License.
19   */
20  
21  package org.universAAL.ontology.phThing;
22  
23  import org.universAAL.middleware.owl.supply.LevelRating;
24  
25  /**
26   * Represents the class of physical manufactured things that have some
27   * capability. It adds no new property to physical things but just provides
28   * means for explicit distinction of certain physical things as devices.
29   * 
30   * @author mtazari
31   * 
32   */
33  public class Device extends PhysicalThing {
34  
35      public static final String MY_URI = PhThingOntology.NAMESPACE + "Device";
36  
37      public static final String PROP_BATTERY_LEVEL = PhThingOntology.NAMESPACE
38  	    + "batteryLevel";
39  
40      public Device() {
41  	super();
42      }
43  
44      public Device(String uri) {
45  	super(uri);
46      }
47  
48      public Device(String uriPrefix, int numProps) {
49  	super(uriPrefix, numProps);
50      }
51  
52      public String getClassURI() {
53  	return MY_URI;
54      }
55  
56      public int getPropSerializationType(String propURI) {
57  	return PROP_SERIALIZATION_FULL;
58      }
59  
60      public LevelRating getBatteryLevel() {
61  	return (LevelRating) props.get(PROP_BATTERY_LEVEL);
62      }
63  
64      public void setBatteryLevel(LevelRating value) {
65  	props.put(PROP_BATTERY_LEVEL, value);
66      }
67  }