protected void addToSchema() { if (m_name == null || m_name.length() == 0) error("Empty " + KEY + " name."); if (m_type == null || m_type.length() == 0) error("Empty " + KEY + " type."); try { Class type = parseType(m_type); Object dflt = m_dflt == null ? null : parse(m_dflt, type); if (m_for == null || m_for.equals(ALL)) { m_nsch.addColumn(m_name, type, dflt); m_esch.addColumn(m_name, type, dflt); } else if (m_for.equals(NODE)) { m_nsch.addColumn(m_name, type, dflt); } else if (m_for.equals(EDGE)) { m_esch.addColumn(m_name, type, dflt); } else { error("Unrecognized \"" + FOR + "\" value: " + m_for); } m_idMap.put(m_id, m_name); m_dflt = null; } catch (DataParseException dpe) { error(dpe); } }
public void startDocument() { m_nodeMap.clear(); inSchema = true; m_esch.addColumn(SRC, int.class); m_esch.addColumn(TRG, int.class); m_esch.addColumn(SRCID, String.class); m_esch.addColumn(TRGID, String.class); }
static { ITEM_SCHEMA.addColumn(LABEL, String.class); ITEM_SCHEMA.addColumn(ACTION, ActionListener.class); }
static { ANCHORITEM_SCHEMA.addColumn(ANCHORITEM, ForceItem.class); }
private Schema getSchema() { Schema schema = new Schema(); schema.addColumn("type", Class.class, null); return schema; }
static { PARAMS_SCHEMA.addColumn(PARAMS, Params.class, new Params()); }