public StatementBundle getFirstStatement(StatementBundleConfiguration config) { if (!configurations.containsKey(config)) return (null); Vector statmnts = (Vector) configurations.get(config); if (statmnts.size() > 0) return ((StatementBundle) statmnts.get(0)); else return (null); }
public StatementBundle addStatement(StatementBundleConfiguration config) { StatementBundle sb1 = config.getStatementBundle(); StatementBundle sb = (StatementBundle) sb1.clone(false); statements.put(sb, config); sortedStatements.add(sb); if (!configurations.containsKey(config)) addConfiguration(config); Vector stments = (Vector) configurations.get(config); stments.add(sb); return (sb); }
public boolean isComplete(StatementBundleConfiguration config) { if (configurations.containsKey(config)) { Vector statements = (Vector) configurations.get(config); Iterator it = statements.iterator(); int count = 0; while (it.hasNext()) { count++; if (!((StatementBundle) it.next()).isComplete()) return (false); } if (count > 0) return (true); else return (false); } else return (false); }
public StatementBundleConfiguration getConfiguration(StatementBundle statement) { if (!statements.containsKey(statement)) return (null); else return ((StatementBundleConfiguration) statements.get(statement)); }
public Vector getStatements(StatementBundleConfiguration config) { if (!configurations.containsKey(config)) ; addConfiguration(config); return ((Vector) configurations.get(config)); }
public void addConfiguration(StatementBundleConfiguration config) { if (!configurations.containsKey(config)) configurations.put(config, new Vector()); }
public boolean contains(StatementBundleConfiguration config) { return (configurations.containsKey(config)); }