Class RLSCSVParser
java.lang.Object
fr.inria.rules.integraal.io.csv.RLSCSVParser
- All Implemented Interfaces:
Parser<RLSCSVResult>, CloseableIterator<RLSCSVResult>, Closeable, AutoCloseable
Parses an RLS source file into
RLSCSVResult entries.- Author:
- Florent Tornil
This class parses an RLS file into RLSCSVResults
Retrieves CSV files from a configuration file inspired from RLS syntax <a href="https://github.com/knowsys/rulewerk/wiki/Rule-syntax-grammar#source-declarations">...</a> Each line of the configuration file defines a CSV file as well as the predicate it defines.
-
Constructor Summary
ConstructorsConstructorDescriptionRLSCSVParser(File file) Creates a parser for the supplied RLS configuration file.RLSCSVParser(String filepath) Creates a parser for the RLS configuration file at the supplied path. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Parser
parse, streamParsedObjects
-
Constructor Details
-
RLSCSVParser
Creates a parser for the supplied RLS configuration file.- Parameters:
file- RLS configuration file to parseAll
-
RLSCSVParser
Creates a parser for the RLS configuration file at the supplied path.- Parameters:
filepath- to RLS configuration file
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:CloseableIteratorIndicates whether another element can be read from the iterator.- Specified by:
hasNextin interfaceCloseableIterator<RLSCSVResult>- Specified by:
hasNextin interfaceParser<RLSCSVResult>- Returns:
- true iff there is a next element
-
next
Description copied from interface:CloseableIteratorReturns the next element from the iterator.- Specified by:
nextin interfaceCloseableIterator<RLSCSVResult>- Specified by:
nextin interfaceParser<RLSCSVResult>- Returns:
- the next element
-
close
public void close()Description copied from interface:CloseableIteratorCloses the iterator and releases its resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCloseableIterator<RLSCSVResult>
-