blob: 13e439b78089a8390e13725fd5d73eed3b7742bc [file] [log] [blame]
/*
* Copyright (c) 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM - initial API and implementation
*
* $Id: XMI2UMLSaveImpl.java,v 1.1 2006/04/26 15:48:53 khussey Exp $
*/
package org.eclipse.uml2.uml.internal.resource;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.xmi.XMLHelper;
import org.eclipse.emf.ecore.xmi.impl.EMOFExtendedMetaData;
import org.eclipse.emf.ecore.xmi.impl.XMISaveImpl;
public class XMI2UMLSaveImpl
extends XMISaveImpl {
public XMI2UMLSaveImpl(XMLHelper helper) {
super(helper);
}
protected void saveContainedMany(EObject eObject,
EStructuralFeature eStructuralFeature) {
if (eStructuralFeature == EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS) {
doc.startElement(EMOFExtendedMetaData.XMI_EXTENSION_ELEMENT);
doc.addAttribute(EMOFExtendedMetaData.XMI_EXTENDER_ATTRIBUTE,
EcorePackage.eNS_URI);
super.saveContainedMany(eObject, eStructuralFeature);
doc.endElement();
} else {
super.saveContainedMany(eObject, eStructuralFeature);
}
}
}