|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.common.MCRXMLTableManager
public class MCRXMLTableManager
This class manage all accesses to the XML table database. This database holds all informations about the MCRObjectID and the corresponding XML file.
| Field Summary | |
|---|---|
(package private) static MCRConfiguration |
CONFIG
|
(package private) static MCRCache |
jdomCache
|
(package private) static Logger |
LOGGER
|
| Constructor Summary | |
|---|---|
protected |
MCRXMLTableManager()
The constructor of this class. |
| Method Summary | |
|---|---|
void |
create(MCRObjectID mcrid,
Document xml,
Date lastModified)
The method create a new item in the datastore. |
void |
delete(MCRObjectID mcrid)
The method remove a item for the MCRObjectID from the datastore. |
boolean |
exist(MCRObjectID mcrid)
This method check that the MCRObjectID exist in this store. |
List<String> |
getAllAllowedMCRObjectIDTypes()
The method return a Array list with all MCRObjectID-Types, stored in the XML table. |
int |
getHighestStoredID(String idproject,
String idtype)
This method returns the highest stored ID number for a given MCRObjectID base, or 0 if no object is stored for this type and project. |
long |
getLastModified()
|
static MCRXMLTableManager |
instance()
Returns the link table manager singleton. |
List<MCRObjectIDDate> |
listObjectDates(String type)
lists objects of the specified type and their last modified date. |
Document |
readDocument(MCRObjectID id)
returns the JDOM-Document of the given MCRObjectID. |
List<String> |
retrieveAllIDs()
The method return a list with all stored MCRObjectID's of the XML table |
List<String> |
retrieveAllIDs(String type)
The method return a Array list with all stored MCRObjectID's of the XML table of a MCRObjectID type. |
Document |
retrieveAsJDOM(MCRObjectID mcrid)
The method retrieve a dataset for the given MCRObjectID and returns the corresponding JDOM Document. |
byte[] |
retrieveAsXML(MCRObjectID mcrid)
The method retrieve a dataset for the given MCRObjectID and returns the corresponding XML file as byte array. |
void |
update(MCRObjectID mcrid,
byte[] xml,
Date lastModified)
The method update an item in the datastore. |
void |
update(MCRObjectID mcrid,
Document xml,
Date lastModified)
The method update an item in the datastore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static Logger LOGGER
static MCRConfiguration CONFIG
static MCRCache jdomCache
| Constructor Detail |
|---|
protected MCRXMLTableManager()
| Method Detail |
|---|
public static MCRXMLTableManager instance()
public void create(MCRObjectID mcrid,
Document xml,
Date lastModified)
throws MCRException
mcrid - a MCRObjectIDxml - a JDOM Document
MCRException - if the method arguments are not correct
public void delete(MCRObjectID mcrid)
throws MCRException
mcrid - a MCRObjectID
MCRException - if the method argument is not correct
public void update(MCRObjectID mcrid,
Document xml,
Date lastModified)
throws MCRException
mcrid - a MCRObjectIDxml - a byte array with the XML file
MCRException - if the method arguments are not correct
public void update(MCRObjectID mcrid,
byte[] xml,
Date lastModified)
throws MCRException
mcrid - a MCRObjectIDxml - a byte array with the XML file
MCRException - if the method arguments are not correct
public byte[] retrieveAsXML(MCRObjectID mcrid)
throws MCRException
mcrid - a MCRObjectID
MCRException - if the method arguments are not correct
public Document retrieveAsJDOM(MCRObjectID mcrid)
throws MCRException
mcrid - a MCRObjectID
MCRException - if the method arguments are not correct
public int getHighestStoredID(String idproject,
String idtype)
throws MCRPersistenceException
project - the project ID part of the MCRObjectID basetype - the type ID part of the MCRObjectID base
MCRPersistenceException - if a persistence problem is occuredpublic boolean exist(MCRObjectID mcrid)
mcrid - a MCRObjectID
public List<String> retrieveAllIDs(String type)
type - a MCRObjectID type string
public List<String> retrieveAllIDs()
public List<String> getAllAllowedMCRObjectIDTypes()
public Document readDocument(MCRObjectID id)
id - ObjectID of MyCoRe Document
public List<MCRObjectIDDate> listObjectDates(String type)
type and their last modified date.
type - type of object
public long getLastModified()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||