edu.indiana.dlib.metsnav.mets.v1_4
Class File

java.lang.Object
  extended by edu.indiana.dlib.metsnav.mets.v1_4.File
All Implemented Interfaces:
Serializable

public class File
extends Object
implements Serializable

file: File element. The file element provides access to content files for a METS object. A file element may contain one or more FLocat elements, which provide pointers to a content file, and/or an FContent element, which wraps an encoded version of the file. Note that ALL FLocat and FContent elements underneath a single file element should identify/contain identical copies of a single file.

See Also:
Serialized Form

Constructor Summary
File()
           
 
Method Summary
 void addADMID(int index, Object vADMID)
          Method addADMID
 void addADMID(Object vADMID)
          Method addADMID
 void addDMDID(int index, Object vDMDID)
          Method addDMDID
 void addDMDID(Object vDMDID)
          Method addDMDID
 void addFLocat(FLocat vFLocat)
          Method addFLocat
 void addFLocat(int index, FLocat vFLocat)
          Method addFLocat
 void clearADMID()
          Method clearADMID
 void clearDMDID()
          Method clearDMDID
 void clearFLocat()
          Method clearFLocat
 void deleteSEQ()
          Method deleteSEQ
 void deleteSIZE()
          Method deleteSIZE
 Enumeration enumerateADMID()
          Method enumerateADMID
 Enumeration enumerateDMDID()
          Method enumerateDMDID
 Enumeration enumerateFLocat()
          Method enumerateFLocat
 Object[] getADMID()
          Method getADMID
 Object getADMID(int index)
          Method getADMID
 int getADMIDCount()
          Method getADMIDCount
 String getCHECKSUM()
          Returns the value of field 'CHECKSUM'.
 FileCHECKSUMTYPEType getCHECKSUMTYPE()
          Returns the value of field 'CHECKSUMTYPE'.
 Date getCREATED()
          Returns the value of field 'CREATED'.
 Object[] getDMDID()
          Method getDMDID
 Object getDMDID(int index)
          Method getDMDID
 int getDMDIDCount()
          Method getDMDIDCount
 FContent getFContent()
          Returns the value of field 'FContent'.
 FLocat[] getFLocat()
          Method getFLocat
 FLocat getFLocat(int index)
          Method getFLocat
 int getFLocatCount()
          Method getFLocatCount
 String getGROUPID()
          Returns the value of field 'GROUPID'.
 String getID()
          Returns the value of field 'ID'.
 String getMIMETYPE()
          Returns the value of field 'MIMETYPE'.
 String getOWNERID()
          Returns the value of field 'OWNERID'.
 int getSEQ()
          Returns the value of field 'SEQ'.
 long getSIZE()
          Returns the value of field 'SIZE'.
 String getUSE()
          Returns the value of field 'USE'.
 boolean hasSEQ()
          Method hasSEQ
 boolean hasSIZE()
          Method hasSIZE
 boolean isValid()
          Method isValid
 void marshal(ContentHandler handler)
          Method marshal
 void marshal(Writer out)
          Method marshal
 boolean removeADMID(Object vADMID)
          Method removeADMID
 boolean removeDMDID(Object vDMDID)
          Method removeDMDID
 boolean removeFLocat(FLocat vFLocat)
          Method removeFLocat
 void setADMID(int index, Object vADMID)
          Method setADMID
 void setADMID(Object[] ADMIDArray)
          Method setADMID
 void setCHECKSUM(String CHECKSUM)
          Sets the value of field 'CHECKSUM'.
 void setCHECKSUMTYPE(FileCHECKSUMTYPEType CHECKSUMTYPE)
          Sets the value of field 'CHECKSUMTYPE'.
 void setCREATED(Date CREATED)
          Sets the value of field 'CREATED'.
 void setDMDID(int index, Object vDMDID)
          Method setDMDID
 void setDMDID(Object[] DMDIDArray)
          Method setDMDID
 void setFContent(FContent FContent)
          Sets the value of field 'FContent'.
 void setFLocat(FLocat[] FLocatArray)
          Method setFLocat
 void setFLocat(int index, FLocat vFLocat)
          Method setFLocat
 void setGROUPID(String GROUPID)
          Sets the value of field 'GROUPID'.
 void setID(String ID)
          Sets the value of field 'ID'.
 void setMIMETYPE(String MIMETYPE)
          Sets the value of field 'MIMETYPE'.
 void setOWNERID(String OWNERID)
          Sets the value of field 'OWNERID'.
 void setSEQ(int SEQ)
          Sets the value of field 'SEQ'.
 void setSIZE(long SIZE)
          Sets the value of field 'SIZE'.
 void setUSE(String USE)
          Sets the value of field 'USE'.
static Object unmarshal(Reader reader)
          Method unmarshal
 void validate()
          Method validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

File

public File()
Method Detail

addADMID

public void addADMID(Object vADMID)
              throws IndexOutOfBoundsException
Method addADMID

Parameters:
vADMID -
Throws:
IndexOutOfBoundsException

addADMID

public void addADMID(int index,
                     Object vADMID)
              throws IndexOutOfBoundsException
Method addADMID

Parameters:
index -
vADMID -
Throws:
IndexOutOfBoundsException

addDMDID

public void addDMDID(Object vDMDID)
              throws IndexOutOfBoundsException
Method addDMDID

Parameters:
vDMDID -
Throws:
IndexOutOfBoundsException

addDMDID

public void addDMDID(int index,
                     Object vDMDID)
              throws IndexOutOfBoundsException
Method addDMDID

Parameters:
index -
vDMDID -
Throws:
IndexOutOfBoundsException

addFLocat

public void addFLocat(FLocat vFLocat)
               throws IndexOutOfBoundsException
Method addFLocat

Parameters:
vFLocat -
Throws:
IndexOutOfBoundsException

addFLocat

public void addFLocat(int index,
                      FLocat vFLocat)
               throws IndexOutOfBoundsException
Method addFLocat

Parameters:
index -
vFLocat -
Throws:
IndexOutOfBoundsException

clearADMID

public void clearADMID()
Method clearADMID


clearDMDID

public void clearDMDID()
Method clearDMDID


clearFLocat

public void clearFLocat()
Method clearFLocat


deleteSEQ

public void deleteSEQ()
Method deleteSEQ


deleteSIZE

public void deleteSIZE()
Method deleteSIZE


enumerateADMID

public Enumeration enumerateADMID()
Method enumerateADMID

Returns:
Enumeration

enumerateDMDID

public Enumeration enumerateDMDID()
Method enumerateDMDID

Returns:
Enumeration

enumerateFLocat

public Enumeration enumerateFLocat()
Method enumerateFLocat

Returns:
Enumeration

getADMID

public Object getADMID(int index)
                throws IndexOutOfBoundsException
Method getADMID

Parameters:
index -
Returns:
Object
Throws:
IndexOutOfBoundsException

getADMID

public Object[] getADMID()
Method getADMID

Returns:
Object

getADMIDCount

public int getADMIDCount()
Method getADMIDCount

Returns:
int

getCHECKSUM

public String getCHECKSUM()
Returns the value of field 'CHECKSUM'. The field 'CHECKSUM' has the following description: CHECKSUM: an optional string attribute providing a checksum value for the included file.

Returns:
String

getCHECKSUMTYPE

public FileCHECKSUMTYPEType getCHECKSUMTYPE()
Returns the value of field 'CHECKSUMTYPE'. The field 'CHECKSUMTYPE' has the following description: CHECKSUMTYPE: an optional attribute specifying the checksum algorithm used to produce the value contained in the CHECKSUM attribute. CHECKSUMTYPE must contain one of the following values: HAVAL MD5 SHA-1 SHA-256 SHA-384 SHA-512 TIGER WHIRLPOOL

Returns:
FileCHECKSUMTYPEType

getCREATED

public Date getCREATED()
Returns the value of field 'CREATED'. The field 'CREATED' has the following description: CREATED: an optional dateTime providing the date of creation for the file.

Returns:
Date

getDMDID

public Object getDMDID(int index)
                throws IndexOutOfBoundsException
Method getDMDID

Parameters:
index -
Returns:
Object
Throws:
IndexOutOfBoundsException

getDMDID

public Object[] getDMDID()
Method getDMDID

Returns:
Object

getDMDIDCount

public int getDMDIDCount()
Method getDMDIDCount

