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
always, since the type is
known to be compatible. But individual implementations may have other
requirements beyond class assignability.
Copyright © 2009–2017 SciJava. All rights reserved.