Package org.dlese.dpc.schemedit.ndr
Class CollectionImporter
java.lang.Object
org.dlese.dpc.schemedit.ndr.CollectionImporter
Extracts data from a Collection Metadata object and loads it into the NCS
data structures to create a collection, and then creates item-level metadata
from MetadataObjects in the NDR (transforming to native format if possible).
ISSUE: can we import arbitrary collections, or is it REQUIRED that NCS-level information (e.g., format) is present.
- Author:
- Jonathan Ostwald
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionImporter(String mdpHandle, String recordsPath, String configPath) Constructor for development and debugging purposes (servletContext is not available).CollectionImporter(String mdpHandle, ServletContext servletContext) Constructor for the CollectionImporter object (with access to ServletContext) -
Method Summary
Modifier and TypeMethodDescriptiondoImport()NOT YET DOCUMENTEDGets the collectionConfigFile attribute of the CollectionImporter objectprotected MetaDataFrameworkGets the collectionConfigFramework attribute of the CollectionImporter objectprotected MetaDataFrameworkGets the metaDataFramework attribute of the AbstractSchemEditAction objectorg.dom4j.ElementGets the statusEntries element from the metadataProvider's dsc_data datastream, which reflect the collection's history, including status changes, imports and exports.Determines a collectionId for the collection to be imported.voidWrite Collection-level metadata record to disk (NOT currently used).voidloadItemLevelMetadata(CollectionConfig collectionConfig) Process MetadataWrappers in NDR response.static voidNOT YET DOCUMENTED
-
Constructor Details
-
CollectionImporter
Constructor for the CollectionImporter object (with access to ServletContext)- Parameters:
mdpHandle- NOT YET DOCUMENTEDservletContext- NOT YET DOCUMENTED- Throws:
Exception- NOT YET DOCUMENTED
-
CollectionImporter
Constructor for development and debugging purposes (servletContext is not available).- Parameters:
mdpHandle- NOT YET DOCUMENTEDrecordsPath- NOT YET DOCUMENTEDconfigPath- NOT YET DOCUMENTED- Throws:
Exception- NOT YET DOCUMENTED
-
-
Method Details
-
doImport
NOT YET DOCUMENTED- Returns:
- NOT YET DOCUMENTED
- Throws:
Exception- NOT YET DOCUMENTED
-
getCollectionFramework
Gets the metaDataFramework attribute of the AbstractSchemEditAction object- Returns:
- The metaDataFramework value
- Throws:
Exception- NOT YET DOCUMENTED
-
getCollectionConfigFramework
Gets the collectionConfigFramework attribute of the CollectionImporter object- Returns:
- The collectionConfigFramework value
- Throws:
Exception- NOT YET DOCUMENTED
-
getCollectionHistory
public org.dom4j.Element getCollectionHistory()Gets the statusEntries element from the metadataProvider's dsc_data datastream, which reflect the collection's history, including status changes, imports and exports.- Returns:
- The statusEntries element if one exists, or an "empty_history" element otherwise
-
loadCollectionLevelMetadata
Write Collection-level metadata record to disk (NOT currently used).- Throws:
Exception- NOT YET DOCUMENTED
-
getCollectionId
Determines a collectionId for the collection to be imported.Tries the following until a value is found:
- collectionId property of mdpReader
- setSpec property of mdpReader
- creates a uniqueID number
- Returns:
- The collectionId value
-
getCollectionConfigFile
Gets the collectionConfigFile attribute of the CollectionImporter object- Returns:
- The collectionConfigFile value
-
loadItemLevelMetadata
Process MetadataWrappers in NDR response.Extract the following from each MetaDataWrapper and write to file system:
- pid
- itemRecord
- dcsDataRecord
- Parameters:
collectionConfig- NOT YET DOCUMENTED- Throws:
Exception- NOT YET DOCUMENTED
-
main
NOT YET DOCUMENTED- Parameters:
args- NOT YET DOCUMENTED- Throws:
Exception- NOT YET DOCUMENTED
-