Returns:
int

getFContent

public FContent getFContent()
Returns the value of field 'FContent'. The field 'FContent' has the following description: FContent: file content. The FContent element is used to deliver a content file for a METS document within the METS file itself. The content file must be either Base 64 encoded, and contained within the subsidiary binData wrapper element, or consist of XML information and be contained within the subsidiary xmlData wrapper element.

Returns:
FContent

getFLocat

public FLocat getFLocat(int index)
                 throws IndexOutOfBoundsException
Method getFLocat

Parameters:
index -
Returns:
FLocat
Throws:
IndexOutOfBoundsException

getFLocat

public FLocat[] getFLocat()
Method getFLocat

Returns:
FLocat

getFLocatCount

public int getFLocatCount()
Method getFLocatCount

Returns:
int

getGROUPID

public String getGROUPID()
Returns the value of field 'GROUPID'. The field 'GROUPID' has the following description: GROUPID: an optional string attribute which may be used to record an identifier that establishes a correspondence between this file and files in other file groups. For example, a master image in one file group would share the same GROUPID value with a reference copy in a second file group and a thumbnail image in a third file group.

Returns:
String

getID

public String getID()
Returns the value of field 'ID'. The field 'ID' has the following description: ID: an XML ID value.

Returns:
String

getMIMETYPE

public String getMIMETYPE()
Returns the value of field 'MIMETYPE'. The field 'MIMETYPE' has the following description: MIMETYPE: an optional string attribute providing the MIME type for the file.

Returns:
String

getOWNERID

public String getOWNERID()
Returns the value of field 'OWNERID'. The field 'OWNERID' has the following description: OWNERID: an optional string attribute which may be used to provide a unique identifier (including a URI) assigned to the file which may differ from the URI used to retrieve the file.

Returns:
String

getSEQ

public int getSEQ()
Returns the value of field 'SEQ'. The field 'SEQ' has the following description: SEQ: an optional integer indicating the sequence of this file relative to the others in its file group.

Returns:
int

getSIZE

public long getSIZE()
Returns the value of field 'SIZE'. The field 'SIZE' has the following description: SIZE: an optional long integer specifying the size of the file in bytes.

Returns:
long

getUSE

public String getUSE()
Returns the value of field 'USE'. The field 'USE' has the following description: USE: an optional string attribute indicating the intended use of this file (e.g., "master", "reference", "thumbnail" for image files).

Returns:
String

hasSEQ

public boolean hasSEQ()
Method hasSEQ

Returns:
boolean

hasSIZE

public boolean hasSIZE()
Method hasSIZE

Returns:
boolean

isValid

public boolean isValid()
Method isValid

Returns:
boolean

marshal

public void marshal(Writer out)
             throws MarshalException,
                    ValidationException
Method marshal

Parameters:
out -
Throws:
MarshalException
ValidationException

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    MarshalException,
                    ValidationException
Method marshal

Parameters:
handler -
Throws:
IOException
MarshalException
ValidationException

removeADMID

public boolean removeADMID(Object vADMID)
Method removeADMID

Parameters:
vADMID -
Returns:
boolean

removeDMDID

public boolean removeDMDID(Object vDMDID)
Method removeDMDID

Parameters:
vDMDID -
Returns:
boolean

removeFLocat

public boolean removeFLocat(FLocat vFLocat)
Method removeFLocat

Parameters:
vFLocat -
Returns:
boolean

setADMID

public void setADMID(int index,
                     Object vADMID)
              throws IndexOutOfBoundsException
Method setADMID

Parameters:
index -
vADMID -
Throws:
IndexOutOfBoundsException

setADMID

public void setADMID(Object[] ADMIDArray)
Method setADMID

Parameters:
ADMIDArray -

setCHECKSUM

public void setCHECKSUM(String CHECKSUM)
Sets the value of field 'CHECKSUM'. The field 'CHECKSUM' has the following description: CHECKSUM: an optional string attribute providing a checksum value for the included file.

Parameters:
CHECKSUM - the value of field 'CHECKSUM'.

setCHECKSUMTYPE

