org.mycore.datamodel.metadata.validator
Class MCREditorOutValidator

java.lang.Object
  extended by org.mycore.datamodel.metadata.validator.MCREditorOutValidator

public class MCREditorOutValidator
extends Object

Version:
$Revision: 1 $ $Date: 08.05.2009 15:51:37 $
Author:
Thomas Scheffler (yagee)

Nested Class Summary
(package private) static class MCREditorOutValidator.MCRMetaAdressCheck
           
(package private) static class MCREditorOutValidator.MCRMetaClassificationCheck
           
(package private) static class MCREditorOutValidator.MCRMetaHistoryDateCheck
           
 
Constructor Summary
MCREditorOutValidator(Document jdom_in, MCRObjectID id)
          instantiate the validator with the editor input jdom_in.
 
Method Summary
static String checkMetaObject(Element datasubtag, Class<? extends MCRMetaInterface> metaClass, boolean keepLang)
           
static String checkMetaObjectWithLang(Element datasubtag, Class<? extends MCRMetaInterface> metaClass)
           
static String checkMetaObjectWithLangNotEmpty(Element datasubtag, Class<? extends MCRMetaInterface> metaClass)
           
static String checkMetaObjectWithLinks(Element datasubtag, Class<? extends MCRMetaInterface> metaClass)
           
 Document generateValidMyCoReObject()
          tries to generate a valid MCRObject as JDOM Document.
static Class<? extends MCRMetaInterface> getClass(String mcrclass)
           
 List<String> getErrorLog()
          returns a List of Error log entries
(package private) static MCREditorMetadataValidator getObjectCheckInstance(Class<? extends MCRMetaInterface> clazz)
           
(package private) static MCREditorMetadataValidator getObjectCheckWithLangInstance(Class<? extends MCRMetaInterface> clazz)
           
(package private) static MCREditorMetadataValidator getObjectCheckWithLangNotEmptyInstance(Class<? extends MCRMetaInterface> clazz)
           
(package private) static MCREditorMetadataValidator getObjectCheckWithLinksInstance(Class<? extends MCRMetaInterface> clazz)
           
static void setDefaultDerivateACLs(Element service)
          The method add a default ACL-block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCREditorOutValidator

public MCREditorOutValidator(Document jdom_in,
                             MCRObjectID id)
                      throws JDOMException,
                             IOException
instantiate the validator with the editor input jdom_in. id will be set as the MCRObjectID for the resulting object that can be fetched with generateValidMyCoReObject()

Parameters:
jdom_in - editor input
Throws:
IOException
JDOMException
Method Detail

generateValidMyCoReObject

public Document generateValidMyCoReObject()
tries to generate a valid MCRObject as JDOM Document.

Returns:
MCRObject

getErrorLog

public List<String> getErrorLog()
returns a List of Error log entries

Returns:
log entries for the whole validation process

getClass

public static Class<? extends MCRMetaInterface> getClass(String mcrclass)
                                                  throws ClassNotFoundException
Throws:
ClassNotFoundException

checkMetaObject

public static String checkMetaObject(Element datasubtag,
                                     Class<? extends MCRMetaInterface> metaClass,
                                     boolean keepLang)

checkMetaObjectWithLang

public static String checkMetaObjectWithLang(Element datasubtag,
                                             Class<? extends MCRMetaInterface> metaClass)

checkMetaObjectWithLangNotEmpty

public static String checkMetaObjectWithLangNotEmpty(Element datasubtag,
                                                     Class<? extends MCRMetaInterface> metaClass)

checkMetaObjectWithLinks

public static String checkMetaObjectWithLinks(Element datasubtag,
                                              Class<? extends MCRMetaInterface> metaClass)

getObjectCheckInstance

static MCREditorMetadataValidator getObjectCheckInstance(Class<? extends MCRMetaInterface> clazz)

getObjectCheckWithLangInstance

static MCREditorMetadataValidator getObjectCheckWithLangInstance(Class<? extends MCRMetaInterface> clazz)

getObjectCheckWithLangNotEmptyInstance

static MCREditorMetadataValidator getObjectCheckWithLangNotEmptyInstance(Class<? extends MCRMetaInterface> clazz)

getObjectCheckWithLinksInstance

static MCREditorMetadataValidator getObjectCheckWithLinksInstance(Class<? extends MCRMetaInterface> clazz)

setDefaultDerivateACLs

public static void setDefaultDerivateACLs(Element service)
The method add a default ACL-block.

Parameters:
service -