Skip to content

Commit a3d8e7e

Browse files
committed
Adding the changes.
1 parent b718b70 commit a3d8e7e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/datamovement/JacksonCSVSplitter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class JacksonCSVSplitter implements Splitter<JacksonHandle> {
4545
private ArrayNode headers = null;
4646

4747
/**
48+
* The CsvMapper configured for the current instance.
4849
* @return the CsvMapper for the current instance.
4950
*/
5051
public CsvMapper getCsvMapper() {
@@ -72,6 +73,7 @@ public JacksonCSVSplitter withCsvMapper(CsvMapper mapper) {
7273
}
7374

7475
/**
76+
* The CsvSchema configured for the current instance.
7577
* @return the CsvSchema for the current instance.
7678
*/
7779
public CsvSchema getCsvSchema() {
@@ -123,6 +125,7 @@ public Stream<JacksonHandle> split(Reader input) throws Exception {
123125
}
124126

125127
/**
128+
* The number of JsonNodes found so far.
126129
* @return the number of JsonNodes found in the input stream.
127130
*/
128131
@Override
@@ -131,6 +134,7 @@ public long getCount() {
131134
}
132135

133136
/**
137+
* The headers of the csv file.
134138
* @return the headers found in the csv file.
135139
*/
136140
public ArrayNode getHeaders() {

marklogic-client-api/src/main/java/com/marklogic/client/datamovement/Splitter.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222
import com.marklogic.client.io.marker.AbstractWriteHandle;
2323

2424
/**
25-
* To facilitate CSV splitting, Splitter allows to implement the split method where the
26-
* incoming input stream is converted to a stream of another object, for example JacksonHandle
27-
* and gives an option to keep a record of the number of objects created using getCount method.
25+
* Splitter splits an input stream into a Java stream of write handles.
2826
*/
2927
public interface Splitter<T extends AbstractWriteHandle> {
3028
/**
31-
* Converts the incoming input stream to a stream of object T.
29+
* Converts the incoming input stream to a stream of AbstractWriteHandle objects.
3230
* @param input is the incoming input stream.
33-
* @return a stream of T.
31+
* @return a stream of AbstractWriteHandle objects.
3432
*/
3533
Stream<T> split(InputStream input) throws Exception;
3634

0 commit comments

Comments
 (0)