DefaultDevice device = null;
// First check in the hierarchy to see if the device exists.
Hierarchy hierarchy = loadHierarchy();
final HierarchyEntry entry = hierarchy.find(deviceName);
if (entry != null) {
// The device name exists in the hierarchy.
// Create the device by reading in it's standard and custom
// polices, and also any device patterns and device TACs.