source: trunk/src/org/expeditee/io/DefaultFrameWriter.java@ 1505

Last change on this file since 1505 was 1505, checked in by bnemhaus, 4 years ago

New Attributes (and repurposed old ones) to be used for encryption of frames:

  • FrameEncryptionLabel. Used to be EncryptionLabel, which is still the case for items. When applied to a frame, it determines the label used to encrypt the entire frame.
  • HomogeneousEncryptionLabel. Does not yet actually do anything. The future point of this attribute is to provide the label that must be used to encrypt items on the frame when the user has only homogeneous encryption permissions.
  • EncryptionFramePermission. Does not yet actually do anything. The future point of this attribute isto determine if a user is able to change the FrameEncryptionLabel on a frame. Level 0 (none), no they cannot. Level 1 (homogeneous), they can only change it to HomogeneousEncryptionLabel. Level 2 (Hetrogeneous Owner), they can change it to any label as long as the owner of the Frame has that label. Level 3 (Hetrogeneous), they can change it to anything.
  • EncryptionPermission. Does not yet actually do anything. The future point of this attribute is to determine what encryption labels can be applied to items on the frame. Level 0 (none), cannot apply an encryption label. Level 1 (homogeneous), they can only used the label specified in HomogeneousEncryptionLabel. Level 2 (Hetrogeneous Owner), they can only use encryption labels that the owner of the frame has. Level 3 (Hetrogeneous) they can use any labels to encrypt an item.
