|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.ifs2.MCRStore
org.mycore.datamodel.ifs2.MCRMetadataStore
public class MCRMetadataStore
Stores XML metadata documents (or optionally any other BLOB data) in a persistent filesystem structure For each object type, a store must be defined as follows: MCR.IFS2.Store.DocPortal_document.Class=org.mycore.datamodel.ifs2.MCRMetadataStore MCR.IFS2.Store.DocPortal_document.BaseDir=/foo/bar MCR.IFS2.Store.DocPortal_document.SlotLayout=4-2-2 MCR.IFS2. MCR.IFS2.Store.DocPortal_document.ForceXML=true (which is default)
| Field Summary | |
|---|---|
protected boolean |
forceXML
If true (which is default), store will enforce it gets XML to store, otherwise any binary content can be stored here. |
| Fields inherited from class org.mycore.datamodel.ifs2.MCRStore |
|---|
ASCENDING, DESCENDING, dir, id, idLength, lastID, offset, prefix, slotLength, stores, suffix |
| Constructor Summary | |
|---|---|
MCRMetadataStore()
|
|
| Method Summary | |
|---|---|
protected MCRStoredMetadata |
buildMetadataObject(org.apache.commons.vfs.FileObject fo,
int id)
Builds a new stored metadata object in this store |
MCRStoredMetadata |
create(MCRContent xml)
Stores a newly created document, using the next free ID. |
MCRStoredMetadata |
create(MCRContent xml,
int id)
Stores a newly created document under the given ID. |
static MCRMetadataStore |
getStore(String type)
Returns the store for the given metadata document type |
protected void |
init(String type)
Initializes a new metadata store instance. |
MCRStoredMetadata |
retrieve(int id)
Returns the metadata stored under the given ID, or null |
protected boolean |
shouldForceXML()
|
| Methods inherited from class org.mycore.datamodel.ifs2.MCRStore |
|---|
delete, delete, exists, getBaseDir, getHighestStoredID, getID, getNextFreeID, getSlot, getSlotPath, getSlotPaths, listIDs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean forceXML
| Constructor Detail |
|---|
public MCRMetadataStore()
| Method Detail |
|---|
public static MCRMetadataStore getStore(String type)
type - the type of metadata to store
protected void init(String type)
init in class MCRStoretype - the document type that is stored in this storeprotected boolean shouldForceXML()
public MCRStoredMetadata create(MCRContent xml)
throws Exception
xml - the XML document to be stored
Exception
public MCRStoredMetadata create(MCRContent xml,
int id)
throws Exception
xml - the XML document to be storedid - the ID under which the document should be stored
Exception
public MCRStoredMetadata retrieve(int id)
throws Exception
id - the ID of the XML document
Exception
protected MCRStoredMetadata buildMetadataObject(org.apache.commons.vfs.FileObject fo,
int id)
fo - the FileObject that stores the dataid - the ID of the metadata object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||