Package prefuse.data

Examples of prefuse.data.Tuple


     * Get the OperationalString Names
     */
    String[] getOpStringNames() {
        ArrayList<String> list = new ArrayList<String>();
        for(Iterator it=g.neighbors(root); it.hasNext();) {
            Tuple t = (Tuple)it.next();
            Object o = t.get(Constants.USER_OBJECT);
            if(o!=null && o instanceof GraphNode) {
                if(((GraphNode)o).getOpString()!=null)
                    list.add(((GraphNode)o).getOpStringName());
            }
        }
View Full Code Here


     * Get an OperationalString GraphNode
     */
    GraphNode getOpStringNode(final String name) {
        GraphNode opStringNode = null;
        for(Iterator it=g.neighbors(root); it.hasNext();) {
            Tuple t = (Tuple)it.next();
            Object o = t.get(Constants.USER_OBJECT);
            if(o!=null && o instanceof GraphNode) {
                GraphNode node = (GraphNode)o;
                if(node.getOpString()!=null &&
                   node.getOpStringName().equals(name)) {
                    opStringNode = node;
View Full Code Here

     * Remove a ServiceElement's instances
     */
    int removeServiceInstances(final GraphNode node) {
        ArrayList<GraphNode> list = new ArrayList<GraphNode>();
        for (Iterator it = g.outNeighbors(node.getTableNode()); it.hasNext();) {
            Tuple t = (Tuple) it.next();
            Object o = t.get(Constants.USER_OBJECT);
            if (o != null && o instanceof GraphNode) {
                GraphNode g = (GraphNode) o;
                if (node.isServiceElement() && g.isOpString())
                    continue;
                list.add(g);
View Full Code Here

            }
        }

        ArrayList<GraphNode> list = new ArrayList<GraphNode>();
        for (Iterator it = g.neighbors(node.getTableNode()); it.hasNext();) {
            Tuple t = (Tuple) it.next();
            Object o = t.get(Constants.USER_OBJECT);
            if (o != null && o instanceof GraphNode) {
                GraphNode g = (GraphNode) o;
                if (node.isServiceElement() && g.isOpString())
                    continue;
                if (node.isOpString() && g.isServiceElement()) {
View Full Code Here

     * Get the children of a TableNode as an array of GraphNode instances
     */
    public static GraphNode[] getChildren(Graph g, TableNode node) {
        ArrayList<GraphNode> list = new ArrayList<GraphNode>();
        for (Iterator it = g.outNeighbors(node); it.hasNext();) {
            Tuple t = (Tuple) it.next();
            Object o = t.get(Constants.USER_OBJECT);
            if (o != null && o instanceof GraphNode) {
                list.add((GraphNode) o);
            }
        }
        return (list.toArray(new GraphNode[list.size()]));
View Full Code Here

        vis.cancel("filter");
        TupleSet set = vis.getGroup(Constants.TREE);
        for (Iterator it = set.tuples(); it.hasNext();) {
            Object o = it.next();
            boolean delete = false;
            Tuple sourceTuple = null;
            Object uo = null;

            if (o instanceof TableEdgeItem) {
                TableEdgeItem tei = (TableEdgeItem) o;
                uo = tei.getTargetNode().get(Constants.USER_OBJECT);
View Full Code Here

TOP

Related Classes of prefuse.data.Tuple

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.