org.mycore.datamodel.ifs
Class MCRFileContentType

java.lang.Object
  extended by org.mycore.datamodel.ifs.MCRFileContentType

public class MCRFileContentType
extends Object

Instances of this class represent information about the content type of a file.

Author:
Frank Lützenkirchen

Field Summary
protected  String ID
          The unique ID of this file content type
protected  String label
          The label of this file content type
protected  String mimeType
          The MIME type used to deliver this file type to a client browser
protected  String url
          The URL where information such as a plug-in download page can be found
 
Constructor Summary
MCRFileContentType(String ID, String label, String url, String mimeType)
          Constructs a new file content type instance.
 
Method Summary
 String getID()
          Returns the unique ID of this file content type
 String getLabel()
          Returns the label of this file content type
 String getMimeType()
          Returns the MIME type used to deliver this file type to a client browser.
 String getURL()
          Returns the URL where additional information like a plug-in download page can be found
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

protected String ID
The unique ID of this file content type


label

protected String label
The label of this file content type


url

protected String url
The URL where information such as a plug-in download page can be found


mimeType

protected String mimeType
The MIME type used to deliver this file type to a client browser

Constructor Detail

MCRFileContentType

MCRFileContentType(String ID,
                   String label,
                   String url,
                   String mimeType)
Constructs a new file content type instance. The list of known file content types is defined in an XML file that is specified in the property MCR.IFS.FileContentTypes.DefinitionFile, and that file is searched in the CLASSPATH directories or JAR files and parsed by MCRFileContentTypeFactory.

Parameters:
ID - the unique content type ID
label - the label of this content type
url - the url where information like a plug-in can be found
mimeType - the MIME type used for this content type
See Also:
MCRFileContentTypeFactory
Method Detail

getID

public String getID()
Returns the unique ID of this file content type

Returns:
the unique ID of this file content type

getLabel

public String getLabel()
Returns the label of this file content type

Returns:
the label of this file content type

getMimeType

public String getMimeType()
Returns the MIME type used to deliver this file type to a client browser. If no MIME type is set, the default type "application/octet-stream" for binary content is returned.

Returns:
the MIME type used to deliver this file type to a client browser

getURL

public String getURL()
Returns the URL where additional information like a plug-in download page can be found

Returns:
the URL of additional information, or null

toString

public String toString()
Overrides:
toString in class Object