Package com.gengoai.hermes.format
Class DocFormatService
- java.lang.Object
-
- com.gengoai.hermes.format.DocFormatService
-
public final class DocFormatService extends Object
Service for handling
DocFormat
andDocFormatProvider
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ONE_PER_LINE_SUFFIX
The suffix to add to formats to indicate the input has one document per line.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DocFormat
create(@NonNull Specification specification)
Creates aDocFormat
from the given specification, where the specification is in the form of:format_name[_opl]::[RESOURCE];PARAMETERS
static DocFormat
create(@NonNull String specification)
Creates aDocFormat
from the given specification, where the specification is in the form of:format_name[_opl]::[RESOURCE];PARAMETERS
static DocFormatProvider
getProvider(@NonNull String name)
Gets theDocFormatProvider
for the given format name.static Collection<DocFormatProvider>
getProviders()
-
-
-
Field Detail
-
ONE_PER_LINE_SUFFIX
public static final String ONE_PER_LINE_SUFFIX
The suffix to add to formats to indicate the input has one document per line.- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static DocFormat create(@NonNull @NonNull Specification specification)
Creates a
DocFormat
from the given specification, where the specification is in the form of:format_name[_opl]::[RESOURCE];PARAMETERS
- Parameters:
specification
- the specification- Returns:
- the doc format
-
create
public static DocFormat create(@NonNull @NonNull String specification)
Creates a
DocFormat
from the given specification, where the specification is in the form of:format_name[_opl]::[RESOURCE];PARAMETERS
- Parameters:
specification
- the specification- Returns:
- the doc format
-
getProvider
public static DocFormatProvider getProvider(@NonNull @NonNull String name)
Gets theDocFormatProvider
for the given format name.- Parameters:
name
- the format name- Returns:
- the DocFormatProvider
-
getProviders
public static Collection<DocFormatProvider> getProviders()
- Returns:
- all registered
DocFormatProvider
s.
-
-