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.xslt; 25 26 import org.openoffice.xmerge.converter.xml.OfficeDocument; 27 28 /** 29 * This class is an implementation of <code>OfficeDocument</code> for 30 * the generic office format. 31 */ 32 public class GenericOfficeDocument extends OfficeDocument { 33 34 /** 35 * Constructor with arguments to set <code>name</code>. 36 * 37 * @param name The name of the <code>Document</code> 38 */ GenericOfficeDocument(String name)39 public GenericOfficeDocument(String name) { 40 super(name); 41 } 42 43 44 /** 45 * Constructor with arguments to set <code>name</code>, the 46 * <code>namespaceAware</code> flag, and the <code>validating</code> 47 * flag. 48 * 49 * @param name The name of the <code>Document</code>. 50 * @param namespaceAware The value of the <code>namespaceAware</code> 51 * flag. 52 * @param validating The value of the <code>validating</code> flag. 53 */ GenericOfficeDocument(String name, boolean namespaceAware, boolean validating)54 public GenericOfficeDocument(String name, boolean namespaceAware, boolean validating) { 55 56 super(name, namespaceAware, validating); 57 } 58 59 /** 60 * Returns the Office file extension for the generic format. 61 * 62 * @return The Office file extension for the generic format. 63 */ getFileExtension()64 protected String getFileExtension() { 65 return ""; 66 } 67 68 /** 69 * Returns the Office attribute for the generic format. 70 * 71 * @return The Office attribute for the generic format. 72 */ getOfficeClassAttribute()73 protected String getOfficeClassAttribute() { 74 75 return ""; 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 String getDocumentMimeType() { 84 /* TODO: Determine the MIME-type from the input. */ 85 return ""; 86 } 87 88 } 89 90