File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
marklogic-client-api/src/main/java/com/marklogic/client/datamovement Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff 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 () {
Original file line number Diff line number Diff line change 2222import 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 */
2927public 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
You can’t perform that action at this time.
0 commit comments