private void parseCommentMetamorph(String comment) { // parse key/value pairs StringTokenizer st = new StringTokenizer(comment, "\n"); while (st.hasMoreTokens()) { String line = st.nextToken(); int colon = line.indexOf(':'); if (colon < 0) { addGlobalMeta("Comment", line); description = line; continue; } String key = line.substring(0, colon); String value = line.substring(colon + 1); addGlobalMeta(key, value); } }
private void parseCommentMetamorph(String comment) { // parse key/value pairs StringTokenizer st = new StringTokenizer(comment, "\n"); while (st.hasMoreTokens()) { String line = st.nextToken(); int colon = line.indexOf(':'); if (colon < 0) { addGlobalMeta("Comment", line); description = line; continue; } String key = line.substring(0, colon); String value = line.substring(colon + 1); addGlobalMeta(key, value); } }
private void parseCommentGeneric(String comment) { if (comment == null) return; String[] lines = comment.split("\n"); if (lines.length > 1) { StringBuilder buf = new StringBuilder(comment.length()); for (String line : lines) { int eq = line.indexOf('='); if (eq != -1) { String key = line.substring(0, eq).trim(); String value = line.substring(eq + 1).trim(); addGlobalMeta(key, value); } else if (!line.startsWith("[")) { buf.append(line); buf.append('\n'); } } description = buf.toString(); addGlobalMeta("Comment", description); } }
private void parseCommentGeneric(String comment) { if (comment == null) return; String[] lines = comment.split("\n"); if (lines.length > 1) { StringBuilder buf = new StringBuilder(comment.length()); for (String line : lines) { int eq = line.indexOf('='); if (eq != -1) { String key = line.substring(0, eq).trim(); String value = line.substring(eq + 1).trim(); addGlobalMeta(key, value); } else if (!line.startsWith("[")) { buf.append(line); buf.append('\n'); } } description = buf.toString(); addGlobalMeta("Comment", description); } }
XMLTools.parseXML(metadata); for (String key : xmlMetadata.keySet()) { addGlobalMeta(key, xmlMetadata.get(key)); addGlobalMeta(tag.toString(), metadata);
XMLTools.parseXML(metadata); for (String key : xmlMetadata.keySet()) { addGlobalMeta(key, xmlMetadata.get(key)); addGlobalMeta(tag.toString(), metadata);