public class Sensor extends Object implements IDomainModel
Constructor and Description |
---|
Sensor()
Default constructor.
|
Sensor(String name,
String uri,
String modelId,
String ownerId) |
Sensor(String id,
String name,
String uri,
String modelId,
Set<Property> properties,
String ownerId) |
Modifier and Type | Method and Description |
---|---|
boolean |
addProperty(Property e) |
boolean |
equals(Object obj) |
String |
getId()
The slug is the name of the instance lower-cased, spaces replaced with '-',
and special characters removed.
|
String |
getModelId() |
String |
getName() |
String |
getOrganizationId() |
Set<Property> |
getProperties() |
Property |
getProperty(String key) |
String |
getUri() |
int |
hashCode() |
boolean |
removeProperty(Object o) |
void |
setId(String id)
Sets the instance's slug.
|
void |
setModelId(String model) |
void |
setName(String name)
Sets the name of the instance.
|
void |
setOrganizationId(String ownerId)
Sets the id of the owner of this instance.
|
void |
setProperties(Set<Property> properties) |
void |
setUri(String uri) |
String |
toString() |
public Sensor()
public Sensor(String name, String uri, String modelId, String ownerId)
name
- The name.uri
- The URI to the meter.modelId
- The id of the meter's model.ownerId
- the id of the owner of the sensor.public Sensor(String id, String name, String uri, String modelId, Set<Property> properties, String ownerId)
id
- The unique id.name
- The name.uri
- The URI to the meter.modelId
- The id of the meter's model.properties
- The properties associated with this Sensor.ownerId
- the id of the owner of the sensor.public boolean addProperty(Property e)
e
- The Property to add.List.add(java.lang.Object)
public String getId()
IDomainModel
getId
in interface IDomainModel
public String getModelId()
public String getName()
getName
in interface IDomainModel
public String getOrganizationId()
getOrganizationId
in interface IDomainModel
public Property getProperty(String key)
key
- The key.public String getUri()
public boolean removeProperty(Object o)
o
- The Property to remove.List.remove(java.lang.Object)
public void setId(String id)
IDomainModel
setId
in interface IDomainModel
id
- the id to setpublic void setModelId(String model)
model
- the id of the model to setpublic void setName(String name)
IDomainModel
setName
in interface IDomainModel
name
- the name to setpublic void setOrganizationId(String ownerId)
IDomainModel
setOrganizationId
in interface IDomainModel
ownerId
- the id of the owner to setpublic void setProperties(Set<Property> properties)
properties
- the properties to setpublic void setUri(String uri)
uri
- the uri to setCopyright © 2015 Collaborative Software Development Laboratory. All rights reserved.