test_class.file: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBExportTest.java
test_class.identifier: RDBExportTest
test_case.body: @Test
      public void testparseDel() {
          // actually, RFC 4180 format
          String[] empty = new String[0];
          String[] result;
  
          result = RDBExport.parseDel("1,2,3").toArray(empty);
          assertArrayEquals(new String[] { "1", "2", "3" }, result);
  
          result = RDBExport.parseDel("\"a\",\"b,c\",\"d\"\"e\"").toArray(empty);
          assertArrayEquals(new String[] { "a", "b,c", "d\"e" }, result);
      }
test_case.class_method_signature: RDBExportTest.testparseDel()
test_case.full_signature: @Test public void testparseDel()
test_case.identifier: testparseDel
test_case.invocations: toArray parseDel assertArrayEquals toArray parseDel assertArrayEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testparseDel()
focal_class.declarator: UTF8 = Charset.forName("UTF-8")
focal_class.modifier: private static final
focal_class.original_string: private static final Charset UTF8 = Charset.forName("UTF-8");
focal_class.type: Charset
focal_class.var_name: UTF8
focal_class.declarator: JSON = new RDBJSONSupport(false)
focal_class.modifier: private static final
focal_class.original_string: private static final RDBJSONSupport JSON = new RDBJSONSupport(false);
focal_class.type: RDBJSONSupport
focal_class.var_name: JSON
focal_class.declarator: EXCLUDE_COLUMNS = new HashSet<String>()
focal_class.modifier: private static final
focal_class.original_string: private static final Set<String> EXCLUDE_COLUMNS = new HashSet<String>();
focal_class.type: Set<String>
focal_class.var_name: EXCLUDE_COLUMNS
focal_class.file: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBExport.java
focal_class.identifier: RDBExport
focal_class.class_method_signature: RDBExport.main(String[] args)
focal_class.full_signature: public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_class.class_method_signature: RDBExport.dumpFile(String filename, String lobdir, Format format, PrintStream out, List<String> fieldNames,
              List<String> columnNames, RDBDocumentSerializer ser)
focal_class.full_signature: private static void dumpFile(String filename, String lobdir, Format format, PrintStream out, List<String> fieldNames,
              List<String> columnNames, RDBDocumentSerializer ser)
focal_class.identifier: dumpFile
focal_class.modifiers: private static
focal_class.parameters: (String filename, String lobdir, Format format, PrintStream out, List<String> fieldNames,
              List<String> columnNames, RDBDocumentSerializer ser)
focal_class.return: void
focal_class.signature: void dumpFile(String filename, String lobdir, Format format, PrintStream out, List<String> fieldNames,
              List<String> columnNames, RDBDocumentSerializer ser)
focal_class.class_method_signature: RDBExport.parseDel(String line)
focal_class.full_signature: protected static List<String> parseDel(String line)
focal_class.identifier: parseDel
focal_class.modifiers: protected static
focal_class.parameters: (String line)
focal_class.return: List<String>
focal_class.signature: List<String> parseDel(String line)
focal_class.class_method_signature: RDBExport.dumpJDBC(String url, String user, String pw, String table, String query, Format format, PrintStream out,
              List<String> fieldNames, RDBDocumentSerializer ser)
focal_class.full_signature: private static void dumpJDBC(String url, String user, String pw, String table, String query, Format format, PrintStream out,
              List<String> fieldNames, RDBDocumentSerializer ser)
focal_class.identifier: dumpJDBC
focal_class.modifiers: private static
focal_class.parameters: (String url, String user, String pw, String table, String query, Format format, PrintStream out,
              List<String> fieldNames, RDBDocumentSerializer ser)
focal_class.return: void
focal_class.signature: void dumpJDBC(String url, String user, String pw, String table, String query, Format format, PrintStream out,
              List<String> fieldNames, RDBDocumentSerializer ser)
