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

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


    private ResourceJiBXTester tester = new ResourceJiBXTester(
            HierarchyTestCase.class);

    public void testUnmarshall() throws JiBXException, IOException {

        Hierarchy hierarchy = (Hierarchy) tester.unmarshall(Hierarchy.class,
                "HierarchyTest.xml");

        StringBuffer output = new StringBuffer();
        dumpHierarchy(hierarchy, output);
        String actual = output.toString();
View Full Code Here


                                                String deviceName) throws RepositoryException {

        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.
View Full Code Here

            RepositoryConnection connection,
            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) {
View Full Code Here

    }

    public RepositoryEnumeration enumerateDeviceNames(
            RepositoryConnection connection) throws RepositoryException {

        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

    public RepositoryEnumeration enumerateDeviceFallbacks(
            RepositoryConnection connection) throws RepositoryException {

        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[] {
View Full Code Here

TOP

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

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.