M - - The Metadata type returned by this Parser.public abstract class AbstractParser<M extends TypedMetadata> extends AbstractGroupable implements TypedParser<M>
Parser implementations.| Constructor and Description |
|---|
AbstractParser() |
| Modifier and Type | Method and Description |
|---|---|
void |
close(boolean fileOnly)
Closes the image source(s) associated with this component, with a toggle to
determine if the component itself is reset.
|
LocationInfo[] |
getAdvancedImageUsedLocations(int imageIndex,
boolean noPixels)
Returns an array of LocationInfo objects representing the Locations needed to open
the current series.
|
LocationInfo[] |
getAdvancedUsedLocations(boolean noPixels)
Returns an array of LocationInfo objects representing the Locations needed to open
this dataset.
|
org.scijava.io.location.Location[] |
getImageUsedFiles(int imageIndex)
Returns an array of filenames needed to open the indicated image index.
|
org.scijava.io.location.Location[] |
getImageUsedFiles(int imageIndex,
boolean noPixels)
Returns an array of filenames needed to open the indicated image.
|
M |
getMetadata() |
org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> |
getSource() |
org.scijava.io.location.Location |
getSourceLocation() |
Set<MetadataLevel> |
getSupportedMetadataLevels()
Returns a list of MetadataLevel options for determining the granularity of
Metadata collection.
|
org.scijava.io.location.Location[] |
getUsedFiles()
Returns an array of filenames needed to open this dataset.
|
org.scijava.io.location.Location[] |
getUsedLocations(boolean noPixels)
Returns an array of filenames needed to open this dataset.
|
M |
parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream)
Creates a
Metadata object from the provided image source. |
M |
parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle,
M meta)
Generic-parameterized
parse method, using
TypedMetadata to avoid type erasure conflicts with
Parser.parse(DataHandle, Metadata). |
M |
parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle,
Metadata meta)
Parses metadata from the provided image source to an existing
Metadata object (overwriting may occur). |
M |
parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle,
Metadata meta,
SCIFIOConfig config)
/** As
Parser.parse(DataHandle, Metadata) with configuration options. |
M |
parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle,
M meta,
SCIFIOConfig config)
Generic-parameterized
parse method, using
TypedMetadata to avoid type erasure conflicts with
Parser.parse(DataHandle, Metadata). |
M |
parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream,
SCIFIOConfig config)
As
Parser.parse(DataHandle) with configuration options. |
M |
parse(org.scijava.io.location.Location fileName)
Creates a
Metadata object using the provided location of an image
source. |
M |
parse(org.scijava.io.location.Location loc,
Metadata meta)
Parses metadata using the provided name of an image source, and writes to
an existing
Metadata object (overwriting may occur). |
M |
parse(org.scijava.io.location.Location loc,
Metadata meta,
SCIFIOConfig config)
As
Parser.parse(Location, Metadata) with configuration options. |
M |
parse(org.scijava.io.location.Location loc,
M meta,
SCIFIOConfig config)
Generic-parameterized
parse method, using
TypedMetadata to avoid type erasure conflicts with
Parser.parse(Location, Metadata). |
M |
parse(org.scijava.io.location.Location loc,
SCIFIOConfig config)
As
Parser.parse(Location) with configuration options. |
protected void |
setMetaData(Metadata meta)
Allows implementations of this class that override
parse(Location, Metadata, SCIFIOConfig) to set the metadata. |
protected abstract void |
typedParse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle,
M meta,
SCIFIOConfig config)
A helper method, called by
parse(DataHandle, TypedMetadata). |
void |
updateSource(org.scijava.io.location.Location source)
Updates the source being operated on by this parser (e.g. in multi-file
formats).
|
fileGroupOption, hasCompanionFiles, isSingleFilecloseasBrowsableLocation, asBrowsableLocation, getFormat, getFormatNamegetVersion, loggetInfo, getPriority, setInfo, setPriority, toStringcontext, getContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFormat, getFormatNamegetVersion, loggetIdentifiercontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationfileGroupOption, hasCompanionFiles, isSingleFilepublic M parse(org.scijava.io.location.Location fileName) throws IOException, FormatException
ParserMetadata object using the provided location of an image
source.parse in interface Parserparse in interface TypedParser<M extends TypedMetadata>fileName - the Location of the image source to parse.Metadata object of the appropriate type.IOExceptionFormatExceptionpublic M parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream) throws IOException, FormatException
ParserMetadata object from the provided image source.parse in interface Parserparse in interface TypedParser<M extends TypedMetadata>stream - a random access handle to the image source to parse.Metadata object of the appropriate type.IOExceptionFormatExceptionpublic M parse(org.scijava.io.location.Location loc, Metadata meta) throws IOException, FormatException
ParserMetadata object (overwriting may occur).parse in interface Parserloc - the Location of the image source to parse.meta - A base Metadata to fill.Metadata after parsing.IOExceptionFormatExceptionpublic M parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle, Metadata meta) throws IOException, FormatException
ParserMetadata object (overwriting may occur).parse in interface Parserhandle - A DataHandle to the image source to parse.meta - A base Metadata to fill.Metadata after parsing.IOExceptionFormatExceptionpublic M getMetadata()
getMetadata in interface Parserpublic org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> getSource()
public org.scijava.io.location.Location getSourceLocation()
getSourceLocation in interface Parserpublic void updateSource(org.scijava.io.location.Location source) throws IOException
ParserupdateSource in interface ParserIOExceptionpublic org.scijava.io.location.Location[] getUsedFiles()
ParsergetUsedFiles in interface Parserpublic org.scijava.io.location.Location[] getUsedLocations(boolean noPixels)
ParsergetUsedLocations in interface Parserpublic org.scijava.io.location.Location[] getImageUsedFiles(int imageIndex)
ParsergetImageUsedFiles in interface Parserpublic org.scijava.io.location.Location[] getImageUsedFiles(int imageIndex, boolean noPixels)
ParsergetImageUsedFiles in interface Parserpublic LocationInfo[] getAdvancedUsedLocations(boolean noPixels)
ParsergetAdvancedUsedLocations in interface Parserpublic LocationInfo[] getAdvancedImageUsedLocations(int imageIndex, boolean noPixels)
ParsergetAdvancedImageUsedLocations in interface Parserpublic Set<MetadataLevel> getSupportedMetadataLevels()
ParsergetSupportedMetadataLevels in interface Parserpublic M parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle, M meta) throws IOException, FormatException
TypedParserparse method, using
TypedMetadata to avoid type erasure conflicts with
Parser.parse(DataHandle, Metadata).parse in interface TypedParser<M extends TypedMetadata>IOExceptionFormatExceptionParser.parse(DataHandle, Metadata)public M parse(org.scijava.io.location.Location loc, M meta, SCIFIOConfig config) throws IOException, FormatException
TypedParserparse method, using
TypedMetadata to avoid type erasure conflicts with
Parser.parse(Location, Metadata).parse in interface TypedParser<M extends TypedMetadata>IOExceptionFormatExceptionParser.parse(Location, Metadata, SCIFIOConfig)public M parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle, M meta, SCIFIOConfig config) throws IOException, FormatException
TypedParserparse method, using
TypedMetadata to avoid type erasure conflicts with
Parser.parse(DataHandle, Metadata).parse in interface TypedParser<M extends TypedMetadata>IOExceptionFormatExceptionParser.parse(DataHandle, Metadata, SCIFIOConfig)public void close(boolean fileOnly)
throws IOException
HasSourceclose in interface HasSourcefileOnly - - If true, only the associated source(s) are closed.IOExceptionprotected abstract void typedParse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle, M meta, SCIFIOConfig config) throws IOException, FormatException
parse(DataHandle, TypedMetadata).
Allows for boilerplate code to come after parsing, specifically calls to
Metadata.populateImageMetadata().
This method should be implemented to populate any format-specific Metadata.
NB: if a Format requires type-specific parsing to occur before the Abstract
layer, Override #parse(String, TypedMetadata) instead.
IOExceptionFormatExceptionpublic M parse(org.scijava.io.location.Location loc, SCIFIOConfig config) throws IOException, FormatException
ParserParser.parse(Location) with configuration options.parse in interface Parserparse in interface TypedParser<M extends TypedMetadata>loc - Name of the image source to parse.config - Configuration information to use for this parse.Metadata object of the appropriate type.IOExceptionFormatExceptionpublic M parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream, SCIFIOConfig config) throws IOException, FormatException
ParserParser.parse(DataHandle) with configuration options.parse in interface Parserparse in interface TypedParser<M extends TypedMetadata>stream - a DataHandle to the image source to parse.config - Configuration information to use for this parse.Metadata object of the appropriate type.IOExceptionFormatExceptionpublic M parse(org.scijava.io.location.Location loc, Metadata meta, SCIFIOConfig config) throws IOException, FormatException
ParserParser.parse(Location, Metadata) with configuration options.parse in interface Parserloc - the Location of the image source to parse.meta - A base Metadata to fill.config - Configuration information to use for this parse.Metadata after parsing.IOExceptionFormatExceptionpublic M parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle, Metadata meta, SCIFIOConfig config) throws IOException, FormatException
ParserParser.parse(DataHandle, Metadata) with configuration options.parse in interface Parserhandle - a random access handle to the image source to parse.meta - A base Metadata to fill.config - Configuration information to use for this parse.Metadata after parsing.IOExceptionFormatExceptionprotected void setMetaData(Metadata meta)
parse(Location, Metadata, SCIFIOConfig) to set the metadata.meta - the metadata object for this parserCopyright © 2011–2026 SCIFIO. All rights reserved.