public class Identifier
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Identifier.SerializedId
A helper class for generating Identifier object using
fromSerializable(java.io.Serializable). |
static class |
Identifier.SourceIdentifier
This class serves as blueprint for a source URI in
StorageContentMetadata. |
static class |
Identifier.TriggerIdentifier
This class serves as a trigger attribute in making content search
InfoRequest
and as upload triggered identifier StorageContentMetadata. |
| Modifier and Type | Field and Description |
|---|---|
int |
attributeId
Attribute ID of parent capability.
|
int |
capabilityId
Capability ID of the parent resource.
|
long |
deviceNodeId
Node ID of the device in the network.
|
java.lang.String |
networkId
ID of the network generated after successful creation of the network.
|
java.lang.String |
resourceEui
Unique identifier of the resource in the parent device.
|
int |
ruleId
ID of the Rule under consideration.
|
int |
sceneId
ID of the Scene under consideration.
|
int |
zoneId
ID of the zone in the network.
|
| Constructor and Description |
|---|
Identifier(Identifier id)
Constructor for current class using
Identifier param. |
Identifier(java.lang.String networkId,
long deviceNodeId,
java.lang.String resourceEui,
int capabilityId,
int attributeId,
int zoneId,
int sceneId,
int ruleId)
An overloaded constructor for current class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static Identifier |
fromJson(com.google.gson.Gson gson,
java.lang.String jsonIdentifier)
An overloaded function to deserialize the
String param to the
Identifier object using custom Gson instance. |
static Identifier |
fromJson(java.lang.String jsonIdentifier)
A function to deserialize the
String param to the Identifier object. |
static Identifier |
fromJsonTree(com.google.gson.Gson gson,
com.google.gson.JsonElement jsonElement)
An overloaded function to deserialize the
JsonElement param to the
Identifier object using custom Gson instance. |
static Identifier |
fromJsonTree(com.google.gson.JsonElement jsonElement)
A function to deserialize the
JsonElement param to the Identifier object. |
static Identifier |
fromSerializable(java.io.Serializable serializable)
A function to make an
Identifier object out of serializable param. |
<T extends Attribute> |
getAttribute()
A generic method to fetch attribute for the identifier instance.
|
<T extends Capability> |
getCapability()
A generic method to fetch capability for the identifier instance.
|
<T extends Device> |
getDevice()
A generic method to fetch device for the identifier instance.
|
static Identifier |
getIdentifier(Attribute attribute)
A function to get all identification information for attribute param.
|
static Identifier |
getIdentifier(Capability capability)
A function to get all identification information for capability param.
|
static Identifier |
getIdentifier(Device device)
A function to get all identification information for device param.
|
static Identifier |
getIdentifier(Network network)
A function to get all identification information for device param.
|
static Identifier |
getIdentifier(Resource resource)
A function to get all identification information for resource param.
|
static Identifier |
getIdentifier(Rule rule)
A function to get all identification information for rule param.
|
static Identifier |
getIdentifier(Scene scene)
A function to get all identification information for scene param.
|
static Identifier |
getIdentifier(Zone zone)
A function to get all identification information for zone param.
|
<T extends Network> |
getNetwork()
A generic method to fetch network for the identifier instance.
|
<T extends Resource> |
getResource()
A generic method to fetch Resource for the identifier instance.
|
<T extends Rule> |
getRule()
A generic method to fetch rule for the identifier instance.
|
<T extends Scene> |
getScene()
A generic method to fetch scene for the identifier instance.
|
<T extends Zone> |
getZone()
A generic method to fetch zone for the identifier instance.
|
int |
hashCode() |
java.lang.String |
toJson()
A function to convert the current instance of
Identifier to Json String. |
java.lang.String |
toJson(com.google.gson.Gson gson)
A function to convert the current instance of
Identifier to Json String. |
com.google.gson.JsonElement |
toJsonTree()
A function to facilitate serialization of
Identifier object
to an equivalent representation of tree of JsonElements. |
com.google.gson.JsonElement |
toJsonTree(com.google.gson.Gson gson)
An overloaded function to facilitate serialization of
Identifier object
to an equivalent representation of tree of JsonElements. |
java.io.Serializable |
toSerializable()
A function to create
Serializable version of Identifier instance
under interest. |
java.lang.String |
toString() |
@SerializedName(value="networkId") public final java.lang.String networkId
Network.getId()@SerializedName(value="nodeId",
alternate="gatewayNodeId")
public final long deviceNodeId
Device.getId()@SerializedName(value="resourceEui") public final java.lang.String resourceEui
Resource.getId()@SerializedName(value="capabilityId") public final int capabilityId
Capability.getId()@SerializedName(value="attributeId") public final int attributeId
Attribute.getId()@SerializedName(value="zoneId") public final int zoneId
Zone.getId()@SerializedName(value="sceneId") public final int sceneId
Scene.getId()@SerializedName(value="ruleId") public final int ruleId
Rule.getId()public Identifier(Identifier id)
Identifier param.id - identifier with information of all ids.public Identifier(java.lang.String networkId,
long deviceNodeId,
java.lang.String resourceEui,
int capabilityId,
int attributeId,
int zoneId,
int sceneId,
int ruleId)
networkId - The network to which the device belongs will responddeviceNodeId - The device which has to respond to this requestresourceEui - The ID corresponding to the resourcecapabilityId - CapabilityID of the recipient resourceattributeId - ID of the attribute value as in Capability.AttributeIdzoneId - ID of the zone in the networksceneId - ID of the scene created by user in networkruleId - ID of the rule created by user in networkpublic static Identifier getIdentifier(Network network)
network - Network object in interest, for an Identifierpublic static Identifier getIdentifier(Device device)
device - Device object in interest, for an Identifierpublic static Identifier getIdentifier(Resource resource)
resource - Resource object in interest, for an Identifierpublic static Identifier getIdentifier(Capability capability)
capability - Capability object in interest, for an Identifierpublic static Identifier getIdentifier(Attribute attribute)
attribute - Attribute object in interest, for an Identifierpublic static Identifier getIdentifier(Zone zone)
zone - Zone object in interest, for an Identifierpublic static Identifier getIdentifier(Scene scene)
scene - Scene object in interest, for an Identifierpublic static Identifier getIdentifier(Rule rule)
rule - Rule object in interest, for an Identifierpublic <T extends Network> T getNetwork()
T - any immediate subclass of Network classpublic <T extends Device> T getDevice()
T - any immediate subclass of Device classpublic <T extends Resource> T getResource()
T - any immediate subclass of Resource classpublic <T extends Capability> T getCapability()
T - any immediate subclass of Capability classpublic <T extends Attribute> T getAttribute()
T - any immediate subclass of Attribute classpublic <T extends Zone> T getZone()
T - any immediate subclass of Zone classpublic <T extends Scene> T getScene()
T - any immediate subclass of Scene classpublic <T extends Rule> T getRule()
T - any immediate subclass of Rule classpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic com.google.gson.JsonElement toJsonTree()
Identifier object
to an equivalent representation of tree of JsonElements.JsonElements for Identifier instance.public com.google.gson.JsonElement toJsonTree(com.google.gson.Gson gson)
Identifier object
to an equivalent representation of tree of JsonElements.gson - To serialize using Google's Gson class.JsonElements for Identifier instance.public java.lang.String toJson()
Identifier to Json String.Identifier.public java.lang.String toJson(com.google.gson.Gson gson)
Identifier to Json String.gson - To serialize using Google's Gson class.Identifier.public java.io.Serializable toSerializable()
Serializable version of Identifier instance
under interest.Identifier.SerializedIdpublic static Identifier fromSerializable(java.io.Serializable serializable)
Identifier object out of serializable param.serializable - Serializable instance in interest, for an Identifier instance.Identifier from provided Json.public static Identifier fromJson(java.lang.String jsonIdentifier)
String param to the Identifier object.jsonIdentifier - A String representation of Identifier data class.Identifier from provided Json.public static Identifier fromJson(com.google.gson.Gson gson, java.lang.String jsonIdentifier)
String param to the
Identifier object using custom Gson instance.gson - To deserialize using Google's Gson class.jsonIdentifier - A String representation of Identifier data class.Identifier from provided Json.public static Identifier fromJsonTree(com.google.gson.JsonElement jsonElement)
JsonElement param to the Identifier object.jsonElement - An element of Json that holds data for Identifier.Identifier from provided Json.public static Identifier fromJsonTree(com.google.gson.Gson gson, com.google.gson.JsonElement jsonElement)
JsonElement param to the
Identifier object using custom Gson instance.gson - To deserialize using Google's Gson class.jsonElement - An element of Json that holds data for Identifier.Identifier from provided Json.public java.lang.String toString()
toString in class java.lang.Object