} else if (m_structure.attribute(i).isString()) { vals[i] = 0; m_structure.attribute(i).setStringValue(Utils.unquote(val.toString())); } else if (m_structure.attribute(i).isDate()) { String format = m_structure.attribute(i).getDateFormat(); SimpleDateFormat sdf = new SimpleDateFormat(format); String dateVal = Utils.unquote(val.toString()); try { vals[i] = sdf.parse(dateVal).getTime(); m_structure.attribute(i).indexOfValue(Utils.unquote(val.toString())); if (index < 0) { throw new IOException("Read unknown nominal value " + val.toString()
} else if (m_structure.attribute(i).isString()) { vals[i] = 0; m_structure.attribute(i).setStringValue(Utils.unquote(val.toString())); } else if (m_structure.attribute(i).isDate()) { String format = m_structure.attribute(i).getDateFormat(); SimpleDateFormat sdf = new SimpleDateFormat(format); String dateVal = Utils.unquote(val.toString()); try { vals[i] = sdf.parse(dateVal).getTime(); m_structure.attribute(i).indexOfValue(Utils.unquote(val.toString())); if (index < 0) { throw new IOException("Read unknown nominal value " + val.toString()
setRelationName(Utils.unquote(tmpStr)); } else { setRelationName("");
setRelationName(Utils.unquote(tmpStr)); } else { setRelationName("");
output = Utils.quote(input); assertTrue("Empty string quoted", output.startsWith("'") && output.endsWith("'")); assertTrue("Empty string restored", input.equals(Utils.unquote(output))); assertTrue("Blank restored", input.equals(Utils.unquote(output))); assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output))); assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output))); assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output))); assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output))); assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));
output = Utils.quote(input); assertTrue("Empty string quoted", output.startsWith("'") && output.endsWith("'")); assertTrue("Empty string restored", input.equals(Utils.unquote(output))); assertTrue("Blank restored", input.equals(Utils.unquote(output))); assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output))); assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output))); assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output))); assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output))); assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));
vals[index] = data.attribute(index).indexOfValue(value); if ((vals[index] == -1) && value.startsWith("'") && value.endsWith("'")) vals[index] = data.attribute(index).indexOfValue(Utils.unquote(value)); vals[index] = data.attribute(index).indexOfValue(Utils.unbackQuoteChars(Utils.unquote(value))); if (vals[index] == -1) { System.err.println("Unknown label '" + value + "' for attribute #" + (index+1) + "!");
vals[index] = data.attribute(index).indexOfValue(value); if ((vals[index] == -1) && value.startsWith("'") && value.endsWith("'")) vals[index] = data.attribute(index).indexOfValue(Utils.unquote(value)); vals[index] = data.attribute(index).indexOfValue(Utils.unbackQuoteChars(Utils.unquote(value))); if (vals[index] == -1) { System.err.println("Unknown label '" + value + "' for attribute #" + (index+1) + "!");