1 package jp.sourceforge.stigmata;
7 import java.util.Iterator;
10 * This interface represents a set of extracted birthmarks.
12 * @author Haruaki Tamada
15 public interface ExtractionResultSet extends Iterable<BirthmarkSet>{
16 public BirthmarkStoreTarget getStoreTarget();
19 * returns an environment of extraction result.
21 public BirthmarkEnvironment getEnvironment();
24 * returns a context of extraction result.
26 public BirthmarkContext getContext();
28 public String getId();
33 public boolean isTableType();
36 * sets table type comparison flag.
39 public void setTableType(boolean flag);
42 * returns types of extracted birthmarks.
44 public String[] getBirthmarkTypes();
46 public ExtractionUnit getExtractionUnit();
49 * returns the number of target birthmark-set size (# of classes, packages, or jar files).
51 public int getBirthmarkSetSize();
54 * returns an iterator for all of birthmark-sets.
56 public Iterator<BirthmarkSet> iterator();
59 * returns a birthmark-set of given index.
61 public BirthmarkSet getBirthmarkSet(int index);
64 * returns a birthmark-set of given name.
66 public BirthmarkSet getBirthmarkSet(String name);
69 * returns an array for all of birthmark-sets.
71 public BirthmarkSet[] getBirthmarkSets();
74 * removes given birthmark-set from this object.
76 public void removeBirthmarkSet(BirthmarkSet bs);
79 * removes all of birthmark-set this object has.
81 public void removeAllBirthmarkSets();
84 * returns the number of birthmark-set to specified extraction target (TARGET_X, TARGET_Y, TARGET_XY, or TARGET_BOTH).
86 public int getBirthmarkSetSize(ExtractionTarget target);
89 * returns an iterator of birthmark-sets from specified extraction target.
91 public Iterator<BirthmarkSet> birthmarkSets(ExtractionTarget target);
96 public BirthmarkSet getBirthmarkSet(ExtractionTarget target, int index);
101 public BirthmarkSet getBirthmarkSet(ExtractionTarget target, String setname);
106 public BirthmarkSet[] getBirthmarkSets(ExtractionTarget target);
109 * adds birthmark-set to extraction target.
110 * This method must be called when building birthmark-set is completely finished.
111 * All of birthmark must be added to birthmark-set.
112 * Because, if the concrete class of this interface stores given birthmark-set to database,
113 * birthmarks is parsed and store into target database in this method.
114 * @throws IllegalArgumentsException target is ExtractionTarget.TARGET_BOTH
116 public void addBirthmarkSet(ExtractionTarget target, BirthmarkSet set) throws BirthmarkStoreException;
119 * remove all of birthmark-set this object has, then, adds each birthmark-sets to this object.
120 * @see #removeAllBirthmarkSets(ExtractionTarget)
121 * @see #addBirthmarkSet(ExtractionTarget, BirthmarkSet)
122 * @throws IllegalArgumentsException target is ExtractionTarget.TARGET_BOTH
124 public void setBirthmarkSets(ExtractionTarget target, BirthmarkSet[] sets) throws BirthmarkStoreException;
127 * remove specified birthmark-set from specified extraction target.
129 public void removeBirthmarkSet(ExtractionTarget target, BirthmarkSet set);
132 * remove all birthmark-sets from specified extraction target.
134 public void removeAllBirthmarkSets(ExtractionTarget target);