|  |  |  | 
|---|
|  |  |  | @AllArgsConstructor | 
|---|
|  |  |  | public class MqttTopic { | 
|---|
|  |  |  | public String orgTag ;//组织标识 | 
|---|
|  |  |  | public String protocol ;//协议名称 | 
|---|
|  |  |  | public String devId ;//设备(FBox)ID | 
|---|
|  |  |  | public String topic ;//消息主题 | 
|---|
|  |  |  | public String protocol ;//协议名称(名称+版本) | 
|---|
|  |  |  | public String devId ;//设备ID(FBox序列号) | 
|---|
|  |  |  | public String type;//数据(命令)类型 | 
|---|
|  |  |  | public Integer no;//测站编号 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public boolean isEmpty(){ | 
|---|
|  |  |  | return orgTag == null || protocol == null || devId == null || topic == null | 
|---|
|  |  |  | || orgTag.trim().length() == 0 || protocol.trim().length() == 0 || devId.trim().length() == 0 || topic.trim().length() == 0 ; | 
|---|
|  |  |  | return orgTag == null || protocol == null || devId == null || type == null || no == null | 
|---|
|  |  |  | || orgTag.trim().length() == 0 || protocol.trim().length() == 0 || devId.trim().length() == 0 || type.trim().length() == 0 || no <= 0 ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String shortName(){ | 
|---|
|  |  |  | return topic ; | 
|---|
|  |  |  | return type + "/" + no; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String longName(){ | 
|---|
|  |  |  | return orgTag + "/" + protocol + "/" + devId + "/" + topic ; | 
|---|
|  |  |  | return orgTag + "/" + protocol + "/" + devId + "/" + type + "/" + no; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|