B.3.10 Example 7
The seventh example provides an illustration a request in which a Client wants to display part of the AddressSpace based on a starting point that was obtained via browsing. This request includes listing References as something that is to be returned. In this case the Person Browsed to Area2 and wanted to Query for information below this starting point.
Example 7: Get PersonType.NodeId, AnimalType.NodeId, PersonType.HasChild Reference, PersonType.HasAnimal Reference where the person is in Area2 (Cleveland nodes) and the person has a child.
Table B.29 describes the NodeTypeDescription parameters used in the example.
| Type Definition Node | Include Subtypes | QueryDataDescription | ||
|---|---|---|---|---|
| Relative Path | Attribute | Index Range | ||
| PersonType | FALSE | “.NodeId” | Value | N/A |
| <12:HasChild> | Value | N/A | ||
| <12:HasAnimal>NodeId | Value | N/A | ||
| <12:HasAnimal> | Value | N/A | ||
The corresponding ContentFilter is illustrated in Figure B.11. Note that the Browse call would typically return a NodeId, thus the first filter is for the BaseObjectType with a NodeId of 95 where 95 is the NodeId associated with the Area2 node, all Nodes descend from BaseObjectType, and NodeId is a base Property so this filter will work for all Queries of this nature.

Table B.30 describes the elements, operators and operands used in the example.
| Element[] | Operator | Operand[0] | Operand[1] | Operand[2] | Operand[3] |
|---|---|---|---|---|---|
| 0 | RelatedTo | ElementOperand = 2 | ElementOperand = 1 | AttributeOperand = Node:HierachicalReference, BrowsePath “.”, Attribute:NodeId | LiteralOperand = ‘1’ |
| 1 | RelatedTo | AttributeOperand = NodeId: 12:PersonType, BrowsePath “.”, Attribute: NodeId | AttributeOperand = NodeId: 12:PersonType, BrowsePath “.”, Attribute: NodeId | AttributeOperand = NodeId: 12:HasChild, BrowsePath “.”, Attribute: NodeId | LiteralOperand = ‘1’ |
| 2 | Equals | AttributeOperand = NodeId: BaseObjectType, BrowsePath “.”, Attribute: NodeId, | LiteralOperand = ‘95 |
The results from this Query would contain the QueryDataSets shown in Table B.31.
| NodeId | TypeDefinition NodeId | RelativePath | Value |
|---|---|---|---|
| 12:42 (HFamily1) | PersonType | “.NodeId” | 12:42 (HFamily1) |
| <12:HasChild> | HasChild ReferenceDescription | ||
| <12:HasAnimal>12:AnimalType.NodeId | NULL | ||
| <12:HasAnimal> | HasFarmAnimal ReferenceDescription | ||
| 12:48 (HFamily2) | PersonType | “.NodeId” | 12:48 (HFamily2) |
| <12:HasChild> | HasChild ReferenceDescription | ||
| <12:HasAnimal>12:AnimalType.NodeId | 12:91 (Pig1) | ||
| <12:HasAnimal> | HasFarmAnimal ReferenceDescription |