public class DynamicMetadataOptions extends Object implements MetadataOptions
| Modifier and Type | Field and Description | 
|---|---|
| static MetadataLevel | METADATA_LEVEL_DEFAULT | 
| static String | METADATA_LEVEL_KEY | 
| private Properties | props | 
| static boolean | READER_VALIDATE_DEFAULT | 
| static String | READER_VALIDATE_KEY | 
| Constructor and Description | 
|---|
| DynamicMetadataOptions()Creates an options object with metadata level set to  METADATA_LEVEL_DEFAULTand file validation set toREADER_VALIDATE_DEFAULT. | 
| DynamicMetadataOptions(MetadataLevel level)Creates an options object with metadata level set to the
 specified value and file validation set to  READER_VALIDATE_DEFAULT | 
| Modifier and Type | Method and Description | 
|---|---|
| String | get(String name)Get the value of property  name. | 
| String | get(String name,
   String defaultValue)Get the value of property  name. | 
| Boolean | getBoolean(String name)Get the value of property  nameas a Boolean. | 
| Boolean | getBoolean(String name,
          Boolean defaultValue)Get the value of property  nameas a Boolean. | 
| Class<?> | getClass(String name)Get the value of property  nameas a class. | 
| Class<?> | getClass(String name,
        Class<?> defaultValue)Get the value of property  nameas a class. | 
| Double | getDouble(String name)Get the value of property  nameas a Double. | 
| Double | getDouble(String name,
         Double defaultValue)Get the value of property  nameas a Double. | 
| <T extends Enum<T>> | getEnum(String name,
       T defaultValue)Get the value of property  nameas an enumerated type. | 
| File | getFile(String name)Get the value of property  nameas a file object. | 
| File | getFile(String name,
       File defaultValue)Get the value of property  nameas a file object. | 
| Float | getFloat(String name)Get the value of property  nameas a Float. | 
| Float | getFloat(String name,
        Float defaultValue)Get the value of property  nameas a Float. | 
| Integer | getInteger(String name)Get the value of property  nameas an Integer. | 
| Integer | getInteger(String name,
          Integer defaultValue)Get the value of property  nameas an Integer. | 
| Long | getLong(String name)Get the value of property  nameas a Long. | 
| Long | getLong(String name,
       Long defaultValue)Get the value of property  nameas a Long. | 
| MetadataLevel | getMetadataLevel()Get the configured metadata level. | 
| boolean | isValidate()Checks whether file validation has been set. | 
| void | set(String name,
   String value)Set property  nametovalue. | 
| void | setBoolean(String name,
          Boolean value)Set property  nameto Booleanvalue. | 
| void | setClass(String name,
        Class<?> value)Set property  nameto Classvalue. | 
| void | setDouble(String name,
         Double value)Set property  nameto Doublevalue. | 
| <T extends Enum<T>> | setEnum(String name,
       T value)Set property  nameto enumerated typevalue. | 
| void | setFile(String name,
       File value)Set property  nameto file objectvalue. | 
| void | setFloat(String name,
        Float value)Set property  nameto Floatvalue. | 
| void | setInteger(String name,
          Integer value)Set property  nameto Integervalue. | 
| void | setLong(String name,
       Long value)Set property  nameto Longvalue. | 
