edu.uiuc.ndiipp.hubandspoke.profile
Class METSProfile

java.lang.Object
  extended by edu.uiuc.ndiipp.hubandspoke.profile.METSProfile
Direct Known Subclasses:
HaSMasterMETSProfile, HaSMETSProfile

public abstract class METSProfile
extends java.lang.Object


Nested Class Summary
static class METSProfile.AMD_SECTION
           
static class METSProfile.DMDSecStatus
           
static class METSProfile.PackageType
           
static class METSProfile.PREMISAgentType
           
static class METSProfile.PREMISEventType
           
static class METSProfile.PREMISIdentifierType
           
static class METSProfile.PREMISLinkingAgentRole
           
static class METSProfile.PREMISObjectCategory
           
static class METSProfile.PREMISSwType
           
static class METSProfile.StructMapType
           
static class METSProfile.TechMDStatus
           
 
Field Summary
static java.lang.String AMD_NS
           
static java.lang.String JHOVE_NS
           
static java.lang.String METS_NS
           
static java.lang.String MIX_NS
           
static java.lang.String MODS_NS
           
static java.lang.String PREMIS_NS
           
static java.lang.String TEXTMD_NS
           
static java.lang.String VMD_NS
           
static java.lang.String XLINK_NS
           
 
Constructor Summary
METSProfile()
           
 
Method Summary
static gov.loc.premis.PremisObjectDocument createBasicPremisObject(METSProfile.PREMISIdentifierType idType, java.lang.String id, METSProfile.PREMISObjectCategory objCat)
          Return a basic PremisObjectDocument with the given parameters
static gov.loc.premis.PremisObjectDocument createPremisObjectFromFile(java.io.File f, METSProfile.PREMISIdentifierType idType)
           
 java.net.URI getBaseURI()
          Return the base URI of the current METS file
 gov.loc.mets.MetsMetsDocument getMetsDocument()
          Return the underlying XMLBean MetsDocument object
 org.apache.xmlbeans.XmlID getNewID(java.lang.String prefix, org.apache.xmlbeans.XmlObject xobj)
          Get the next unassigned ID value that can be used in the METS file and assign it to an XmlObject
 gov.loc.mets.MetsMdSecType newPREMISObjectTechMD(gov.loc.mets.MetsDivType.Mptr mptr, METSProfile.PREMISIdentifierType idType, java.lang.String idVal)
          Add a new PREMIS Object techMD section that is associated with the given mptr div, and return the newly added techMD section that contains the PREMIS object.
 gov.loc.mets.MetsMdSecType newPREMISObjectTechMD(gov.loc.mets.MetsDivType div, METSProfile.PREMISIdentifierType idType, java.lang.String idVal)
          Add a new PREMIS Object techMD section that is associated with the given div element, and return the newly added techMD section that contains the PREMIS object.
 gov.loc.mets.MetsMdSecType newPREMISObjectTechMD(gov.loc.mets.MetsFileType ft, METSProfile.PREMISIdentifierType idType, java.lang.String idVal)
          Add a new PREMIS Object techMD section that is associated with the given file, and return the newly added techMD section that contains the PREMIS object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AMD_NS

public static final java.lang.String AMD_NS
See Also:
Constant Field Values

JHOVE_NS

public static final java.lang.String JHOVE_NS
See Also:
Constant Field Values

METS_NS

public static final java.lang.String METS_NS
See Also:
Constant Field Values

MIX_NS

public static final java.lang.String MIX_NS
See Also:
Constant Field Values

MODS_NS

public static final java.lang.String MODS_NS
See Also:
Constant Field Values

PREMIS_NS

public static final java.lang.String PREMIS_NS
See Also:
Constant Field Values

TEXTMD_NS

public static final java.lang.String TEXTMD_NS
See Also:
Constant Field Values

VMD_NS

public static final java.lang.String VMD_NS
See Also:
Constant Field Values

XLINK_NS

public static final java.lang.String XLINK_NS
See Also:
Constant Field Values
Constructor Detail

METSProfile

