Package emissary.core
Class IBaseDataObjectHelper
- java.lang.Object
-
- emissary.core.IBaseDataObjectHelper
-
public final class IBaseDataObjectHelper extends Object
Utility methods that assist with working with IBaseDataObject's.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidaddParentInformationToChild(IBaseDataObject parentIBaseDataObject, IBaseDataObject childIBaseDataObject, boolean nullifyFileType, Set<String> alwaysCopyMetadataKeys, String placeKey, KffDataObjectHandler kffDataObjectHandler)Used to propagate needed parent information to a sprouted child.static voidaddParentInformationToChild(IBaseDataObject parentIBaseDataObject, IBaseDataObject childIBaseDataObject, boolean nullifyFileType, Set<String> alwaysCopyMetadataKeys, String placeKey, KffDataObjectHandler kffDataObjectHandler, boolean useSbcf)Used to propagate needed parent information to a sprouted child.static voidaddParentInformationToChildExcluding(IBaseDataObject parentIBaseDataObject, IBaseDataObject childIBaseDataObject, Pattern excludedParametersPattern)Used to propagate needed parent metadata parameter information to a sprouted child except for those parameters whose names are specified in a regular expression pattern.static voidaddParentInformationToChildren(IBaseDataObject parent, List<IBaseDataObject> children, boolean nullifyFileType, Set<String> alwaysCopyMetadataKeys, String placeKey, KffDataObjectHandler kffDataObjectHandler)Used to propagate needed parent information to a sprouted child.static voidaddParentInformationToChildren(IBaseDataObject parent, List<IBaseDataObject> children, boolean nullifyFileType, Set<String> alwaysCopyMetadataKeys, String placeKey, KffDataObjectHandler kffDataObjectHandler, boolean useSbcf)Used to propagate needed parent information to a sprouted child.static IBaseDataObjectclone(IBaseDataObject iBaseDataObject)Clones an IBaseDataObject.static IBaseDataObjectclone(IBaseDataObject iBaseDataObject, boolean fullClone)Deprecated.preferclone(IBaseDataObject)static byte[]findPreferredData(IBaseDataObject payload, List<String> preferredViews)Search for the first preferred view that is present or use the primary data if nonestatic byte[]findPreferredDataByRegex(IBaseDataObject payload, List<Pattern> preferredViewNamePatterns)Search for the first preferred view by regular expression or use the primary data if none match
-
-
-
Method Detail
-
clone
public static IBaseDataObject clone(IBaseDataObject iBaseDataObject)
Clones an IBaseDataObject.- Parameters:
iBaseDataObject- the IBaseDataObject to be cloned.- Returns:
- the clone of the IBaseDataObject passed in.
-
clone
@Deprecated public static IBaseDataObject clone(IBaseDataObject iBaseDataObject, boolean fullClone)
Deprecated.preferclone(IBaseDataObject)Clones an IBaseDataObject equivalently to emissary.core.BaseDataObject.clone(), which duplicates some attributes. A "fullClone" duplicates all attributes.- Parameters:
iBaseDataObject- the IBaseDataObject to be cloned.fullClone- specifies if all fields should be cloned.- Returns:
- the clone of the IBaseDataObject passed in.
-
addParentInformationToChild
public static void addParentInformationToChild(IBaseDataObject parentIBaseDataObject, IBaseDataObject childIBaseDataObject, boolean nullifyFileType, Set<String> alwaysCopyMetadataKeys, String placeKey, KffDataObjectHandler kffDataObjectHandler)
Used to propagate needed parent information to a sprouted child. NOTE: This is taken from emissary.place.MultiFileServerPlace.- Parameters:
parentIBaseDataObject- the source of parameters to be copiedchildIBaseDataObject- the destination for parameters to be copiednullifyFileType- if true the child fileType is nullified after the copyalwaysCopyMetadataKeys- set of metadata keys to always copy from parent to child.placeKey- the place key to be added to the transform history.kffDataObjectHandler- the kffDataObjectHandler to use to create the kff hashes.
-
addParentInformationToChild
public static void addParentInformationToChild(IBaseDataObject parentIBaseDataObject, IBaseDataObject childIBaseDataObject, boolean nullifyFileType, Set<String> alwaysCopyMetadataKeys, String placeKey, KffDataObjectHandler kffDataObjectHandler, boolean useSbcf)
Used to propagate needed parent information to a sprouted child. NOTE: This is taken from emissary.place.MultiFileServerPlace.- Parameters:
parentIBaseDataObject- the source of parameters to be copiedchildIBaseDataObject- the destination for parameters to be copiednullifyFileType- if true the child fileType is nullified after the copyalwaysCopyMetadataKeys- set of metadata keys to always copy from parent to child.placeKey- the place key to be added to the transform history.kffDataObjectHandler- the kffDataObjectHandler to use to create the kff hashes.
-
addParentInformationToChildren
public static void addParentInformationToChildren(IBaseDataObject parent, @Nullable List<IBaseDataObject> children, boolean nullifyFileType, Set<String> alwaysCopyMetadataKeys, String placeKey, KffDataObjectHandler kffDataObjectHandler)
Used to propagate needed parent information to a sprouted child. NOTE: This is taken from emissary.place.MultiFileServerPlace.- Parameters:
parent- the source of parameters to be copiedchildren- the destination for parameters to be copiednullifyFileType- if true the child fileType is nullified after the copyalwaysCopyMetadataKeys- set of metadata keys to always copy from parent to child.placeKey- the place key to be added to the transform history.kffDataObjectHandler- the kffDataObjectHandler to use to create the kff hashes.
-
addParentInformationToChildren
public static void addParentInformationToChildren(IBaseDataObject parent, @Nullable List<IBaseDataObject> children, boolean nullifyFileType, Set<String> alwaysCopyMetadataKeys, String placeKey, KffDataObjectHandler kffDataObjectHandler, boolean useSbcf)
Used to propagate needed parent information to a sprouted child. NOTE: This is taken from emissary.place.MultiFileServerPlace.- Parameters:
parent- the source of parameters to be copiedchildren- the destination for parameters to be copiednullifyFileType- if true the child fileType is nullified after the copyalwaysCopyMetadataKeys- set of metadata keys to always copy from parent to child.placeKey- the place key to be added to the transform history.kffDataObjectHandler- the kffDataObjectHandler to use to create the kff hashes.useSbcf- chooses whether to use the SeekableByteChannelFactory or byte[] from the IBDO.
-
addParentInformationToChildExcluding
public static void addParentInformationToChildExcluding(IBaseDataObject parentIBaseDataObject, IBaseDataObject childIBaseDataObject, Pattern excludedParametersPattern)
Used to propagate needed parent metadata parameter information to a sprouted child except for those parameters whose names are specified in a regular expression pattern.- Parameters:
parentIBaseDataObject- the source of parameters to be copiedchildIBaseDataObject- the destination for parameters to be copiedexcludedParametersPattern- compiled regular expression specifying parameter names not to copy down
-
findPreferredDataByRegex
public static byte[] findPreferredDataByRegex(IBaseDataObject payload, List<Pattern> preferredViewNamePatterns)
Search for the first preferred view by regular expression or use the primary data if none match- Parameters:
payload- the payload to pull data frompreferredViewNamePatterns- the list of referred view regular expression patterns (null returns data)
-
findPreferredData
public static byte[] findPreferredData(IBaseDataObject payload, List<String> preferredViews)
Search for the first preferred view that is present or use the primary data if none- Parameters:
payload- the payload to pull data frompreferredViews- the list of preferred views (null returns data)
-
-