Package org.gephi.data.attributes.type

Examples of org.gephi.data.attributes.type.StringList


        columnMap = new HashMap<String, AttributeColumnImpl>();
        rows = new ArrayList<AttributeRowImpl>();

        AttributeColumnImpl co1 = nodeClass.addColumn("col1", "Column 1", AttributeType.STRING, AttributeOrigin.DATA, "nil");
        AttributeColumnImpl co2 = nodeClass.addColumn("col2", "Column 2", AttributeType.INT, AttributeOrigin.PROPERTY, 0);
        AttributeColumnImpl co3 = nodeClass.addColumn("col3", "Column 3", AttributeType.LIST_STRING, AttributeOrigin.DATA, new StringList("nothing", ","));
        AttributeColumnImpl co4 = nodeClass.addColumn("col4", "Column 4", AttributeType.STRING, AttributeOrigin.COMPUTED, "zero");
        AttributeColumnImpl co5 = nodeClass.addColumn("col5", "Column 5", AttributeType.BOOLEAN, AttributeOrigin.DATA, true);
        AttributeColumnImpl co6 = nodeClass.addColumn("col6", "Column 6", AttributeType.STRING, AttributeOrigin.DATA, "default");

        columnMap.put("col1", co1);
View Full Code Here


        model = new IndexedAttributeModel();
        AttributeTableImpl nodeTableImpl = model.getNodeTable();
        nodeTableImpl.addColumn("id", "Identifier", AttributeType.INT, AttributeOrigin.DATA, new Integer(0));
        nodeTableImpl.addColumn("url", AttributeType.STRING);
        nodeTableImpl.addColumn("position", "Position&<>\"'$*", AttributeType.FLOAT, AttributeOrigin.PROPERTY, new Float(0));
        nodeTableImpl.addColumn("cats", "Catégories", AttributeType.LIST_STRING, AttributeOrigin.DATA, new StringList("a,b,c,d"));
        AttributeTableImpl edgeTableImpl = model.getEdgeTable();
        edgeTableImpl.addColumn("name", AttributeType.STRING, AttributeOrigin.DATA);
        //edgeTableImpl.addColumn("weight", AttributeType.DOUBLE, AttributeOrigin.DATA);
    }
View Full Code Here

            AttributeValue[] values2 = n2.getAttributeRow().getValues();
            assertEquals("0", values2[col0.getIndex()].getColumn().getId());
            assertEquals("2", values2[col2.getIndex()].getColumn().getId());
            assertEquals("Author", ((DynamicType) values2[col0.getIndex()].getValue()).getValue());
            assertEquals(new StringList("String1, String2, String 3"), values2[col2.getIndex()].getValue());

            AttributeValue[] values3 = n3.getAttributeRow().getValues();
            DynamicType val4 = (DynamicType) values3[col4.getIndex()].getValue();
            double low = DynamicUtilities.getDoubleFromXMLDateString("2009-01-01");
            double high = DynamicUtilities.getDoubleFromXMLDateString("2009-12-31");
View Full Code Here

                }
                while (matcher.find()) {
                    foundGroups.add(matcher.group());
                }
                if (foundGroups.size() > 0) {
                    attributes.setValue(newColumn.getIndex(), new StringList(foundGroups.toArray(new String[0])));
                    foundGroups.clear();
                } else {
                    attributes.setValue(newColumn.getIndex(), null);
                }
            }
View Full Code Here

            return new CharacterList((char[]) array);
        else if (componentType == Character.class)
            return new CharacterList((Character[]) array);

        else if (componentType == String.class)
            return new StringList((String[]) array);

        else if (componentType == BigInteger.class)
            return new BigIntegerList((BigInteger[]) array);

        else if (componentType == BigDecimal.class)
View Full Code Here

                }
                while (matcher.find()) {
                    foundGroups.add(matcher.group());
                }
                if (foundGroups.size() > 0) {
                    attributes.setValue(newColumn.getIndex(), new StringList(foundGroups.toArray(new String[0])));
                    foundGroups.clear();
                } else {
                    attributes.setValue(newColumn.getIndex(), null);
                }
            }
View Full Code Here

            return new CharacterList((char[]) array);
        else if (componentType == Character.class)
            return new CharacterList((Character[]) array);

        else if (componentType == String.class)
            return new StringList((String[]) array);

        else if (componentType == BigInteger.class)
            return new BigIntegerList((BigInteger[]) array);

        else if (componentType == BigDecimal.class)
View Full Code Here

TOP

Related Classes of org.gephi.data.attributes.type.StringList

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.