|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.ifs.MCROldFile
public class MCROldFile
Represents a stored file with its metadata and content. USED BY MILESS 1.3 ONLY!
| Field Summary | |
|---|---|
protected MCRAudioVideoExtender |
avExtender
Deprecated. The optional extender for streaming audio/video files |
protected String |
contentTypeID
Deprecated. The ID of the content type of this file |
protected GregorianCalendar |
lastModified
Deprecated. The date of last modification of this file |
protected String |
md5
Deprecated. The md5 checksum that was built when content was read for this file |
static String |
oldFileEvent
Deprecated. |
protected String |
ownerID
Deprecated. The ID of the file owner, e .g. |
protected String |
path
Deprecated. The file path |
protected long |
size
Deprecated. The file size in number of bytes |
protected String |
storageID
Deprecated. The ID that identifies the place where the store holds the content |
protected String |
storeID
Deprecated. The ID of the store that holds this file's content |
| Constructor Summary | |
|---|---|
MCROldFile()
Deprecated. Creates a new empty, unstored MCROldFile instance. |
|
| Method Summary | |
|---|---|
void |
deleteContent()
Deprecated. Deletes the content of this file from the ContentStore used |
MCRAudioVideoExtender |
getAudioVideoExtender()
Deprecated. Returns the AudioVideoExtender in case this file is streaming audio/video and stored in a ContentStore that supports this |
String |
getChecksum()
Deprecated. Returns the MD5 checksum for this file |
byte[] |
getContentAsByteArray()
Deprecated. Gets the content of this file as a byte array |
InputStream |
getContentAsInputStream()
Deprecated. Gets an InputStream to read the content of this file from the underlying store. |
Document |
getContentAsJDOM()
Deprecated. |
String |
getContentAsString()
Deprecated. Gets the content of this file as a string, using the default encoding |
String |
getContentAsString(String encoding)
Deprecated. Gets the content of this file as a string, using the given encoding |
protected MCRContentStore |
getContentStore()
Deprecated. Returns the MCRContentStore instance that holds the content of this file |
void |
getContentTo(File target)
Deprecated. Writes the content of this file to a file on the local filesystem |
void |
getContentTo(OutputStream target)
Deprecated. Writes the content of this file to a target output stream |
MCRFileContentType |
getContentType()
Deprecated. This method will throw an UnsupportedOperationException, it is not implemented for MCROldFile class. |
String |
getContentTypeID()
Deprecated. Gets the ID of the content type of this file |
String |
getDirectory()
Deprecated. Returns the directory of this file |
String |
getExtension()
Deprecated. Returns the file extension of this file, or an empty string if the file has no extension |
String |
getFileName()
Deprecated. Returns the filename of this file |
String |
getID()
Deprecated. Returns the ID of this file |
GregorianCalendar |
getLastModified()
Deprecated. Returns the time of last modification of this file |
String |
getOwnerID()
Deprecated. Returns the ID of the owner of this file |
String |
getPath()
Deprecated. Returns the relative path of this file |
long |
getSize()
Deprecated. Returns the file size as number of bytes |
String |
getSizeFormatted()
Deprecated. Returns the file size, formatted as a string |
static String |
getSizeFormatted(long bytes)
Deprecated. Takes a file size in bytes and formats it as a string for output |
String |
getStorageID()
Deprecated. Returns the storage ID that identifies the place where the MCRContentStore has stored the content of this file |
String |
getStoreID()
Deprecated. Returns the ID of the MCRContentStore implementation that holds the content of this file |
boolean |
hasAudioVideoExtender()
Deprecated. Returns true, if this file is stored in a content store that provides an MCRAudioVideoExtender for audio/video streaming and additional metadata |
void |
repairSearch()
Deprecated. |
void |
setChecksum(String md5)
Deprecated. Sets the MD5 checksum for this file |
void |
setContentFrom(MCRContentInputStream source,
MCRContentStore store)
Deprecated. Reads the content of this file from the source ContentInputStream and stores it in the ContentStore given |
void |
setContentTypeID(String ID)
Deprecated. Sets the ID of the content type of this file |
void |
setLastModified(GregorianCalendar date)
Deprecated. Sets the time of last modification of this file |
void |
setOwnerID(String ID)
Deprecated. Sets the ID of the owner of this file |
void |
setPath(String path)
Deprecated. Sets the relative path of this file |
void |
setSize(long size)
Deprecated. Sets the file size |
void |
setStorageID(String ID)
Deprecated. Sets the storage ID that identifies the place where the MCRContentStore has stored the content of this file |
void |
setStoreID(String ID)
Deprecated. Sets the ID of the MCRContentStore implementation that holds the content of this file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String storeID
protected String storageID
protected String ownerID
protected String contentTypeID
protected String path
protected String md5
protected long size
protected GregorianCalendar lastModified
protected MCRAudioVideoExtender avExtender
public static final String oldFileEvent
| Constructor Detail |
|---|
public MCROldFile()
| Method Detail |
|---|
public void setOwnerID(String ID)
ID - the non-empty owner IDpublic String getOwnerID()
public String getID()
MCRFileReader
getID in interface MCRFileReaderpublic void setPath(String path)
public String getPath()
getPath in interface MCRFileReaderpublic String getFileName()
public String getDirectory()
public String getExtension()
getExtension in interface MCRFileReaderpublic void setSize(long size)
public long getSize()
getSize in interface MCRFileReaderpublic String getSizeFormatted()
public static String getSizeFormatted(long bytes)
public void setChecksum(String md5)
public String getChecksum()
public void setLastModified(GregorianCalendar date)
public GregorianCalendar getLastModified()
public void setStoreID(String ID)
public String getStoreID()
getStoreID in interface MCRFileReaderpublic void setStorageID(String ID)
public String getStorageID()
getStorageID in interface MCRFileReaderprotected MCRContentStore getContentStore()
public void setContentFrom(MCRContentInputStream source,
MCRContentStore store)
throws MCRPersistenceException
MCRPersistenceException
public void deleteContent()
throws MCRPersistenceException
MCRPersistenceException
public void getContentTo(OutputStream target)
throws MCRPersistenceException
MCRPersistenceException
public void getContentTo(File target)
throws MCRPersistenceException,
IOException
MCRPersistenceException
IOException
public byte[] getContentAsByteArray()
throws MCRPersistenceException
MCRPersistenceException
public String getContentAsString()
throws MCRPersistenceException
MCRPersistenceException
public String getContentAsString(String encoding)
throws MCRPersistenceException,
UnsupportedEncodingException
MCRPersistenceException
UnsupportedEncodingExceptionpublic boolean hasAudioVideoExtender()
public MCRAudioVideoExtender getAudioVideoExtender()
public void setContentTypeID(String ID)
public String getContentTypeID()
getContentTypeID in interface MCRFileReaderpublic MCRFileContentType getContentType()
getContentType in interface MCRFileReader
public InputStream getContentAsInputStream()
throws IOException
IOException
public Document getContentAsJDOM()
throws MCRPersistenceException,
IOException,
JDOMException
MCRPersistenceException
IOException
JDOMExceptionpublic void repairSearch()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||