/** * Sets the character used to indicate a row should be ignored when present at the start of a row. * * @param comments New comments value */ public void setComments(Character comments) { setComments(charToString(comments)); }
/** * Sets the value used to separate individual fields in a record. * * @param fieldDelimiter New fieldDelimiter value */ public void setFieldDelimiter(Character fieldDelimiter) { setFieldDelimiter(charToString(fieldDelimiter)); }
/** * Sets the value used for escaping where the field delimiter is part of the value. * * @param quoteCharacter New quoteCharacter value */ public void setQuoteCharacter(Character quoteCharacter) { setQuoteCharacter(charToString(quoteCharacter)); }
/** * Sets the character used for escaping the quote character inside an already escaped value. * * @param quoteEscapeCharacter New quoteEscapeCharacter value */ public void setQuoteEscapeCharacter(Character quoteEscapeCharacter) { setQuoteEscapeCharacter(charToString(quoteEscapeCharacter)); }
/** * Sets the value used to separate individual records. * * @param recordDelimiter New recordDelimiter value */ public void setRecordDelimiter(Character recordDelimiter) { setRecordDelimiter(charToString(recordDelimiter)); }
String escapeChar = schema.getProperty(ESCAPE_CHAR, null); CSVInput selectObjectCSVInputSerialization = new CSVInput(); selectObjectCSVInputSerialization.setRecordDelimiter(lineDelimiter); selectObjectCSVInputSerialization.setFieldDelimiter(fieldDelimiter); selectObjectCSVInputSerialization.setComments(COMMENTS_CHAR_STR); selectObjectCSVInputSerialization.setQuoteCharacter(quoteChar); selectObjectCSVInputSerialization.setQuoteEscapeCharacter(escapeChar); InputSerialization selectObjectInputSerialization = new InputSerialization();
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFileHeaderInfo() == null) ? 0 : getFileHeaderInfo().hashCode()); hashCode = prime * hashCode + ((getCommentsAsString() == null) ? 0 : getCommentsAsString().hashCode()); hashCode = prime * hashCode + ((getQuoteEscapeCharacterAsString() == null) ? 0 : getQuoteEscapeCharacterAsString().hashCode()); hashCode = prime * hashCode + ((getRecordDelimiterAsString() == null) ? 0 : getRecordDelimiterAsString().hashCode()); hashCode = prime * hashCode + ((getFieldDelimiterAsString() == null) ? 0 : getFieldDelimiterAsString().hashCode()); hashCode = prime * hashCode + (getQuoteCharacterAsString() != null ? getQuoteCharacterAsString().hashCode() : 0); hashCode = prime * hashCode + ((getAllowQuotedRecordDelimiter() == null) ? 0 : getAllowQuotedRecordDelimiter().hashCode()); return hashCode; }
/** * Sets the value used to separate individual records. * * @param recordDelimiter The new recordDelimiter value. * @return This object for method chaining. */ public CSVInput withRecordDelimiter(String recordDelimiter) { setRecordDelimiter(recordDelimiter); return this; }
/** * Sets the value used to separate individual fields in a record. * * @param fieldDelimiter The new fieldDelimiter value. * @return This object for method chaining. */ public CSVInput withFieldDelimiter(Character fieldDelimiter) { setFieldDelimiter(fieldDelimiter); return this; }
/** * Sets the value used for escaping where the field delimiter is part of the value. * * @param quoteCharacter The new quoteCharacter value. * @return This object for method chaining. */ public CSVInput withQuoteCharacter(String quoteCharacter) { setQuoteCharacter(quoteCharacter); return this; }
/** * Sets the character used to indicate a row should be ignored when present at the start of a row. * * @param comments The new comments value. * @return This object for method chaining. */ public CSVInput withComments(String comments) { setComments(comments); return this; }
/** * Sets the character used for escaping the quote character inside an already escaped value. * * @param quoteEscapeCharacter The new quoteEscapeCharacter value. * @return This object for method chaining. */ public CSVInput withQuoteEscapeCharacter(String quoteEscapeCharacter) { setQuoteEscapeCharacter(quoteEscapeCharacter); return this; }
private static SelectObjectContentRequest generateBaseCSVRequest(String bucket, String key, String query) { SelectObjectContentRequest request = new SelectObjectContentRequest(); request.setBucketName(bucket); request.setKey(key); request.setExpression(query); request.setExpressionType(ExpressionType.SQL); InputSerialization inputSerialization = new InputSerialization(); inputSerialization.setCsv(new CSVInput()); inputSerialization.setCompressionType(CompressionType.NONE); request.setInputSerialization(inputSerialization); OutputSerialization outputSerialization = new OutputSerialization(); outputSerialization.setCsv(new CSVOutput()); request.setOutputSerialization(outputSerialization); return request; } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || ! (obj instanceof InputSerialization)) { return false; } final InputSerialization other = (InputSerialization) obj; if (other.getCsv() == null ^ this.getCsv() == null) return false; if (other.getCsv() != null && !other.getCsv().equals(this.getCsv())) return false; if (other.getJson() == null ^ this.getJson() == null) return false; if (other.getJson() != null && !other.getJson().equals(this.getJson())) return false; if (other.getCompressionType() == null ^ this.getCompressionType() == null) return false; if (other.getCompressionType() != null && !other.getCompressionType().equals(this.getCompressionType())) return false; return true; }
String escapeChar = schema.getProperty(ESCAPE_CHAR, null); CSVInput selectObjectCSVInputSerialization = new CSVInput(); selectObjectCSVInputSerialization.setRecordDelimiter(lineDelimiter); selectObjectCSVInputSerialization.setFieldDelimiter(fieldDelimiter); selectObjectCSVInputSerialization.setComments(COMMENTS_CHAR_STR); selectObjectCSVInputSerialization.setQuoteCharacter(quoteChar); selectObjectCSVInputSerialization.setQuoteEscapeCharacter(escapeChar); InputSerialization selectObjectInputSerialization = new InputSerialization();
if (other.getFileHeaderInfo() == null ^ this.getFileHeaderInfo() == null) return false; if (other.getFileHeaderInfo() != null && !other.getFileHeaderInfo().equals(this.getFileHeaderInfo())) return false; if (other.getQuoteEscapeCharacterAsString() == null ^ this.getQuoteEscapeCharacterAsString() == null) return false; if (other.getQuoteEscapeCharacterAsString() != null && !other.getQuoteEscapeCharacterAsString().equals(this.getQuoteEscapeCharacterAsString())) return false; if (other.getCommentsAsString() == null ^ this.getCommentsAsString() == null) return false; if (other.getCommentsAsString() != null && !other.getCommentsAsString().equals(this.getCommentsAsString())) return false; if (other.getRecordDelimiterAsString() == null ^ this.getRecordDelimiterAsString() == null) return false; if (other.getRecordDelimiterAsString() != null && !other.getRecordDelimiterAsString().equals(this.getRecordDelimiterAsString())) return false; if (other.getFieldDelimiterAsString() == null ^ this.getFieldDelimiterAsString() == null) return false; if (other.getFieldDelimiterAsString() != null && !other.getFieldDelimiterAsString().equals(this.getFieldDelimiterAsString())) return false; if (other.getQuoteCharacterAsString() == null ^ this.getQuoteCharacterAsString() == null) return false; if (other.getQuoteCharacterAsString() != null && !other.getQuoteCharacterAsString().equals(this.getQuoteCharacterAsString())) return false; if (other.getAllowQuotedRecordDelimiter() != null && !other.getAllowQuotedRecordDelimiter().equals(this.getAllowQuotedRecordDelimiter())) return false; return true;
/** * Sets the value used to separate individual records. * * @param recordDelimiter The new recordDelimiter value. * @return This object for method chaining. */ public CSVInput withRecordDelimiter(Character recordDelimiter) { setRecordDelimiter(recordDelimiter); return this; }
/** * Sets the value used to separate individual fields in a record. * * @param fieldDelimiter The new fieldDelimiter value. * @return This object for method chaining. */ public CSVInput withFieldDelimiter(String fieldDelimiter) { setFieldDelimiter(fieldDelimiter); return this; }
/** * Sets the value used for escaping where the field delimiter is part of the value. * * @param quoteCharacter The new quoteCharacter value. * @return This object for method chaining. */ public CSVInput withQuoteCharacter(Character quoteCharacter) { setQuoteCharacter(quoteCharacter); return this; }
/** * Sets the Single character used to indicate a row should be ignored when present at the start of a row. * * @param comments The new comments value. * @return This object for method chaining. */ public CSVInput withComments(Character comments) { setComments(comments); return this; }