focal_class.class_method_signature: RDBExport.readBooleanOrNullFromResultSet(ResultSet res, String field)
focal_class.full_signature: @Nullable private static Boolean readBooleanOrNullFromResultSet(ResultSet res, String field)
focal_class.identifier: readBooleanOrNullFromResultSet
focal_class.modifiers: @Nullable private static
focal_class.parameters: (ResultSet res, String field)
focal_class.return: Boolean
focal_class.signature: Boolean readBooleanOrNullFromResultSet(ResultSet res, String field)
focal_class.class_method_signature: RDBExport.readLongOrNullFromResultSet(ResultSet res, String field)
focal_class.full_signature: @Nullable private static Long readLongOrNullFromResultSet(ResultSet res, String field)
focal_class.identifier: readLongOrNullFromResultSet
focal_class.modifiers: @Nullable private static
focal_class.parameters: (ResultSet res, String field)
focal_class.return: Long
focal_class.signature: Long readLongOrNullFromResultSet(ResultSet res, String field)
focal_class.class_method_signature: RDBExport.dumpRow(RDBDocumentSerializer ser, String id, RDBRow row)
focal_class.full_signature: @NotNull private static StringBuilder dumpRow(RDBDocumentSerializer ser, String id, RDBRow row)
focal_class.identifier: dumpRow
focal_class.modifiers: @NotNull private static
focal_class.parameters: (RDBDocumentSerializer ser, String id, RDBRow row)
focal_class.return: StringBuilder
focal_class.signature: StringBuilder dumpRow(RDBDocumentSerializer ser, String id, RDBRow row)
focal_class.class_method_signature: RDBExport.dumpFieldNames(List<String> fieldNames)
focal_class.full_signature: @NotNull private static String dumpFieldNames(List<String> fieldNames)
focal_class.identifier: dumpFieldNames
focal_class.modifiers: @NotNull private static
focal_class.parameters: (List<String> fieldNames)
focal_class.return: String
focal_class.signature: String dumpFieldNames(List<String> fieldNames)
focal_class.class_method_signature: RDBExport.asJSON(List<String> fieldNames, StringBuilder fulljson)
focal_class.full_signature: @NotNull private static StringBuilder asJSON(List<String> fieldNames, StringBuilder fulljson)
focal_class.identifier: asJSON
focal_class.modifiers: @NotNull private static
focal_class.parameters: (List<String> fieldNames, StringBuilder fulljson)
focal_class.return: StringBuilder
focal_class.signature: StringBuilder asJSON(List<String> fieldNames, StringBuilder fulljson)
focal_class.class_method_signature: RDBExport.asCSV(List<String> csvFieldNames, StringBuilder fulljson)
focal_class.full_signature: @NotNull private static StringBuilder asCSV(List<String> csvFieldNames, StringBuilder fulljson)
focal_class.identifier: asCSV
focal_class.modifiers: @NotNull private static
focal_class.parameters: (List<String> csvFieldNames, StringBuilder fulljson)
focal_class.return: StringBuilder
focal_class.signature: StringBuilder asCSV(List<String> csvFieldNames, StringBuilder fulljson)
focal_class.class_method_signature: RDBExport.dumpJsonValuetoCsv(StringBuilder buf, Object o)
focal_class.full_signature: private static void dumpJsonValuetoCsv(StringBuilder buf, Object o)
focal_class.identifier: dumpJsonValuetoCsv
focal_class.modifiers: private static
focal_class.parameters: (StringBuilder buf, Object o)
focal_class.return: void
focal_class.signature: void dumpJsonValuetoCsv(StringBuilder buf, Object o)
focal_class.class_method_signature: RDBExport.isBinaryType(int sqlType)
focal_class.full_signature: private static boolean isBinaryType(int sqlType)
focal_class.identifier: isBinaryType
focal_class.modifiers: private static
focal_class.parameters: (int sqlType)
focal_class.return: boolean
focal_class.signature: boolean isBinaryType(int sqlType)
focal_class.class_method_signature: RDBExport.printUsage()
focal_class.full_signature: private static void printUsage()
focal_class.identifier: printUsage
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void printUsage()
focal_class.class_method_signature: RDBExport.printHelp()
focal_class.full_signature: private static void printHelp()
focal_class.identifier: printHelp
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void printHelp()
focal_method.body: protected static List<String> parseDel(String line) {
          ArrayList<String> result = new ArrayList<String>();
  
          boolean inQuoted = false;
          char quotechar = '"';
          char fielddelim = ',';
          StringBuilder value = new StringBuilder();
          for (int i = 0; i < line.length(); i++) {
              char c = line.charAt(i);
              if (!inQuoted) {
                  if (c == fielddelim) {
                      result.add(value.toString());
                      value = new StringBuilder();
                  } else {
                      if (value.length() == 0 && c == quotechar) {
                          inQuoted = true;
                      } else {
                          value.append(c);
                      }
                  }
              } else {
                  if (c == quotechar) {
                      if (i + 1 != line.length() && line.charAt(i + 1) == quotechar) {
                          // quoted quote char
                          value.append(c);
                          i += 1;
                      } else {
                          inQuoted = false;
                      }
                  } else {
                      value.append(c);
                  }
              }
          }
          result.add(value.toString());
  
          return result;
      }
focal_method.class_method_signature: RDBExport.parseDel(String line)
focal_method.full_signature: protected static List<String> parseDel(String line)
focal_method.identifier: parseDel
focal_method.invocations: length charAt add toString length append length charAt append append add toString
focal_method.modifiers: protected static
focal_method.parameters: (String line)
focal_method.return: List<String>
focal_method.signature: List<String> parseDel(String line)