Constructor
new ContentParser(config)
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | is an object containing the parser configuration. |
- Source:
Methods
getConfig() → {Object}
- Source:
Returns:
config is the passed during the initialization parser config object.
- Type
- Object
(abstract) getSupportedType() → {string}
- Source:
Returns:
the type which underlying parser supports which should be the type under which it was registered in the parser registry.
- Type
- string
(abstract) isStreaming() → {boolean}
If implemented by successors, this must return boolean true
when the wrapped parser supports stream reading by default or
false
otherwise.
- Source:
Returns:
if the parser supports streaming by default
- Type
- boolean
(abstract) parse(content, configopt) → {Term}
Implementations should delegate the actual parsing to underlying parser library or to a custom implementation.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
content |
string | which has to be parsed to given format. |
|
config |
Object |
<optional> |
optional parser configuration. |
- Source:
Returns:
the converted content.
- Type
- Term