Subversion Repositories bacoAlunos

Rev

Rev 1929 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1929 Rev 1930
1
package pt.estgp.estgweb.utils.documentBuilder;
1
package pt.estgp.estgweb.utils.documentBuilder;
2
 
2
 
3
import java.util.ArrayList;
3
import java.util.ArrayList;
4
import java.util.List;
4
import java.util.List;
5
 
5
 
6
/**
6
/**
7
 * Created by jorgemachado on 11/10/17.
7
 * Created by jorgemachado on 11/10/17.
8
 */
8
 */
9
public class DocumentSection extends SectionContainer
9
public class DocumentSection extends SectionContainer
10
{
10
{
11
    1.5.0/docs/api/java/lang/String.html">String title = "";
11
    1.5.0/docs/api/java/lang/String.html">String title = "";
12
 
12
 
13
    List<DocComponent> components = new ArrayList<DocComponent>();
13
    List<DocComponent> components = new ArrayList<DocComponent>();
14
 
14
 
15
    public DocumentSection() {
15
    public DocumentSection() {
16
    }
16
    }
17
 
17
 
18
    public DocumentSection(1.5.0/docs/api/java/lang/String.html">String title) {
18
    public DocumentSection(1.5.0/docs/api/java/lang/String.html">String title) {
19
        this.title = title;
19
        this.title = title;
20
    }
20
    }
21
 
21
 
22
    public 1.5.0/docs/api/java/lang/String.html">String getTitle() {
22
    public 1.5.0/docs/api/java/lang/String.html">String getTitle() {
23
        return title;
23
        return title;
24
    }
24
    }
25
 
25
 
26
    public void setTitle(1.5.0/docs/api/java/lang/String.html">String title) {
26
    public void setTitle(1.5.0/docs/api/java/lang/String.html">String title) {
27
        this.title = title;
27
        this.title = title;
28
    }
28
    }
29
 
29
 
30
 
30
 
31
    public List<DocComponent> getComponents() {
31
    public List<DocComponent> getComponents() {
32
        return components;
32
        return components;
33
    }
33
    }
34
 
34
 
35
    public void setComponents(List<DocComponent> components) {
35
    public void setComponents(List<DocComponent> components) {
36
        this.components = components;
36
        this.components = components;
37
    }
37
    }
38
 
38
 
39
 
39
 
40
 
40
 
41
    public DocComponent findDocComponent(1.5.0/docs/api/java/lang/Class.html">Class compClass)
41
    public DocComponent findDocComponent(1.5.0/docs/api/java/lang/Class.html">Class compClass)
42
    {
42
    {
43
        if(getComponents() != null)
43
        if(getComponents() != null)
44
            for(DocComponent comp: getComponents())
44
            for(DocComponent comp: getComponents())
45
            {
45
            {
46
                if(comp.getClass().equals(compClass))
46
                if(comp.getClass().equals(compClass))
47
                {
47
                {
48
                    return comp;
48
                    return comp;
49
                }
49
                }
50
            }
50
            }
51
        return null;
51
        return null;
52
    }
52
    }
53
 
53
 
54
    public DocComponent findDocComponent(1.5.0/docs/api/java/lang/Class.html">Class compClass, 1.5.0/docs/api/java/lang/String.html">String internalCode)
54
    public DocComponent findDocComponent(1.5.0/docs/api/java/lang/Class.html">Class compClass, 1.5.0/docs/api/java/lang/String.html">String internalCode)
55
    {
55
    {
56
 
-
 
57
        if(getComponents() != null)
56
        if(getComponents() != null && internalCode != null)
58
        for(DocComponent comp: getComponents())
57
            for(DocComponent comp: getComponents())
59
        {
-
 
60
            if(comp.getClass().equals(compClass) && comp.getInternalCode().equals(internalCode))
-
 
61
            {
58
            {
-
 
59
                if(comp.getClass().equals(compClass) && comp.getInternalCode().equals(internalCode))
-
 
60
                {
62
                return comp;
61
                    return comp;
-
 
62
                }
63
            }
63
            }
64
        }
-
 
65
        return null;
64
        return null;
66
    }
65
    }
67
}
66
}
68
 
67