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

## org.apache.any23.extractor
Class ExtractionParameters

    java.lang.Object
      org.apache.any23.extractor.ExtractionParameters

    public class ExtractionParameters

extends Object

This class models the parameters to be used to perform an extraction.

Author:
  Michele Mostarda (mostarda@fbk.eu)
See Also:
  `Any23`

Nested Class Summary
`static class` | `ExtractionParameters.ValidationMode` Declares the supported validation actions.

Constructor Summary
`ExtractionParameters(Configuration configuration, ExtractionParameters.ValidationMode extractionMode)` Constructor.
`ExtractionParameters(Configuration configuration, ExtractionParameters.ValidationMode extractionMode, boolean nesting)` Constructor, allows to set explicitly the value for flag `SingleDocumentExtraction.METADATA_NESTING_FLAG`.
`ExtractionParameters(Configuration configuration, ExtractionParameters.ValidationMode extractionMode, Map<String,Boolean> extractionFlags, Map<String,String> extractionProperties)` Constructor.

Method Summary
`boolean` | `equals(Object obj)`
`boolean` | `getFlag(String flagName)` Returns the value of the specified extraction flag, if the flag is undefined it will be retrieved by the default `Configuration`.
`String` | `getProperty(String propertyName)` Returns the value of the specified extraction property, if the property is undefined it will be retrieved by the default `Configuration`.
`int` | `hashCode()`
`boolean` | `isFix()`
`boolean` | `isValidate()`
`static ExtractionParameters` | `newDefault()` Creates the default extraction parameters with `DefaultConfiguration`.
`static ExtractionParameters` | `newDefault(Configuration c)`
`Boolean` | `setFlag(String flagName, boolean value)` Sets the value for an extraction flag.
`String` | `setProperty(String propertyName, String propertyValue)` Sets the value for an extraction property.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExtractionParameters

    public ExtractionParameters(Configuration configuration,
                                ExtractionParameters.ValidationMode extractionMode,
                                Map<String,Boolean> extractionFlags,
                                Map<String,String> extractionProperties)

  Constructor.

  Parameters:
    `configuration` - underlying configuration.
    `extractionMode` - specifies the required extraction mode.
    `extractionFlags` - map of specific flags used for extraction. If not specified they will be retrieved by the default `Configuration`.
    `extractionProperties` - map of specific properties used for extraction. If not specified they will ne retrieved by the default `Configuration`.

### ExtractionParameters

    public ExtractionParameters(Configuration configuration,
                                ExtractionParameters.ValidationMode extractionMode)

  Constructor.

  Parameters:
    `configuration` - underlying configuration.
    `extractionMode` - specifies the required extraction mode.

### ExtractionParameters

    public ExtractionParameters(Configuration configuration,
                                ExtractionParameters.ValidationMode extractionMode,
                                boolean nesting)

  Constructor, allows to set explicitly the value for flag `SingleDocumentExtraction.METADATA_NESTING_FLAG`.

  Parameters:
    `configuration` - the underlying configuration.
    `extractionMode` - specifies the required extraction mode.
    `nesting` - if `true` nesting triples will be expressed.

Method Detail

### newDefault

    public static final ExtractionParameters newDefault(Configuration c)

  Parameters:
    `c` - the underlying configuration.
  Returns:
    the default extraction parameters.

### newDefault

    public static final ExtractionParameters newDefault()

  Creates the default extraction parameters with `DefaultConfiguration`.

  Returns:
    the default extraction parameters.

### isValidate

    public boolean isValidate()

  Returns:
    `true` if validation is active.

### isFix

    public boolean isFix()

  Returns:
    `true` if fix is active.

### getFlag

    public boolean getFlag(String flagName)

  Returns the value of the specified extraction flag, if the flag is undefined it will be retrieved by the default `Configuration`.

  Parameters:
    `flagName` - name of flag.
  Returns:
    flag value.

### setFlag

    public Boolean setFlag(String flagName,
                           boolean value)

  Sets the value for an extraction flag.

  Parameters:
    `flagName` - flag name.
    `value` - new flag value.
  Returns:
    the previous flag value.

### getProperty

    public String getProperty(String propertyName)

  Returns the value of the specified extraction property, if the property is undefined it will be retrieved by the default `Configuration`.

  Parameters:
    `propertyName` - the property name.
  Returns:
    the property value.
  Throws:
    `IllegalArgumentException` - if the property name is not defined in configuration.

### setProperty

    public String setProperty(String propertyName,
                              String propertyValue)

  Sets the value for an extraction property.

  Parameters:
    `propertyName` - the property name.
    `propertyValue` - the property value.
  Returns:
    the previous property value.

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

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

Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.