protected void finished() { if (isValidXML()) { if (key != null) { instructions.put(key, MetadataFactory.createTouchpointInstruction(getText(), qualifier)); } } } }
/** * Returns an instance of {@link ITouchpointData} with the given instructions. * * @param instructions The instructions for the touchpoint data. * @return The created touchpoint data */ public static ITouchpointData createTouchpointData(Map<String, ? extends Object> instructions) { Assert.isNotNull(instructions); //copy the map to protect against subsequent change by caller if (instructions.isEmpty()) return EMPTY_TOUCHPOINT_DATA; Map<String, ITouchpointInstruction> result = new LinkedHashMap<String, ITouchpointInstruction>(instructions.size()); for (Map.Entry<String, ? extends Object> entry : instructions.entrySet()) { Object value = entry.getValue(); ITouchpointInstruction instruction; if (value == null || value instanceof String) instruction = createTouchpointInstruction((String) value, null); else instruction = (ITouchpointInstruction) value; result.put(entry.getKey(), instruction); } return new TouchpointData(result); }
protected void finished() { if (isValidXML()) { if (key != null) { instructions.put(key, MetadataFactory.createTouchpointInstruction(getText(), qualifier)); } } } }
protected void finished() { if (isValidXML()) { if (key != null) { instructions.put(key, MetadataFactory.createTouchpointInstruction(getText(), qualifier)); } } } }
private void parseInstruction(String prefix, Map<String, ITouchpointInstruction> instructions) { String phase = current.substring(current.lastIndexOf('.') + 1); String body = currentValue(); next(); prefix += '.'; String importAttribute = null; if (current != null && current.startsWith(prefix)) { if (current.substring(prefix.length()).equals(IMPORT)) { importAttribute = currentValue(); } else { // we ignore elements we do not understand } next(); } ITouchpointInstruction instruction = MetadataFactory.createTouchpointInstruction(body, importAttribute); instructions.put(phase, instruction); }
private void parseInstruction(String prefix, Map<String, ITouchpointInstruction> instructions) { String phase = current.substring(current.lastIndexOf('.') + 1); String body = currentValue(); next(); prefix += '.'; String importAttribute = null; if (current != null && current.startsWith(prefix)) { if (current.substring(prefix.length()).equals(IMPORT)) { importAttribute = currentValue(); } else { // we ignore elements we do not understand } next(); } ITouchpointInstruction instruction = MetadataFactory.createTouchpointInstruction(body, importAttribute); instructions.put(phase, instruction); }
private void parseInstruction(String prefix, Map<String, ITouchpointInstruction> instructions) { String phase = current.substring(current.lastIndexOf('.') + 1); String body = currentValue(); next(); prefix += '.'; String importAttribute = null; if (current != null && current.startsWith(prefix)) { if (current.substring(prefix.length()).equals(IMPORT)) { importAttribute = currentValue(); } else { // we ignore elements we do not understand } next(); } ITouchpointInstruction instruction = MetadataFactory.createTouchpointInstruction(body, importAttribute); instructions.put(phase, instruction); }
private void parseInstruction(String prefix, Map<String, ITouchpointInstruction> instructions) { String phase = current.substring(current.lastIndexOf('.') + 1); String body = currentValue(); next(); prefix += '.'; String importAttribute = null; if (current != null && current.startsWith(prefix)) { if (current.substring(prefix.length()).equals(IMPORT)) { importAttribute = currentValue(); } else { // we ignore elements we do not understand } next(); } ITouchpointInstruction instruction = MetadataFactory.createTouchpointInstruction(body, importAttribute); instructions.put(phase, instruction); }
importAttribute += instruction.getBody(); instruction = createTouchpointInstruction(body, importAttribute);