KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > clipbuilder > html > web > html > Impl > ExtractorFilter > AbsctractExtractoreFilter


1 package org.jahia.clipbuilder.html.web.html.Impl.ExtractorFilter;
2 import java.util.*;
3
4 import org.jahia.clipbuilder.html.web.html.*;
5
6 /**
7  * Description of the Class
8  *
9  *@author Tlili Khaled
10  */

11 public abstract class AbsctractExtractoreFilter implements ExtractorFilter {
12     private Map keyMap = new Hashtable();
13     private int mode;
14     private String JavaDoc name;
15
16
17     /**
18      * Constructor for the AbsctractExtractoreFilter object
19      *
20      *@param name Description of Parameter
21      */

22     public AbsctractExtractoreFilter(String JavaDoc name) {
23         setName(name);
24     }
25
26
27     /**
28      * Sets the Name attribute of the AbsctractExtractoreFilter object
29      *
30      *@param name The new Name value
31      */

32     public void setName(String JavaDoc name) {
33         this.name = name;
34     }
35
36
37
38     /**
39      * Sets the Mode attribute of the AbsctractExtractoreFilter object
40      *
41      *@param mode The new Mode value
42      */

43     public void setMode(int mode) {
44         this.mode = mode;
45     }
46
47
48     /**
49      * Sets the KeyMap attribute of the AbsctractExtractoreFilter object
50      *
51      *@param map The new KeyMap value
52      */

53     public void setKeyMap(Map map) {
54         this.keyMap = map;
55     }
56
57
58     /**
59      * Gets the Name attribute of the AbsctractExtractoreFilter object
60      *
61      *@return The Name value
62      */

63     public String JavaDoc getName() {
64         return name;
65     }
66
67
68     /**
69      * Gets the KeyValue attribute of the AbsctractExtractoreFilter object
70      *
71      *@param name Description of Parameter
72      *@return The KeyValue value
73      */

74     public String JavaDoc getKeyPart(String JavaDoc name) {
75         return (String JavaDoc) keyMap.get(name);
76     }
77
78
79     /**
80      * Gets the KeyMap attribute of the AbsctractExtractoreFilter object
81      *
82      *@return The KeyMap value
83      */

84     public Map getKeyMap() {
85         return keyMap;
86     }
87
88
89
90     /**
91      * Gets the Mode attribute of the AbsctractExtractoreFilter object
92      *
93      *@return The Mode value
94      */

95     public int getMode() {
96         return mode;
97     }
98
99
100     /**
101      * Gets the EmbeddedSelectedPart attribute of the AbsctractExtractoreFilter
102      * object
103      *
104      *@param document Description of Parameter
105      *@param action Description of Parameter
106      *@return The EmbeddedSelectedPart value
107      */

108     public String JavaDoc getEmbeddedSelectedPart(HTMLDocument document, int action) {
109         try {
110             return getSelectedPart(document, action);
111         }
112         catch (Exception JavaDoc ex) {
113             ex.printStackTrace();
114             return "Can't find embedded selected part";
115         }
116     }
117
118
119     /**
120      * Adds a feature to the Key attribute of the AbsctractExtractoreFilter
121      * object
122      *
123      *@param name The feature to be added to the Key attribute
124      *@param value The feature to be added to the Key attribute
125      */

126     public void addKeyPart(String JavaDoc name, String JavaDoc value) {
127         keyMap.put(name, value);
128     }
129
130 }
131
Popular Tags