private void emitNewOccurrence(int srxId, AttributeList attrs) throws SAXException { enabledOutput = toProcess(srxId); if (!enabledOutput) { return; } currentSrxId = srxId; String mappedName = XmiMapping.getMappingName(srxId); emit(eol + kOccurrenceType + " " + mappedName + eol); // if it's a component, write its composite String composite = XmiMapping.getComposite(srxId); if (composite != null) { if (!occurrenceNameStack.empty()) { String compositeName = (String) occurrenceNameStack.peek(); if (compositeName != null) { emit(composite + " " + compositeName + eol); } } // end if } // end if // Keep its XMI.id if (attrs != null) { for (int i = 0; i < attrs.getLength(); i++) { String attr = attrs.getName(i); if (attr.equals(kXmiId)) { currentXmiId = attrs.getValue(i); } // end if } // end for } // end if // Keep its current XMI name & SRX name currentXmiName = XmiMapping.getXmiName(srxId); currentSrxName = XmiMapping.getSrxName(srxId); }