Interface Format
- All Superinterfaces:
Identified
A Format represents a file format (or other) used for data coming in and out of RiskScape. This could be something simple like a CSV file or bitmap data coming from a WCS server.
Format is set to become the central place where data formats are registered and as a jumping off point for other APIs that allows reading and writing of those formats. For now we are using this for creating RiskscapeWriter only, but we will want to evolve this and make Format a part of the BookmarkResolver API, i.e. add a getFormat() method to BookmarkResolver. Also note that format should not be bound to row-based formats and that we want to make sure we allow things like coverages or bitmaps to come on board, too
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumFormat characteristics are here to guide the various bits of code that use them to be able to use them generically without prior knowledge of them specifically.static classAs yet empty format options that apply to all formats. -
Method Summary
Modifier and TypeMethodDescriptionResultOrProblems<? extends Format.FormatOptions>buildOptions(Map<String, List<?>> paramMap, BindingContext context, Struct input) Builds a FormatOptions object from the given parameter mapgetRequiredOptions(BindingContext context) Returns options that are required for this output format (if any)Get aWriterConstructorto create an output writer with.default Class<? extends Format.FormatOptions>Methods inherited from interface nz.org.riskscape.engine.Identified
getId, getIdentifiedClass
-
Method Details
-
getExtension
String getExtension()- Returns:
- the file extension that this format is normally saved as
-
getMediaType
String getMediaType()- Returns:
- the media type for this format
-
getCharacteristics
Set<Format.Characteristics> getCharacteristics()- Returns:
- the set of characteristics associated with this data format.
-
getWriterOptionsClass
- Returns:
- the
Classdefining writer options for this format. Objects of this class may be used as the format
-
buildOptions
ResultOrProblems<? extends Format.FormatOptions> buildOptions(Map<String, List<?>> paramMap, BindingContext context, Struct input) Builds a FormatOptions object from the given parameter map
-
getRequiredOptions
Returns options that are required for this output format (if any)
-
getWriterConstructor
Optional<WriterConstructor> getWriterConstructor()Get a
WriterConstructorto create an output writer with.- Returns:
- the writer constructor or empty if writing tuples to this format is not supported
-