Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.alfresco.repo.content.metadata
Enum MetadataExtracter.OverwritePolicy
java.lang.Object
  java.lang.Enum<MetadataExtracter.OverwritePolicy>
      org.alfresco.repo.content.metadata.MetadataExtracter.OverwritePolicy
All Implemented Interfaces:
Comparable<MetadataExtracter.OverwritePolicy>, Serializable
Enclosing class:
MetadataExtracter

@org.alfresco.api.AlfrescoPublicApi
public static enum MetadataExtracter.OverwritePolicy
extends Enum<MetadataExtracter.OverwritePolicy>
A enumeration of functional property overwrite policies. These determine whether extracted properties are written into the property map or not.
Author:
Derek Hulley, Jesper Steen Møller

Enum Constant Summary
CAUTIOUS
          This policy only puts the extracted value if there is no value (null or otherwise) in the properties map.
EAGER
          This policy puts the new value if: the extracted property is not null null extracted values are return in the 'modified' map.
PRAGMATIC
          This policy puts the new value if: the extracted property is not null either: there is no target key for the property the target value is null the string representation of the target value is an empty string or: the extracted property is a media related one (eg Image, Audio or Video) null extracted values are return in the 'modified' map.
PRUDENT
          This policy puts the new value if: the extracted property is not null there is no target key for the property the target value is null the string representation of the target value is an empty string null extracted values are return in the 'modified' map.
Method Summary
applyProperties(Map<QName,Serializable> extractedProperties, Map<QName,Serializable> targetProperties)
          Apply the overwrite policy for the extracted properties.
valueOf(String name)
values()
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
Enum Constant Detail
EAGER
public static final MetadataExtracter.OverwritePolicy EAGER
This policy puts the new value if:
  • the extracted property is not null
null extracted values are return in the 'modified' map.

PRAGMATIC
public static final MetadataExtracter.OverwritePolicy PRAGMATIC
This policy puts the new value if:
  • the extracted property is not null
  • either:
    • there is no target key for the property
    • the target value is null
    • the string representation of the target value is an empty string
    or:
    • the extracted property is a media related one (eg Image, Audio or Video)
null extracted values are return in the 'modified' map.

PRUDENT
public static final MetadataExtracter.OverwritePolicy PRUDENT
This policy puts the new value if:
  • the extracted property is not null
  • there is no target key for the property
  • the target value is null
  • the string representation of the target value is an empty string
null extracted values are return in the 'modified' map.

CAUTIOUS
public static final MetadataExtracter.OverwritePolicy CAUTIOUS
This policy only puts the extracted value if there is no value (null or otherwise) in the properties map. It is assumed that the mere presence of a property key is enough to inidicate that the target property is as intented. This policy puts the new value if:
  • the extracted property is not null
  • there is no target key for the property
null extracted values are return in the 'modified' map.
Method Detail
values
public static MetadataExtracter.OverwritePolicy[] values()

valueOf
public static MetadataExtracter.OverwritePolicy valueOf(String name)

applyProperties
public Map<QName,SerializableapplyProperties(Map<QName,Serializable> extractedProperties,
                                               Map<QName,Serializable> targetProperties)
Apply the overwrite policy for the extracted properties.
Returns:
Returns a map of all properties that were applied to the target map as well as any null values that weren't applied but were present.

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.