org.odftoolkit.odfdom.pkg.manifest
Class OdfFileEntry

java.lang.Object
  extended by org.odftoolkit.odfdom.pkg.manifest.OdfFileEntry

public class OdfFileEntry
extends Object


Constructor Summary
OdfFileEntry(FileEntryElement fileEntryElement)
           
 
Method Summary
 OdfFileEntry getCopy()
           
 EncryptionDataElement getEncryptionData()
           
 String getMediaTypeString()
           
static String getMediaTypeString(String fileRef)
          Get the media type from the given file reference
 FileEntryElement getOdfElement()
          Gets the OdfElement of this OdfFileEntry.
 String getPath()
           
 Integer getSize()
          Get the size.
 void setEncryptionData(EncryptionDataElement encryptionData)
           
 void setMediaTypeString(String mediaType)
           
 void setPath(String path)
           
 void setSize(Integer size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OdfFileEntry

public OdfFileEntry(FileEntryElement fileEntryElement)
Parameters:
fileEntryElement - the OdfElement of the
Method Detail

getCopy

public OdfFileEntry getCopy()

setPath

public void setPath(String path)

getPath

public String getPath()

setMediaTypeString

public void setMediaTypeString(String mediaType)
Parameters:
mediaType - of the file. Use null or an empty string to unset the mediaType to an empty string.

getMediaTypeString

public String getMediaTypeString()
Returns:
the mediatype of the mandatory <manifest:file-entry> attribute. If no mediatype exists an empty string is returned

getMediaTypeString

public static String getMediaTypeString(String fileRef)
Get the media type from the given file reference

Parameters:
fileRef - the reference to the file the media type is questioned
Returns:
the mediaType string of the given file reference

setSize

public void setSize(Integer size)

getSize

public Integer getSize()
Get the size.


setEncryptionData

public void setEncryptionData(EncryptionDataElement encryptionData)

getEncryptionData

public EncryptionDataElement getEncryptionData()
Returns:
null if no encryption data had been set

getOdfElement

public FileEntryElement getOdfElement()
Gets the OdfElement of this OdfFileEntry.

Returns:
the OdfElement of this OdfFileEntry.


Copyright © 2008-2017 The Apache Software Foundation. All Rights Reserved.