public METSProfile()
Method Detail

createBasicPremisObject

public static gov.loc.premis.PremisObjectDocument createBasicPremisObject(METSProfile.PREMISIdentifierType idType,
                                                                          java.lang.String id,
                                                                          METSProfile.PREMISObjectCategory objCat)
Return a basic PremisObjectDocument with the given parameters

Parameters:
idType - HaSMETSProfile.PREMISIdentifierType
id - String with the identifier value
objCat - HaSMETSProfile.PREMISObjectCategory
Returns:
PremisObjectDocument

createPremisObjectFromFile

public static gov.loc.premis.PremisObjectDocument createPremisObjectFromFile(java.io.File f,
                                                                             METSProfile.PREMISIdentifierType idType)

getBaseURI

public java.net.URI getBaseURI()
Return the base URI of the current METS file

Returns:
the base URI of the current METS file

getMetsDocument

public gov.loc.mets.MetsMetsDocument getMetsDocument()
Return the underlying XMLBean MetsDocument object

Returns:
the underlying XMLBean MetsDocument object

getNewID

public org.apache.xmlbeans.XmlID getNewID(java.lang.String prefix,
                                          org.apache.xmlbeans.XmlObject xobj)
Get the next unassigned ID value that can be used in the METS file and assign it to an XmlObject

Parameters:
prefix - string that will be prepended to all ID values, if this is null or empty string then the value "ID" will be used
xobj - the XmlObject to which the ID will be assigned
Returns:
an XmlID object representing the new ID attribute

newPREMISObjectTechMD

public gov.loc.mets.MetsMdSecType newPREMISObjectTechMD(gov.loc.mets.MetsDivType div,
                                                        METSProfile.PREMISIdentifierType idType,
                                                        java.lang.String idVal)
                                                 throws HaSMETSProfileException
Add a new PREMIS Object techMD section that is associated with the given div element, and return the newly added techMD section that contains the PREMIS object.

NOTE: The idType and idVal parameters are not the same as the XML ID attributes used to associate the new techMD section to the file.

Parameters:
div - the div element to which the techMD is associated
idType - the type of the ID to be used with the PREMIS object
idVal - the value of the identifier
Returns:
returns the new techMD section that was created
Throws:
HaSMETSProfileException

newPREMISObjectTechMD

public gov.loc.mets.MetsMdSecType newPREMISObjectTechMD(gov.loc.mets.MetsFileType ft,
                                                        METSProfile.PREMISIdentifierType idType,
                                                        java.lang.String idVal)
                                                 throws HaSMETSProfileException
Add a new PREMIS Object techMD section that is associated with the given file, and return the newly added techMD section that contains the PREMIS object. Attributes of the file element such as CHECKSUM, MIMETYPE, and SIZE are copied into the PREMIS object.

NOTE: The idType and idVal parameters are not the same as the XML ID attributes used to associate the new techMD section to the file.

Parameters:
ft - the file to which the techMD is associated
idType - the type of the ID to be used with the PREMIS object
idVal - the value of the identifier
Returns:
returns the new techMD section that was created
Throws:
HaSMETSProfileException

newPREMISObjectTechMD

public gov.loc.mets.MetsMdSecType newPREMISObjectTechMD(gov.loc.mets.MetsDivType.Mptr mptr,
                                                        METSProfile.PREMISIdentifierType idType,
                                                        java.lang.String idVal)
                                                 throws HaSMETSProfileException
Add a new PREMIS Object techMD section that is associated with the given mptr div, and return the newly added techMD section that contains the PREMIS object. Attributes of the mptr target file such as CHECKSUM, MIMETYPE, and SIZE are copied into the PREMIS object.

NOTE: The idType and idVal parameters are not the same as the XML ID attributes used to associate the new techMD section to the file.

Parameters:
mptr - the mptr to which the techMD will be associated
idType - the type of the ID to be used with the PREMIS object
idVal - the value of the identifier
Returns:
returns the new techMD section that was created
Throws:
HaSMETSProfileException


Copyright © 2006, University of Illinois.