abstract class AbstractConverter[T, C <: ConverterConfig, F <: Field, O <: ConverterOptions] extends SimpleFeatureConverter with ParsingConverter[T] with LazyLogging
Abstract converter implementation. Typically paired with an AbstractConverterFactory. If so, needs to have a default constructor consisting of (targetSft, config, fields, options), so that the AbstractConverterFactory can instantiate it via reflection.
Subclasses need to implement read
to parse the underlying input stream into raw values that will be
transformed to simple features.
- T
intermediate parsed values binding
- C
config binding
- F
field binding
- O
options binding
- Alphabetic
- By Inheritance
- AbstractConverter
- ParsingConverter
- SimpleFeatureConverter
- LazyLogging
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
AbstractConverter(sft: SimpleFeatureType, config: C, fields: Seq[F], options: O)
- sft
simple feature type
- config
converter config
- fields
converter fields
- options
converter options
Abstract Value Members
-
abstract
def
parse(is: InputStream, ec: EvaluationContext): CloseableIterator[T]
Parse objects out of the input stream.
Parse objects out of the input stream. This should be lazily evaluated, so that any exceptions occur in the call to
hasNext
(and not during the iterator creation), which lets us handle them appropriately inErrorHandlingIterator
. If there is any sense of 'lines', they should be indicated withec.counter.incLineCount
- is
input
- ec
evaluation context
- returns
raw extracted values, one iterator entry per simple feature
- Attributes
- protected
-
abstract
def
values(parsed: CloseableIterator[T], ec: EvaluationContext): CloseableIterator[Array[Any]]
Convert parsed values into the raw array used for reading fields.
Convert parsed values into the raw array used for reading fields. If line counting was not handled in
parse
(due to no sense of 'lines' in the input), then the line count should be incremented here instead- parsed
parsed values
- ec
evaluation context
- Attributes
- protected
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
close(): Unit
- Definition Classes
- AbstractConverter → Closeable → AutoCloseable
- val config: C
-
def
convert(values: CloseableIterator[T], ec: EvaluationContext): CloseableIterator[SimpleFeature]
Convert parsed values into simple features
Convert parsed values into simple features
- values
parsed values, from
parse
- ec
evaluation context
- Definition Classes
- AbstractConverter → ParsingConverter
-
def
createEvaluationContext(globalParams: Map[String, Any], success: Counter, failure: Counter): EvaluationContext
Create a context used for local state while processing.
Create a context used for local state while processing. A context object is not thread-safe, and should only be used in one thread at a time.
- globalParams
global key-values to make accessible through the evaluation context
- success
counter for tracking successful conversions
- failure
counter for tracking failed conversions
- Definition Classes
- AbstractConverter → SimpleFeatureConverter
-
def
createEvaluationContext(globalParams: Map[String, Any]): EvaluationContext
Create a context used for local state while processing.
Create a context used for local state while processing. A context object is not thread-safe, and should only be used in one thread at a time.
- globalParams
global key-values to make accessible through the evaluation context
- Definition Classes
- AbstractConverter → SimpleFeatureConverter
-
final
def
createEvaluationContext(globalParams: Map[String, Any]): EvaluationContext
Java API for
createEvaluationContext
Java API for
createEvaluationContext
- globalParams
global key-values to make accessible through the evaluation context
- Definition Classes
- SimpleFeatureConverter
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val fields: Seq[F]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- LazyLogging
- Annotations
- @transient()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val options: O
-
def
process(is: InputStream, ec: EvaluationContext): CloseableIterator[SimpleFeature]
Process an input stream into simple features.
Process an input stream into simple features.
This method should be thread-safe, as long as different evaluation contexts are used for each request.
- is
input
- ec
evaluation context
- Definition Classes
- AbstractConverter → SimpleFeatureConverter
- val sft: SimpleFeatureType
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
targetSft: SimpleFeatureType
Result feature type
Result feature type
- Definition Classes
- AbstractConverter → SimpleFeatureConverter
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated