|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.schemedit.ndr.writer.MetadataWriter org.dlese.dpc.schemedit.ndr.writer.NSDLCollectionWriter
public class NSDLCollectionWriter
Creates or updates the NDR Objects necessary to create a NSDL collection in the NDR, namely the collection Metadata Record, Collection Resource, Collection Aggregator, and Collection MetadataProvider.
NOTE: A NSDL collection is different from the representation of a DLESE/NCS collection in the NDR. A NCS collection consists of only a MetadataProvider, Aggregator and item-level Metadata objects. If we are creating an NSDL collection for an EXISTING NCS collection we need to do some additional operations, which are NOT YET IMPLEMENTED:
Field Summary |
---|
Fields inherited from class org.dlese.dpc.schemedit.ndr.writer.MetadataWriter |
---|
collectionConfig, dcsDataRecord, docReader, finalAndValid, itemRecord, mdReader, nsdlItemId, recId, rm, servletContext, xmlConversionService |
Constructor Summary | |
---|---|
NSDLCollectionWriter(ServletContext servletContext)
Constructor for the NSDLCollectionWriter object |
Method Summary | |
---|---|
protected NdrRequest |
addMetadataRequest(NdrRequest ndrRequest,
String resHandle)
Adds a feature to the MetadataRequest attribute of the NSDLCollectionWriter object |
protected List |
getMetadataForRelationsToAdd(String resourceHandle)
Gets the metadataForRelationsToAdd attribute of the NSDLCollectionWriter object. |
protected MetadataReader |
getMetadataReader()
Gets the metadataReader attribute of the NSDLCollectionWriter object |
protected Element |
getNCSCollectionConfig()
Returns the collection_config data_stream from the collection MDP if possible. |
protected String |
getNCSCollectionNativeFormat()
For Collections whose items are managed by this NCS instance, we can find the itemFormat by inspecting the "collection_config" stream of the Collection MetadataProvider object. |
protected NdrRequest |
modifyMetadataRequest(NdrRequest ndrRequest,
String resHandle,
Element nsdl_dc_stream)
Description of the Method |
SyncReportEntry |
write(String recId,
DcsDataRecord dcsDataRecord)
Convenience write method that doesn't require ncs_collect metadata to be supplied (this will be obtained from index in the callee). |
SyncReportEntry |
write(String recId,
String recordXml,
DcsDataRecord dcsDataRecord)
Creates or updates collection-level NDR Objects necessary to define a NSDL collection in the NDR, including collection-level metadata object, collection resource, and collection aggregator. |
Methods inherited from class org.dlese.dpc.schemedit.ndr.writer.MetadataWriter |
---|
getCollectionConfig, getItemRecord, getMetaDataFramework, getResourceHandle, getResourceUrl, getServletContextAttribute, getValueOrNull, getWriteRequest, init, setServletContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NSDLCollectionWriter(ServletContext servletContext) throws Exception
servletContext
- NOT YET DOCUMENTED
Exception
- NOT YET DOCUMENTEDMethod Detail |
---|
public SyncReportEntry write(String recId, DcsDataRecord dcsDataRecord) throws Exception
write
in class MetadataWriter
recId
- NOT YET DOCUMENTEDdcsDataRecord
- NOT YET DOCUMENTED
Exception
- NOT YET DOCUMENTEDpublic SyncReportEntry write(String recId, String recordXml, DcsDataRecord dcsDataRecord) throws Exception
NOTE: if the NCSL collection already exists, then there is a possibility that the collection's resource URL has been modified. For this reason, we have to locate the collection definition objects in the NDR by other means than the resource URL ...
write
in class MetadataWriter
recId
- record id, used to obtain collection metadata from
index if necessaryrecordXml
- collection metadata as String (optionally provided)dcsDataRecord
- auxillary information about the collection metadata
record
Exception
- NOT YET DOCUMENTEDprotected List getMetadataForRelationsToAdd(String resourceHandle)
resourceHandle
- Description of the Parameter
protected NdrRequest addMetadataRequest(NdrRequest ndrRequest, String resHandle) throws Exception
addMetadataRequest
in class MetadataWriter
ndrRequest
- The feature to be added to the MetadataRequest
attributeresHandle
- The feature to be added to the MetadataRequest
attribute
Exception
- Description of the Exceptionprotected NdrRequest modifyMetadataRequest(NdrRequest ndrRequest, String resHandle, Element nsdl_dc_stream) throws Exception
modifyMetadataRequest
in class MetadataWriter
ndrRequest
- Description of the ParameterresHandle
- Description of the Parameternsdl_dc_stream
- Description of the Parameter
Exception
- Description of the Exceptionprotected MetadataReader getMetadataReader() throws Exception
getMetadataReader
in class MetadataWriter
Exception
- NOT YET DOCUMENTEDprotected Element getNCSCollectionConfig()
protected String getNCSCollectionNativeFormat()
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |