Package org.mantikhor.llapi

Examples of org.mantikhor.llapi.Path


        paths.toArray(arrayOfPaths);
        assertTrue(arrayOfPaths.length == this.numberOfTerminatingNodes);
       
        for (int ndx = 0; ndx < this.numberOfTerminatingNodes; ndx++)
        {
            Path path = arrayOfPaths[ndx];
            assertTrue(path.getProperties().size() == 2);
            ResourceNode resNode = path.getStartNode();
            ResourceNode nameNode = (ResourceNode)getNode(TreeImplTest.NODES.NAME_NODE_TREEI);
            assertTrue(resNode.getProperties().containsAll(nameNode.getProperties()));
            assertTrue(nameNode.getProperties().containsAll(resNode.getProperties()));
        }
    }
View Full Code Here


        Path[] arrayOfPaths = new Path[paths.size()];
        paths.toArray(arrayOfPaths);
        assertTrue(arrayOfPaths.length == 3);
        for (int ndx = 0; ndx < 3; ndx++)
        {
            Path path = arrayOfPaths[ndx];
            assertTrue(path.getProperties().size() == 1);
            ResourceNode resNode = path.getStartNode();
            ResourceNode nameNode = (ResourceNode)getNode(TreeImplTest.NODES.A);
            assertTrue(resNode.getProperties().containsAll(nameNode.getProperties()));
            assertTrue(nameNode.getProperties().containsAll(resNode.getProperties()));
        }
    }
View Full Code Here

        Path[] arrayOfPaths = new Path[paths.size()];
        paths.toArray(arrayOfPaths);
        assertTrue(arrayOfPaths.length == 3);
        for (int ndx = 0; ndx < 3; ndx++)
        {
            Path path = arrayOfPaths[ndx];
            assertTrue(path.getProperties().size() == 1);
            ResourceNode node = path.getStartNode();
            ResourceNode nameNode = (ResourceNode)getNode(TreeImplTest.NODES.C);
            assertTrue(node.getProperties().containsAll(nameNode.getProperties()));
            assertTrue(nameNode.getProperties().containsAll(node.getProperties()));
        }
    }
View Full Code Here

            for (int ndx2 = 0; ndx2 < 3; ndx2++)
            {
                List<BaseProperty> theProps = new ArrayList<BaseProperty>(2);
                theProps.add(getProperty(TreeImplTest.PROPERTIES.values()[ndx1]));
                theProps.add(getProperty(TreeImplTest.PROPERTIES.values()[start + ndx2]));
                Path aPathInTreeIII = PathImpl.newInstance(treeIII.getNamenode(), theProps);
                pathsInTreeIII.add(aPathInTreeIII);
                assertTrue(pathsTreeIII.contains(aPathInTreeIII));               
            }
        }
       
        // Can we verify that the paths in treeI are:
       
        // [nTI, A, D], [nTI, A, E], [nTI, A, F],
        // [nTI, B, G], [nTI, B, H], [nTI, B, I],
        // [nTI, C, J], [nTI, C, K], [nTI, C, L]   

        List<Path> pathsInTreeI = new ArrayList<Path>(9);

        for ( int ndx1 = TreeImplTest.PROPERTIES.A.ordinal();
              ndx1 < TreeImplTest.PROPERTIES.C.ordinal() + 1;
              ndx1++)
        {
            // 0 -> 3,4,5, 1 -> 6,7,8, 2 -> 9,10,11
            int start = (ndx1 + 1) * 3;
           
            for (int ndx2 = 0; ndx2 < 3; ndx2++)
            {
                List<BaseProperty> theProps = new ArrayList<BaseProperty>(2);
                theProps.add(getProperty(TreeImplTest.PROPERTIES.values()[ndx1]));
                theProps.add(getProperty(TreeImplTest.PROPERTIES.values()[start + ndx2]));
                Path aPathInTreeI = PathImpl.newInstance(treeI.getNamenode(), theProps);
                pathsInTreeI.add(aPathInTreeI);
                assertTrue(pathsTreeI.contains(aPathInTreeI));               
            }
        }
       
View Full Code Here

       
        // So, is the content of "this" in the other?
        //        private ResourceNode startNode;
        //        private List<BaseProperty> propertyList;
       
        Path otherAsPath = (Path)other;
        ResourceNode othersResourceNode = otherAsPath.getStartNode();
        if (!this.getStartNode().isContentContainedBy(othersResourceNode))
        {
            return false;
        }
       
        List<BaseProperty> othersProperties = otherAsPath.getProperties();
        if (!othersProperties.containsAll(this.getProperties()))
        {
            return false;
        }
       
View Full Code Here

TOP

Related Classes of org.mantikhor.llapi.Path

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.