public abstract class AbstractMetExtractor extends Object implements MetExtractor
A core MetExtractor
implementation, implementing all methods but {extractMetadata(File)
Modifier and Type | Field and Description |
---|---|
protected MetExtractorConfig |
config |
protected static Logger |
LOG |
protected MetExtractorConfigReader |
reader |
Constructor and Description |
---|
AbstractMetExtractor(MetExtractorConfigReader reader) |
Modifier and Type | Method and Description |
---|---|
Metadata |
extractMetadata(File f)
|
Metadata |
extractMetadata(File f,
File configFile)
|
Metadata |
extractMetadata(File f,
MetExtractorConfig config)
|
Metadata |
extractMetadata(File f,
String configFilePath)
|
Metadata |
extractMetadata(String filePath)
Extracts
Metadata from a given /path/to/some/file . |
Metadata |
extractMetadata(URL fileUrl)
|
Metadata |
extractMetadata(URL fileUrl,
MetExtractorConfig config)
|
protected abstract Metadata |
extrMetadata(File file)
|
void |
setConfigFile(File f)
Sets the config file for this MetExtractor to the specified
File
f . |
void |
setConfigFile(MetExtractorConfig config)
Sets the MetExtractorConfig for the MetExtractor
|
void |
setConfigFile(String filePath)
Sets the config file for this MetExtractor to the specified
File
identified by filePath . |
protected MetExtractorConfig config
protected MetExtractorConfigReader reader
protected static final Logger LOG
public AbstractMetExtractor(MetExtractorConfigReader reader)
protected abstract Metadata extrMetadata(File file) throws MetExtractionException
file
- The File
from which Metadata
will be extractedMetadata
extractedMetExtractionException
- If any error occurspublic Metadata extractMetadata(File f) throws MetExtractionException
MetExtractor
extractMetadata
in interface MetExtractor
f
- File object to extract Metadata from.Metadata
from the given File
.MetExtractionException
- If any error occurs.public Metadata extractMetadata(String filePath) throws MetExtractionException
MetExtractor
Metadata
from a given /path/to/some/file
.extractMetadata
in interface MetExtractor
filePath
- Path to a given file to extract Metadata from.Metadata
from the given filePath
.MetExtractionException
- If any error occurs.public Metadata extractMetadata(URL fileUrl) throws MetExtractionException
MetExtractor
extractMetadata
in interface MetExtractor
fileUrl
- The URL pointer to a File.Metadata
from the given File URL
.MetExtractionException
- If any error occurs.public Metadata extractMetadata(File f, File configFile) throws MetExtractionException
MetExtractor
extractMetadata
in interface MetExtractor
f
- The File to extract Metadata from.configFile
- The config file for this MetExtractor.Metadata
from the given File
using the
specified config file.MetExtractionException
- If any error occurs.public Metadata extractMetadata(File f, String configFilePath) throws MetExtractionException
MetExtractor
extractMetadata
in interface MetExtractor
f
- The File to extract Metadata from.configFilePath
- The path to the config file for this MetExtractor.Metadata
from the given File
using the
specified config file path.MetExtractionException
- If any error occurs.public Metadata extractMetadata(File f, MetExtractorConfig config) throws MetExtractionException
MetExtractor
extractMetadata
in interface MetExtractor
f
- The File
from which Metadata
will be extracted
fromconfig
- The config file for the extractorMetadata
extracted from the File
MetExtractionException
- If any error occurspublic Metadata extractMetadata(URL fileUrl, MetExtractorConfig config) throws MetExtractionException
MetExtractor
extractMetadata
in interface MetExtractor
fileUrl
- The URL
from which Metadata
will be extracted
fromconfig
- The config file for the extractorMetadata
extracted from the URL
MetExtractionException
- If any error occurspublic void setConfigFile(File f) throws MetExtractionException
MetExtractor
File
f
.setConfigFile
in interface MetExtractor
f
- The config file for this MetExtractor.MetExtractionException
public void setConfigFile(MetExtractorConfig config)
MetExtractor
setConfigFile
in interface MetExtractor
config
- The MetExtractorConfigpublic void setConfigFile(String filePath) throws MetExtractionException
MetExtractor
File
identified by filePath
.setConfigFile
in interface MetExtractor
filePath
- The config file path for this MetExtractor.MetExtractionException
Copyright © 1999–2017 Apache OODT. All rights reserved.