|
1 /* |
|
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 * Options handler |
|
17 * |
|
18 */ |
|
19 package com.nokia.trace.dictionary.model.handlers; |
|
20 |
|
21 import org.xml.sax.Attributes; |
|
22 |
|
23 import com.nokia.trace.dictionary.model.DecodeObject; |
|
24 import com.nokia.trace.dictionary.model.DictionaryContentHandler; |
|
25 import com.nokia.trace.dictionary.model.DictionaryDecodeModel; |
|
26 |
|
27 /** |
|
28 * Options handler |
|
29 * |
|
30 */ |
|
31 final class OptionsHandler extends BaseHandler { |
|
32 |
|
33 /** |
|
34 * Tag name this handler handles |
|
35 */ |
|
36 private static final String OPTIONS_TAG = "options"; //$NON-NLS-1$ |
|
37 |
|
38 /** |
|
39 * Constructor |
|
40 * |
|
41 * @param model |
|
42 * the model |
|
43 */ |
|
44 OptionsHandler(DictionaryDecodeModel model) { |
|
45 super(model, OPTIONS_TAG); |
|
46 } |
|
47 |
|
48 /* |
|
49 * (non-Javadoc) |
|
50 * |
|
51 * @see |
|
52 * com.nokia.trace.dictionary.model.handlers.BaseHandler#processStartElement |
|
53 * (org.xml.sax.Attributes, |
|
54 * com.nokia.trace.dictionary.model.DictionaryContentHandler) |
|
55 */ |
|
56 @Override |
|
57 public void processStartElement(Attributes atts, |
|
58 DictionaryContentHandler handler) { |
|
59 handler.getVariables().setInsideMetadataBlock(true); |
|
60 } |
|
61 |
|
62 /* |
|
63 * (non-Javadoc) |
|
64 * |
|
65 * @see |
|
66 * com.nokia.trace.dictionary.model.handlers.BaseHandler#processEndElement |
|
67 * (java.lang.StringBuffer, java.lang.Object, |
|
68 * com.nokia.trace.dictionary.model.DictionaryContentHandler, |
|
69 * com.nokia.trace.dictionary.model.DecodeObject) |
|
70 */ |
|
71 @Override |
|
72 public void processEndElement(StringBuffer elementContent, |
|
73 Object unFinishedObject, DictionaryContentHandler handler, |
|
74 DecodeObject parentObject) { |
|
75 handler.getVariables().setInsideMetadataBlock(false); |
|
76 } |
|
77 |
|
78 } |