public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof ITouchpointData)) return false; final ITouchpointData other = (ITouchpointData) obj; if (instructions == null) { if (other.getInstructions() != null) return false; } else if (!instructions.equals(other.getInstructions())) return false; return true; }
return initial; Map<String, ITouchpointInstruction> resultInstructions = new HashMap<String, ITouchpointInstruction>(initial.getInstructions()); for (String key : incomingInstructions.keySet()) { ITouchpointInstruction instruction = incomingInstructions.get(key);
protected void writeTouchpointData(Collection<ITouchpointData> touchpointData) { if (touchpointData != null && touchpointData.size() > 0) { start(TOUCHPOINT_DATA_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.size()); for (ITouchpointData nextData : touchpointData) { Map<String, ITouchpointInstruction> instructions = nextData.getInstructions(); if (instructions.size() > 0) { start(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, instructions.size()); for (Map.Entry<String, ITouchpointInstruction> entry : instructions.entrySet()) { start(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); attribute(TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE, entry.getKey()); ITouchpointInstruction instruction = entry.getValue(); if (instruction.getImportAttribute() != null) attribute(TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE, instruction.getImportAttribute()); cdata(instruction.getBody(), true); end(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); } end(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); } } end(TOUCHPOINT_DATA_ELEMENT); } }
protected void writeTouchpointData(Collection<ITouchpointData> touchpointData) { if (touchpointData != null && touchpointData.size() > 0) { start(TOUCHPOINT_DATA_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.size()); for (ITouchpointData nextData : touchpointData) { Map<String, ITouchpointInstruction> instructions = nextData.getInstructions(); if (instructions.size() > 0) { start(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, instructions.size()); for (Map.Entry<String, ITouchpointInstruction> entry : instructions.entrySet()) { start(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); attribute(TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE, entry.getKey()); ITouchpointInstruction instruction = entry.getValue(); if (instruction.getImportAttribute() != null) attribute(TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE, instruction.getImportAttribute()); cdata(instruction.getBody(), true); end(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); } end(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); } } end(TOUCHPOINT_DATA_ELEMENT); } }
protected void writeTouchpointData(Collection<ITouchpointData> touchpointData) { if (touchpointData != null && touchpointData.size() > 0) { start(TOUCHPOINT_DATA_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.size()); for (ITouchpointData nextData : touchpointData) { Map<String, ITouchpointInstruction> instructions = nextData.getInstructions(); if (instructions.size() > 0) { start(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, instructions.size()); for (Map.Entry<String, ITouchpointInstruction> entry : instructions.entrySet()) { start(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); attribute(TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE, entry.getKey()); ITouchpointInstruction instruction = entry.getValue(); if (instruction.getImportAttribute() != null) attribute(TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE, instruction.getImportAttribute()); cdata(instruction.getBody(), true); end(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); } end(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); } } end(TOUCHPOINT_DATA_ELEMENT); } }
for (Entry<String, ITouchpointInstruction> tpe : tp.getInstructions().entrySet()) { Activator.println(" "+tpe.getKey()+"="+tpe.getValue());