Constructor
new SparqlXmlResultParser(config)
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | is an object containing the parser configuration. |
Methods
getSupportedType()
isStreaming()
parse(stream, configopt) → {NodeJS.ReadableStream|Promise.<boolean>}
This method should be invoked with a text stream and will return also a stream converted to RDFJS objects.
Client of the method can subscribe to following events in order to consume
the stream:
stream.on('variables', (variables) => console.log(variables));
stream.on('data', (bindings) => console.log(bindings));
stream.on('error', (error) => console.log(error));
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
stream |
NodeJS.ReadableStream | with the text which has to be parsed to given format. |
|
config |
Object |
<optional> |
optional parser configuration. |
Returns:
a stream with the converted content for SELECT queries and a Promise which resolves to boolean value for ASK queries.
- Type
- NodeJS.ReadableStream | Promise.<boolean>