public interface JPhyloIOFormatInfo extends JPhyloIOFormatSpecificObject
JPhyloIOEventReader
and JPhyloIOEventWriter
.Modifier and Type | Method and Description |
---|---|
JPhyloIOContentExtensionFileFilter |
createFileFilter(ContentExtensionFileFilter.TestStrategy testStrategy)
Creates a new file filter instance that is associated with the modeled format.
|
java.lang.String |
getFormatName()
Returns the human readable name of the modeled format.
|
MetadataModeling |
getMetadataModeling(EventContentType parentContentType,
boolean forReading)
Determines which kind of metadata the represented format allows to model nested under the specified data element
Readers will not produce metaevents under an unsupported type, while writers will accept but ignore metaevents under
this type.
|
java.util.Set<java.lang.String> |
getSupportedParameters(boolean forReading)
Returns a set of the parameters supported by the associated reader or writer.
|
boolean |
isElementModeled(EventContentType contentType,
boolean forReading)
Determines whether the represented format allows to model the specified data element (content type).
|
getFormatID
java.lang.String getFormatName()
JPhyloIOContentExtensionFileFilter createFileFilter(ContentExtensionFileFilter.TestStrategy testStrategy)
testStrategy
- the strategy to be used to accept a file or notboolean isElementModeled(EventContentType contentType, boolean forReading)
Note that the values returned here indicate the capabilities of the provided readers and writers and not the
capabilities of the respective format. It may happen that elements of a format are not supported by its reader and
writer. In such cases false
would be returned here for the according content type.
Note that this method will return true
for content types that may occur at multiple positions in the event stream
(e.g. EventContentType.LITERAL_META
or EventContentType.SET_ELEMENT
), if they are supported at least
at one position. Use #isMetadataModeled(EventContentType)
to check at which position metadata elements are
supported.
contentType
- the content type to be testedforReading
- Specify true
here, if support for contentType
in reading this format or
false
for writing it should be returned.true
if the specified content type is supported, false
otherwise#isMetadataModeled(EventContentType)
MetadataModeling getMetadataModeling(EventContentType parentContentType, boolean forReading)
Note that the values returned here indicate the capabilities of the provided readers and writers and not the capabilities of the respective format.
contentType
- the content type of the parent element of possibly supported metadataforReading
- Specify true
here, if support for metadata nested under contentType
in reading this
format or false
for writing it should be returned.null
#isElementModeled(EventContentType)
java.util.Set<java.lang.String> getSupportedParameters(boolean forReading)
ReadWriteParameterNames
. Readers
and writers from third party developers may introduce additional parameter names defined elsewhere.forReading
- Specify true
here, if support for parameterName
in reading this format or
false
for writing it should be returned.