1 /** 2 * <copyright> 3 * 4 * Copyright (c) 2005 IBM Corporation and others. 5 * All rights reserved. This program and the accompanying materials 6 * are made available under the terms of the Eclipse Public License v1.0 7 * which accompanies this distribution, and is available at 8 * http://www.eclipse.org/legal/epl-v10.html 9 * 10 * Contributors: 11 * IBM - Initial API and implementation 12 * 13 * </copyright> 14 * 15 * $Id: DOMHelper.java,v 1.2 2005/06/08 06:16:07 nickb Exp $ 16 */ 17 package org.eclipse.emf.ecore.xmi; 18 19 import org.eclipse.emf.ecore.EObject; 20 import org.eclipse.emf.ecore.EStructuralFeature; 21 import org.w3c.dom.Node; 22 23 /** 24 * This interface provides methods which given a DOM node return corresponding EMF objects. 25 * @since 2.1.0 26 */ 27 public interface DOMHelper 28 { 29 /** 30 * @param node the DOM node 31 * @return the {@link org.eclipse.emf.ecore.EObject} container that holds the DOM node. 32 */ 33 EObject getContainer(Node node); 34 35 /** 36 * @param node the DOM node 37 * @return the feature for the DOM node value. 38 */ 39 EStructuralFeature getEStructuralFeature(Node node); 40 41 /** 42 * @param node the attribute {@link org.w3c.dom.Attr} or element {@link org.w3c.dom.Element} node 43 * @return the corresponding EMF value, one of: 44 * {@link org.eclipse.emf.ecore.EObject} 45 * {@link org.eclipse.emf.ecore.util.FeatureMap.Entry} 46 * {@link java.util.List} 47 * or Java type (e.g. {@link java.lang.String} 48 */ 49 Object getValue(Node node); 50 51 } 52