org.mycore.datamodel.metadata
Class MCRMetaIFS

java.lang.Object
  extended by org.mycore.datamodel.metadata.MCRMetaDefault
      extended by org.mycore.datamodel.metadata.MCRMetaIFS
All Implemented Interfaces:
Cloneable, MCRMetaInterface

public final class MCRMetaIFS
extends MCRMetaDefault

This class implements all method for handling the IFS metadata. The MCRMetaIFS class present all informations to store and retrieve derivates to the IFS.

<tag class="MCRMetaIFS" >
<subtag sourcepath="..." maindoc="..." ifsid="..." />
</tag>

Version:
$Revision: 13085 $ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06 Feb 2008) $
Author:
Jens Kupferschmidt

Field Summary
 
Fields inherited from class org.mycore.datamodel.metadata.MCRMetaDefault
datapart, DEFAULT_DATAPART, DEFAULT_INHERITED, DEFAULT_LANG_LENGTH, DEFAULT_LANGUAGE, DEFAULT_STRING_LENGTH, DEFAULT_TYPE_LENGTH, inherited, lang, LOGGER, NL, subtag, type
 
Constructor Summary
MCRMetaIFS()
          This is the constructor.
MCRMetaIFS(String set_datapart, String set_subtag, String default_lang, String set_sourcepath)
          This is the constructor.
 
Method Summary
 Object clone()
          This method make a NOT clone of this class.
 Element createXML()
          This method create a XML stream for all data in this class, defined by the MyCoRe XML MCRMetaIFS definition for the given subtag.
 String getIFSID()
          The method return the derivate IFS ID.
 String getMainDoc()
          The method return the derivate main document name.
 String getSourcePath()
          The method return the derivate source path.
 boolean isValid()
          This method check the validation of the content of this class.
 void setFromDOM(Element element)
          This method read the XML input stream part from a DOM part for the metadata of the document.
 void setIFSID(String set_ifsid)
          This method set the value of derivate IFS ID.
 void setMainDoc(String set_maindoc)
          This method set the value of derivate main document.
 void setSourcePath(String set_sourcepath)
          This method set the value of derivate source path.
 
Methods inherited from class org.mycore.datamodel.metadata.MCRMetaDefault
debug, debugDefault, decrementInherited, getDataPart, getInherited, getInheritedToString, getLang, getSubTag, getType, incrementInherited, setDataPart, setInherited, setLang, setSubTag, setType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCRMetaIFS

public MCRMetaIFS()
This is the constructor.
The language element was set to en . All other data was set to empty.


MCRMetaIFS

public MCRMetaIFS(String set_datapart,
                  String set_subtag,
                  String default_lang,
                  String set_sourcepath)
           throws MCRException
This is the constructor.
The language element was set to en . The subtag element was set to the value of set_subtag. If the value of set_subtag is null or empty an exception was throwed. The type element was set empty. The sourcepath must be NOT null or empty.

Parameters:
set_datapart - the global part of the elements like 'metadata' or 'service'
set_subtag - the name of the subtag
set_sourcepath - the sourcepath attribute
Throws:
MCRException - if the set_subtag value, the set_classid value or the set_categid are null, empty, too long or not a MCRObjectID
Method Detail

getSourcePath

public final String getSourcePath()
The method return the derivate source path.

Returns:
the sourcepath

getMainDoc

public final String getMainDoc()
The method return the derivate main document name.

Returns:
the main document name.

getIFSID

public final String getIFSID()
The method return the derivate IFS ID.

Returns:
the IFS ID.

setSourcePath

public final void setSourcePath(String set_sourcepath)
This method set the value of derivate source path.

Parameters:
set_sourcepath - the derivate source path

setMainDoc

public final void setMainDoc(String set_maindoc)
This method set the value of derivate main document.

Parameters:
set_maindoc - the derivate main document name

setIFSID

public final void setIFSID(String set_ifsid)
This method set the value of derivate IFS ID.

Parameters:
set_ifsid - the derivate IFS ID

setFromDOM

public final void setFromDOM(Element element)
                      throws MCRException
This method read the XML input stream part from a DOM part for the metadata of the document.

Specified by:
setFromDOM in interface MCRMetaInterface
Overrides:
setFromDOM in class MCRMetaDefault
Parameters:
element - a relevant JDOM element for the metadata
Throws:
MCRException - if the set_sourcepath value is null or empty

createXML

public final Element createXML()
                        throws MCRException
This method create a XML stream for all data in this class, defined by the MyCoRe XML MCRMetaIFS definition for the given subtag.

Specified by:
createXML in interface MCRMetaInterface
Specified by:
createXML in class MCRMetaDefault
Returns:
a JDOM Element with the XML MCRClassification part
Throws:
MCRException - if the content of this class is not valid

isValid

public final boolean isValid()
This method check the validation of the content of this class. The method returns true if
  • the subtag is not null or empty
otherwise the method return false

Specified by:
isValid in interface MCRMetaInterface
Overrides:
isValid in class MCRMetaDefault
Returns:
a boolean value

clone

public final Object clone()
This method make a NOT clone of this class. It is an empty method.

Specified by:
clone in interface MCRMetaInterface
Specified by:
clone in class MCRMetaDefault