public abstract class ContainerItem extends Object
An instance of ContainerItem
class is used as return value of Parser.getContainer()
method. See the usage examples there.
Constructor and Description |
---|
ContainerItem(String filePath,
long size,
Iterable<MetadataItem> metadata)
Initializes a new instance of
ContainerItem with the item full path. |
ContainerItem(String name,
String directory,
long size,
Iterable<MetadataItem> metadata)
Initializes a new instance of
ContainerItem with the item name and directory. |
Modifier and Type | Method and Description |
---|---|
String |
getDirectory()
Gets the directory of the item.
|
String |
getFilePath()
Gets the full path of the item.
|
Iterable<MetadataItem> |
getMetadata()
Gets the collection of metadata items.
|
String |
getName()
Gets the name of the item.
|
long |
getSize()
Gets the size of the item.
|
Parser |
openParser()
Creates the
Parser object for the item content. |
Parser |
openParser(LoadOptions loadOptions)
Creates the
Parser object for the item content with LoadOptions . |
abstract Parser |
openParser(LoadOptions loadOptions,
ParserSettings parserSettings)
|
abstract InputStream |
openStream()
Opens the stream of the item content.
|
public ContainerItem(String name, String directory, long size, Iterable<MetadataItem> metadata)
ContainerItem
with the item name and directory.name
- The name of the item.directory
- The directory of the item.size
- The size of the item.metadata
- The collection of metadata items.public ContainerItem(String filePath, long size, Iterable<MetadataItem> metadata)
ContainerItem
with the item full path.filePath
- The full path of the item.size
- The size of the item.metadata
- The collection of metadata items.public String getName()
public String getDirectory()
public String getFilePath()
public long getSize()
public Iterable<MetadataItem> getMetadata()
MetadataItem
objects; empty if metadata isn't set.public abstract InputStream openStream()
public Parser openParser()
Parser
object for the item content.Parser
class of the item content.public Parser openParser(LoadOptions loadOptions)
Parser
object for the item content with LoadOptions
.loadOptions
- The options to open the item content.Parser
class of the item content.public abstract Parser openParser(LoadOptions loadOptions, ParserSettings parserSettings)
loadOptions
- The options to open the item content.parserSettings
- The parser settings which are used to customize data extraction.Parser
class of the item content.Copyright © 2020. All rights reserved.