Ejemplo n.º 1
0
    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);
      }
    }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
 static {
   ITEM_SCHEMA.addColumn(LABEL, String.class);
   ITEM_SCHEMA.addColumn(ACTION, ActionListener.class);
 }
Ejemplo n.º 4
0
 static {
   ANCHORITEM_SCHEMA.addColumn(ANCHORITEM, ForceItem.class);
 }
 private Schema getSchema() {
   Schema schema = new Schema();
   schema.addColumn("type", Class.class, null);
   return schema;
 }
Ejemplo n.º 6
0
 static {
   PARAMS_SCHEMA.addColumn(PARAMS, Params.class, new Params());
 }