|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.metadata.MCRBase
public abstract class MCRBase
This class is a abstract basic class for objects in the MyCoRe Project. It is the frame to produce a full functionality object.
| Field Summary | |
|---|---|
protected boolean |
importMode
|
protected Document |
jdom_document
|
(package private) static Logger |
LOGGER
|
static int |
MAX_LABEL_LENGTH
constant value for the object id length |
protected static MCRConfiguration |
mcr_conf
|
protected static String |
mcr_encoding
|
protected MCRObjectID |
mcr_id
|
protected String |
mcr_label
|
protected String |
mcr_schema
|
protected MCRObjectService |
mcr_service
|
protected String |
mcr_version
|
protected static String |
NL
|
protected static String |
SLASH
|
| Constructor Summary | |
|---|---|
MCRBase()
This is the constructor of the MCRBase class. |
|
| Method Summary | |
|---|---|
abstract void |
createInDatastore()
The methode create the object in the data store. |
abstract Document |
createXML()
This methode create a XML stream for all object data. |
abstract void |
deleteFromDatastore(String id)
The methode delete the object in the data store. |
MCRObjectID |
getId()
This methode return the object id. |
String |
getLabel()
This methode return the object label. |
String |
getSchema()
This methode return the object schema. |
MCRObjectService |
getService()
This methode return the instance of the MCRObjectService class. |
String |
getVersion()
This methode return the MyCoRe version of the data structure. |
boolean |
isImportMode()
|
boolean |
isValid()
This method check the validation of the content of this class. |
abstract void |
receiveFromDatastore(String id)
The methode receive the object for the given MCRObjectID and stored it in this MCRObject. |
abstract void |
repairPersitenceDatastore(MCRObjectID id)
The method repair search index. |
abstract void |
repairPersitenceDatastore(String id)
The method repair search index. |
abstract void |
setFromURI(URI uri)
This methode read the XML input stream from an URI into a temporary DOM and check it with XSchema file. |
abstract void |
setFromXML(byte[] xml,
boolean valid)
This methode read the XML input stream from a byte array into JDOM and check it with XSchema file. |
void |
setId(MCRObjectID id)
This methode set the object ID. |
void |
setImportMode(boolean importMode)
|
void |
setLabel(String label)
This methode set the object label. |
void |
setSchema(String schema)
This methode set the object schema. |
void |
setService(MCRObjectService service)
This methode set the object MCRObjectService. |
void |
setVersion()
This methode set the MyCoRe version to the string 'Version 1.3'. |
abstract void |
updateInDatastore()
The methode update the object in the data store. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_LABEL_LENGTH
protected static final MCRConfiguration mcr_conf
protected static final String mcr_encoding
protected Document jdom_document
protected MCRObjectID mcr_id
protected String mcr_label
protected String mcr_version
protected String mcr_schema
protected MCRObjectService mcr_service
protected static final String NL
protected static final String SLASH
protected boolean importMode
static Logger LOGGER
| Constructor Detail |
|---|
public MCRBase()
throws MCRException,
MCRConfigurationException
MCRException - general Exception of MyCoRe
MCRConfigurationException - a special exception for configuration data| Method Detail |
|---|
public final MCRObjectID getId()
public final String getLabel()
public final String getVersion()
public final String getSchema()
public final MCRObjectService getService()
public abstract void setFromURI(URI uri)
throws MCRException
uri - an URI
MCRException - general Exception of MyCoRe
public abstract void setFromXML(byte[] xml,
boolean valid)
throws MCRException
xml - a XML string
MCRException - general Exception of MyCoRepublic final void setId(MCRObjectID id)
id - the object IDpublic final void setLabel(String label)
label - the object labelpublic final void setVersion()
public final void setSchema(String schema)
schema - the object schemapublic final void setService(MCRObjectService service)
service - the object MCRObjectService part
public abstract Document createXML()
throws MCRException
MCRException - if the content of this class is not valid
public abstract void createInDatastore()
throws MCRPersistenceException,
MCRActiveLinkException
MCRPersistenceException - if a persistence problem is occured
MCRActiveLinkException
public abstract void deleteFromDatastore(String id)
throws MCRPersistenceException,
MCRActiveLinkException
id - the object ID
MCRPersistenceException - if a persistence problem is occured
MCRActiveLinkException
public abstract void receiveFromDatastore(String id)
throws MCRPersistenceException
id - the object ID
MCRPersistenceException - if a persistence problem is occured
public abstract void updateInDatastore()
throws MCRPersistenceException,
MCRActiveLinkException
MCRPersistenceException - if a persistence problem is occured
MCRActiveLinkException
public abstract void repairPersitenceDatastore(String id)
throws MCRPersistenceException
id - the MCRObjectID as String
MCRPersistenceException
public abstract void repairPersitenceDatastore(MCRObjectID id)
throws MCRPersistenceException
id - the MCRObjectID
MCRPersistenceExceptionpublic boolean isValid()
public boolean isImportMode()
public void setImportMode(boolean importMode)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||