| void | setMetadataLevel(MetadataLevel level)Set the metadata level. | 
| void | setValidate(boolean validateMetadata)Specifies whether or not to validate files when reading. | 
public static final String METADATA_LEVEL_KEY
public static final MetadataLevel METADATA_LEVEL_DEFAULT
public static final String READER_VALIDATE_KEY
public static final boolean READER_VALIDATE_DEFAULT
private Properties props
public DynamicMetadataOptions()
METADATA_LEVEL_DEFAULT and file validation set to READER_VALIDATE_DEFAULT.public DynamicMetadataOptions(MetadataLevel level)
READER_VALIDATE_DEFAULTlevel - the MetadataLevel to use.public MetadataLevel getMetadataLevel()
MetadataOptionsgetMetadataLevel in interface MetadataOptionsMetadataLevel.public void setMetadataLevel(MetadataLevel level)
MetadataOptionssetMetadataLevel in interface MetadataOptionslevel - a MetadataLevel.public boolean isValidate()
MetadataOptionsisValidate in interface MetadataOptionstrue if files are validated when read, false otherwise.public void setValidate(boolean validateMetadata)
MetadataOptionssetValidate in interface MetadataOptionsvalidateMetadata - true if files should be validated, false otherwise.public void set(String name, String value)
name to value.
 If value is null the property will be removed.name - property name.value - property value.IllegalArgumentException - if name is null.public String get(String name)
name.name - property name.null if the property does not exist.public String get(String name, String defaultValue)
name.name - property name.defaultValue - default value.defaultValue if the property
 does not exist.public <T extends Enum<T>> void setEnum(String name, T value)
name to enumerated type value.name - property name.value - property value.public <T extends Enum<T>> T getEnum(String name, T defaultValue)
name as an enumerated type.name - property name.defaultValue - default value.defaultValue if the property does not exist.IllegalArgumentException - if mapping is illegal for the type
 providedpublic void setBoolean(String name, Boolean value)
name to Boolean value.name - property name.value - property value.public Boolean getBoolean(String name)
name as a Boolean.name - property name.null if the
 property does not exist.IllegalArgumentException - if value does not represent a Boolean.public Boolean getBoolean(String name, Boolean defaultValue)
name as a Boolean.name - property name.defaultValue - default value.defaultValue if
 the property does not exist.IllegalArgumentException - if value does not represent a Boolean.public void setInteger(String name, Integer value)
name to Integer value.name - property name.value - property value.public Integer getInteger(String name)
name as an Integer.name - property name.null if the
 property does not exist.NumberFormatException - if value does not represent an Integer.public Integer getInteger(String name, Integer defaultValue)
name as an Integer.name - property name.defaultValue - default value.defaultValue if
 the property does not exist.NumberFormatException - if value does not represent an Integer.public void setLong(String name, Long value)
name to Long value.name - property name.value - property value.public Long getLong(String name)
name as a Long.name - property name.null if the property
 does not exist.NumberFormatException - if value does not represent a Long.public Long getLong(String name, Long defaultValue)
name as a Long.name - property name.defaultValue - default value.defaultValue if
 the property does not exist.NumberFormatException - if value does not represent a Long.public void setFloat(String name, Float value)
name to Float value.name - property name.value - property value.public Float getFloat(String name)
name as a Float.name - property name.null if the
 property does not exist.NumberFormatException - if value does not represent a Float.public Float getFloat(String name, Float defaultValue)
name as a Float.name - property name.defaultValue - default value.defaultValue if
 the property does not exist.NumberFormatException - if value does not represent a Float.public void setDouble(String name, Double value)
name to Double value.name - property name.value - property value.public Double getDouble(String name)
name as a Double.name - property name.null if the
 property does not exist.NumberFormatException - if value does not represent a Double.public Double getDouble(String name, Double defaultValue)
name as a Double.name - property name.defaultValue - default value.defaultValue if
 the property does not exist.NumberFormatException - if value does not represent a Double.public void setClass(String name, Class<?> value)
name to Class value.name - property name.value - property value.public Class<?> getClass(String name) throws ClassNotFoundException
name as a class.name - property name.null if the
 property does not exist.ClassNotFoundException - if value does not map to an existing class.public Class<?> getClass(String name, Class<?> defaultValue) throws ClassNotFoundException
name as a class.name - property name.defaultValue - default value.defaultValue if
 the property does not exist.ClassNotFoundException - if value does not map to an existing class.public void setFile(String name, File value)
name to file object value.name - property name.value - property value.public File getFile(String name)
name as a file object.name - property name.File, or null if the
 property does not exist.Copyright © 2017 Open Microscopy Environment