Package com.volantis.devrep.device.api.xml.hierarchy

Examples of com.volantis.devrep.device.api.xml.hierarchy.HierarchyEntry


        indent(indent, buffer);
        buffer.append("Entry:" + entry.getDeviceName() + "\n");
        int childIndent = indent+1;
        Iterator children = entry.children();
        while (children.hasNext()) {
            HierarchyEntry child = (HierarchyEntry) children.next();
            dumpEntry(child, buffer, childIndent);
        }
    }
View Full Code Here


        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.
            device = createDevice(deviceName);

            // We must explicitly add the fallback policy for backward
            // compatibility.
            final HierarchyEntry parent = entry.getParent();
            String fallbackDeviceName;
            if (parent != null) {
                fallbackDeviceName = parent.getDeviceName();
            } else {
                // for backwards compatibility with the old JDOM accessor,
                // we add a fallback of null for Master. Not sure if we
                // really should?
                fallbackDeviceName = null;
View Full Code Here

            String deviceName)
            throws RepositoryException {

        Iterator children = null;
        Hierarchy hierarchy = loadHierarchy();
        HierarchyEntry entry = hierarchy.find(deviceName);
        if (entry != null) {
            children = entry.children();
        }
        return new IteratorRepositoryEnumeration(children) {

            public Object next() throws RepositoryException {
                HierarchyEntry child = (HierarchyEntry) super.next();
                return child.getDeviceName();
            }
        };
    }
View Full Code Here

        Hierarchy hierarchy = loadHierarchy();
        Iterator entries = hierarchy.entries();
        return new IteratorRepositoryEnumeration(entries) {
            public Object next() throws RepositoryException {
                HierarchyEntry entry = (HierarchyEntry) super.next();
                return entry.getDeviceName();
            }
        };
    }
View Full Code Here

        Collection deviceFallbacks = new ArrayList();
        Hierarchy hierarchy = loadHierarchy();
        Iterator entries = hierarchy.entries();
        while (entries.hasNext()) {
            HierarchyEntry entry = (HierarchyEntry) entries.next();
            HierarchyEntry parent = entry.getParent();
            if (parent != null) {
                deviceFallbacks.add(new String[] {
                    entry.getDeviceName(), parent.getDeviceName()});
            } else {
                // Add a special Master=null entry.
                // This is how the old JDOM accessor worked.
                deviceFallbacks.add(new String[] {
                    entry.getDeviceName(), null});
View Full Code Here

TOP

Related Classes of com.volantis.devrep.device.api.xml.hierarchy.HierarchyEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.