public void setCHECKSUMTYPE(FileCHECKSUMTYPEType CHECKSUMTYPE)
Sets the value of field 'CHECKSUMTYPE'. The field 'CHECKSUMTYPE' has the following description: CHECKSUMTYPE: an optional attribute specifying the checksum algorithm used to produce the value contained in the CHECKSUM attribute. CHECKSUMTYPE must contain one of the following values: HAVAL MD5 SHA-1 SHA-256 SHA-384 SHA-512 TIGER WHIRLPOOL

Parameters:
CHECKSUMTYPE - the value of field 'CHECKSUMTYPE'.

setCREATED

public void setCREATED(Date CREATED)
Sets the value of field 'CREATED'. The field 'CREATED' has the following description: CREATED: an optional dateTime providing the date of creation for the file.

Parameters:
CREATED - the value of field 'CREATED'.

setDMDID

public void setDMDID(int index,
                     Object vDMDID)
              throws IndexOutOfBoundsException
Method setDMDID

Parameters:
index -
vDMDID -
Throws:
IndexOutOfBoundsException

setDMDID

public void setDMDID(Object[] DMDIDArray)
Method setDMDID

Parameters:
DMDIDArray -

setFContent

public void setFContent(FContent FContent)
Sets the value of field 'FContent'. The field 'FContent' has the following description: FContent: file content. The FContent element is used to deliver a content file for a METS document within the METS file itself. The content file must be either Base 64 encoded, and contained within the subsidiary binData wrapper element, or consist of XML information and be contained within the subsidiary xmlData wrapper element.

Parameters:
FContent - the value of field 'FContent'.

setFLocat

public void setFLocat(int index,
                      FLocat vFLocat)
               throws IndexOutOfBoundsException
Method setFLocat

Parameters:
index -
vFLocat -
Throws:
IndexOutOfBoundsException

setFLocat

public void setFLocat(FLocat[] FLocatArray)
Method setFLocat

Parameters:
FLocatArray -

setGROUPID

public void setGROUPID(String GROUPID)
Sets the value of field 'GROUPID'. The field 'GROUPID' has the following description: GROUPID: an optional string attribute which may be used to record an identifier that establishes a correspondence between this file and files in other file groups. For example, a master image in one file group would share the same GROUPID value with a reference copy in a second file group and a thumbnail image in a third file group.

Parameters:
GROUPID - the value of field 'GROUPID'.

setID

public void setID(String ID)
Sets the value of field 'ID'. The field 'ID' has the following description: ID: an XML ID value.

Parameters:
ID - the value of field 'ID'.

setMIMETYPE

public void setMIMETYPE(String MIMETYPE)
Sets the value of field 'MIMETYPE'. The field 'MIMETYPE' has the following description: MIMETYPE: an optional string attribute providing the MIME type for the file.

Parameters:
MIMETYPE - the value of field 'MIMETYPE'.

setOWNERID

public void setOWNERID(String OWNERID)
Sets the value of field 'OWNERID'. The field 'OWNERID' has the following description: OWNERID: an optional string attribute which may be used to provide a unique identifier (including a URI) assigned to the file which may differ from the URI used to retrieve the file.

Parameters:
OWNERID - the value of field 'OWNERID'.

setSEQ

public void setSEQ(int SEQ)
Sets the value of field 'SEQ'. The field 'SEQ' has the following description: SEQ: an optional integer indicating the sequence of this file relative to the others in its file group.

Parameters:
SEQ - the value of field 'SEQ'.

setSIZE

public void setSIZE(long SIZE)
Sets the value of field 'SIZE'. The field 'SIZE' has the following description: SIZE: an optional long integer specifying the size of the file in bytes.

Parameters:
SIZE - the value of field 'SIZE'.

setUSE

public void setUSE(String USE)
Sets the value of field 'USE'. The field 'USE' has the following description: USE: an optional string attribute indicating the intended use of this file (e.g., "master", "reference", "thumbnail" for image files).

Parameters:
USE - the value of field 'USE'.

unmarshal

public static Object unmarshal(Reader reader)
                        throws MarshalException,
                               ValidationException
Method unmarshal

Parameters:
reader -
Returns:
Object
Throws:
MarshalException
ValidationException

validate

public void validate()
              throws ValidationException
Method validate

Throws:
ValidationException


Copyright © 2005 Trustees of Indiana University. All Rights Reserved.