001: /***************************************************************
002: * This file is part of the [fleXive](R) project.
003: *
004: * Copyright (c) 1999-2008
005: * UCS - unique computing solutions gmbh (http://www.ucs.at)
006: * All rights reserved
007: *
008: * The [fleXive](R) project is free software; you can redistribute
009: * it and/or modify it under the terms of the GNU General Public
010: * License as published by the Free Software Foundation;
011: * either version 2 of the License, or (at your option) any
012: * later version.
013: *
014: * The GNU General Public License can be found at
015: * http://www.gnu.org/copyleft/gpl.html.
016: * A copy is found in the textfile GPL.txt and important notices to the
017: * license from the author are found in LICENSE.txt distributed with
018: * these libraries.
019: *
020: * This library is distributed in the hope that it will be useful,
021: * but WITHOUT ANY WARRANTY; without even the implied warranty of
022: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
023: * GNU General Public License for more details.
024: *
025: * For further information about UCS - unique computing solutions gmbh,
026: * please see the company website: http://www.ucs.at
027: *
028: * For further information about [fleXive](R), please see the
029: * project website: http://www.flexive.org
030: *
031: *
032: * This copyright notice MUST APPEAR in all copies of the file!
033: ***************************************************************/package com.flexive.shared.media.impl;
034:
035: import com.flexive.shared.media.FxMetadata;
036: import com.flexive.shared.media.FxMediaType;
037:
038: import javax.xml.stream.XMLStreamWriter;
039: import java.util.List;
040: import java.util.ArrayList;
041: import java.util.Collections;
042:
043: /**
044: * Metadata for unknown formats
045: *
046: * @author Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
047: * @version $Rev
048: */
049: public class FxUnknownMetadataImpl extends FxMetadata {
050:
051: private final static List<FxMetadataItem> empytmeta = Collections
052: .unmodifiableList(new ArrayList<FxMetadataItem>(0));
053: private String mimeType;
054: private String filename;
055:
056: /**
057: * Ctor
058: *
059: * @param mimeType mimetype
060: * @param filename filename or <code>null</code>
061: */
062: public FxUnknownMetadataImpl(String mimeType, String filename) {
063: this .mimeType = mimeType;
064: this .filename = filename;
065: }
066:
067: /**
068: * {@inheritDoc}
069: */
070: public FxMediaType getMediaType() {
071: return FxMediaType.Unknown;
072: }
073:
074: /**
075: * {@inheritDoc}
076: */
077: public String getMimeType() {
078: return mimeType;
079: }
080:
081: /**
082: * {@inheritDoc}
083: */
084: public String getFilename() {
085: return filename;
086: }
087:
088: /**
089: * {@inheritDoc}
090: */
091: public List<FxMetadataItem> getMetadata() {
092: return empytmeta;
093: }
094:
095: /**
096: * {@inheritDoc}
097: */
098: protected void writeXMLTags(XMLStreamWriter writer) {
099: //nothing to do
100: }
101: }
|