public interface TextFormat extends HandlerPlugin<File>
TextFormat
is a plugin that provides handling for a text markup
language.
Text formats discoverable at runtime must implement this interface and be
annotated with @Plugin
with attribute Plugin.type()
=
TextFormat
.class. While it possible to create a text format merely by
implementing this interface, it is encouraged to instead extend
AbstractTextFormat
, for convenience.
Plugin
,
TextService
Modifier and Type | Method and Description |
---|---|
String |
asHTML(String text)
Expresses the given text string in HTML format.
|
List<String> |
getExtensions()
Gets the list of filename extensions for text in this format.
|
default Class<File> |
getType()
Gets the type associated with the object.
|
default boolean |
supports(File file)
Gets whether this object is compatible with the given data object.
|
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
List<String> getExtensions()
default boolean supports(File file)
Typed
By default, this method will return true
iff the data is assignable
to the associated type given by Typed.getType()
. But individual
implementations may have other requirements beyond class assignability.
Copyright © 2015–2022 SciJava. All rights reserved.