public class MetadataExchange
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
MetadataExchange.FieldFilter |
static class |
MetadataExchange.Format |
static interface |
MetadataExchange.ProgressListener |
Constructor and Description |
---|
MetadataExchange() |
Modifier and Type | Method and Description |
---|---|
static void |
exportItems(ItemCollection itemCollection,
java.util.List<java.lang.Integer> itemIDs,
java.io.OutputStream destination,
MetadataExchange.Format format,
MetadataExchange.FieldFilter fieldFilter,
MetadataExchange.ProgressListener progress)
Exports all items or the items with the specified IDs from the given
ItemCollection into the output stream. |
static void |
exportItems(MultiItemCollection multiItemCollection,
java.util.List<ItemIdentifier> itemIDs,
java.io.OutputStream destination,
MetadataExchange.Format format,
MetadataExchange.FieldFilter fieldFilter,
MetadataExchange.ProgressListener progress)
Exports all items or the items with the specified IDs from the given
MultiItemCollection into the output stream. |
static void |
importItems(java.io.InputStream source,
long sourceLength,
java.lang.String permissionTemplate,
ItemCollection destination,
MetadataExchange.Format format,
MetadataExchange.FieldFilter fieldFilter,
MetadataExchange.ProgressListener progress)
Imports the given stream into new records.
|
public static void exportItems(ItemCollection itemCollection, java.util.List<java.lang.Integer> itemIDs, java.io.OutputStream destination, MetadataExchange.Format format, MetadataExchange.FieldFilter fieldFilter, MetadataExchange.ProgressListener progress) throws java.io.IOException
ItemCollection
into the output stream.itemCollection
- collection to read the items fromitemIDs
- either the list of item IDs to export or null to export all items of the item collectiondestination
- output stream to write the export toformat
- the wanted format of the export. Recommended is only the XML
format as
the other formats do not support all features of CumulusfieldFilter
- Implementation that specifies which fields to export or null to export all fields. Only supported for XML
formatprogress
- callback implementation to give the caller a chance to display a progress. You can pass null
if you do not want to
track the progress.java.io.IOException
- on any error writing data to the streampublic static void exportItems(MultiItemCollection multiItemCollection, java.util.List<ItemIdentifier> itemIDs, java.io.OutputStream destination, MetadataExchange.Format format, MetadataExchange.FieldFilter fieldFilter, MetadataExchange.ProgressListener progress) throws java.io.IOException
MultiItemCollection
into the output stream.multiItemCollection
- collection to read the items fromitemIDs
- either the list of ItemIdentifier
to export or null to export all items of the collectiondestination
- output stream to write the export toformat
- the wanted format of the export. Recommended is only the XML
format as the other formats do not support all features of CumulusfieldFilter
- Implementation that specifies which fields to export or null to export all fields. Only supported for XML
formatprogress
- callback implementation to give the caller a chance to display a progress. You can pass null
if you do not want
to track the progress.java.io.IOException
- on any error writing data to the streampublic static void importItems(java.io.InputStream source, long sourceLength, java.lang.String permissionTemplate, ItemCollection destination, MetadataExchange.Format format, MetadataExchange.FieldFilter fieldFilter, MetadataExchange.ProgressListener progress)
source
- stream to read the data fromsourceLength
- number of bytes to read from the streampermissionTemplate
- permission template to use for new recordsdestination
- ItemCollection
where new records are addedformat
- Format of the given streamfieldFilter
- Implementation that specifies which fields to import or null to import all fields. Only supported for format XML
.progress
- Progress listener that enables the caller to get information about the current progress. You can pass null
if you
do not want to track the progress.www.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.