OSDN Git Service

update
[stigmata/stigmata.git] / src / main / java / jp / sourceforge / stigmata / ExtractionResultSet.java
1 package jp.sourceforge.stigmata;
2
3 /*
4  * $Id$
5  */
6
7 import java.util.Iterator;
8
9 /**
10  * This interface represents a set of extracted birthmarks.
11  * 
12  * @author Haruaki Tamada
13  * @version $Revision$ 
14  */
15 public interface ExtractionResultSet extends Iterable<BirthmarkSet>{
16     public BirthmarkStoreTarget getStoreTarget();
17
18     /**
19      * returns an environment of extraction result.
20      */
21     public BirthmarkEnvironment getEnvironment();
22
23     /**
24      * returns a context of extraction result.
25      */
26     public BirthmarkContext getContext();
27
28     public String getId();
29
30     /**
31      * sets extraction 
32      */
33     public boolean isTableType();
34
35     /**
36      * sets table type comparison flag.
37      * @see #isTableType()
38      */
39     public void setTableType(boolean flag);
40
41     /**
42      * returns types of extracted birthmarks.
43      */
44     public String[] getBirthmarkTypes();
45
46     public ExtractionUnit getExtractionUnit();
47
48     /**
49      * returns the number of target birthmark-set size (# of classes, packages, or jar files).
50      */
51     public int getBirthmarkSetSize();
52
53     /**
54      * returns an iterator for all of birthmark-sets.
55      */
56     public Iterator<BirthmarkSet> iterator();
57
58     /**
59      * returns a birthmark-set of given index.
60      */
61     public BirthmarkSet getBirthmarkSet(int index);
62
63     /**
64      * returns a birthmark-set of given name.
65      */
66     public BirthmarkSet getBirthmarkSet(String name);
67
68     /**
69      * returns an array for all of birthmark-sets.
70      */
71     public BirthmarkSet[] getBirthmarkSets();
72
73     /**
74      * removes given birthmark-set from this object.
75      */
76     public void removeBirthmarkSet(BirthmarkSet bs);
77
78     /**
79      * removes all of birthmark-set this object has.
80      */
81     public void removeAllBirthmarkSets();
82
83     /**
84      * returns the number of birthmark-set to specified extraction target (TARGET_X, TARGET_Y, TARGET_XY, or TARGET_BOTH).
85      */
86     public int getBirthmarkSetSize(ExtractionTarget target);
87
88     /**
89      * returns an iterator of birthmark-sets from specified extraction target.
90      */
91     public Iterator<BirthmarkSet> birthmarkSets(ExtractionTarget target);
92
93     /**
94      * 
95      */
96     public BirthmarkSet getBirthmarkSet(ExtractionTarget target, int index);
97
98     /**
99      * 
100      */
101     public BirthmarkSet getBirthmarkSet(ExtractionTarget target, String setname);
102
103     /**
104      * 
105      */
106     public BirthmarkSet[] getBirthmarkSets(ExtractionTarget target);
107
108     /**
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 
115      */
116     public void addBirthmarkSet(ExtractionTarget target, BirthmarkSet set) throws BirthmarkStoreException;
117
118     /**
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 
123      */
124     public void setBirthmarkSets(ExtractionTarget target, BirthmarkSet[] sets) throws BirthmarkStoreException;
125
126     /**
127      * remove specified birthmark-set from specified extraction target.
128      */
129     public void removeBirthmarkSet(ExtractionTarget target, BirthmarkSet set);
130
131     /**
132      * remove all birthmark-sets from specified extraction target.
133      */
134     public void removeAllBirthmarkSets(ExtractionTarget target);
135 }