OSDN Git Service

2bd5f6faede624ed17d10ffbd131df9b7deb3889
[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  */
14 public interface ExtractionResultSet extends Iterable<BirthmarkSet>{
15     public BirthmarkStoreTarget getStoreTarget();
16
17     /**
18      * returns an environment of extraction result.
19      */
20     public BirthmarkEnvironment getEnvironment();
21
22     /**
23      * returns a context of extraction result.
24      */
25     public BirthmarkContext getContext();
26
27     public String getId();
28
29     /**
30      * sets extraction 
31      */
32     public boolean isTableType();
33
34     /**
35      * sets table type comparison flag.
36      * @see #isTableType()
37      */
38     public void setTableType(boolean flag);
39
40     /**
41      * returns types of extracted birthmarks.
42      */
43     public String[] getBirthmarkTypes();
44
45     public ExtractionUnit getExtractionUnit();
46
47     /**
48      * returns the number of target birthmark-set size (# of classes, packages, or jar files).
49      */
50     public int getBirthmarkSetSize();
51
52     /**
53      * returns an iterator for all of birthmark-sets.
54      */
55     @Override
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 }