The Fully Qualified ID contains a complete set of fields to contact a server and get further details. The purpose is to identify an Item to the level where it contains enough information for contacting the correct server, on a relevant protocol, and obtain further information for the item from that server. The key identification are build up of:
1) ServerId.Id Guid - identify a specific server or set of configuration.
2) ParentId Guid - the parent FQID will contain this in the ObjectId field
3) ObjectId Guid - a unique id for this object (Item)
If an FQID does not have a parent, the parentId is Guid.Empty
To make lookup easier and to assist in displaying relevant selection choices for users, the following type fields are present:
1) FolderType - identify if this is some kind of grouping or collection
2) Kind Guid - identifies what type of object this FQID identifies.
The Kind class contains a set of predefined values for all Milestone known Kinds, e.g. Kind.Camera is assigned to FQIDs for cameras and groups of cameras.
Note: When some object cannot be identified by a Guid, but rather a string, the ObjectIdString can be used as an alternative to the ObjectId. It is though highly recommended to fill the ObjectId if possible.
The FQID is primarily created by plug-in developed ItemManagers and during deserialization of configurations.
This method is NOT intended for overrides, as MIP Environment need to be able to deserialize a XML string to a correct FQID object.
A camera sample for XProtect Corporate:
More...
|
FQID | Clone () |
| Make a new FQID with same value in all fields. Note: ServerId is also cloned in itself.
|
|
bool | Contains (String match) |
| Search through Kind, Object and ServerId to contain the match value.
|
|
bool | EqualGuids (object fqid) |
| Compares all the Guids from the this and the given FQID.
ServerId can be null in either parts, and will be ignored in that case. If not null, then ServerId.Id, ParentId, ObjectId and Kind are compared.
|
|
override bool | Equals (object fqid) |
| Compares all fields in the FQID with the given parameter.
|
|
bool | EqualsIgnoreFolderType (object fqid) |
| Compares all fields in the FQID with the given parameter. This version of the Euqals will ignore the FolderType field.
|
|
| FQID () |
| Empty constructor.
|
|
| FQID (ServerId serverId) |
| Builds the FQID from a ServerId. This can be used when instantiating the FQID for a Server.
|
|
| FQID (ServerId serverId, FolderType folderType, Guid kind) |
| Builds the FQID from a ServerId. This can be used when instantiating a new FQID from a parent. The ObjectId and ParentId should then be filled afterwards.
|
|
| FQID (ServerId serverId, Guid parentId, Guid objectId, FolderType folderType, Guid kind) |
| Create a FQID with a ServerId of the server that holds and object with id=ObjectId. If the ObjectId is a Camera, the parentId is a Recorder. If the ObjectId is a PTZ, the parentId is a Camera.
|
|
| FQID (ServerId serverId, Guid parentId, String objectIdString, FolderType folderType, Guid kind) |
| Create a FQID with a ServerId of the server that holds and object with id=ObjectIdString. If the ObjectId is a PTZ, the parentId is the Id of a Camera.
|
|
| FQID (String xmlString) |
| Builds the FQID from a XmlNode in String format representing the InnerXml. The will normally be created by this class itself during a Serialization call, either "Serialize" or "ToXmlNode".
|
|
| FQID (String xmlString, UserContext context) |
| Builds the FQID from a XmlNode in String format representing the InnerXml. The will normally be created by this class itself during a Serialization call, either "Serialize" or "ToXmlNode".
|
|
| FQID (XmlNode xmlNode) |
| Builds the FQID from a XmlNode. The will normally be created by this class itself during a Serialization call, either "Serialize" or "ToXmlNode".
|
|
override int | GetHashCode () |
| Creates a hash code based on internal Guids.
|
|
FQID | GetParent () |
| Get the parent FQID to this FQID. This implementation will build the FQID from the current ServerId and set objectId = ParentId, and assume other fields are the same (FolderType, Kind). Note: Please use the GetItem method on the EnvironmentManager if an Item is to be used. Note 2: As it is assumed that the parent have same Kind as this FQID, this call will not always work.
|
|
void | Serialize (XmlWriter xmlWriter) |
| Format the FQID into a XmlNode vi the provided XmlWriter. A sample format is: (Guids are incorrect)
|
|
new String | ToString () |
| Format the FQID into a displayable string.
|
|
XmlNode | ToXmlNode () |
| Format the FQID into a XmlNode.
|
|
|
FolderType | FolderType [get, set] |
| Identifies is this FQID identifies a folder or a specific item. A specific item would a e.g. a camera or a microphone or a plug-in defined item. A folder type can be FolderType.SystemDefined or FolderType.UserDefined - where the system defined is used when one of the built-in folders are used, e.g. "All Cameras" on one physical recorder. While the user defined are used when an administrator has created a group of items.
|
|
Guid | Kind [get, set] |
| The type of this item. Predefined Milestone Kinds are defined the class Kind.
|
|
Guid | ObjectId [get, set] |
| Id of the item itself (Except for Presets, see below)
|
|
String | ObjectIdString [get, set] |
| When the ID is not a Guid, e.g. a preset this ObjectIdString is filled with the name of the Preset.
|
|
Guid | ParentId [get, set] |
| The parent to this object, e.g. recorder ID for cameras, cameraId for PTZPresets.
|
|
ServerId | ServerId [get, set] |
| Id of the server that owns the item identified by the FQID. For cameras, microphones, outputs etc. the ServerId will identify the recording server that handles the device. In a XProtect Corporate system, the user-defined events and groups, the ServerId will point to the Management Server.
|
|
The Fully Qualified ID contains a complete set of fields to contact a server and get further details. The purpose is to identify an Item to the level where it contains enough information for contacting the correct server, on a relevant protocol, and obtain further information for the item from that server. The key identification are build up of:
1) ServerId.Id Guid - identify a specific server or set of configuration.
2) ParentId Guid - the parent FQID will contain this in the ObjectId field
3) ObjectId Guid - a unique id for this object (Item)
If an FQID does not have a parent, the parentId is Guid.Empty
To make lookup easier and to assist in displaying relevant selection choices for users, the following type fields are present:
1) FolderType - identify if this is some kind of grouping or collection
2) Kind Guid - identifies what type of object this FQID identifies.
The Kind class contains a set of predefined values for all Milestone known Kinds, e.g. Kind.Camera is assigned to FQIDs for cameras and groups of cameras.
Note: When some object cannot be identified by a Guid, but rather a string, the ObjectIdString can be used as an alternative to the ObjectId. It is though highly recommended to fill the ObjectId if possible.
The FQID is primarily created by plug-in developed ItemManagers and during deserialization of configurations.
This method is NOT intended for overrides, as MIP Environment need to be able to deserialize a XML string to a correct FQID object.
A camera sample for XProtect Corporate:
- ServerId will be pointing to the Recorder, e.g.:
-— Id = Id of the recorder that has the camera
-— Type = ServerId.CorporateRecordingServerType ("XPCORS")
-— Host = "myRecorder.domain.domainext"
-— Port = 7563 - when using default
- ParentId = Guid of the XProtect Corporate Recording Server
- ObjectId = Id of the camera
- ObjectIdString = null
- Kind = Kind.Camera
- FolderType = FolderType.No
◆ FQID() [1/8]
VideoOS.Platform.FQID.FQID |
( |
| ) |
|
|
inline |
◆ FQID() [2/8]
VideoOS.Platform.FQID.FQID |
( |
ServerId | serverId, |
|
|
Guid | parentId, |
|
|
Guid | objectId, |
|
|
FolderType | folderType, |
|
|
Guid | kind ) |
|
inline |
Create a FQID with a ServerId of the server that holds and object with id=ObjectId. If the ObjectId is a Camera, the parentId is a Recorder. If the ObjectId is a PTZ, the parentId is a Camera.
If the object being defined is the server itself, both ObjectId and ParentId will be Guid.Empty.
- Parameters
-
serverId | The id of the server the object is owned by |
parentId | Points to a parent, if relevant |
objectId | The specific id of the object on the server. Guid.Empty for the server object itself |
folderType | Defines if this object is a folder, e.g. contains children |
kind | Identifies the type of this object |
◆ FQID() [3/8]
VideoOS.Platform.FQID.FQID |
( |
ServerId | serverId, |
|
|
Guid | parentId, |
|
|
String | objectIdString, |
|
|
FolderType | folderType, |
|
|
Guid | kind ) |
|
inline |
Create a FQID with a ServerId of the server that holds and object with id=ObjectIdString. If the ObjectId is a PTZ, the parentId is the Id of a Camera.
- Parameters
-
serverId | The id of the server the object is owned by |
parentId | Points to a parent, if relevant |
objectIdString | The specific id of the object on the server |
folderType | Defines if this object is a folder, e.g. contains children |
kind | Identifies the type of this object |
◆ FQID() [4/8]
Builds the FQID from a ServerId. This can be used when instantiating a new FQID from a parent. The ObjectId and ParentId should then be filled afterwards.
- Parameters
-
serverId | Id of the server that holds the item |
folderType | Identify if this is a folder with children |
kind | Identifying the type of this item |
◆ FQID() [5/8]
VideoOS.Platform.FQID.FQID |
( |
ServerId | serverId | ) |
|
|
inline |
Builds the FQID from a ServerId. This can be used when instantiating the FQID for a Server.
- Parameters
-
serverId | The id of the Server |
◆ FQID() [6/8]
VideoOS.Platform.FQID.FQID |
( |
String | xmlString | ) |
|
|
inline |
Builds the FQID from a XmlNode in String format representing the InnerXml. The will normally be created by this class itself during a Serialization call, either "Serialize" or "ToXmlNode".
This method will try to set the Platform.ServerId.UserContext to the value from a single user environment. If you are using a multi-user environment, use the FQID(string, UserContext) constructor instead to set the user context to the correct instance.
- Parameters
-
xmlString | A string containing the XmlNode.InnerXml of a FQID |
◆ FQID() [7/8]
VideoOS.Platform.FQID.FQID |
( |
String | xmlString, |
|
|
UserContext | context ) |
|
inline |
Builds the FQID from a XmlNode in String format representing the InnerXml. The will normally be created by this class itself during a Serialization call, either "Serialize" or "ToXmlNode".
- Parameters
-
xmlString | A string containing the XmlNode.InnerXml of a FQID |
context | The UserContext the FQID belongs to. |
- Exceptions
-
ArgumentNullException | If xmlString is null. |
ArgumentNullException | If context is null. |
◆ FQID() [8/8]
VideoOS.Platform.FQID.FQID |
( |
XmlNode | xmlNode | ) |
|
|
inline |
Builds the FQID from a XmlNode. The will normally be created by this class itself during a Serialization call, either "Serialize" or "ToXmlNode".
- Parameters
-
◆ Clone()
FQID VideoOS.Platform.FQID.Clone |
( |
| ) |
|
|
inline |
Make a new FQID with same value in all fields. Note: ServerId is also cloned in itself.
- Returns
◆ Contains()
bool VideoOS.Platform.FQID.Contains |
( |
String | match | ) |
|
|
inline |
◆ EqualGuids()
bool VideoOS.Platform.FQID.EqualGuids |
( |
object | fqid | ) |
|
|
inline |
Compares all the Guids from the this and the given FQID.
ServerId can be null in either parts, and will be ignored in that case. If not null, then ServerId.Id, ParentId, ObjectId and Kind are compared.
- Parameters
-
- Returns
◆ Equals()
override bool VideoOS.Platform.FQID.Equals |
( |
object | fqid | ) |
|
|
inline |
Compares all fields in the FQID with the given parameter.
- Parameters
-
fqid | The FQID to compare this with |
- Returns
- true if they contain same values (They can be different instances)
◆ EqualsIgnoreFolderType()
bool VideoOS.Platform.FQID.EqualsIgnoreFolderType |
( |
object | fqid | ) |
|
|
inline |
Compares all fields in the FQID with the given parameter. This version of the Euqals will ignore the FolderType field.
- Parameters
-
fqid | The FQID to compare this with |
- Returns
- true if they contain same values (They can be different instances)
◆ GetHashCode()
override int VideoOS.Platform.FQID.GetHashCode |
( |
| ) |
|
|
inline |
Creates a hash code based on internal Guids.
- Returns
◆ GetParent()
FQID VideoOS.Platform.FQID.GetParent |
( |
| ) |
|
|
inline |
Get the parent FQID to this FQID. This implementation will build the FQID from the current ServerId and set objectId = ParentId, and assume other fields are the same (FolderType, Kind). Note: Please use the GetItem method on the EnvironmentManager if an Item is to be used. Note 2: As it is assumed that the parent have same Kind as this FQID, this call will not always work.
- Returns
- FQID of the parent, if it could be found
◆ operator!=()
static bool VideoOS.Platform.FQID.operator!= |
( |
FQID | obj1, |
|
|
FQID | obj2 ) |
|
inlinestatic |
Will return true if the two references point to different objects and Equals(object) returns false.
- Parameters
-
- Returns
◆ operator==()
static bool VideoOS.Platform.FQID.operator== |
( |
FQID | obj1, |
|
|
FQID | obj2 ) |
|
inlinestatic |
Will return true if the two references point to the same object or if Equals(object) returns true.
- Parameters
-
- Returns
◆ Serialize()
void VideoOS.Platform.FQID.Serialize |
( |
XmlWriter | xmlWriter | ) |
|
|
inline |
Format the FQID into a XmlNode vi the provided XmlWriter. A sample format is: (Guids are incorrect)
<Type>XPCO</Type>
<Scheme>http</Scheme>
<Hostname>dksr-mgt-03.company.com</Hostname>
<Port>80</Port>
<Id>FD2AB85B-B944-448f-BAA9-CC4DCE1172FA</Id>
<
Kind>FD2AB85B-B944-448f-BAA9-CC4DCE1172FA</
Kind>
- Parameters
-
◆ ToString()
new String VideoOS.Platform.FQID.ToString |
( |
| ) |
|
|
inline |
Format the FQID into a displayable string.
- Returns
◆ ToXmlNode()
XmlNode VideoOS.Platform.FQID.ToXmlNode |
( |
| ) |
|
|
inline |
Format the FQID into a XmlNode.
- Returns
◆ FolderType
Identifies is this FQID identifies a folder or a specific item. A specific item would a e.g. a camera or a microphone or a plug-in defined item. A folder type can be FolderType.SystemDefined or FolderType.UserDefined - where the system defined is used when one of the built-in folders are used, e.g. "All Cameras" on one physical recorder. While the user defined are used when an administrator has created a group of items.
◆ Kind
Guid VideoOS.Platform.FQID.Kind |
|
getset |
The type of this item. Predefined Milestone Kinds are defined the class Kind.
◆ ObjectId
Guid VideoOS.Platform.FQID.ObjectId |
|
getset |
Id of the item itself (Except for Presets, see below)
◆ ObjectIdString
String VideoOS.Platform.FQID.ObjectIdString |
|
getset |
When the ID is not a Guid, e.g. a preset this ObjectIdString is filled with the name of the Preset.
◆ ParentId
Guid VideoOS.Platform.FQID.ParentId |
|
getset |
The parent to this object, e.g. recorder ID for cameras, cameraId for PTZPresets.
◆ ServerId
Id of the server that owns the item identified by the FQID. For cameras, microphones, outputs etc. the ServerId will identify the recording server that handles the device. In a XProtect Corporate system, the user-defined events and groups, the ServerId will point to the Management Server.