1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 package org.openoffice.xmerge.converter.xml;
25 
26 /**
27  *  This interface contains constants for StarOffice XML tags,
28  *  attributes (StarCalc cell types, etc.).
29  *
30  *  @author      Herbie Ong, Paul Rank, Martin Maher
31  */
32 public interface OfficeConstants {
33 
34     /** Element tag for <i>office:document</i>, this is the root tag. */
35     public final static String TAG_OFFICE_DOCUMENT = "office:document";
36 
37     /**
38      *  Element tag for <i>office:document-content</i>, this is the root
39      *  tag in content.xml.
40      */
41     public final static String TAG_OFFICE_DOCUMENT_CONTENT = "office:document-content";
42 
43     /**
44      *  Element tag for <i>office:document-settings</i>, this is the root
45      *  tag in content.xml.
46      */
47     public final static String TAG_OFFICE_DOCUMENT_SETTINGS= "office:document-settings";
48 
49      /**
50      *  Element tag for <i>office:document-meta</i>, this is the root
51      *  tag in content.xml.
52      */
53     public final static String TAG_OFFICE_DOCUMENT_META= "office:document-meta";
54 
55     /**
56      *  Element tag for <i>office:document-styles</i>, this is the root tag
57      *  in styles.xml.
58      */
59     public final static String TAG_OFFICE_DOCUMENT_STYLES = "office:document-styles";
60 
61     /**
62      *  Attribute tag for <i>office:class</i> of element
63      *  <i>office:document</i>.
64      */
65     public final static String ATTRIBUTE_OFFICE_CLASS = "office:class";
66 
67     /** Element tag for <i>office:styles</i>. */
68     public final static String TAG_OFFICE_STYLES = "office:styles";
69 
70 	/** Element tag for <i>office:meta</i>. */
71     public final static String TAG_OFFICE_META = "office:meta";
72 
73     /** Element tag for <i>office:automatic-styles</i>. */
74     public final static String TAG_OFFICE_AUTOMATIC_STYLES = "office:automatic-styles";
75 
76     /** Element tag for <i>office:master-styles</i>. */
77     public final static String TAG_OFFICE_MASTER_STYLES = "office:master-styles";
78 
79     /** Element tag for <i>office:body</i>. */
80     public final static String TAG_OFFICE_BODY = "office:body";
81 
82     /** Element tag for <i>office:settings</i>. */
83     public final static String TAG_OFFICE_SETTINGS = "office:settings";
84 
85  //Adding
86 
87     /** Element tag for <i>text:variable-set</i>. */
88     public final static String TAG_TEXT_VARIABLE_SET = "text:variable-set";
89 
90   /** Element tag for <i>text:variable-get</i>. */
91     public final static String TAG_TEXT_VARIABLE_GET = "text:variable-get";
92 /** Element tag for <i>text:expression</i>. */
93     public final static String TAG_TEXT_EXPRESSION = "text:expression";
94 
95 /** Element tag for <i>text:user-field-get</i>. */
96     public final static String TAG_TEXT_USER_FIELD_GET = "text:user-field-get";
97 
98 /** Element tag for <i>text:page-variable-get</i>. */
99     public final static String TAG_TEXT_PAGE_VARIABLE_GET = "text:page-variable-get";
100 /** Element tag for <i>text:sequence</i>. */
101     public final static String TAG_TEXT_SEQUENCE = "text:sequence";
102 
103      /** Element tag for <i>text:text-input</i>. */
104     public final static String TAG_TEXT_VARIABLE_INPUT = "text:variable-input";
105      /** Element tag for <i>text:time</i>. */
106      public final static String TAG_TEXT_TIME = "text:time";
107 
108     /** Element tag for <i>text:page-count</i>. */
109      public final static String TAG_TEXT_PAGE_COUNT = "text:page-count";
110     /** Element tag for <i>text:page-number</i>. */
111      public final static String TAG_TEXT_PAGE_NUMBER = "text:page-number";
112     /** Element tag for <i>text:author-initials</i>. */
113      public final static String TAG_TEXT_AUTHOR_INITIALS = "text:author-initials";
114     /** Element tag for <i>text:subject</i>. */
115      public final static String TAG_TEXT_SUBJECT = "text:subject";
116     /** Element tag for <i>text:title</i>. */
117      public final static String TAG_TEXT_TITLE = "text:title";
118     /** Element tag for <i>text:creation-time</i>. */
119      public final static String TAG_TEXT_CREATION_TIME = "text:creation-time";
120 
121     /** Element tag for <i>text:date</i>. */
122      public final static String TAG_TEXT_DATE = "text:date";
123     /** Element tag for <i>text:text-input</i>. */
124      public final static String TAG_TEXT_TEXT_INPUT = "text:text-input";
125 
126 
127 //end adding
128 
129     /** Element tag for <i>office:font-decls</i>. */
130     public final static String TAG_OFFICE_FONT_DECLS = "office:font-decls";
131 
132     /** Element tag for <i>style:font-decl</i>. */
133     public final static String TAG_STYLE_FONT_DECL = "style:font-decl";
134 
135     /** Attribute tag for <i>style:name</i> of element <i>style:name</i>. */
136     public final static String ATTRIBUTE_STYLE_NAME = "style:name";
137 
138     /**
139      *  Attribute tag for <i>style:font-pitch</i> of element
140      *  <i>style:font-pitch</i>.
141      */
142     public final static String ATTRIBUTE_STYLE_FONT_PITCH = "style:font-pitch";
143 
144     /**
145      *  Attribute tag for <i>fo:font-family</i> of element
146      *  <i>fo:font-family</i>.
147      */
148     public final static String ATTRIBUTE_FO_FONT_FAMILY = "fo:font-family";
149 
150     /**
151      *  Attribute tag for <i>fo:font-family</i> of element
152      *  <i>fo:font-family</i>.
153      */
154     public final static String ATTRIBUTE_FO_FONT_FAMILY_GENERIC = "fo:font-family-generic";
155 
156     /** Element tag for <i>text:p</i>. */
157     public final static String TAG_PARAGRAPH = "text:p";
158 
159     /** Element tag for <i>text:</i>. */
160     public final static String TAG_TEXT = "text:";
161 
162     /** Element tag for <i>text:h</i>. */
163     public final static String TAG_HEADING = "text:h";
164 
165     /** Element tag for <i>text:s</i>. */
166     public final static String TAG_SPACE = "text:s";
167 
168     /** Element tag for <i>text:tab-stop</i>. */
169     public final static String TAG_TAB_STOP = "text:tab-stop";
170 
171     /** Element tag for <i>text:line-break</i>. */
172     public final static String TAG_LINE_BREAK = "text:line-break";
173 
174     /** Element tag for <i>text:span</i>. */
175     public final static String TAG_SPAN = "text:span";
176 
177     /** Element tag for <i>text:a</i>. */
178     public final static String TAG_HYPERLINK = "text:a";
179 
180     /** Element tag for <i>text:bookmark</i>. */
181     public final static String TAG_BOOKMARK = "text:bookmark";
182 
183     /** Element tag for <i>text:bookmark-start</i>. */
184     public final static String TAG_BOOKMARK_START = "text:bookmark-start";
185 
186     /** Element tag for <i>text:unordered-list</i>. */
187     public final static String TAG_UNORDERED_LIST = "text:unordered-list";
188 
189     /** Element tag for <i>text:ordered-list</i>. */
190     public final static String TAG_ORDERED_LIST = "text:ordered-list";
191 
192     /** Element tag for <i>text:list-header</i>. */
193     public final static String TAG_LIST_HEADER = "text:list-header";
194 
195     /** Element tag for <i>text:list-item</i>. */
196     public final static String TAG_LIST_ITEM = "text:list-item";
197 
198     /** Attribute tag for <i>text:c</i> of element <i>text:s</i>. */
199     public final static String ATTRIBUTE_SPACE_COUNT = "text:c";
200 
201     /**
202      * Attribute tag for <i>text:style-name</i> of element
203      *  <i>text:style-name</i>.
204      */
205     public final static String ATTRIBUTE_TEXT_STYLE_NAME = "text:style-name";
206 
207     /** Element tag for <i>table:table</i>. */
208     public final static String TAG_TABLE = "table:table";
209 
210     /** Element tag for <i>table:named-expression</i>. */
211     public final static String TAG_NAMED_EXPRESSIONS = "table:named-expressions";
212 
213     /** Element tag for <i>table:named-range</i>. */
214     public final static String TAG_TABLE_NAMED_RANGE= "table:named-range";
215 
216     /** Element tag for <i>table:named-expression</i>. */
217     public final static String TAG_TABLE_NAMED_EXPRESSION= "table:named-expression";
218 
219 	/**
220      *  Attribute tag for <i>table:name</i> of element
221      *  <i>table:table</i>.
222      */
223     public final static String ATTRIBUTE_TABLE_NAME = "table:name";
224 
225     /**
226      *  Attribute tag for <i>table:expression</i> of element
227      *  <i>table:named-range</i>.
228      */
229     public final static String ATTRIBUTE_TABLE_EXPRESSION = "table:expression";
230 
231     /**
232      *  Attribute tag for <i>table:base-cell-address</i> of element
233      *  <i>table:named-range</i>.
234      */
235     public final static String ATTRIBUTE_TABLE_BASE_CELL_ADDRESS = "table:base-cell-address";
236 
237 	/**
238      *  Attribute tag for <i>table:cell-range-address</i> of element
239      *  <i>table:named-range</i>.
240      */
241     public final static String ATTRIBUTE_TABLE_CELL_RANGE_ADDRESS = "table:cell-range-address";
242 
243     /** Element tag for <i>table:table-row</i>. */
244     public final static String TAG_TABLE_ROW = "table:table-row";
245 
246     /** Element tag for <i>table:table-column</i>. */
247     public final static String TAG_TABLE_COLUMN = "table:table-column";
248 
249 	/**
250 	*  Attribute tag for <i>table:default-cell-style-name</i>
251 	*  of element <i>table:table-column</i>.
252 	*/
253 	public final static String ATTRIBUTE_DEFAULT_CELL_STYLE = "table:default-cell-style-name";
254 
255     /** Element tag for <i>table:scenario</i>. */
256     public final static String TAG_TABLE_SCENARIO = "table:scenario";
257 
258     /** Element tag for <i>table:table-cell</i>. */
259     public final static String TAG_TABLE_CELL = "table:table-cell";
260 
261     /**
262      *  Attribute tag for <i>table:value-type</i> of element
263      *  <i>table:table-cell</i>.
264      */
265     public final static String ATTRIBUTE_TABLE_VALUE_TYPE = "table:value-type";
266 
267     /**
268      *  Attribute tag for <i>table:number-columns-repeated</i>
269      *  of element <i>table:table-cell</i>.
270      */
271     public final static String ATTRIBUTE_TABLE_NUM_COLUMNS_REPEATED =
272         "table:number-columns-repeated";
273 
274     /**
275      *  Attribute tag for <i>table:number-rows-repeated</i>
276      *  of element <i>table:table-row</i>.
277      */
278     public final static String ATTRIBUTE_TABLE_NUM_ROWS_REPEATED =
279         "table:number-rows-repeated";
280 
281     /**
282      *  Attribute tag for <i>table:formula</i> of element
283      *  <i>table:table-cell</i>.
284      */
285     public final static String ATTRIBUTE_TABLE_FORMULA = "table:formula";
286 
287     /**
288      *  Attribute tag for <i>table:value</i> of element
289      *  <i>table:table-cell</i>.
290      */
291     public final static String ATTRIBUTE_TABLE_VALUE = "table:value";
292 
293     /**
294      *  Attribute tag for <i>table:date-value</i> of element
295      *  <i>table:table-cell</i>.
296      */
297     public final static String ATTRIBUTE_TABLE_DATE_VALUE = "table:date-value";
298 
299     /**
300      *  Attribute tag for <i>table:time-value</i> of element
301      *  <i>table:table-cell</i>.
302      */
303     public final static String ATTRIBUTE_TABLE_TIME_VALUE = "table:time-value";
304 
305     /**
306      *  Attribute tag for <i>table:string-value</i> of element
307      *  <i>table:table-cell</i>.
308      */
309     public final static String ATTRIBUTE_TABLE_STRING_VALUE =
310         "table:string-value";
311 
312     /**
313      *  Attribute tag for <i>table:time-boolean-value</i> of element
314      *  <i>table:table-cell</i>.
315      */
316     public final static String ATTRIBUTE_TABLE_BOOLEAN_VALUE =
317         "table:boolean-value";
318 
319     /** Attribute tag for <i>table:style-name</i> of table elements. */
320     public final static String ATTRIBUTE_TABLE_STYLE_NAME = "table:style-name";
321 
322     /**
323      *  Attribute tag for <i>table:currency</i> of element
324      *  <i>table:table-cell</i>.
325      */
326     public final static String ATTRIBUTE_TABLE_CURRENCY = "table:currency";
327 
328     /** The cell contains data of type <i>string</i>. */
329     public final static String CELLTYPE_STRING = "string";
330 
331     /** The cell contains data of type <i>float</i>. */
332     public final static String CELLTYPE_FLOAT = "float";
333 
334     /** The cell contains data of type <i>time</i>. */
335     public final static String CELLTYPE_TIME = "time";
336 
337     /** The cell contains data of type <i>date</i>. */
338     public final static String CELLTYPE_DATE = "date";
339 
340     /** The cell contains data of type <i>currency</i>. */
341     public final static String CELLTYPE_CURRENCY = "currency";
342 
343     /** The cell contains data of type <i>boolean</i>. */
344     public final static String CELLTYPE_BOOLEAN = "boolean";
345 
346     /** The cell contains data of type <i>percent</i>. */
347     public final static String CELLTYPE_PERCENT = "percentage";
348 
349     /** StarWriter XML file extension. */
350     public final static String SXW_FILE_EXTENSION = ".sxw";
351 
352     /** StarWriter XML <i>office:class</i> value. */
353     public final static String SXW_TYPE = "text";
354 
355     /** StarCalc XML file extension. */
356     public final static String SXC_FILE_EXTENSION = ".sxc";
357 
358     /** StarCalc XML <i>office:class</i> value. */
359     public final static String SXC_TYPE = "spreadsheet";
360 
361     /** Element tag for <i>manifest:manifest</i>entry in Manifest XML */
362     public final static String TAG_MANIFEST_ROOT = "manifest:manifest";
363 
364     /** Element tag for <i>manifest:file-entry</i> entry in Manifest XML. */
365     public final static String TAG_MANIFEST_FILE = "manifest:file-entry";
366 
367     /**
368      * Attribute tag for <i>manifest:media-type</i> of element
369      * <i>manifest:file-entry</i>.
370      */
371     public final static String ATTRIBUTE_MANIFEST_FILE_TYPE = "manifest:media-type";
372 
373     /**
374      * Attribute tag for <i>manifest:full-path</i> of element
375      * <i>manifest:file-entry</i>.
376      */
377     public final static String ATTRIBUTE_MANIFEST_FILE_PATH = "manifest:full-path";
378 
379 	// Tags and Elements for the settings.xml
380 
381     /** Element tag for <i>config:config-item</i>. */
382     public final static String TAG_CONFIG_ITEM = "config:config-item";
383 
384     /** Element tag for <i>config:config-item-set</i>. */
385     public final static String TAG_CONFIG_ITEM_SET = "config:config-item-set";
386 
387     /** Element tag for <i>config:config-item-map-indexed</i>. */
388     public final static String TAG_CONFIG_ITEM_MAP_INDEXED = "config:config-item-map-indexed";
389 
390     /** Element tag for <i>config:config-item-map-named</i>. */
391     public final static String TAG_CONFIG_ITEM_MAP_NAMED = "config:config-item-map-named";
392 
393     /** Element tag for <i>config:config-item-map-entry</i>. */
394     public final static String TAG_CONFIG_ITEM_MAP_ENTRY= "config:config-item-map-entry";
395 
396 	/**
397      *  Attribute tag for <i>config:name</i> of element
398      *  <i>config:config-item</i>.
399      */
400     public final static String ATTRIBUTE_CONFIG_NAME = "config:name";
401 
402 	/**
403      *  Attribute tag for <i>config:type</i> of element
404      *  <i>config:config-item</i>.
405      */
406     public final static String ATTRIBUTE_CONFIG_TYPE = "config:type";
407 
408 
409     /** StarWriter XML MIME type. */
410     public final static String SXW_MIME_TYPE = "application/vnd.sun.xml.writer";
411 
412     /** StarWriter XML Template MIME type. */
413     public final static String STW_MIME_TYPE = "application/vnd.sun.xml.writer.template";
414 
415     /** StarCalc XML MIME type. */
416     public final static String SXC_MIME_TYPE = "application/vnd.sun.xml.calc";
417 
418     /** StarCalc XML Template MIME type. */
419     public final static String STC_MIME_TYPE = "application/vnd.sun.xml.calc.template";
420 
421     /** StarImpress XML MIME type. */
422     public final static String SXI_MIME_TYPE = "application/vnd.sun.xml.impress";
423 
424     /** StarImpress XML Template MIME type. */
425     public final static String STI_MIME_TYPE = "application/vnd.sun.xml.impress.template";
426 
427     /** StarDraw XML MIME type. */
428     public final static String SXD_MIME_TYPE = "application/vnd.sun.xml.draw";
429 
430     /** StarMath XML MIME type. */
431     public final static String SXM_MIME_TYPE = "application/vnd.sun.xml.math";
432 
433     /** StarWriter Global XML MIME Type */
434     public final static String SXG_MIME_TYPE = "application/vnd.sun.xml.writer.global";
435 }
436