File size: 19.4 KB
Line 
1/**
2 * DefaultFrameWriter.java
3 * Copyright (C) 2010 New Zealand Digital Library, http://expeditee.org
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19package org.expeditee.io;
20
21import java.io.BufferedOutputStream;
22import java.io.File;
23import java.io.FileOutputStream;
24import java.io.IOException;
25import java.io.OutputStream;
26import java.io.OutputStreamWriter;
27import java.io.Writer;
28import java.lang.reflect.Method;
29import java.util.Collection;
30import java.util.HashSet;
31import java.util.LinkedHashMap;
32import java.util.Set;
33
34import org.expeditee.agents.WriteTree;
35import org.expeditee.gio.EcosystemManager;
36import org.expeditee.gui.Frame;
37import org.expeditee.gui.FrameIO;
38import org.expeditee.items.Item;
39import org.expeditee.items.Line;
40import org.expeditee.items.Text;
41
42public abstract class DefaultFrameWriter extends ItemWriter implements
43 FrameWriter {
44 protected static final char MAGNETIZED_ITEM_BOTTOM = '/';
45 protected static final char MAGNETIZED_ITEM_TOP = '^';
46 protected static final char MAGNETIZED_ITEM_RIGHT = ']';
47 protected static final char MAGNETIZED_ITEM_LEFT = '[';
48 protected static final char PERMISSION = 'p';
49 protected static final char LINK_HISTORY = 'B';
50 protected static final char TOOLTIP = 'A';
51 protected static final char CONSTRAINT_IDS = 'c';
52 protected static final char LINE_IDS = 'l';
53 protected static final char THICKNESS = 'h';
54 protected static final char AUTO_WRAP_TO_SAVE = 'r';
55 protected static final char JUSTIFICATION = 'k';
56 protected static final char MIN_WIDTH_TO_SAVE = 'M';
57 protected static final char WIDTH_TO_SAVE = 'w';
58 protected static final char INITIAL_SPACING = 'm';
59 protected static final char LETTER_SPACING = 'b';
60 protected static final char WORD_SPACING = 'a';
61 protected static final char FORMULA = 'J';
62 protected static final char MASK = 'O';
63 protected static final char SPACING = 't';
64 protected static final char FONT = 'f';
65 protected static final char FILLED = 'z';
66 protected static final char DOT_TYPE = 'v';
67 protected static final char ARROW = 'j';
68 protected static final char LINE_PATTERN = 'g';
69 protected static final char LINK_TEMPLATE = 'y';
70 protected static final char LINK_FRAMESET = 'q';
71 protected static final char LINK_MARK = 'n';
72 protected static final char OWNER = 'o';
73 protected static final char FILL_PATTERN = 'i';
74 protected static final char ANCHOR_BOTTOM = 'I';
75 protected static final char ANCHOR_TOP = 'N';
76 protected static final char ANCHOR_RIGHT = 'H';
77 protected static final char ANCHOR_LEFT = 'R';
78 protected static final char GRADIENT_ANGLE = 'Q';
79 protected static final char GRADIENT_COLOR = 'E';
80 protected static final char FILL_COLOR = 'e';
81 protected static final char HIGHLIGHT = 'u';
82 protected static final char DATA = 'D';
83 protected static final char ACTION_LEAVE_FRAME = 'Y';
84 protected static final char ACTION_ENTER_FRAME = 'W';
85 protected static final char ACTION_CURSOR_LEAVE = 'V';
86 protected static final char ACTION_CURSOR_ENTER = 'U';
87 protected static final char ACTION_MARK = 'x';
88 protected static final char ACTION = 'X';
89 protected static final char LINK = 'F';
90 protected static final char TEXT = 'T';
91 protected static final char POSITION = 'P';
92 protected static final char BORDER_COLOR = 'K';
93 protected static final char BACKGROUND_COLOR = 'G';
94 protected static final char COLOR = 'd';
95 protected static final char DATE_CREATED = 's';
96 protected static final char TYPE_AND_ID = 'S';
97
98 public static final String TAB_INDEX_STR = "_ti";
99 public static final String SINGLE_LINE_ONLY_STR = "_sl";
100 public static final String PLACEHOLDER_STR = "_ph";
101 public static final String ENCRYPTION_LABEL_STR = "_el";
102 public static final String ACCEPTS_ENTER = "_ae";
103 public static final String MAGNETIZED_ITEM_BOTTOM_STR = MAGNETIZED_ITEM_BOTTOM + "";
104 public static final String MAGNETIZED_ITEM_TOP_STR = MAGNETIZED_ITEM_TOP + "";
105 public static final String MAGNETIZED_ITEM_RIGHT_STR = MAGNETIZED_ITEM_RIGHT + "";
106 public static final String MAGNETIZED_ITEM_LEFT_STR = MAGNETIZED_ITEM_LEFT + "";
107 public static final String PERMISSION_STR = PERMISSION + "";
108 public static final String LINK_HISTORY_STR = LINK_HISTORY + "";
109 public static final String TOOLTIP_STR = TOOLTIP + "";
110 public static final String CONSTRAINT_IDS_STR = CONSTRAINT_IDS + "";
111 public static final String LINE_IDS_STR = LINE_IDS + "";
112 public static final String THICKNESS_STR = THICKNESS + "";
113 public static final String AUTO_WRAP_TO_SAVE_STR = AUTO_WRAP_TO_SAVE + "";
114 public static final String JUSTIFICATION_STR = JUSTIFICATION + "";
115 public static final String MIN_WIDTH_TO_SAVE_STR = MIN_WIDTH_TO_SAVE + "";
116 public static final String WIDTH_TO_SAVE_STR = WIDTH_TO_SAVE + "";
117 public static final String INITIAL_SPACING_STR = INITIAL_SPACING + "";
118 public static final String LETTER_SPACING_STR = LETTER_SPACING + "";
119 public static final String WORD_SPACING_STR = WORD_SPACING + "";
120 public static final String FORMULA_STR = FORMULA + "";
121 public static final String MASK_STR = MASK + "";
122 public static final String SPACING_STR = SPACING + "";
123 public static final String FONT_STR = FONT + "";
124 public static final String FILLED_STR = FILLED + "";
125 public static final String DOT_TYPE_STR = DOT_TYPE + "";
126 public static final String ARROW_STR = ARROW + "";
127 public static final String LINE_PATTERN_STR = LINE_PATTERN + "";
128 public static final String LINK_TEMPLATE_STR = LINK_TEMPLATE + "";
129 public static final String LINK_FRAMESET_STR = LINK_FRAMESET + "";
130 public static final String LINK_MARK_STR = LINK_MARK + "";
131 public static final String OWNER_STR = OWNER + "";
132 public static final String FILL_PATTERN_STR = FILL_PATTERN + "";
133 public static final String ANCHOR_BOTTOM_STR = ANCHOR_BOTTOM + "";
134 public static final String ANCHOR_TOP_STR = ANCHOR_TOP + "";
135 public static final String ANCHOR_RIGHT_STR = ANCHOR_RIGHT + "";
136 public static final String ANCHOR_LEFT_STR = ANCHOR_LEFT + "";
137 public static final String GRADIENT_ANGLE_STR = GRADIENT_ANGLE + "";
138 public static final String GRADIENT_COLOR_STR = GRADIENT_COLOR + "";
139 public static final String FILL_COLOR_STR = FILL_COLOR + "";
140 public static final String HIGHLIGHT_STR = HIGHLIGHT + "";
141 public static final String DATA_STR = DATA + "";
142 public static final String ACTION_LEAVE_FRAME_STR = ACTION_LEAVE_FRAME + "";
143 public static final String ACTION_ENTER_FRAME_STR = ACTION_ENTER_FRAME + "";
144 public static final String ACTION_CURSOR_LEAVE_STR = ACTION_CURSOR_LEAVE + "";
145 public static final String ACTION_CURSOR_ENTER_STR = ACTION_CURSOR_ENTER + "";
146 public static final String ACTION_MARK_STR = ACTION_MARK + "";
147 public static final String ACTION_STR = ACTION + "";
148 public static final String LINK_STR = LINK + "";
149 public static final String TEXT_STR = TEXT + "";
150 public static final String POSITION_STR = POSITION + "";
151 public static final String BORDER_COLOR_STR = BORDER_COLOR + "";
152 public static final String BACKGROUND_COLOR_STR = BACKGROUND_COLOR + "";
153 public static final String COLOR_STR = COLOR + "";
154 public static final String DATE_CREATED_STR = DATE_CREATED + "";
155 public static final String TYPE_AND_ID_STR = TYPE_AND_ID + "";
156
157 protected String _filename = null;
158
159 protected String _output = null;
160
161 protected ProxyWriter _writer = null;
162
163 protected String _format = "";
164
165 protected boolean _running = true;
166
167 protected boolean _stop = false;
168
169 // keep track of methods that are put on the same line
170 private static LinkedHashMap<Character, Method> _ItemCharTags = new LinkedHashMap<Character, Method>();
171 // IMPORTANT: keys in _ItemTagsExt must start with underscore as their first character
172 private static LinkedHashMap<String, Method> _ItemStrTags = new LinkedHashMap<String, Method>();
173
174 private static LinkedHashMap<String, Method> _ItemTags = new LinkedHashMap<String, Method>();
175
176 protected static LinkedHashMap<Character, Method> _FrameTags = new LinkedHashMap<Character, Method>();
177
178 {
179 try {
180 /// C H I J L N P Q R S W X Y Z
181 /// a b c f g h i j l m n o q r s t u v w x y z
182 // Standard frame tags
183 _FrameTags.put('V', Frame.class.getMethod("getVersion"));
184 _FrameTags.put('p', Frame.class.getMethod("getPermission"));
185 _FrameTags.put('U', Frame.class.getMethod("getOwner"));
186 _FrameTags.put('D', Frame.class.getMethod("getDateCreated"));
187 _FrameTags.put('M', Frame.class.getMethod("getLastModifyUser"));
188 _FrameTags.put('d', Frame.class.getMethod("getLastModifyDate"));
189 _FrameTags.put('F', Frame.class.getMethod("getFrozenDate"));
190 _FrameTags.put('O', Frame.class.getMethod("getForegroundColor"));
191 _FrameTags.put('B', Frame.class.getMethod("getBackgroundColor"));
192 _FrameTags.put('T', Frame.class.getMethod("getData"));
193 _FrameTags.put('G', Frame.class.getMethod("getGroup"));
194
195 // Encryption frame tags
196 _FrameTags.put('K', Frame.class.getMethod("getFrameEncryptionLabel"));
197 _FrameTags.put('E', Frame.class.getMethod("getFrameEncryptionPermission"));
198 _FrameTags.put('k', Frame.class.getMethod("getHomogeneousEncryptionLabel"));
199 _FrameTags.put('e', Frame.class.getMethod("getEncryptionPermission"));
200
201 // Note: As of 26/11/18 there are no unused letter item tags. Use other characters.
202 _ItemCharTags.put(DefaultFrameWriter.TYPE_AND_ID, Item.class.getMethod("getTypeAndID"));
203 _ItemCharTags.put(DefaultFrameWriter.DATE_CREATED, Item.class.getMethod("getDateCreated"));
204 _ItemCharTags.put(DefaultFrameWriter.COLOR, Item.class.getMethod("getColor"));
205 _ItemCharTags.put(DefaultFrameWriter.BACKGROUND_COLOR, Item.class.getMethod("getBackgroundColor"));
206 _ItemCharTags.put(DefaultFrameWriter.BORDER_COLOR, Item.class.getMethod("getBorderColor"));
207
208 _ItemCharTags.put(DefaultFrameWriter.POSITION, Item.class.getMethod("getPosition"));
209 _ItemCharTags.put(DefaultFrameWriter.TEXT, Text.class.getMethod("getText"));
210 _ItemCharTags.put(DefaultFrameWriter.LINK, Item.class.getMethod("getLink"));
211 _ItemCharTags.put(DefaultFrameWriter.ACTION, Item.class.getMethod("getAction"));
212 _ItemCharTags.put(DefaultFrameWriter.ACTION_MARK, Item.class.getMethod("getActionMark"));
213 _ItemCharTags.put(DefaultFrameWriter.ACTION_CURSOR_ENTER, Item.class.getMethod("getActionCursorEnter"));
214 _ItemCharTags.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE, Item.class.getMethod("getActionCursorLeave"));
215 _ItemCharTags.put(DefaultFrameWriter.ACTION_ENTER_FRAME, Item.class.getMethod("getActionEnterFrame"));
216 _ItemCharTags.put(DefaultFrameWriter.ACTION_LEAVE_FRAME, Item.class.getMethod("getActionLeaveFrame"));
217 _ItemCharTags.put(DefaultFrameWriter.DATA, Item.class.getMethod("getData"));
218 _ItemCharTags.put(DefaultFrameWriter.HIGHLIGHT, Item.class.getMethod("getHighlight"));
219 _ItemCharTags.put(DefaultFrameWriter.FILL_COLOR, Item.class.getMethod("getFillColor"));
220 _ItemCharTags.put(DefaultFrameWriter.GRADIENT_COLOR, Item.class.getMethod("getGradientColor"));
221 _ItemCharTags.put(DefaultFrameWriter.GRADIENT_ANGLE, Item.class.getMethod("getGradientAngle"));
222
223 _ItemCharTags.put(DefaultFrameWriter.ANCHOR_LEFT, Item.class.getMethod("getAnchorLeft"));
224 _ItemCharTags.put(DefaultFrameWriter.ANCHOR_RIGHT, Item.class.getMethod("getAnchorRight"));
225 _ItemCharTags.put(DefaultFrameWriter.ANCHOR_TOP, Item.class.getMethod("getAnchorTop"));
226 _ItemCharTags.put(DefaultFrameWriter.ANCHOR_BOTTOM, Item.class.getMethod("getAnchorBottom"));
227
228 _ItemCharTags.put(DefaultFrameWriter.FILL_PATTERN, Item.class.getMethod("getFillPattern"));
229 _ItemCharTags.put(DefaultFrameWriter.OWNER, Item.class.getMethod("getOwner"));
230 _ItemCharTags.put(DefaultFrameWriter.LINK_MARK, Item.class.getMethod("getLinkMark"));
231 _ItemCharTags.put(DefaultFrameWriter.LINK_FRAMESET, Item.class.getMethod("getLinkFrameset"));
232 _ItemCharTags.put(DefaultFrameWriter.LINK_TEMPLATE, Item.class.getMethod("getLinkTemplate"));
233 _ItemCharTags.put(DefaultFrameWriter.LINE_PATTERN, Item.class.getMethod("getLinePattern"));
234
235 _ItemCharTags.put(DefaultFrameWriter.ARROW, Item.class.getMethod("getArrow"));
236
237 _ItemCharTags.put(DefaultFrameWriter.DOT_TYPE, Item.class.getMethod("getDotType"));
238 _ItemCharTags.put(DefaultFrameWriter.FILLED, Item.class.getMethod("getFilled"));
239
240 _ItemCharTags.put(DefaultFrameWriter.FONT, Text.class.getMethod("getFont"));
241 _ItemCharTags.put(DefaultFrameWriter.SPACING, Text.class.getMethod("getSpacing"));
242
243 _ItemCharTags.put(DefaultFrameWriter.MASK, Text.class.getMethod("getMask"));
244
245 // TODO set a boolean flag to indicate that the text is a formula
246 // Store the formula in the text property NOT the answer
247 _ItemCharTags.put(DefaultFrameWriter.FORMULA, Item.class.getMethod("getFormula"));
248
249 _ItemCharTags.put(DefaultFrameWriter.WORD_SPACING, Text.class.getMethod("getWordSpacing"));
250 _ItemCharTags.put(DefaultFrameWriter.LETTER_SPACING, Text.class.getMethod("getLetterSpacing"));
251 _ItemCharTags.put(DefaultFrameWriter.INITIAL_SPACING, Text.class.getMethod("getInitialSpacing"));
252 _ItemCharTags.put(DefaultFrameWriter.WIDTH_TO_SAVE, Text.class.getMethod("getWidthToSave"));
253 _ItemCharTags.put(DefaultFrameWriter.MIN_WIDTH_TO_SAVE, Text.class.getMethod("getMinWidthToSave"));
254 _ItemCharTags.put(DefaultFrameWriter.JUSTIFICATION, Text.class.getMethod("getJustification"));
255 _ItemCharTags.put(DefaultFrameWriter.AUTO_WRAP_TO_SAVE, Text.class.getMethod("getAutoWrapToSave"));
256
257 _ItemCharTags.put(DefaultFrameWriter.THICKNESS, Item.class.getMethod("getThickness"));
258 _ItemCharTags.put(DefaultFrameWriter.LINE_IDS, Item.class.getMethod("getLineIDs"));
259 _ItemCharTags.put(DefaultFrameWriter.CONSTRAINT_IDS, Item.class.getMethod("getConstraintIDs"));
260
261 _ItemCharTags.put(DefaultFrameWriter.TOOLTIP, Item.class.getMethod("getTooltip"));
262 _ItemCharTags.put(DefaultFrameWriter.LINK_HISTORY, Item.class.getMethod("getLinkHistory"));
263
264 _ItemCharTags.put(DefaultFrameWriter.PERMISSION, Item.class.getMethod("getPermission"));
265
266 _ItemCharTags.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT, Item.class.getMethod("getMagnetizedItemLeft"));
267 _ItemCharTags.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT, Item.class.getMethod("getMagnetizedItemRight"));
268 _ItemCharTags.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP, Item.class.getMethod("getMagnetizedItemTop"));
269 _ItemCharTags.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM, Item.class.getMethod("getMagnetizedItemBottom"));
270
271 _ItemStrTags.put(DefaultFrameWriter.ENCRYPTION_LABEL_STR, Item.class.getMethod("getEncryptionLabel"));
272
273 _ItemStrTags.put(DefaultFrameWriter.PLACEHOLDER_STR, Text.class.getMethod("getPlaceholder"));
274 _ItemStrTags.put(DefaultFrameWriter.SINGLE_LINE_ONLY_STR, Text.class.getMethod("isSingleLineOnly"));
275 _ItemStrTags.put(DefaultFrameWriter.TAB_INDEX_STR, Text.class.getMethod("getTabIndex"));
276 _ItemStrTags.put(DefaultFrameWriter.ACCEPTS_ENTER, Item.class.getMethod("acceptsKeyboardEnter"));
277 } catch (Exception e) {
278 e.printStackTrace();
279 }
280
281 Set<Character> keySet = _ItemCharTags.keySet();
282 for (Character key: keySet) {
283 _ItemTags.put(key + "", _ItemCharTags.get(key));
284 }
285 _ItemTags.putAll(_ItemStrTags);
286 }
287
288 public DefaultFrameWriter() {
289
290
291 }
292
293 public void setOutputLocation(String filename) {
294 _filename = filename;
295 }
296
297 public String writeFrame(Frame toWrite) throws IOException {
298 return writeFrame(toWrite, null);
299 }
300
301 public String writeFrame(Frame toWrite, Writer writer) throws IOException {
302 try {
303 initialise(toWrite, writer);
304
305 outputFrame(toWrite);
306
307 _running = false;
308 return finaliseFrame();
309 } catch (IOException ioe) {
310 _running = false;
311 throw ioe;
312 }
313
314 }
315
316 /**
317 * Called before writing out the body items of each frame.
318 *
319 * @param starting
320 * the name of the frame currently being written out.
321 * @throws IOException
322 */
323 protected void writeStartFrame(Frame starting) throws IOException {
324 if (starting.getTitleItem() != null) {
325 if (starting.getTitleItem().isAnnotation())
326 this.writeAnnotationTitle(starting.getTitleItem());
327 else
328 this.writeTitle(starting.getTitleItem(), starting.getSortedItems());
329 }
330 }
331
332 /**
333 * Called after writing out the body items of each frame.
334 *
335 * @param ending
336 * the name of the frame currently being written out.
337 * @throws IOException
338 */
339 protected void writeEndFrame(Frame ending) throws IOException {
340 }
341
342 protected final void initialise(Frame start) throws IOException {
343 initialise(start, null);
344 }
345
346 protected void initialise(Frame start, Writer writer) throws IOException {
347 if (_filename == null)
348 _filename = FrameIO.EXPORTS_PATH + getFileName(start) + _format;
349
350 if (writer != null) {
351 _writer = new ProxyWriter(writer);
352 _output = writer.toString();
353 } else if (_filename.equalsIgnoreCase(WriteTree.CLIPBOARD)) {
354 _writer = new ProxyWriter(true);
355 _output = WriteTree.CLIPBOARD;
356 } else {
357 if (_filename.contains(File.separator)) {
358 String extTest = _filename.substring(_filename
359 .lastIndexOf(File.separator) + 1);
360 if (!extTest.contains("."))
361 _filename += _format;
362 } else if (!_filename.contains("."))
363 _filename += _format;
364
365 if (!_filename.contains(File.separator))
366 _filename = FrameIO.EXPORTS_PATH + _filename;
367
368 File test = new File(_filename);
369
370 File parent = test.getParentFile();
371 if (parent != null && !parent.exists()) {
372 parent.mkdirs();
373 }
374
375 // Open an Output Stream Writer to set encoding
376 OutputStream fout = new FileOutputStream(_filename);
377 OutputStream bout = new BufferedOutputStream(fout);
378 Writer out = new OutputStreamWriter(bout, "UTF-8");
379
380 _writer = new ProxyWriter(out);
381 _output = _filename;
382 }
383 }
384
385 protected String getFileName(Frame start) {
386 return getValidFilename(start.getTitle());
387 }
388
389 public static String getValidFilename(String filename) {
390 return filename.replaceAll("[ \\.]", "_");
391 }
392
393 protected String finalise() throws IOException {
394 try {
395 _writer.flush();
396 _writer.close();
397 } catch (IOException ioe) {
398 } finally {
399 _writer.close();
400 }
401 String errorMessage = EcosystemManager.getMiscManager().open(_output);
402 if (errorMessage != null) System.err.println(errorMessage);
403 return " exported to " + _output;
404 }
405
406 protected String finaliseFrame() throws IOException {
407 return "Frame" + finalise();
408 }
409
410 protected void outputFrame(Frame toWrite) throws IOException {
411 writeStartFrame(toWrite);
412
413 Collection<Item> done = new HashSet<Item>();
414
415 for (Item i : getItemsToWrite(toWrite)) {
416 if (_stop) {
417 return;
418 }
419
420 if (i instanceof Line) {
421 if (done.contains(i)) {
422 continue;
423 }
424 done.addAll(i.getAllConnected());
425 }
426 writeItem(i);
427 }
428 writeEndFrame(toWrite);
429 }
430
431 protected Collection<Item> getItemsToWrite(Frame toWrite) {
432 return toWrite.getItemsToSave();
433 }
434
435 public boolean isRunning() {
436 return _running;
437 }
438
439 public void stop() {
440 _stop = true;
441 }
442
443 public String getFileContents() {
444 return "Not Supported";
445 }
446
447 public static LinkedHashMap<String, Method> getItemTags() {
448 return _ItemTags;
449 }
450
451 /**
452 * @return the _ItemTags
453 */
454 public static LinkedHashMap<Character, Method> getItemCharTags() {
455 return _ItemCharTags;
456 }
457
458 /**
459 * @return the _ItemTagsExt
460 */
461 public static LinkedHashMap<String, Method> getItemStrTags() {
462 return _ItemStrTags;
463 }
464
465}
Note: See TracBrowser for help on using the repository browser.