/** * Instantiate this schema as a new Table instance. * @return a new Table with this schema */ public Table instantiate() { return instantiate(0); }
protected void schemaCheck() { if ( inSchema ) { m_nsch.lockSchema(); m_esch.lockSchema(); m_nodes = m_nsch.instantiate(); m_edges = m_esch.instantiate(); inSchema = false; } }
/** * Instantiate and return the link table. * @return the created link table */ protected Table createLinkTable() { return LINKS_SCHEMA.instantiate(getNodeTable().getMaximumRow()+1); }
/** * Create a new AggregateTable. * @param vis the Visualization associated with the table * @param group the data group the table contents belongs to * @param schema the Schema to use for this table */ public AggregateTable(Visualization vis, String group, Schema schema) { super(vis, group, schema, TableAggregateItem.class); m_aggregated = AGGREGATED_SCHEMA.instantiate(); m_aggregated.index(AGGREGATE); m_aggregated.index(MEMBER_HASH); }
/** * Query this table for a filtered, sorted subset of this table. This * operation creates an entirely new table independent of this table. * If a filtered view of this same table is preferred, use the * {@link CascadedTable} class. * @param filter the predicate filter determining which rows to include * in the new table. If this value is null, all rows will be included. * @param sort the sorting criteria determining the order in which * rows are added to the new table. If this value is null, the rows * will not be sorted. * @return a new table meeting the query specification */ public Table select(Predicate filter, Sort sort) { Table t = getSchema().instantiate(); Iterator tuples = tuples(filter, sort); while ( tuples.hasNext() ) { t.addTuple((Tuple)tuples.next()); } return t; }
t = getSchema(metadata, m_handler).instantiate(); if ( key != null ) { try {
/** * Create a new SpanningTree. * @param g the backing Graph to span * @param root the Node to use as the root of the spanning tree */ public SpanningTree(Graph g, Node root) { super(g.getNodeTable(), EDGE_SCHEMA.instantiate()); m_backing = g; TupleManager etm = new TupleManager(getEdgeTable(), null, TableEdgeItem.class) { public Tuple getTuple(int row) { return m_backing.getEdge(m_table.getInt(row, SOURCE_EDGE)); } }; getEdgeTable().setTupleManager(etm); super.setTupleManagers(g.m_nodeTuples, etm); buildSpanningTree(root); }