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.sxc;
25 
26 import org.openoffice.xmerge.converter.xml.OfficeDocument;
27 import org.openoffice.xmerge.converter.xml.OfficeConstants;
28 
29 /**
30  *  This class is an implementation of <code>OfficeDocument</code> for
31  *  the SXC format.
32  */
33 public class SxcDocument extends OfficeDocument {
34 
35     /**
36      *  Constructor with arguments to set <code>name</code>.
37      *
38      *  @param  name  The name of the <code>Document</code>
39      */
SxcDocument(String name)40     public SxcDocument(String name) {
41         super(name);
42     }
43 
44 
45     /**
46      *  Constructor with arguments to set <code>name</code>, the
47      *  <code>namespaceAware</code> flag, and the <code>validating</code>
48      *  flag.
49      *
50      *  @param  name            The name of the <code>Document</code>.
51      *  @param  namespaceAware  The value of the <code>namespaceAware</code>
52      *                          flag.
53      *  @param  validating      The value of the <code>validating</code> flag.
54      */
SxcDocument(String name, boolean namespaceAware, boolean validating)55     public SxcDocument(String name, boolean namespaceAware, boolean validating) {
56 
57         super(name, namespaceAware, validating);
58     }
59 
60     /**
61      *  Returns the Office file extension for the SXC format.
62      *
63      *  @return  The Office file extension for the SXC format.
64      */
getFileExtension()65     protected String getFileExtension() {
66         return OfficeConstants.SXC_FILE_EXTENSION;
67     }
68 
69     /**
70      *  Returns the Office attribute for the SXC format.
71      *
72      *  @return  The Office attribute for the SXC format.
73      */
getOfficeClassAttribute()74     protected String getOfficeClassAttribute() {
75         return OfficeConstants.SXC_TYPE;
76     }
77 
78     /**
79      * Method to return the MIME type of the document.
80      *
81      * @return  String  The document's MIME type.
82      */
getDocumentMimeType()83     protected final String getDocumentMimeType() {
84         return OfficeConstants.SXC_MIME_TYPE;
85     }
86 
87 }
88 
89