1 package jp.sourceforge.stigmata;
7 import java.util.Iterator;
10 * This interface represents a set of extracted birthmarks.
12 * @author Haruaki Tamada
14 public interface ExtractionResultSet extends Iterable<BirthmarkSet>{
15 public BirthmarkStoreTarget getStoreTarget();
18 * returns an environment of extraction result.
20 public BirthmarkEnvironment getEnvironment();
23 * returns a context of extraction result.
25 public BirthmarkContext getContext();
27 public String getId();
32 public boolean isTableType();
35 * sets table type comparison flag.
38 public void setTableType(boolean flag);
41 * returns types of extracted birthmarks.
43 public String[] getBirthmarkTypes();
45 public ExtractionUnit getExtractionUnit();
48 * returns the number of target birthmark-set size (# of classes, packages, or jar files).
50 public int getBirthmarkSetSize();
53 * 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);