diff options
Diffstat (limited to 'bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd')
72 files changed, 0 insertions, 23023 deletions
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAnyContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAnyContent.java deleted file mode 100644 index 5e13bf8ca9..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAnyContent.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Any Content</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAnyContent() - * @model - * @generated - */ -public interface DTDAnyContent extends DTDElementContent { -} // DTDAnyContent diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAttribute.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAttribute.java deleted file mode 100644 index ba9841f51b..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAttribute.java +++ /dev/null @@ -1,240 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -import java.util.Collection; - -import org.eclipse.emf.ecore.EAttribute; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Attribute</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getComment <em>Comment</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultKind <em>Default Kind</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultValueString <em>Default Value String</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity <em>Attribute Name Referenced Entity</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity <em>Attribute Type Referenced Entity</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement <em>DTD Element</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute() - * @model - * @generated - */ -public interface DTDAttribute extends EAttribute, DTDObject, DTDSourceOffset { - // NON-GEN interfaces DTDObject, DTDSourceOffset - - public DTDType getDTDType(); - - public void setDTDType(DTDType type); - - public void setDTDBasicType(int value); - - public DTDEnumerationType createDTDEnumeration(String[] enumValues, int enumKind); - - public Collection getEnumeratedValues(); - - public String unparse(); - - /** - * Returns the value of the '<em><b>Comment</b></em>' attribute. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Comment</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Comment</em>' attribute. - * @see #setComment(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_Comment() - * @model - * @generated - */ - String getComment(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getComment <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Comment</em>' attribute. - * @see #getComment() - * @generated - */ - void setComment(String value); - - /** - * Returns the value of the '<em><b>Default Kind</b></em>' attribute. - * The literals are from the enumeration - * {@link org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind}. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Default Kind</em>' attribute isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Default Kind</em>' attribute. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind - * @see #setDefaultKind(DTDDefaultKind) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_DefaultKind() - * @model - * @generated - */ - DTDDefaultKind getDefaultKind(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultKind <em>Default Kind</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Default Kind</em>' attribute. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind - * @see #getDefaultKind() - * @generated - */ - void setDefaultKind(DTDDefaultKind value); - - /** - * Returns the value of the '<em><b>Default Value String</b></em>' - * attribute. <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Default Value String</em>' attribute - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Default Value String</em>' attribute. - * @see #setDefaultValueString(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_DefaultValueString() - * @model - * @generated - */ - String getDefaultValueString(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultValueString <em>Default Value String</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Default Value String</em>' - * attribute. - * @see #getDefaultValueString() - * @generated - */ - void setDefaultValueString(String value); - - /** - * Returns the value of the '<em><b>Attribute Name Referenced Entity</b></em>' - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeNameReference <em>Attribute Name Reference</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Attribute Name Referenced Entity</em>' - * reference isn't clear, there really should be more of a description - * here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Attribute Name Referenced Entity</em>' - * reference. - * @see #setAttributeNameReferencedEntity(DTDEntity) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_AttributeNameReferencedEntity() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeNameReference - * @model opposite="attributeNameReference" - * @generated - */ - DTDEntity getAttributeNameReferencedEntity(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity <em>Attribute Name Referenced Entity</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Attribute Name Referenced Entity</em>' - * reference. - * @see #getAttributeNameReferencedEntity() - * @generated - */ - void setAttributeNameReferencedEntity(DTDEntity value); - - /** - * Returns the value of the '<em><b>Attribute Type Referenced Entity</b></em>' - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeTypeReference <em>Attribute Type Reference</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Attribute Type Referenced Entity</em>' - * reference isn't clear, there really should be more of a description - * here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Attribute Type Referenced Entity</em>' - * reference. - * @see #setAttributeTypeReferencedEntity(DTDEntity) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_AttributeTypeReferencedEntity() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeTypeReference - * @model opposite="attributeTypeReference" - * @generated - */ - DTDEntity getAttributeTypeReferencedEntity(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity <em>Attribute Type Referenced Entity</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Attribute Type Referenced Entity</em>' - * reference. - * @see #getAttributeTypeReferencedEntity() - * @generated - */ - void setAttributeTypeReferencedEntity(DTDEntity value); - - /** - * Returns the value of the '<em><b>DTD Element</b></em>' container - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getDTDAttribute <em>DTD Attribute</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>DTD Element</em>' container reference - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>DTD Element</em>' container - * reference. - * @see #setDTDElement(DTDElement) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_DTDElement() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement#getDTDAttribute - * @model opposite="DTDAttribute" - * @generated - */ - DTDElement getDTDElement(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement <em>DTD Element</em>}' - * container reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>DTD Element</em>' container - * reference. - * @see #getDTDElement() - * @generated - */ - void setDTDElement(DTDElement value); - -} // DTDAttribute diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicType.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicType.java deleted file mode 100644 index e0032804a0..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicType.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.ecore.EClass; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Basic Type</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicType#getKind <em>Kind</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDBasicType() - * @model - * @generated - */ -public interface DTDBasicType extends EClass, DTDType { - // NON-GEN interfaces DTDType - - public String getTypeDescription(); - - /** - * Returns the value of the '<em><b>Kind</b></em>' attribute. The - * literals are from the enumeration - * {@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind}. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Kind</em>' attribute isn't clear, there - * really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Kind</em>' attribute. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind - * @see #setKind(DTDBasicTypeKind) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDBasicType_Kind() - * @model - * @generated - */ - DTDBasicTypeKind getKind(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicType#getKind <em>Kind</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Kind</em>' attribute. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind - * @see #getKind() - * @generated - */ - void setKind(DTDBasicTypeKind value); -} // DTDBasicType diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicTypeKind.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicTypeKind.java deleted file mode 100644 index c8fe9cd769..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicTypeKind.java +++ /dev/null @@ -1,332 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.AbstractEnumerator; - -/** - * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Basic Type Kind</b></em>', - * and utility methods for working with them. <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDBasicTypeKind() - * @model - * @generated - */ -public final class DTDBasicTypeKind extends AbstractEnumerator { - /** - * The '<em><b>NONE</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #NONE_LITERAL - * @model - * @generated - * @ordered - */ - public static final int NONE = 0; - - /** - * The '<em><b>CDATA</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #CDATA_LITERAL - * @model - * @generated - * @ordered - */ - public static final int CDATA = 1; - - /** - * The '<em><b>ID</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #ID_LITERAL - * @model - * @generated - * @ordered - */ - public static final int ID = 2; - - /** - * The '<em><b>IDREF</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #IDREF_LITERAL - * @model - * @generated - * @ordered - */ - public static final int IDREF = 3; - - /** - * The '<em><b>IDREFS</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #IDREFS_LITERAL - * @model - * @generated - * @ordered - */ - public static final int IDREFS = 4; - - /** - * The '<em><b>ENTITY</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #ENTITY_LITERAL - * @model - * @generated - * @ordered - */ - public static final int ENTITY = 5; - - /** - * The '<em><b>ENTITIES</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #ENTITIES_LITERAL - * @model - * @generated - * @ordered - */ - public static final int ENTITIES = 6; - - /** - * The '<em><b>NMTOKEN</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #NMTOKEN_LITERAL - * @model - * @generated - * @ordered - */ - public static final int NMTOKEN = 7; - - /** - * The '<em><b>NMTOKENS</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #NMTOKENS_LITERAL - * @model - * @generated - * @ordered - */ - public static final int NMTOKENS = 8; - - /** - * The '<em><b>NONE</b></em>' literal object. <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>NONE</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #NONE - * @generated - * @ordered - */ - public static final DTDBasicTypeKind NONE_LITERAL = new DTDBasicTypeKind(NONE, "NONE"); //$NON-NLS-1$ - - /** - * The '<em><b>CDATA</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>CDATA</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #CDATA - * @generated - * @ordered - */ - public static final DTDBasicTypeKind CDATA_LITERAL = new DTDBasicTypeKind(CDATA, "CDATA"); //$NON-NLS-1$ - - /** - * The '<em><b>ID</b></em>' literal object. <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>ID</b></em>' literal object isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #ID - * @generated - * @ordered - */ - public static final DTDBasicTypeKind ID_LITERAL = new DTDBasicTypeKind(ID, "ID"); //$NON-NLS-1$ - - /** - * The '<em><b>IDREF</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>IDREF</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #IDREF - * @generated - * @ordered - */ - public static final DTDBasicTypeKind IDREF_LITERAL = new DTDBasicTypeKind(IDREF, "IDREF"); //$NON-NLS-1$ - - /** - * The '<em><b>IDREFS</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>IDREFS</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #IDREFS - * @generated - * @ordered - */ - public static final DTDBasicTypeKind IDREFS_LITERAL = new DTDBasicTypeKind(IDREFS, "IDREFS"); //$NON-NLS-1$ - - /** - * The '<em><b>ENTITY</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>ENTITY</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #ENTITY - * @generated - * @ordered - */ - public static final DTDBasicTypeKind ENTITY_LITERAL = new DTDBasicTypeKind(ENTITY, "ENTITY"); //$NON-NLS-1$ - - /** - * The '<em><b>ENTITIES</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>ENTITIES</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #ENTITIES - * @generated - * @ordered - */ - public static final DTDBasicTypeKind ENTITIES_LITERAL = new DTDBasicTypeKind(ENTITIES, "ENTITIES"); //$NON-NLS-1$ - - /** - * The '<em><b>NMTOKEN</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>NMTOKEN</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #NMTOKEN - * @generated - * @ordered - */ - public static final DTDBasicTypeKind NMTOKEN_LITERAL = new DTDBasicTypeKind(NMTOKEN, "NMTOKEN"); //$NON-NLS-1$ - - /** - * The '<em><b>NMTOKENS</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>NMTOKENS</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #NMTOKENS - * @generated - * @ordered - */ - public static final DTDBasicTypeKind NMTOKENS_LITERAL = new DTDBasicTypeKind(NMTOKENS, "NMTOKENS"); //$NON-NLS-1$ - - /** - * An array of all the '<em><b>Basic Type Kind</b></em>' enumerators. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private static final DTDBasicTypeKind[] VALUES_ARRAY = new DTDBasicTypeKind[]{NONE_LITERAL, CDATA_LITERAL, ID_LITERAL, IDREF_LITERAL, IDREFS_LITERAL, ENTITY_LITERAL, ENTITIES_LITERAL, NMTOKEN_LITERAL, NMTOKENS_LITERAL,}; - - /** - * A public read-only list of all the '<em><b>Basic Type Kind</b></em>' - * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the '<em><b>Basic Type Kind</b></em>' literal with the - * specified name. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDBasicTypeKind get(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - DTDBasicTypeKind result = VALUES_ARRAY[i]; - if (result.toString().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the '<em><b>Basic Type Kind</b></em>' literal with the - * specified value. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDBasicTypeKind get(int value) { - switch (value) { - case NONE : - return NONE_LITERAL; - case CDATA : - return CDATA_LITERAL; - case ID : - return ID_LITERAL; - case IDREF : - return IDREF_LITERAL; - case IDREFS : - return IDREFS_LITERAL; - case ENTITY : - return ENTITY_LITERAL; - case ENTITIES : - return ENTITIES_LITERAL; - case NMTOKEN : - return NMTOKEN_LITERAL; - case NMTOKENS : - return NMTOKENS_LITERAL; - } - return null; - } - - /** - * Only this class can construct instances. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - private DTDBasicTypeKind(int value, String name) { - super(value, name); - } - -} // DTDBasicTypeKind diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDConstants.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDConstants.java deleted file mode 100644 index ef3fb79e3d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDConstants.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -public class DTDConstants { - public static String DTD_ERROR_LINE_PREFIX = "<!--ERROR "; //$NON-NLS-1$ - public static String DTD_ERROR_LINE_SUFFIX = " -->"; //$NON-NLS-1$ - public static final String DTD_EXTENSION = "dtd"; //$NON-NLS-1$ - public static final String XML_EXTENSION = "xml"; //$NON-NLS-1$ - public static final String XMI_EXTENSION = "xmi"; //$NON-NLS-1$ - public static final String DTD_XMI_EXTENSION = "dtd.xmi"; //$NON-NLS-1$ -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDContent.java deleted file mode 100644 index f0667581ed..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDContent.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.ecore.EObject; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Content</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile <em>DTD File</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDContent() - * @model abstract="true" - * @generated - */ -public interface DTDContent extends EObject { - /** - * Returns the value of the '<em><b>DTD File</b></em>' container - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDContent <em>DTD Content</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>DTD File</em>' container reference isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>DTD File</em>' container reference. - * @see #setDTDFile(DTDFile) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDContent_DTDFile() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDContent - * @model opposite="DTDContent" - * @generated - */ - DTDFile getDTDFile(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile <em>DTD File</em>}' - * container reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>DTD File</em>' container - * reference. - * @see #getDTDFile() - * @generated - */ - void setDTDFile(DTDFile value); - -} // DTDContent diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDDefaultKind.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDDefaultKind.java deleted file mode 100644 index 9e57c5a37f..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDDefaultKind.java +++ /dev/null @@ -1,194 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.AbstractEnumerator; - -/** - * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Default Kind</b></em>', - * and utility methods for working with them. <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDDefaultKind() - * @model - * @generated - */ -public final class DTDDefaultKind extends AbstractEnumerator { - /** - * The '<em><b>IMPLIED</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #IMPLIED_LITERAL - * @model - * @generated - * @ordered - */ - public static final int IMPLIED = 1; - - /** - * The '<em><b>REQUIRED</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #REQUIRED_LITERAL - * @model - * @generated - * @ordered - */ - public static final int REQUIRED = 2; - - /** - * The '<em><b>FIXED</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #FIXED_LITERAL - * @model - * @generated - * @ordered - */ - public static final int FIXED = 3; - - /** - * The '<em><b>NOFIXED</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #NOFIXED_LITERAL - * @model - * @generated - * @ordered - */ - public static final int NOFIXED = 4; - - /** - * The '<em><b>IMPLIED</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>IMPLIED</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #IMPLIED - * @generated - * @ordered - */ - public static final DTDDefaultKind IMPLIED_LITERAL = new DTDDefaultKind(IMPLIED, "IMPLIED"); //$NON-NLS-1$ - - /** - * The '<em><b>REQUIRED</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>REQUIRED</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #REQUIRED - * @generated - * @ordered - */ - public static final DTDDefaultKind REQUIRED_LITERAL = new DTDDefaultKind(REQUIRED, "REQUIRED"); //$NON-NLS-1$ - - /** - * The '<em><b>FIXED</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>FIXED</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #FIXED - * @generated - * @ordered - */ - public static final DTDDefaultKind FIXED_LITERAL = new DTDDefaultKind(FIXED, "FIXED"); //$NON-NLS-1$ - - /** - * The '<em><b>NOFIXED</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>NOFIXED</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #NOFIXED - * @generated - * @ordered - */ - public static final DTDDefaultKind NOFIXED_LITERAL = new DTDDefaultKind(NOFIXED, "NOFIXED"); //$NON-NLS-1$ - - /** - * An array of all the '<em><b>Default Kind</b></em>' enumerators. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private static final DTDDefaultKind[] VALUES_ARRAY = new DTDDefaultKind[]{IMPLIED_LITERAL, REQUIRED_LITERAL, FIXED_LITERAL, NOFIXED_LITERAL,}; - - /** - * A public read-only list of all the '<em><b>Default Kind</b></em>' - * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the '<em><b>Default Kind</b></em>' literal with the - * specified name. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDDefaultKind get(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - DTDDefaultKind result = VALUES_ARRAY[i]; - if (result.toString().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the '<em><b>Default Kind</b></em>' literal with the - * specified value. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDDefaultKind get(int value) { - switch (value) { - case IMPLIED : - return IMPLIED_LITERAL; - case REQUIRED : - return REQUIRED_LITERAL; - case FIXED : - return FIXED_LITERAL; - case NOFIXED : - return NOFIXED_LITERAL; - } - return null; - } - - /** - * Only this class can construct instances. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - private DTDDefaultKind(int value, String name) { - super(value, name); - } - -} // DTDDefaultKind diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElement.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElement.java deleted file mode 100644 index d81097cca5..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElement.java +++ /dev/null @@ -1,126 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -import java.util.Collection; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Element</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getComment <em>Comment</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent <em>Content</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getDTDAttribute <em>DTD Attribute</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElement() - * @model - * @generated - */ -public interface DTDElement extends EClass, DTDContent, DTDObject, DTDSourceOffset { - - public void addDTDAttribute(DTDAttribute attribute); - - // returns all references in the same DTDFile that reference this element - public Collection getReferences(); - - // return a brief string listing the attributes - public String getAttributeDetail(); - - /** - * Returns the value of the '<em><b>Comment</b></em>' attribute. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Comment</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Comment</em>' attribute. - * @see #setComment(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElement_Comment() - * @model - * @generated - */ - String getComment(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getComment <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Comment</em>' attribute. - * @see #getComment() - * @generated - */ - void setComment(String value); - - /** - * Returns the value of the '<em><b>Content</b></em>' containment - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement <em>Element</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Content</em>' containment reference - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Content</em>' containment reference. - * @see #setContent(DTDElementContent) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElement_Content() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement - * @model opposite="element" containment="true" required="true" - * @generated - */ - DTDElementContent getContent(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent <em>Content</em>}' - * containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Content</em>' containment - * reference. - * @see #getContent() - * @generated - */ - void setContent(DTDElementContent value); - - /** - * Returns the value of the '<em><b>DTD Attribute</b></em>' - * containment reference list. The list contents are of type - * {@link DTDAttribute}. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement <em>DTD Element</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>DTD Attribute</em>' containment - * reference list isn't clear, there really should be more of a - * description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>DTD Attribute</em>' containment - * reference list. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElement_DTDAttribute() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement - * @model type="DTDAttribute" opposite="DTDElement" containment="true" - * @generated - */ - EList getDTDAttribute(); - -} // DTDElement diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementContent.java deleted file mode 100644 index 1736ab2316..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementContent.java +++ /dev/null @@ -1,112 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.ecore.EObject; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Element Content</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup <em>Group</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement <em>Element</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElementContent() - * @model abstract="true" - * @generated - */ -public interface DTDElementContent extends EObject, DTDObject, DTDSourceOffset { - - // for showing names to be used in the tree - public String getContentName(); - - // for showing items in the table - public String getContentDetail(); - - public DTDElement getDTDElement(); - - // get the most outer DTDGroupContent - public DTDGroupContent getDTDGroupContent(); - - // returns true if this element content is the first - // in the element - // eg <!ELEMENT blah firstElement> - // <!ELEMENT blah ((firstElement, secondElement) | lastElement) - public boolean isFirstElementContent(); - - /** - * Returns the value of the '<em><b>Group</b></em>' container - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getContent <em>Content</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Group</em>' container reference isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Group</em>' container reference. - * @see #setGroup(DTDGroupContent) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElementContent_Group() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getContent - * @model opposite="content" - * @generated - */ - DTDGroupContent getGroup(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup <em>Group</em>}' - * container reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Group</em>' container - * reference. - * @see #getGroup() - * @generated - */ - void setGroup(DTDGroupContent value); - - /** - * Returns the value of the '<em><b>Element</b></em>' container - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent <em>Content</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Element</em>' container reference isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Element</em>' container reference. - * @see #setElement(DTDElement) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElementContent_Element() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent - * @model opposite="content" - * @generated - */ - DTDElement getElement(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement <em>Element</em>}' - * container reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Element</em>' container - * reference. - * @see #getElement() - * @generated - */ - void setElement(DTDElement value); - -} // DTDElementContent diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementReferenceContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementReferenceContent.java deleted file mode 100644 index 44e1bbe51b..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementReferenceContent.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Element Reference Content</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent#getReferencedElement <em>Referenced Element</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElementReferenceContent() - * @model - * @generated - */ -public interface DTDElementReferenceContent extends DTDRepeatableContent { - /** - * Returns the value of the '<em><b>Referenced Element</b></em>' - * reference. <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Referenced Element</em>' reference isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Referenced Element</em>' reference. - * @see #setReferencedElement(DTDElement) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElementReferenceContent_ReferencedElement() - * @model required="true" - * @generated - */ - DTDElement getReferencedElement(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent#getReferencedElement <em>Referenced Element</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Referenced Element</em>' - * reference. - * @see #getReferencedElement() - * @generated - */ - void setReferencedElement(DTDElement value); - -} // DTDElementReferenceContent diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEmptyContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEmptyContent.java deleted file mode 100644 index 5626827cf4..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEmptyContent.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Empty Content</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEmptyContent() - * @model - * @generated - */ -public interface DTDEmptyContent extends DTDElementContent { -} // DTDEmptyContent diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntity.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntity.java deleted file mode 100644 index bd4b4547f5..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntity.java +++ /dev/null @@ -1,220 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.ENamedElement; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Entity</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getComment <em>Comment</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#isParameterEntity <em>Parameter Entity</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent <em>Content</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef <em>Parm Entity Ref</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getEntityReference <em>Entity Reference</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeNameReference <em>Attribute Name Reference</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeTypeReference <em>Attribute Type Reference</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity() - * @model - * @generated - */ -public interface DTDEntity extends ENamedElement, DTDContent, DTDObject, DTDSourceOffset { - /** - * Returns the value of the '<em><b>Comment</b></em>' attribute. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Comment</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Comment</em>' attribute. - * @see #setComment(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_Comment() - * @model - * @generated - */ - String getComment(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getComment <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Comment</em>' attribute. - * @see #getComment() - * @generated - */ - void setComment(String value); - - /** - * Returns the value of the '<em><b>Parameter Entity</b></em>' - * attribute. <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Parameter Entity</em>' attribute isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Parameter Entity</em>' attribute. - * @see #setParameterEntity(boolean) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_ParameterEntity() - * @model - * @generated - */ - boolean isParameterEntity(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#isParameterEntity <em>Parameter Entity</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Parameter Entity</em>' - * attribute. - * @see #isParameterEntity() - * @generated - */ - void setParameterEntity(boolean value); - - /** - * Returns the value of the '<em><b>Content</b></em>' containment - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity <em>DTD Entity</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Content</em>' containment reference - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Content</em>' containment reference. - * @see #setContent(DTDEntityContent) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_Content() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity - * @model opposite="DTDEntity" containment="true" required="true" - * @generated - */ - DTDEntityContent getContent(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent <em>Content</em>}' - * containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Content</em>' containment - * reference. - * @see #getContent() - * @generated - */ - void setContent(DTDEntityContent value); - - /** - * Returns the value of the '<em><b>Parm Entity Ref</b></em>' - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity <em>Entity</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Parm Entity Ref</em>' reference isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Parm Entity Ref</em>' reference. - * @see #setParmEntityRef(DTDParameterEntityReference) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_ParmEntityRef() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity - * @model opposite="entity" required="true" - * @generated - */ - DTDParameterEntityReference getParmEntityRef(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef <em>Parm Entity Ref</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Parm Entity Ref</em>' - * reference. - * @see #getParmEntityRef() - * @generated - */ - void setParmEntityRef(DTDParameterEntityReference value); - - /** - * Returns the value of the '<em><b>Entity Reference</b></em>' - * reference list. The list contents are of type - * {@link DTDEntityReferenceContent}. It is bidirectional and its - * opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity <em>Element Referenced Entity</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Entity Reference</em>' reference list - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Entity Reference</em>' reference - * list. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_EntityReference() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity - * @model type="DTDEntityReferenceContent" - * opposite="elementReferencedEntity" - * @generated - */ - EList getEntityReference(); - - /** - * Returns the value of the '<em><b>Attribute Name Reference</b></em>' - * reference list. The list contents are of type {@link DTDAttribute}. It - * is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity <em>Attribute Name Referenced Entity</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Attribute Name Reference</em>' reference - * list isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Attribute Name Reference</em>' - * reference list. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_AttributeNameReference() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity - * @model type="DTDAttribute" opposite="attributeNameReferencedEntity" - * @generated - */ - EList getAttributeNameReference(); - - /** - * Returns the value of the '<em><b>Attribute Type Reference</b></em>' - * reference list. The list contents are of type {@link DTDAttribute}. It - * is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity <em>Attribute Type Referenced Entity</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Attribute Type Reference</em>' reference - * list isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Attribute Type Reference</em>' - * reference list. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_AttributeTypeReference() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity - * @model type="DTDAttribute" opposite="attributeTypeReferencedEntity" - * @generated - */ - EList getAttributeTypeReference(); - -} // DTDEntity diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityContent.java deleted file mode 100644 index 90626c6161..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityContent.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.ecore.EObject; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Entity Content</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity <em>DTD Entity</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntityContent() - * @model abstract="true" - * @generated - */ -public interface DTDEntityContent extends EObject, DTDObject { - - public String unparse(); - - /** - * Returns the value of the '<em><b>DTD Entity</b></em>' container - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent <em>Content</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>DTD Entity</em>' container reference - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>DTD Entity</em>' container reference. - * @see #setDTDEntity(DTDEntity) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntityContent_DTDEntity() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent - * @model opposite="content" - * @generated - */ - DTDEntity getDTDEntity(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity <em>DTD Entity</em>}' - * container reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>DTD Entity</em>' container - * reference. - * @see #getDTDEntity() - * @generated - */ - void setDTDEntity(DTDEntity value); - -} // DTDEntityContent diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityReferenceContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityReferenceContent.java deleted file mode 100644 index 55b97f7b28..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityReferenceContent.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Entity Reference Content</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity <em>Element Referenced Entity</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntityReferenceContent() - * @model - * @generated - */ -public interface DTDEntityReferenceContent extends DTDRepeatableContent { - - /** - * Returns the value of the '<em><b>Element Referenced Entity</b></em>' - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getEntityReference <em>Entity Reference</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Element Referenced Entity</em>' - * reference isn't clear, there really should be more of a description - * here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Element Referenced Entity</em>' - * reference. - * @see #setElementReferencedEntity(DTDEntity) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntityReferenceContent_ElementReferencedEntity() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getEntityReference - * @model opposite="entityReference" required="true" - * @generated - */ - DTDEntity getElementReferencedEntity(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity <em>Element Referenced Entity</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Element Referenced Entity</em>' - * reference. - * @see #getElementReferencedEntity() - * @generated - */ - void setElementReferencedEntity(DTDEntity value); - -} // DTDEntityReferenceContent - diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumGroupKind.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumGroupKind.java deleted file mode 100644 index 1003dc1cc8..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumGroupKind.java +++ /dev/null @@ -1,139 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.AbstractEnumerator; - -/** - * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Enum Group Kind</b></em>', - * and utility methods for working with them. <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEnumGroupKind() - * @model - * @generated - */ -public final class DTDEnumGroupKind extends AbstractEnumerator { - /** - * The '<em><b>NAME TOKEN GROUP</b></em>' literal value. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @see #NAME_TOKEN_GROUP_LITERAL - * @model - * @generated - * @ordered - */ - public static final int NAME_TOKEN_GROUP = 1; - - /** - * The '<em><b>NOTATION GROUP</b></em>' literal value. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @see #NOTATION_GROUP_LITERAL - * @model - * @generated - * @ordered - */ - public static final int NOTATION_GROUP = 2; - - /** - * The '<em><b>NAME TOKEN GROUP</b></em>' literal object. <!-- - * begin-user-doc --> - * <p> - * If the meaning of '<em><b>NAME TOKEN GROUP</b></em>' literal - * object isn't clear, there really should be more of a description - * here... - * </p> - * <!-- end-user-doc --> - * - * @see #NAME_TOKEN_GROUP - * @generated - * @ordered - */ - public static final DTDEnumGroupKind NAME_TOKEN_GROUP_LITERAL = new DTDEnumGroupKind(NAME_TOKEN_GROUP, "NAME_TOKEN_GROUP"); //$NON-NLS-1$ - - /** - * The '<em><b>NOTATION GROUP</b></em>' literal object. <!-- - * begin-user-doc --> - * <p> - * If the meaning of '<em><b>NOTATION GROUP</b></em>' literal object - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #NOTATION_GROUP - * @generated - * @ordered - */ - public static final DTDEnumGroupKind NOTATION_GROUP_LITERAL = new DTDEnumGroupKind(NOTATION_GROUP, "NOTATION_GROUP"); //$NON-NLS-1$ - - /** - * An array of all the '<em><b>Enum Group Kind</b></em>' enumerators. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private static final DTDEnumGroupKind[] VALUES_ARRAY = new DTDEnumGroupKind[]{NAME_TOKEN_GROUP_LITERAL, NOTATION_GROUP_LITERAL,}; - - /** - * A public read-only list of all the '<em><b>Enum Group Kind</b></em>' - * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the '<em><b>Enum Group Kind</b></em>' literal with the - * specified name. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDEnumGroupKind get(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - DTDEnumGroupKind result = VALUES_ARRAY[i]; - if (result.toString().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the '<em><b>Enum Group Kind</b></em>' literal with the - * specified value. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDEnumGroupKind get(int value) { - switch (value) { - case NAME_TOKEN_GROUP : - return NAME_TOKEN_GROUP_LITERAL; - case NOTATION_GROUP : - return NOTATION_GROUP_LITERAL; - } - return null; - } - - /** - * Only this class can construct instances. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - private DTDEnumGroupKind(int value, String name) { - super(value, name); - } - -} // DTDEnumGroupKind diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumerationType.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumerationType.java deleted file mode 100644 index 4901b2b18b..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumerationType.java +++ /dev/null @@ -1,101 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EEnum; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Enumeration Type</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getKind <em>Kind</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile <em>DTD File</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEnumerationType() - * @model - * @generated - */ -public interface DTDEnumerationType extends EEnum, DTDType { - - public EList getEnumLiterals(); - - public String getEnumerationTypeDescription(); - - /** - * Returns the value of the '<em><b>Kind</b></em>' attribute. The - * literals are from the enumeration - * {@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind}. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Kind</em>' attribute isn't clear, there - * really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Kind</em>' attribute. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind - * @see #setKind(DTDEnumGroupKind) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEnumerationType_Kind() - * @model - * @generated - */ - DTDEnumGroupKind getKind(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getKind <em>Kind</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Kind</em>' attribute. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind - * @see #getKind() - * @generated - */ - void setKind(DTDEnumGroupKind value); - - /** - * Returns the value of the '<em><b>DTD File</b></em>' container - * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDEnumerationType <em>DTD Enumeration Type</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>DTD File</em>' container reference isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>DTD File</em>' container reference. - * @see #setDTDFile(DTDFile) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEnumerationType_DTDFile() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDEnumerationType - * @model opposite="DTDEnumerationType" - * @generated - */ - DTDFile getDTDFile(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile <em>DTD File</em>}' - * container reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>DTD File</em>' container - * reference. - * @see #getDTDFile() - * @generated - */ - void setDTDFile(DTDFile value); - -} // DTDEnumerationType diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDErrorMessage.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDErrorMessage.java deleted file mode 100644 index 613e9c5574..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDErrorMessage.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -public class DTDErrorMessage { - public String errorKey; - public String errorMessage; - public String lineNo; - public String charOffSet; - public String declarationType; - public String declarationName; - public String sourceLine; - - - public DTDErrorMessage(String declarationType, String declarationName, String lineNo, String charOffSet, String errorKey, String errorMessage) { - this(declarationType, declarationName, lineNo, charOffSet, errorKey, errorMessage, null); - } - - public DTDErrorMessage(String declarationType, String declarationName, String lineNo, String charOffSet, String errorKey, String errorMessage, String srcLine) { - this.declarationType = declarationType; - this.declarationName = declarationName; - this.lineNo = lineNo; - this.charOffSet = charOffSet; - this.errorKey = errorKey; - this.errorMessage = errorMessage; - this.sourceLine = srcLine; - } - - public String toString() { - return "(" + declarationType + ":" + declarationName + ") " + lineNo + ":" + charOffSet + " " + errorMessage; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ - } - - /** - * @generated - */ - protected String toStringGen() { - - return "(" + declarationType + ":" + declarationName + ") " + lineNo + ":" + charOffSet + " " + errorMessage; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExtender.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExtender.java deleted file mode 100644 index 59de3608a2..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExtender.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -/** - * This interface can be implemented by an IDomainModel to augment - * getElementProperty for any DTD object. - */ -public interface DTDExtender { - public Object getElementProperty(DTDObject dtdObject, Object object); -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExternalEntity.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExternalEntity.java deleted file mode 100644 index 2f8b34f8ea..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExternalEntity.java +++ /dev/null @@ -1,151 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>External Entity</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getSystemID <em>System ID</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getPublicID <em>Public ID</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation <em>Notation</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getEntityReferencedFromAnotherFile <em>Entity Referenced From Another File</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDExternalEntity() - * @model - * @generated - */ -public interface DTDExternalEntity extends DTDEntityContent { - - /** - * Returns the value of the '<em><b>System ID</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>System ID</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>System ID</em>' attribute. - * @see #setSystemID(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDExternalEntity_SystemID() - * @model - * @generated - */ - String getSystemID(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getSystemID <em>System ID</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>System ID</em>' attribute. - * @see #getSystemID() - * @generated - */ - void setSystemID(String value); - - /** - * Returns the value of the '<em><b>Public ID</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Public ID</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Public ID</em>' attribute. - * @see #setPublicID(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDExternalEntity_PublicID() - * @model - * @generated - */ - String getPublicID(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getPublicID <em>Public ID</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Public ID</em>' attribute. - * @see #getPublicID() - * @generated - */ - void setPublicID(String value); - - /** - * Returns the value of the '<em><b>Notation</b></em>' reference. It - * is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getEntity <em>Entity</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Notation</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Notation</em>' reference. - * @see #setNotation(DTDNotation) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDExternalEntity_Notation() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getEntity - * @model opposite="entity" - * @generated - */ - DTDNotation getNotation(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation <em>Notation</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Notation</em>' reference. - * @see #getNotation() - * @generated - */ - void setNotation(DTDNotation value); - - /** - * Returns the value of the '<em><b>Entity Referenced From Another File</b></em>' - * reference. <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Entity Referenced From Another File</em>' - * reference isn't clear, there really should be more of a description - * here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Entity Referenced From Another File</em>' - * reference. - * @see #setEntityReferencedFromAnotherFile(DTDFile) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDExternalEntity_EntityReferencedFromAnotherFile() - * @model - * @generated - */ - DTDFile getEntityReferencedFromAnotherFile(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getEntityReferencedFromAnotherFile <em>Entity Referenced From Another File</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Entity Referenced From Another File</em>' - * reference. - * @see #getEntityReferencedFromAnotherFile() - * @generated - */ - void setEntityReferencedFromAnotherFile(DTDFile value); - -} // DTDExternalEntity - diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFactory.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFactory.java deleted file mode 100644 index 282777a02c..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFactory.java +++ /dev/null @@ -1,186 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.ecore.EFactory; - -/** - * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a - * create method for each non-abstract class of the model. <!-- end-user-doc - * --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage - * @generated - */ -public interface DTDFactory extends EFactory { - - /** - * The singleton instance of the factory. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - DTDFactory eINSTANCE = new org.eclipse.wst.dtd.core.internal.emf.impl.DTDFactoryImpl(); - - /** - * Returns a new object of class '<em>Group Content</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Group Content</em>'. - * @generated - */ - DTDGroupContent createDTDGroupContent(); - - /** - * Returns a new object of class '<em>Attribute</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Attribute</em>'. - * @generated - */ - DTDAttribute createDTDAttribute(); - - /** - * Returns a new object of class '<em>Element</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Element</em>'. - * @generated - */ - DTDElement createDTDElement(); - - /** - * Returns a new object of class '<em>Empty Content</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Empty Content</em>'. - * @generated - */ - DTDEmptyContent createDTDEmptyContent(); - - /** - * Returns a new object of class '<em>Any Content</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Any Content</em>'. - * @generated - */ - DTDAnyContent createDTDAnyContent(); - - /** - * Returns a new object of class '<em>PC Data Content</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>PC Data Content</em>'. - * @generated - */ - DTDPCDataContent createDTDPCDataContent(); - - /** - * Returns a new object of class '<em>Element Reference Content</em>'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Element Reference Content</em>'. - * @generated - */ - DTDElementReferenceContent createDTDElementReferenceContent(); - - /** - * Returns a new object of class '<em>File</em>'. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @return a new object of class '<em>File</em>'. - * @generated - */ - DTDFile createDTDFile(); - - /** - * Returns a new object of class '<em>Basic Type</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Basic Type</em>'. - * @generated - */ - DTDBasicType createDTDBasicType(); - - /** - * Returns a new object of class '<em>Enumeration Type</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Enumeration Type</em>'. - * @generated - */ - DTDEnumerationType createDTDEnumerationType(); - - /** - * Returns a new object of class '<em>Notation</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Notation</em>'. - * @generated - */ - DTDNotation createDTDNotation(); - - /** - * Returns a new object of class '<em>Entity</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Entity</em>'. - * @generated - */ - DTDEntity createDTDEntity(); - - /** - * Returns a new object of class '<em>External Entity</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>External Entity</em>'. - * @generated - */ - DTDExternalEntity createDTDExternalEntity(); - - /** - * Returns a new object of class '<em>Internal Entity</em>'. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Internal Entity</em>'. - * @generated - */ - DTDInternalEntity createDTDInternalEntity(); - - /** - * Returns a new object of class '<em>Parameter Entity Reference</em>'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Parameter Entity Reference</em>'. - * @generated - */ - DTDParameterEntityReference createDTDParameterEntityReference(); - - /** - * Returns a new object of class '<em>Entity Reference Content</em>'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Entity Reference Content</em>'. - * @generated - */ - DTDEntityReferenceContent createDTDEntityReferenceContent(); - - /** - * Returns the package supported by this factory. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @return the package supported by this factory. - * @generated - */ - DTDPackage getDTDPackage(); - -} // DTDFactory diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFile.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFile.java deleted file mode 100644 index 52ae28a8b0..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFile.java +++ /dev/null @@ -1,157 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import java.util.List; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.ENamedElement; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>File</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getComment <em>Comment</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#isParseError <em>Parse Error</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDContent <em>DTD Content</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDEnumerationType <em>DTD Enumeration Type</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDFile() - * @model - * @generated - */ -public interface DTDFile extends ENamedElement, DTDObject { - - public EList getDTDObject(); - - public List listDTDElement(); - - public List listDTDNotation(); - - public List listDTDEntity(); - - public List listDTDParameterEntityReference(); - - public List listDTDElementAndDTDParameterEntityReference(); - - public DTDElement findElement(String name); - - public DTDEntity findEntity(String name); - - public DTDNotation findNotation(String name); - - public DTDParameterEntityReference findParameterEntityReference(String name); - - public String unparse(boolean includeError); - - /** - * Returns the value of the '<em><b>Comment</b></em>' attribute. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Comment</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Comment</em>' attribute. - * @see #setComment(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDFile_Comment() - * @model - * @generated - */ - String getComment(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getComment <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Comment</em>' attribute. - * @see #getComment() - * @generated - */ - void setComment(String value); - - /** - * Returns the value of the '<em><b>Parse Error</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Parse Error</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Parse Error</em>' attribute. - * @see #setParseError(boolean) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDFile_ParseError() - * @model - * @generated - */ - boolean isParseError(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#isParseError <em>Parse Error</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Parse Error</em>' attribute. - * @see #isParseError() - * @generated - */ - void setParseError(boolean value); - - /** - * Returns the value of the '<em><b>DTD Content</b></em>' containment - * reference list. The list contents are of type {@link DTDContent}. It - * is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile <em>DTD File</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>DTD Content</em>' containment reference - * list isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>DTD Content</em>' containment - * reference list. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDFile_DTDContent() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile - * @model type="DTDContent" opposite="DTDFile" containment="true" - * @generated - */ - EList getDTDContent(); - - /** - * Returns the value of the '<em><b>DTD Enumeration Type</b></em>' - * containment reference list. The list contents are of type - * {@link DTDEnumerationType}. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile <em>DTD File</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>DTD Enumeration Type</em>' containment - * reference list isn't clear, there really should be more of a - * description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>DTD Enumeration Type</em>' - * containment reference list. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDFile_DTDEnumerationType() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile - * @model type="DTDEnumerationType" opposite="DTDFile" containment="true" - * @generated - */ - EList getDTDEnumerationType(); - -} // DTDFile diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupContent.java deleted file mode 100644 index f72720506c..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupContent.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.common.util.EList; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Group Content</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getGroupKind <em>Group Kind</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getContent <em>Content</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDGroupContent() - * @model - * @generated - */ -public interface DTDGroupContent extends DTDRepeatableContent { - - public int getContentPosition(DTDElementContent content); - - /** - * Returns the value of the '<em><b>Group Kind</b></em>' attribute. - * The literals are from the enumeration - * {@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind}. <!-- begin-user-doc - * --> - * <p> - * If the meaning of the '<em>Group Kind</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Group Kind</em>' attribute. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind - * @see #setGroupKind(DTDGroupKind) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDGroupContent_GroupKind() - * @model - * @generated - */ - DTDGroupKind getGroupKind(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getGroupKind <em>Group Kind</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Group Kind</em>' attribute. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind - * @see #getGroupKind() - * @generated - */ - void setGroupKind(DTDGroupKind value); - - /** - * Returns the value of the '<em><b>Content</b></em>' containment - * reference list. The list contents are of type {@link DTDElementContent}. - * It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup <em>Group</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Content</em>' containment reference list - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Content</em>' containment reference - * list. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDGroupContent_Content() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup - * @model type="DTDElementContent" opposite="group" containment="true" - * required="true" - * @generated - */ - EList getContent(); - -} // DTDGroupContent diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupKind.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupKind.java deleted file mode 100644 index 4dd8b107f6..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupKind.java +++ /dev/null @@ -1,139 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.AbstractEnumerator; - -/** - * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Group Kind</b></em>', - * and utility methods for working with them. <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDGroupKind() - * @model - * @generated - */ -public final class DTDGroupKind extends AbstractEnumerator { - /** - * The '<em><b>SEQUENCE</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #SEQUENCE_LITERAL - * @model - * @generated - * @ordered - */ - public static final int SEQUENCE = 1; - - /** - * The '<em><b>CHOICE</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #CHOICE_LITERAL - * @model - * @generated - * @ordered - */ - public static final int CHOICE = 2; - - /** - * The '<em><b>SEQUENCE</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>SEQUENCE</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #SEQUENCE - * @generated - * @ordered - */ - public static final DTDGroupKind SEQUENCE_LITERAL = new DTDGroupKind(SEQUENCE, "SEQUENCE"); //$NON-NLS-1$ - - /** - * The '<em><b>CHOICE</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>CHOICE</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #CHOICE - * @generated - * @ordered - */ - public static final DTDGroupKind CHOICE_LITERAL = new DTDGroupKind(CHOICE, "CHOICE"); //$NON-NLS-1$ - - /** - * An array of all the '<em><b>Group Kind</b></em>' enumerators. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private static final DTDGroupKind[] VALUES_ARRAY = new DTDGroupKind[]{SEQUENCE_LITERAL, CHOICE_LITERAL,}; - - /** - * A public read-only list of all the '<em><b>Group Kind</b></em>' - * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the '<em><b>Group Kind</b></em>' literal with the - * specified name. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDGroupKind get(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - DTDGroupKind result = VALUES_ARRAY[i]; - if (result.toString().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the '<em><b>Group Kind</b></em>' literal with the - * specified value. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDGroupKind get(int value) { - switch (value) { - case SEQUENCE : - return SEQUENCE_LITERAL; - case CHOICE : - return CHOICE_LITERAL; - } - return null; - } - - /** - * Only this class can construct instances. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - private DTDGroupKind(int value, String name) { - super(value, name); - } - -} // DTDGroupKind diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDInternalEntity.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDInternalEntity.java deleted file mode 100644 index 0b28725ec5..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDInternalEntity.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Internal Entity</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity#getValue <em>Value</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDInternalEntity() - * @model - * @generated - */ -public interface DTDInternalEntity extends DTDEntityContent { - /** - * Returns the value of the '<em><b>Value</b></em>' attribute. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Value</em>' attribute isn't clear, there - * really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Value</em>' attribute. - * @see #setValue(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDInternalEntity_Value() - * @model - * @generated - */ - String getValue(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity#getValue <em>Value</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Value</em>' attribute. - * @see #getValue() - * @generated - */ - void setValue(String value); - -} // DTDInternalEntity diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDLexicalInfo.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDLexicalInfo.java deleted file mode 100644 index 997997fa7d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDLexicalInfo.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -public class DTDLexicalInfo implements DTDSourceOffset { - // Begin User Defined Methods - int startOffset; - int endOffset; - - /** - * Get the value of startOffset. - * - * @return value of startOffset. - */ - public int getStartOffset() { - return startOffset; - } - - /** - * Set the value of startOffset. - * - * @param v - * Value to assign to startOffset. - */ - public void setStartOffset(int v) { - this.startOffset = v; - } - - /** - * Get the value of endOffset. - * - * @return value of endOffset. - */ - public int getEndOffset() { - return endOffset; - } - - /** - * Set the value of endOffset. - * - * @param v - * Value to assign to endOffset. - */ - public void setEndOffset(int v) { - - this.endOffset = v; - } - - /** - * Get the value of startOffset. - * - * @return value of startOffset. - */ - protected int getStartOffsetGen() { - - return startOffset; - } - - /** - * Set the value of startOffset. - * - * @param v - * Value to assign to startOffset. - */ - protected void setStartOffsetGen(int v) { - - this.startOffset = v; - } - - /** - * Get the value of endOffset. - * - * @return value of endOffset. - */ - protected int getEndOffsetGen() { - - return endOffset; - } - - /** - * Set the value of endOffset. - * - * @param v - * Value to assign to endOffset. - */ - protected void setEndOffsetGen(int v) { - - - this.endOffset = v; - } -}// DTDSourceOffset diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDNotation.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDNotation.java deleted file mode 100644 index 446bb7a203..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDNotation.java +++ /dev/null @@ -1,140 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.ENamedElement; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Notation</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getComment <em>Comment</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getSystemID <em>System ID</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getPublicID <em>Public ID</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getEntity <em>Entity</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDNotation() - * @model - * @generated - */ -public interface DTDNotation extends ENamedElement, DTDContent, DTDObject, DTDSourceOffset { - - /** - * Returns the value of the '<em><b>Comment</b></em>' attribute. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Comment</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Comment</em>' attribute. - * @see #setComment(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDNotation_Comment() - * @model - * @generated - */ - String getComment(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getComment <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Comment</em>' attribute. - * @see #getComment() - * @generated - */ - void setComment(String value); - - /** - * Returns the value of the '<em><b>System ID</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>System ID</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>System ID</em>' attribute. - * @see #setSystemID(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDNotation_SystemID() - * @model - * @generated - */ - String getSystemID(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getSystemID <em>System ID</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>System ID</em>' attribute. - * @see #getSystemID() - * @generated - */ - void setSystemID(String value); - - /** - * Returns the value of the '<em><b>Public ID</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Public ID</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Public ID</em>' attribute. - * @see #setPublicID(String) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDNotation_PublicID() - * @model - * @generated - */ - String getPublicID(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getPublicID <em>Public ID</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Public ID</em>' attribute. - * @see #getPublicID() - * @generated - */ - void setPublicID(String value); - - /** - * Returns the value of the '<em><b>Entity</b></em>' reference list. - * The list contents are of type {@link DTDExternalEntity}. It is - * bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation <em>Notation</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Entity</em>' reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Entity</em>' reference list. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDNotation_Entity() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation - * @model type="DTDExternalEntity" opposite="notation" - * @generated - */ - EList getEntity(); - -} // DTDNotation diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDObject.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDObject.java deleted file mode 100644 index 603db71c0f..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDObject.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -// Ref package -import org.eclipse.emf.ecore.EObject; - -public interface DTDObject extends EObject { - public String getPathname(); - - public DTDObject findObject(String relativePath); - -} // DTDObject diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDOccurrenceType.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDOccurrenceType.java deleted file mode 100644 index f38fb43ddd..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDOccurrenceType.java +++ /dev/null @@ -1,193 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.AbstractEnumerator; - -/** - * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Occurrence Type</b></em>', - * and utility methods for working with them. <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDOccurrenceType() - * @model - * @generated - */ -public final class DTDOccurrenceType extends AbstractEnumerator { - /** - * The '<em><b>ONE</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #ONE_LITERAL - * @model - * @generated - * @ordered - */ - public static final int ONE = 49; - - /** - * The '<em><b>OPTIONAL</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #OPTIONAL_LITERAL - * @model - * @generated - * @ordered - */ - public static final int OPTIONAL = 63; - - /** - * The '<em><b>ONE OR MORE</b></em>' literal value. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @see #ONE_OR_MORE_LITERAL - * @model - * @generated - * @ordered - */ - public static final int ONE_OR_MORE = 43; - - /** - * The '<em><b>ZERO OR MORE</b></em>' literal value. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @see #ZERO_OR_MORE_LITERAL - * @model - * @generated - * @ordered - */ - public static final int ZERO_OR_MORE = 42; - - /** - * The '<em><b>ONE</b></em>' literal object. <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>ONE</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #ONE - * @generated - * @ordered - */ - public static final DTDOccurrenceType ONE_LITERAL = new DTDOccurrenceType(ONE, "ONE"); //$NON-NLS-1$ - - /** - * The '<em><b>OPTIONAL</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>OPTIONAL</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #OPTIONAL - * @generated - * @ordered - */ - public static final DTDOccurrenceType OPTIONAL_LITERAL = new DTDOccurrenceType(OPTIONAL, "OPTIONAL"); //$NON-NLS-1$ - - /** - * The '<em><b>ONE OR MORE</b></em>' literal object. <!-- - * begin-user-doc --> - * <p> - * If the meaning of '<em><b>ONE OR MORE</b></em>' literal object - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #ONE_OR_MORE - * @generated - * @ordered - */ - public static final DTDOccurrenceType ONE_OR_MORE_LITERAL = new DTDOccurrenceType(ONE_OR_MORE, "ONE_OR_MORE"); //$NON-NLS-1$ - - /** - * The '<em><b>ZERO OR MORE</b></em>' literal object. <!-- - * begin-user-doc --> - * <p> - * If the meaning of '<em><b>ZERO OR MORE</b></em>' literal object - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #ZERO_OR_MORE - * @generated - * @ordered - */ - public static final DTDOccurrenceType ZERO_OR_MORE_LITERAL = new DTDOccurrenceType(ZERO_OR_MORE, "ZERO_OR_MORE"); //$NON-NLS-1$ - - /** - * An array of all the '<em><b>Occurrence Type</b></em>' enumerators. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private static final DTDOccurrenceType[] VALUES_ARRAY = new DTDOccurrenceType[]{ONE_LITERAL, OPTIONAL_LITERAL, ONE_OR_MORE_LITERAL, ZERO_OR_MORE_LITERAL,}; - - /** - * A public read-only list of all the '<em><b>Occurrence Type</b></em>' - * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the '<em><b>Occurrence Type</b></em>' literal with the - * specified name. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDOccurrenceType get(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - DTDOccurrenceType result = VALUES_ARRAY[i]; - if (result.toString().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the '<em><b>Occurrence Type</b></em>' literal with the - * specified value. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDOccurrenceType get(int value) { - switch (value) { - case ONE : - return ONE_LITERAL; - case OPTIONAL : - return OPTIONAL_LITERAL; - case ONE_OR_MORE : - return ONE_OR_MORE_LITERAL; - case ZERO_OR_MORE : - return ZERO_OR_MORE_LITERAL; - } - return null; - } - - /** - * Only this class can construct instances. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - private DTDOccurrenceType(int value, String name) { - super(value, name); - } - -} // DTDOccurrenceType diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPCDataContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPCDataContent.java deleted file mode 100644 index 23af5dd41e..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPCDataContent.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>PC Data Content</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDPCDataContent() - * @model - * @generated - */ -public interface DTDPCDataContent extends DTDElementContent { -} // DTDPCDataContent diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPackage.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPackage.java deleted file mode 100644 index c8e84c1f79..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPackage.java +++ /dev/null @@ -1,2392 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; - -/** - * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains - * accessors for the meta objects to represent - * <ul> - * <li>each class,</li> - * <li>each feature of each class,</li> - * <li>each enum,</li> - * <li>and each data type</li> - * </ul> - * <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDFactory - * @generated - */ -public interface DTDPackage extends EPackage { - - /** - * The package name. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - String eNAME = "dtd"; //$NON-NLS-1$ - - /** - * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @generated - */ - String eNS_URI = "http:///com/ibm/etools/dtd.ecore"; //$NON-NLS-1$ - - /** - * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @generated - */ - String eNS_PREFIX = "org.eclipse.wst.dtd.core.internal.emf"; //$NON-NLS-1$ - - /** - * The singleton instance of the package. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - DTDPackage eINSTANCE = org.eclipse.wst.dtd.core.internal.emf.impl.DTDPackageImpl.init(); - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementContentImpl <em>Element Content</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementContentImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDElementContent() - * @generated - */ - int DTD_ELEMENT_CONTENT = 0; - - /** - * The feature id for the '<em><b>Group</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT_CONTENT__GROUP = 0; - - /** - * The feature id for the '<em><b>Element</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT_CONTENT__ELEMENT = 1; - - /** - * The number of structural features of the the '<em>Element Content</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT_CONTENT_FEATURE_COUNT = 2; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDRepeatableContentImpl <em>Repeatable Content</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDRepeatableContentImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDRepeatableContent() - * @generated - */ - int DTD_REPEATABLE_CONTENT = 8; - - /** - * The feature id for the '<em><b>Group</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_REPEATABLE_CONTENT__GROUP = DTD_ELEMENT_CONTENT__GROUP; - - /** - * The feature id for the '<em><b>Element</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_REPEATABLE_CONTENT__ELEMENT = DTD_ELEMENT_CONTENT__ELEMENT; - - /** - * The feature id for the '<em><b>Occurrence</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_REPEATABLE_CONTENT__OCCURRENCE = DTD_ELEMENT_CONTENT_FEATURE_COUNT + 0; - - /** - * The number of structural features of the the '<em>Repeatable Content</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_REPEATABLE_CONTENT_FEATURE_COUNT = DTD_ELEMENT_CONTENT_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDGroupContentImpl <em>Group Content</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDGroupContentImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDGroupContent() - * @generated - */ - int DTD_GROUP_CONTENT = 1; - - /** - * The feature id for the '<em><b>Group</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_GROUP_CONTENT__GROUP = DTD_REPEATABLE_CONTENT__GROUP; - - /** - * The feature id for the '<em><b>Element</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_GROUP_CONTENT__ELEMENT = DTD_REPEATABLE_CONTENT__ELEMENT; - - /** - * The feature id for the '<em><b>Occurrence</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_GROUP_CONTENT__OCCURRENCE = DTD_REPEATABLE_CONTENT__OCCURRENCE; - - /** - * The feature id for the '<em><b>Group Kind</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_GROUP_CONTENT__GROUP_KIND = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Content</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_GROUP_CONTENT__CONTENT = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the the '<em>Group Content</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_GROUP_CONTENT_FEATURE_COUNT = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl <em>Attribute</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDAttribute() - * @generated - */ - int DTD_ATTRIBUTE = 2; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__EANNOTATIONS = EcorePackage.EATTRIBUTE__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__NAME = EcorePackage.EATTRIBUTE__NAME; - - /** - * The feature id for the '<em><b>EType</b></em>' reference. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__ETYPE = EcorePackage.EATTRIBUTE__ETYPE; - - /** - * The feature id for the '<em><b>Changeable</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__CHANGEABLE = EcorePackage.EATTRIBUTE__CHANGEABLE; - - /** - * The feature id for the '<em><b>Volatile</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__VOLATILE = EcorePackage.EATTRIBUTE__VOLATILE; - - /** - * The feature id for the '<em><b>Transient</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__TRANSIENT = EcorePackage.EATTRIBUTE__TRANSIENT; - - /** - * The feature id for the '<em><b>Unique</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__UNIQUE = EcorePackage.EATTRIBUTE__UNIQUE; - - /** - * The feature id for the '<em><b>Default Value Literal</b></em>' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL = EcorePackage.EATTRIBUTE__DEFAULT_VALUE_LITERAL; - - /** - * The feature id for the '<em><b>Default Value</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__DEFAULT_VALUE = EcorePackage.EATTRIBUTE__DEFAULT_VALUE; - - /** - * The feature id for the '<em><b>Lower Bound</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__LOWER_BOUND = EcorePackage.EATTRIBUTE__LOWER_BOUND; - - /** - * The feature id for the '<em><b>Upper Bound</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__UPPER_BOUND = EcorePackage.EATTRIBUTE__UPPER_BOUND; - - /** - * The feature id for the '<em><b>Many</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__MANY = EcorePackage.EATTRIBUTE__MANY; - - /** - * The feature id for the '<em><b>Required</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__REQUIRED = EcorePackage.EATTRIBUTE__REQUIRED; - - /** - * The feature id for the '<em><b>EContaining Class</b></em>' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__ECONTAINING_CLASS = EcorePackage.EATTRIBUTE__ECONTAINING_CLASS; - - /** - * The feature id for the '<em><b>Unsettable</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__UNSETTABLE = EcorePackage.EATTRIBUTE__UNSETTABLE; - - /** - * The feature id for the '<em><b>ID</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__ID = EcorePackage.EATTRIBUTE__ID; - - /** - * The feature id for the '<em><b>EAttribute Type</b></em>' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__EATTRIBUTE_TYPE = EcorePackage.EATTRIBUTE__EATTRIBUTE_TYPE; - - /** - * The feature id for the '<em><b>Comment</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__COMMENT = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Default Kind</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__DEFAULT_KIND = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Default Value String</b></em>' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__DEFAULT_VALUE_STRING = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 2; - - /** - * The feature id for the '<em><b>Attribute Name Referenced Entity</b></em>' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 3; - - /** - * The feature id for the '<em><b>Attribute Type Referenced Entity</b></em>' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 4; - - /** - * The feature id for the '<em><b>DTD Element</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE__DTD_ELEMENT = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 5; - - /** - * The number of structural features of the the '<em>Attribute</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ATTRIBUTE_FEATURE_COUNT = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 6; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementImpl <em>Element</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDElement() - * @generated - */ - int DTD_ELEMENT = 3; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EANNOTATIONS = EcorePackage.ECLASS__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__NAME = EcorePackage.ECLASS__NAME; - - /** - * The feature id for the '<em><b>Instance Class Name</b></em>' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__INSTANCE_CLASS_NAME = EcorePackage.ECLASS__INSTANCE_CLASS_NAME; - - /** - * The feature id for the '<em><b>Instance Class</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__INSTANCE_CLASS = EcorePackage.ECLASS__INSTANCE_CLASS; - - /** - * The feature id for the '<em><b>Default Value</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__DEFAULT_VALUE = EcorePackage.ECLASS__DEFAULT_VALUE; - - /** - * The feature id for the '<em><b>EPackage</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EPACKAGE = EcorePackage.ECLASS__EPACKAGE; - - /** - * The feature id for the '<em><b>Abstract</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__ABSTRACT = EcorePackage.ECLASS__ABSTRACT; - - /** - * The feature id for the '<em><b>Interface</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__INTERFACE = EcorePackage.ECLASS__INTERFACE; - - /** - * The feature id for the '<em><b>ESuper Types</b></em>' reference - * list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__ESUPER_TYPES = EcorePackage.ECLASS__ESUPER_TYPES; - - /** - * The feature id for the '<em><b>EOperations</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EOPERATIONS = EcorePackage.ECLASS__EOPERATIONS; - - /** - * The feature id for the '<em><b>EAll Attributes</b></em>' reference - * list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EALL_ATTRIBUTES = EcorePackage.ECLASS__EALL_ATTRIBUTES; - - /** - * The feature id for the '<em><b>EAll References</b></em>' reference - * list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EALL_REFERENCES = EcorePackage.ECLASS__EALL_REFERENCES; - - /** - * The feature id for the '<em><b>EReferences</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EREFERENCES = EcorePackage.ECLASS__EREFERENCES; - - /** - * The feature id for the '<em><b>EAttributes</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EATTRIBUTES = EcorePackage.ECLASS__EATTRIBUTES; - - /** - * The feature id for the '<em><b>EAll Containments</b></em>' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EALL_CONTAINMENTS = EcorePackage.ECLASS__EALL_CONTAINMENTS; - - /** - * The feature id for the '<em><b>EAll Operations</b></em>' reference - * list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EALL_OPERATIONS = EcorePackage.ECLASS__EALL_OPERATIONS; - - /** - * The feature id for the '<em><b>EAll Structural Features</b></em>' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EALL_STRUCTURAL_FEATURES = EcorePackage.ECLASS__EALL_STRUCTURAL_FEATURES; - - /** - * The feature id for the '<em><b>EAll Super Types</b></em>' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EALL_SUPER_TYPES = EcorePackage.ECLASS__EALL_SUPER_TYPES; - - /** - * The feature id for the '<em><b>EID Attribute</b></em>' reference. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__EID_ATTRIBUTE = EcorePackage.ECLASS__EID_ATTRIBUTE; - - /** - * The feature id for the '<em><b>DTD File</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__DTD_FILE = EcorePackage.ECLASS_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Comment</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__COMMENT = EcorePackage.ECLASS_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Content</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__CONTENT = EcorePackage.ECLASS_FEATURE_COUNT + 2; - - /** - * The feature id for the '<em><b>DTD Attribute</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT__DTD_ATTRIBUTE = EcorePackage.ECLASS_FEATURE_COUNT + 3; - - /** - * The number of structural features of the the '<em>Element</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT_FEATURE_COUNT = EcorePackage.ECLASS_FEATURE_COUNT + 4; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEmptyContentImpl <em>Empty Content</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEmptyContentImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEmptyContent() - * @generated - */ - int DTD_EMPTY_CONTENT = 4; - - /** - * The feature id for the '<em><b>Group</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_EMPTY_CONTENT__GROUP = DTD_ELEMENT_CONTENT__GROUP; - - /** - * The feature id for the '<em><b>Element</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_EMPTY_CONTENT__ELEMENT = DTD_ELEMENT_CONTENT__ELEMENT; - - /** - * The number of structural features of the the '<em>Empty Content</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_EMPTY_CONTENT_FEATURE_COUNT = DTD_ELEMENT_CONTENT_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAnyContentImpl <em>Any Content</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAnyContentImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDAnyContent() - * @generated - */ - int DTD_ANY_CONTENT = 5; - - /** - * The feature id for the '<em><b>Group</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ANY_CONTENT__GROUP = DTD_ELEMENT_CONTENT__GROUP; - - /** - * The feature id for the '<em><b>Element</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ANY_CONTENT__ELEMENT = DTD_ELEMENT_CONTENT__ELEMENT; - - /** - * The number of structural features of the the '<em>Any Content</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ANY_CONTENT_FEATURE_COUNT = DTD_ELEMENT_CONTENT_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPCDataContentImpl <em>PC Data Content</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPCDataContentImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDPCDataContent() - * @generated - */ - int DTD_PC_DATA_CONTENT = 6; - - /** - * The feature id for the '<em><b>Group</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_PC_DATA_CONTENT__GROUP = DTD_ELEMENT_CONTENT__GROUP; - - /** - * The feature id for the '<em><b>Element</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_PC_DATA_CONTENT__ELEMENT = DTD_ELEMENT_CONTENT__ELEMENT; - - /** - * The number of structural features of the the '<em>PC Data Content</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_PC_DATA_CONTENT_FEATURE_COUNT = DTD_ELEMENT_CONTENT_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementReferenceContentImpl <em>Element Reference Content</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementReferenceContentImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDElementReferenceContent() - * @generated - */ - int DTD_ELEMENT_REFERENCE_CONTENT = 7; - - /** - * The feature id for the '<em><b>Group</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT_REFERENCE_CONTENT__GROUP = DTD_REPEATABLE_CONTENT__GROUP; - - /** - * The feature id for the '<em><b>Element</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT = DTD_REPEATABLE_CONTENT__ELEMENT; - - /** - * The feature id for the '<em><b>Occurrence</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT_REFERENCE_CONTENT__OCCURRENCE = DTD_REPEATABLE_CONTENT__OCCURRENCE; - - /** - * The feature id for the '<em><b>Referenced Element</b></em>' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 0; - - /** - * The number of structural features of the the '<em>Element Reference Content</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ELEMENT_REFERENCE_CONTENT_FEATURE_COUNT = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl <em>File</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDFile() - * @generated - */ - int DTD_FILE = 9; - - /** - * The feature id for the '<em><b>Comment</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_FILE__COMMENT = 0; - - /** - * The feature id for the '<em><b>Parse Error</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_FILE__PARSE_ERROR = 1; - - /** - * The feature id for the '<em><b>DTD Content</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_FILE__DTD_CONTENT = 2; - - /** - * The feature id for the '<em><b>DTD Enumeration Type</b></em>' - * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @generated - * @ordered - */ - int DTD_FILE__DTD_ENUMERATION_TYPE = 3; - - /** - * The number of structural features of the the '<em>File</em>' class. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_FILE_FEATURE_COUNT = 4; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDBasicTypeImpl <em>Basic Type</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDBasicTypeImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDBasicType() - * @generated - */ - int DTD_BASIC_TYPE = 10; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EANNOTATIONS = EcorePackage.ECLASS__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__NAME = EcorePackage.ECLASS__NAME; - - /** - * The feature id for the '<em><b>Instance Class Name</b></em>' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__INSTANCE_CLASS_NAME = EcorePackage.ECLASS__INSTANCE_CLASS_NAME; - - /** - * The feature id for the '<em><b>Instance Class</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__INSTANCE_CLASS = EcorePackage.ECLASS__INSTANCE_CLASS; - - /** - * The feature id for the '<em><b>Default Value</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__DEFAULT_VALUE = EcorePackage.ECLASS__DEFAULT_VALUE; - - /** - * The feature id for the '<em><b>EPackage</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EPACKAGE = EcorePackage.ECLASS__EPACKAGE; - - /** - * The feature id for the '<em><b>Abstract</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__ABSTRACT = EcorePackage.ECLASS__ABSTRACT; - - /** - * The feature id for the '<em><b>Interface</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__INTERFACE = EcorePackage.ECLASS__INTERFACE; - - /** - * The feature id for the '<em><b>ESuper Types</b></em>' reference - * list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__ESUPER_TYPES = EcorePackage.ECLASS__ESUPER_TYPES; - - /** - * The feature id for the '<em><b>EOperations</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EOPERATIONS = EcorePackage.ECLASS__EOPERATIONS; - - /** - * The feature id for the '<em><b>EAll Attributes</b></em>' reference - * list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EALL_ATTRIBUTES = EcorePackage.ECLASS__EALL_ATTRIBUTES; - - /** - * The feature id for the '<em><b>EAll References</b></em>' reference - * list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EALL_REFERENCES = EcorePackage.ECLASS__EALL_REFERENCES; - - /** - * The feature id for the '<em><b>EReferences</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EREFERENCES = EcorePackage.ECLASS__EREFERENCES; - - /** - * The feature id for the '<em><b>EAttributes</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EATTRIBUTES = EcorePackage.ECLASS__EATTRIBUTES; - - /** - * The feature id for the '<em><b>EAll Containments</b></em>' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EALL_CONTAINMENTS = EcorePackage.ECLASS__EALL_CONTAINMENTS; - - /** - * The feature id for the '<em><b>EAll Operations</b></em>' reference - * list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EALL_OPERATIONS = EcorePackage.ECLASS__EALL_OPERATIONS; - - /** - * The feature id for the '<em><b>EAll Structural Features</b></em>' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EALL_STRUCTURAL_FEATURES = EcorePackage.ECLASS__EALL_STRUCTURAL_FEATURES; - - /** - * The feature id for the '<em><b>EAll Super Types</b></em>' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EALL_SUPER_TYPES = EcorePackage.ECLASS__EALL_SUPER_TYPES; - - /** - * The feature id for the '<em><b>EID Attribute</b></em>' reference. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__EID_ATTRIBUTE = EcorePackage.ECLASS__EID_ATTRIBUTE; - - /** - * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE__KIND = EcorePackage.ECLASS_FEATURE_COUNT + 0; - - /** - * The number of structural features of the the '<em>Basic Type</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_BASIC_TYPE_FEATURE_COUNT = EcorePackage.ECLASS_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEnumerationTypeImpl <em>Enumeration Type</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEnumerationTypeImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEnumerationType() - * @generated - */ - int DTD_ENUMERATION_TYPE = 11; - - /** - * The feature id for the '<em><b>EAnnotations</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE__EANNOTATIONS = EcorePackage.EENUM__EANNOTATIONS; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE__NAME = EcorePackage.EENUM__NAME; - - /** - * The feature id for the '<em><b>Instance Class Name</b></em>' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE__INSTANCE_CLASS_NAME = EcorePackage.EENUM__INSTANCE_CLASS_NAME; - - /** - * The feature id for the '<em><b>Instance Class</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE__INSTANCE_CLASS = EcorePackage.EENUM__INSTANCE_CLASS; - - /** - * The feature id for the '<em><b>Default Value</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE__DEFAULT_VALUE = EcorePackage.EENUM__DEFAULT_VALUE; - - /** - * The feature id for the '<em><b>EPackage</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE__EPACKAGE = EcorePackage.EENUM__EPACKAGE; - - /** - * The feature id for the '<em><b>Serializable</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE__SERIALIZABLE = EcorePackage.EENUM__SERIALIZABLE; - - /** - * The feature id for the '<em><b>ELiterals</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE__ELITERALS = EcorePackage.EENUM__ELITERALS; - - /** - * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE__KIND = EcorePackage.EENUM_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>DTD File</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE__DTD_FILE = EcorePackage.EENUM_FEATURE_COUNT + 1; - - /** - * The number of structural features of the the '<em>Enumeration Type</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENUMERATION_TYPE_FEATURE_COUNT = EcorePackage.EENUM_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDContentImpl <em>Content</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDContentImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDContent() - * @generated - */ - int DTD_CONTENT = 19; - - /** - * The feature id for the '<em><b>DTD File</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_CONTENT__DTD_FILE = 0; - - /** - * The number of structural features of the the '<em>Content</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_CONTENT_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl <em>Notation</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDNotation() - * @generated - */ - int DTD_NOTATION = 12; - - /** - * The feature id for the '<em><b>DTD File</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_NOTATION__DTD_FILE = DTD_CONTENT__DTD_FILE; - - /** - * The feature id for the '<em><b>Comment</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_NOTATION__COMMENT = DTD_CONTENT_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>System ID</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_NOTATION__SYSTEM_ID = DTD_CONTENT_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Public ID</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_NOTATION__PUBLIC_ID = DTD_CONTENT_FEATURE_COUNT + 2; - - /** - * The feature id for the '<em><b>Entity</b></em>' reference list. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_NOTATION__ENTITY = DTD_CONTENT_FEATURE_COUNT + 3; - - /** - * The number of structural features of the the '<em>Notation</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_NOTATION_FEATURE_COUNT = DTD_CONTENT_FEATURE_COUNT + 4; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl <em>Entity</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEntity() - * @generated - */ - int DTD_ENTITY = 13; - - /** - * The feature id for the '<em><b>DTD File</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY__DTD_FILE = DTD_CONTENT__DTD_FILE; - - /** - * The feature id for the '<em><b>Comment</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY__COMMENT = DTD_CONTENT_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Parameter Entity</b></em>' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY__PARAMETER_ENTITY = DTD_CONTENT_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Content</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY__CONTENT = DTD_CONTENT_FEATURE_COUNT + 2; - - /** - * The feature id for the '<em><b>Parm Entity Ref</b></em>' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY__PARM_ENTITY_REF = DTD_CONTENT_FEATURE_COUNT + 3; - - /** - * The feature id for the '<em><b>Entity Reference</b></em>' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY__ENTITY_REFERENCE = DTD_CONTENT_FEATURE_COUNT + 4; - - /** - * The feature id for the '<em><b>Attribute Name Reference</b></em>' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE = DTD_CONTENT_FEATURE_COUNT + 5; - - /** - * The feature id for the '<em><b>Attribute Type Reference</b></em>' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE = DTD_CONTENT_FEATURE_COUNT + 6; - - /** - * The number of structural features of the the '<em>Entity</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY_FEATURE_COUNT = DTD_CONTENT_FEATURE_COUNT + 7; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityContentImpl <em>Entity Content</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityContentImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEntityContent() - * @generated - */ - int DTD_ENTITY_CONTENT = 14; - - /** - * The feature id for the '<em><b>DTD Entity</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY_CONTENT__DTD_ENTITY = 0; - - /** - * The number of structural features of the the '<em>Entity Content</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY_CONTENT_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDExternalEntityImpl <em>External Entity</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDExternalEntityImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDExternalEntity() - * @generated - */ - int DTD_EXTERNAL_ENTITY = 15; - - /** - * The feature id for the '<em><b>DTD Entity</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_EXTERNAL_ENTITY__DTD_ENTITY = DTD_ENTITY_CONTENT__DTD_ENTITY; - - /** - * The feature id for the '<em><b>System ID</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_EXTERNAL_ENTITY__SYSTEM_ID = DTD_ENTITY_CONTENT_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Public ID</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_EXTERNAL_ENTITY__PUBLIC_ID = DTD_ENTITY_CONTENT_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Notation</b></em>' reference. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_EXTERNAL_ENTITY__NOTATION = DTD_ENTITY_CONTENT_FEATURE_COUNT + 2; - - /** - * The feature id for the '<em><b>Entity Referenced From Another File</b></em>' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE = DTD_ENTITY_CONTENT_FEATURE_COUNT + 3; - - /** - * The number of structural features of the the '<em>External Entity</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_EXTERNAL_ENTITY_FEATURE_COUNT = DTD_ENTITY_CONTENT_FEATURE_COUNT + 4; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDInternalEntityImpl <em>Internal Entity</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDInternalEntityImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDInternalEntity() - * @generated - */ - int DTD_INTERNAL_ENTITY = 16; - - /** - * The feature id for the '<em><b>DTD Entity</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_INTERNAL_ENTITY__DTD_ENTITY = DTD_ENTITY_CONTENT__DTD_ENTITY; - - /** - * The feature id for the '<em><b>Value</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_INTERNAL_ENTITY__VALUE = DTD_ENTITY_CONTENT_FEATURE_COUNT + 0; - - /** - * The number of structural features of the the '<em>Internal Entity</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_INTERNAL_ENTITY_FEATURE_COUNT = DTD_ENTITY_CONTENT_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDParameterEntityReferenceImpl <em>Parameter Entity Reference</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDParameterEntityReferenceImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDParameterEntityReference() - * @generated - */ - int DTD_PARAMETER_ENTITY_REFERENCE = 17; - - /** - * The feature id for the '<em><b>DTD File</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE = DTD_CONTENT__DTD_FILE; - - /** - * The feature id for the '<em><b>Entity</b></em>' reference. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_PARAMETER_ENTITY_REFERENCE__ENTITY = DTD_CONTENT_FEATURE_COUNT + 0; - - /** - * The number of structural features of the the '<em>Parameter Entity Reference</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_PARAMETER_ENTITY_REFERENCE_FEATURE_COUNT = DTD_CONTENT_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityReferenceContentImpl <em>Entity Reference Content</em>}' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityReferenceContentImpl - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEntityReferenceContent() - * @generated - */ - int DTD_ENTITY_REFERENCE_CONTENT = 18; - - /** - * The feature id for the '<em><b>Group</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY_REFERENCE_CONTENT__GROUP = DTD_REPEATABLE_CONTENT__GROUP; - - /** - * The feature id for the '<em><b>Element</b></em>' container - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY_REFERENCE_CONTENT__ELEMENT = DTD_REPEATABLE_CONTENT__ELEMENT; - - /** - * The feature id for the '<em><b>Occurrence</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY_REFERENCE_CONTENT__OCCURRENCE = DTD_REPEATABLE_CONTENT__OCCURRENCE; - - /** - * The feature id for the '<em><b>Element Referenced Entity</b></em>' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 0; - - /** - * The number of structural features of the the '<em>Entity Reference Content</em>' - * class. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int DTD_ENTITY_REFERENCE_CONTENT_FEATURE_COUNT = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType <em>Occurrence Type</em>}' - * enum. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDOccurrenceType() - * @generated - */ - int DTD_OCCURRENCE_TYPE = 20; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind <em>Default Kind</em>}' - * enum. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDDefaultKind() - * @generated - */ - int DTD_DEFAULT_KIND = 21; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind <em>Basic Type Kind</em>}' - * enum. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDBasicTypeKind() - * @generated - */ - int DTD_BASIC_TYPE_KIND = 22; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind <em>Enum Group Kind</em>}' - * enum. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEnumGroupKind() - * @generated - */ - int DTD_ENUM_GROUP_KIND = 23; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind <em>Group Kind</em>}' - * enum. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDGroupKind() - * @generated - */ - int DTD_GROUP_KIND = 24; - - /** - * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType <em>XML Schema Defined Type</em>}' - * enum. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType - * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getXMLSchemaDefinedType() - * @generated - */ - int XML_SCHEMA_DEFINED_TYPE = 25; - - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent <em>Element Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Element Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementContent - * @generated - */ - EClass getDTDElementContent(); - - /** - * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup <em>Group</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the container reference '<em>Group</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup() - * @see #getDTDElementContent() - * @generated - */ - EReference getDTDElementContent_Group(); - - /** - * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement <em>Element</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the container reference '<em>Element</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement() - * @see #getDTDElementContent() - * @generated - */ - EReference getDTDElementContent_Element(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent <em>Group Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Group Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent - * @generated - */ - EClass getDTDGroupContent(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getGroupKind <em>Group Kind</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Group Kind</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getGroupKind() - * @see #getDTDGroupContent() - * @generated - */ - EAttribute getDTDGroupContent_GroupKind(); - - /** - * Returns the meta object for the containment reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getContent <em>Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the containment reference list '<em>Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getContent() - * @see #getDTDGroupContent() - * @generated - */ - EReference getDTDGroupContent_Content(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute <em>Attribute</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Attribute</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute - * @generated - */ - EClass getDTDAttribute(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getComment <em>Comment</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Comment</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getComment() - * @see #getDTDAttribute() - * @generated - */ - EAttribute getDTDAttribute_Comment(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultKind <em>Default Kind</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Default Kind</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultKind() - * @see #getDTDAttribute() - * @generated - */ - EAttribute getDTDAttribute_DefaultKind(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultValueString <em>Default Value String</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Default Value String</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultValueString() - * @see #getDTDAttribute() - * @generated - */ - EAttribute getDTDAttribute_DefaultValueString(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity <em>Attribute Name Referenced Entity</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference '<em>Attribute Name Referenced Entity</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity() - * @see #getDTDAttribute() - * @generated - */ - EReference getDTDAttribute_AttributeNameReferencedEntity(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity <em>Attribute Type Referenced Entity</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference '<em>Attribute Type Referenced Entity</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity() - * @see #getDTDAttribute() - * @generated - */ - EReference getDTDAttribute_AttributeTypeReferencedEntity(); - - /** - * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement <em>DTD Element</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the container reference '<em>DTD Element</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement() - * @see #getDTDAttribute() - * @generated - */ - EReference getDTDAttribute_DTDElement(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement <em>Element</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Element</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement - * @generated - */ - EClass getDTDElement(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getComment <em>Comment</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Comment</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement#getComment() - * @see #getDTDElement() - * @generated - */ - EAttribute getDTDElement_Comment(); - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent <em>Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the containment reference '<em>Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent() - * @see #getDTDElement() - * @generated - */ - EReference getDTDElement_Content(); - - /** - * Returns the meta object for the containment reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getDTDAttribute <em>DTD Attribute</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the containment reference list '<em>DTD Attribute</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement#getDTDAttribute() - * @see #getDTDElement() - * @generated - */ - EReference getDTDElement_DTDAttribute(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent <em>Empty Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Empty Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent - * @generated - */ - EClass getDTDEmptyContent(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent <em>Any Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Any Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent - * @generated - */ - EClass getDTDAnyContent(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent <em>PC Data Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>PC Data Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent - * @generated - */ - EClass getDTDPCDataContent(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent <em>Element Reference Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Element Reference Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent - * @generated - */ - EClass getDTDElementReferenceContent(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent#getReferencedElement <em>Referenced Element</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference '<em>Referenced Element</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent#getReferencedElement() - * @see #getDTDElementReferenceContent() - * @generated - */ - EReference getDTDElementReferenceContent_ReferencedElement(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent <em>Repeatable Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Repeatable Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent - * @generated - */ - EClass getDTDRepeatableContent(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent#getOccurrence <em>Occurrence</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Occurrence</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent#getOccurrence() - * @see #getDTDRepeatableContent() - * @generated - */ - EAttribute getDTDRepeatableContent_Occurrence(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile <em>File</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>File</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile - * @generated - */ - EClass getDTDFile(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getComment <em>Comment</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Comment</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#getComment() - * @see #getDTDFile() - * @generated - */ - EAttribute getDTDFile_Comment(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#isParseError <em>Parse Error</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Parse Error</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#isParseError() - * @see #getDTDFile() - * @generated - */ - EAttribute getDTDFile_ParseError(); - - /** - * Returns the meta object for the containment reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDContent <em>DTD Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the containment reference list '<em>DTD Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDContent() - * @see #getDTDFile() - * @generated - */ - EReference getDTDFile_DTDContent(); - - /** - * Returns the meta object for the containment reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDEnumerationType <em>DTD Enumeration Type</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the containment reference list '<em>DTD Enumeration Type</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDEnumerationType() - * @see #getDTDFile() - * @generated - */ - EReference getDTDFile_DTDEnumerationType(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicType <em>Basic Type</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Basic Type</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicType - * @generated - */ - EClass getDTDBasicType(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicType#getKind <em>Kind</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Kind</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicType#getKind() - * @see #getDTDBasicType() - * @generated - */ - EAttribute getDTDBasicType_Kind(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType <em>Enumeration Type</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Enumeration Type</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType - * @generated - */ - EClass getDTDEnumerationType(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getKind <em>Kind</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Kind</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getKind() - * @see #getDTDEnumerationType() - * @generated - */ - EAttribute getDTDEnumerationType_Kind(); - - /** - * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile <em>DTD File</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the container reference '<em>DTD File</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile() - * @see #getDTDEnumerationType() - * @generated - */ - EReference getDTDEnumerationType_DTDFile(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation <em>Notation</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Notation</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation - * @generated - */ - EClass getDTDNotation(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getComment <em>Comment</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Comment</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getComment() - * @see #getDTDNotation() - * @generated - */ - EAttribute getDTDNotation_Comment(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getSystemID <em>System ID</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>System ID</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getSystemID() - * @see #getDTDNotation() - * @generated - */ - EAttribute getDTDNotation_SystemID(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getPublicID <em>Public ID</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Public ID</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getPublicID() - * @see #getDTDNotation() - * @generated - */ - EAttribute getDTDNotation_PublicID(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getEntity <em>Entity</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference list '<em>Entity</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getEntity() - * @see #getDTDNotation() - * @generated - */ - EReference getDTDNotation_Entity(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity <em>Entity</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Entity</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity - * @generated - */ - EClass getDTDEntity(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getComment <em>Comment</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Comment</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getComment() - * @see #getDTDEntity() - * @generated - */ - EAttribute getDTDEntity_Comment(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#isParameterEntity <em>Parameter Entity</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Parameter Entity</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#isParameterEntity() - * @see #getDTDEntity() - * @generated - */ - EAttribute getDTDEntity_ParameterEntity(); - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent <em>Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the containment reference '<em>Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent() - * @see #getDTDEntity() - * @generated - */ - EReference getDTDEntity_Content(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef <em>Parm Entity Ref</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference '<em>Parm Entity Ref</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef() - * @see #getDTDEntity() - * @generated - */ - EReference getDTDEntity_ParmEntityRef(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getEntityReference <em>Entity Reference</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference list '<em>Entity Reference</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getEntityReference() - * @see #getDTDEntity() - * @generated - */ - EReference getDTDEntity_EntityReference(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeNameReference <em>Attribute Name Reference</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference list '<em>Attribute Name Reference</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeNameReference() - * @see #getDTDEntity() - * @generated - */ - EReference getDTDEntity_AttributeNameReference(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeTypeReference <em>Attribute Type Reference</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference list '<em>Attribute Type Reference</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeTypeReference() - * @see #getDTDEntity() - * @generated - */ - EReference getDTDEntity_AttributeTypeReference(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent <em>Entity Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Entity Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent - * @generated - */ - EClass getDTDEntityContent(); - - /** - * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity <em>DTD Entity</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the container reference '<em>DTD Entity</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity() - * @see #getDTDEntityContent() - * @generated - */ - EReference getDTDEntityContent_DTDEntity(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity <em>External Entity</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>External Entity</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity - * @generated - */ - EClass getDTDExternalEntity(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getSystemID <em>System ID</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>System ID</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getSystemID() - * @see #getDTDExternalEntity() - * @generated - */ - EAttribute getDTDExternalEntity_SystemID(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getPublicID <em>Public ID</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Public ID</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getPublicID() - * @see #getDTDExternalEntity() - * @generated - */ - EAttribute getDTDExternalEntity_PublicID(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation <em>Notation</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference '<em>Notation</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation() - * @see #getDTDExternalEntity() - * @generated - */ - EReference getDTDExternalEntity_Notation(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getEntityReferencedFromAnotherFile <em>Entity Referenced From Another File</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference '<em>Entity Referenced From Another File</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getEntityReferencedFromAnotherFile() - * @see #getDTDExternalEntity() - * @generated - */ - EReference getDTDExternalEntity_EntityReferencedFromAnotherFile(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity <em>Internal Entity</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Internal Entity</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity - * @generated - */ - EClass getDTDInternalEntity(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity#getValue <em>Value</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the attribute '<em>Value</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity#getValue() - * @see #getDTDInternalEntity() - * @generated - */ - EAttribute getDTDInternalEntity_Value(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference <em>Parameter Entity Reference</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Parameter Entity Reference</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference - * @generated - */ - EClass getDTDParameterEntityReference(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity <em>Entity</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference '<em>Entity</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity() - * @see #getDTDParameterEntityReference() - * @generated - */ - EReference getDTDParameterEntityReference_Entity(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent <em>Entity Reference Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Entity Reference Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent - * @generated - */ - EClass getDTDEntityReferenceContent(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity <em>Element Referenced Entity</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the reference '<em>Element Referenced Entity</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity() - * @see #getDTDEntityReferenceContent() - * @generated - */ - EReference getDTDEntityReferenceContent_ElementReferencedEntity(); - - /** - * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDContent <em>Content</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for class '<em>Content</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDContent - * @generated - */ - EClass getDTDContent(); - - /** - * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile <em>DTD File</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the container reference '<em>DTD File</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile() - * @see #getDTDContent() - * @generated - */ - EReference getDTDContent_DTDFile(); - - /** - * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType <em>Occurrence Type</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for enum '<em>Occurrence Type</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType - * @generated - */ - EEnum getDTDOccurrenceType(); - - /** - * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind <em>Default Kind</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for enum '<em>Default Kind</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind - * @generated - */ - EEnum getDTDDefaultKind(); - - /** - * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind <em>Basic Type Kind</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for enum '<em>Basic Type Kind</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind - * @generated - */ - EEnum getDTDBasicTypeKind(); - - /** - * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind <em>Enum Group Kind</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for enum '<em>Enum Group Kind</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind - * @generated - */ - EEnum getDTDEnumGroupKind(); - - /** - * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind <em>Group Kind</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for enum '<em>Group Kind</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind - * @generated - */ - EEnum getDTDGroupKind(); - - /** - * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType <em>XML Schema Defined Type</em>}'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for enum '<em>XML Schema Defined Type</em>'. - * @see org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType - * @generated - */ - EEnum getXMLSchemaDefinedType(); - - /** - * Returns the factory that creates the instances of the model. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @return the factory that creates the instances of the model. - * @generated - */ - DTDFactory getDTDFactory(); - -} // DTDPackage diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDParameterEntityReference.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDParameterEntityReference.java deleted file mode 100644 index 1f4f918855..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDParameterEntityReference.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import org.eclipse.emf.ecore.ENamedElement; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Parameter Entity Reference</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity <em>Entity</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDParameterEntityReference() - * @model - * @generated - */ -public interface DTDParameterEntityReference extends ENamedElement, DTDContent, DTDObject, DTDSourceOffset { - /** - * Returns the value of the '<em><b>Entity</b></em>' reference. It is - * bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef <em>Parm Entity Ref</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Entity</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Entity</em>' reference. - * @see #setEntity(DTDEntity) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDParameterEntityReference_Entity() - * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef - * @model opposite="parmEntityRef" required="true" - * @generated - */ - DTDEntity getEntity(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity <em>Entity</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Entity</em>' reference. - * @see #getEntity() - * @generated - */ - void setEntity(DTDEntity value); - -} // DTDParameterEntityReference diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDRepeatableContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDRepeatableContent.java deleted file mode 100644 index b9b5123dff..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDRepeatableContent.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -/** - * <!-- begin-user-doc --> A representation of the model object '<em><b>Repeatable Content</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent#getOccurrence <em>Occurrence</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDRepeatableContent() - * @model abstract="true" - * @generated - */ -public interface DTDRepeatableContent extends DTDElementContent { - - public abstract String unparseRepeatableContent(); - - /** - * Returns the value of the '<em><b>Occurrence</b></em>' attribute. - * The literals are from the enumeration - * {@link org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType}. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Occurrence</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Occurrence</em>' attribute. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType - * @see #setOccurrence(DTDOccurrenceType) - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDRepeatableContent_Occurrence() - * @model - * @generated - */ - DTDOccurrenceType getOccurrence(); - - /** - * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent#getOccurrence <em>Occurrence</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Occurrence</em>' attribute. - * @see org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType - * @see #getOccurrence() - * @generated - */ - void setOccurrence(DTDOccurrenceType value); - -} // DTDRepeatableContent diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDResource.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDResource.java deleted file mode 100644 index 21dd1feebc..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDResource.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - - -public interface DTDResource { - // Enumeration Constants - public static final String ANYICON = "icons/any.gif"; //$NON-NLS-1$ - public static final String ELEMENTICON = "icons/element.gif"; //$NON-NLS-1$ - public static final String ENTITYICON = "icons/entity.gif"; //$NON-NLS-1$ - public static final String ATTRIBUTEICON = "icons/attribute.gif"; //$NON-NLS-1$ - public static final String NOTATIONICON = "icons/notation.gif"; //$NON-NLS-1$ - public static final String EMPTYICON = "icons/emptycontent.gif"; //$NON-NLS-1$ - public static final String PCDATAICON = "icons/one.gif"; //$NON-NLS-1$ - public static final String ENTITYREFERENCEICON = "icons/entity_reference.gif"; //$NON-NLS-1$ - - public static final String ONEICON = "icons/one.gif"; //$NON-NLS-1$ - public static final String OPTIONALICON = "icons/optional.gif"; //$NON-NLS-1$ - public static final String ONEORMOREICON = "icons/oneormore.gif"; //$NON-NLS-1$ - public static final String ZEROORMOREICON = "icons/zeroormore.gif"; //$NON-NLS-1$ - - public static final String ONESEQUENCEICON = "icons/onesequence.gif"; //$NON-NLS-1$ - public static final String OPTIONALSEQUENCEICON = "icons/optionalsequence.gif"; //$NON-NLS-1$ - public static final String ONEORMORESEQUENCEICON = "icons/oneormoresequence.gif"; //$NON-NLS-1$ - public static final String ZEROORMORESEQUENCEICON = "icons/zeroormoresequence.gif"; //$NON-NLS-1$ - - public static final String ONECHOICEICON = "icons/onechoice.gif"; //$NON-NLS-1$ - public static final String OPTIONALCHOICEICON = "icons/optionalchoice.gif"; //$NON-NLS-1$ - public static final String ONEORMORECHOICEICON = "icons/oneormorechoice.gif"; //$NON-NLS-1$ - public static final String ZEROORMORECHOICEICON = "icons/zeroormorechoice.gif"; //$NON-NLS-1$ - - public static final String DTDFILEICON = "icons/DTDFile.gif"; //$NON-NLS-1$ - - public static final String NEWDTD = "icons/newdtd_wiz.gif"; //$NON-NLS-1$ - public static final String NEWHTMLFORM = "icons/genhtmform_wiz.gif"; //$NON-NLS-1$ -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDSourceOffset.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDSourceOffset.java deleted file mode 100644 index c63628869b..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDSourceOffset.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -public interface DTDSourceOffset { - /** - * Get the value of startOffset. - * - * @return value of startOffset. - */ - public int getStartOffset(); - - /** - * Set the value of startOffset. - * - * @param v - * Value to assign to startOffset. - */ - public void setStartOffset(int v); - - /** - * Get the value of endOffset. - * - * @return value of endOffset. - */ - public int getEndOffset(); - - /** - * Set the value of endOffset. - * - * @param v - * Value to assign to endOffset. - */ - public void setEndOffset(int v); - -}// DTDSourceOffset diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDType.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDType.java deleted file mode 100644 index 7774623fb3..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDType.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf; - -public interface DTDType extends DTDObject { - // constant strings for dtd attribute types - public static final String NONE = "None"; //$NON-NLS-1$ - - public static final String CDATA = "Character Data (CDATA)"; //$NON-NLS-1$ - public static final String ID = "Identifier (ID)"; //$NON-NLS-1$ - public static final String IDREF = "ID Reference (IDREF)"; //$NON-NLS-1$ - public static final String IDREFS = "ID References (IDREFS)"; //$NON-NLS-1$ - public static final String ENTITY = "Entity Name (ENTITY)"; //$NON-NLS-1$ - public static final String ENTITIES = "Entity Names (ENTITIES)"; //$NON-NLS-1$ - public static final String NMTOKEN = "Name Token (NMTOKEN)"; //$NON-NLS-1$ - public static final String NMTOKENS = "Name Tokens (NMTOKENS)"; //$NON-NLS-1$ - public static final String ENUM_NAME_TOKEN_GROUP = "Enumerated Name Tokens"; //$NON-NLS-1$ - public static final String ENUM_NOTATION_GROUP = "Enumerated NOTATION"; //$NON-NLS-1$ - - public String toString(); - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/XMLSchemaDefinedType.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/XMLSchemaDefinedType.java deleted file mode 100644 index b0c68abbdc..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/XMLSchemaDefinedType.java +++ /dev/null @@ -1,471 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.AbstractEnumerator; - -/** - * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>XML Schema Defined Type</b></em>', - * and utility methods for working with them. <!-- end-user-doc --> - * - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getXMLSchemaDefinedType() - * @model - * @generated - */ -public final class XMLSchemaDefinedType extends AbstractEnumerator { - /** - * The '<em><b>NONE</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #NONE_LITERAL - * @model - * @generated - * @ordered - */ - public static final int NONE = -1; - - /** - * The '<em><b>STRING</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #STRING_LITERAL - * @model - * @generated - * @ordered - */ - public static final int STRING = 1; - - /** - * The '<em><b>BOOLEAN</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #BOOLEAN_LITERAL - * @model - * @generated - * @ordered - */ - public static final int BOOLEAN = 2; - - /** - * The '<em><b>FLOAT</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #FLOAT_LITERAL - * @model - * @generated - * @ordered - */ - public static final int FLOAT = 3; - - /** - * The '<em><b>DOUBLE</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #DOUBLE_LITERAL - * @model - * @generated - * @ordered - */ - public static final int DOUBLE = 4; - - /** - * The '<em><b>DECIMAL</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #DECIMAL_LITERAL - * @model - * @generated - * @ordered - */ - public static final int DECIMAL = 5; - - /** - * The '<em><b>TIMEINSTANT</b></em>' literal value. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @see #TIMEINSTANT_LITERAL - * @model - * @generated - * @ordered - */ - public static final int TIMEINSTANT = 6; - - /** - * The '<em><b>TIMEDURATION</b></em>' literal value. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @see #TIMEDURATION_LITERAL - * @model - * @generated - * @ordered - */ - public static final int TIMEDURATION = 7; - - /** - * The '<em><b>RECURRINGINSTANT</b></em>' literal value. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @see #RECURRINGINSTANT_LITERAL - * @model - * @generated - * @ordered - */ - public static final int RECURRINGINSTANT = 8; - - /** - * The '<em><b>BINARY</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #BINARY_LITERAL - * @model - * @generated - * @ordered - */ - public static final int BINARY = 9; - - /** - * The '<em><b>URI</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #URI_LITERAL - * @model - * @generated - * @ordered - */ - public static final int URI = 10; - - /** - * The '<em><b>INTEGER</b></em>' literal value. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #INTEGER_LITERAL - * @model - * @generated - * @ordered - */ - public static final int INTEGER = 11; - - /** - * The '<em><b>DATE</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #DATE_LITERAL - * @model - * @generated - * @ordered - */ - public static final int DATE = 12; - - /** - * The '<em><b>TIME</b></em>' literal value. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #TIME_LITERAL - * @model - * @generated - * @ordered - */ - public static final int TIME = 13; - - /** - * The '<em><b>NONE</b></em>' literal object. <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>NONE</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #NONE - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType NONE_LITERAL = new XMLSchemaDefinedType(NONE, "NONE"); //$NON-NLS-1$ - - /** - * The '<em><b>STRING</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>STRING</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #STRING - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType STRING_LITERAL = new XMLSchemaDefinedType(STRING, "STRING"); //$NON-NLS-1$ - - /** - * The '<em><b>BOOLEAN</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>BOOLEAN</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #BOOLEAN - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType BOOLEAN_LITERAL = new XMLSchemaDefinedType(BOOLEAN, "BOOLEAN"); //$NON-NLS-1$ - - /** - * The '<em><b>FLOAT</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>FLOAT</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #FLOAT - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType FLOAT_LITERAL = new XMLSchemaDefinedType(FLOAT, "FLOAT"); //$NON-NLS-1$ - - /** - * The '<em><b>DOUBLE</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>DOUBLE</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #DOUBLE - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType DOUBLE_LITERAL = new XMLSchemaDefinedType(DOUBLE, "DOUBLE"); //$NON-NLS-1$ - - /** - * The '<em><b>DECIMAL</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>DECIMAL</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #DECIMAL - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType DECIMAL_LITERAL = new XMLSchemaDefinedType(DECIMAL, "DECIMAL"); //$NON-NLS-1$ - - /** - * The '<em><b>TIMEINSTANT</b></em>' literal object. <!-- - * begin-user-doc --> - * <p> - * If the meaning of '<em><b>TIMEINSTANT</b></em>' literal object - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #TIMEINSTANT - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType TIMEINSTANT_LITERAL = new XMLSchemaDefinedType(TIMEINSTANT, "TIMEINSTANT"); //$NON-NLS-1$ - - /** - * The '<em><b>TIMEDURATION</b></em>' literal object. <!-- - * begin-user-doc --> - * <p> - * If the meaning of '<em><b>TIMEDURATION</b></em>' literal object - * isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #TIMEDURATION - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType TIMEDURATION_LITERAL = new XMLSchemaDefinedType(TIMEDURATION, "TIMEDURATION"); //$NON-NLS-1$ - - /** - * The '<em><b>RECURRINGINSTANT</b></em>' literal object. <!-- - * begin-user-doc --> - * <p> - * If the meaning of '<em><b>RECURRINGINSTANT</b></em>' literal - * object isn't clear, there really should be more of a description - * here... - * </p> - * <!-- end-user-doc --> - * - * @see #RECURRINGINSTANT - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType RECURRINGINSTANT_LITERAL = new XMLSchemaDefinedType(RECURRINGINSTANT, "RECURRINGINSTANT"); //$NON-NLS-1$ - - /** - * The '<em><b>BINARY</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>BINARY</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #BINARY - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType BINARY_LITERAL = new XMLSchemaDefinedType(BINARY, "BINARY"); //$NON-NLS-1$ - - /** - * The '<em><b>URI</b></em>' literal object. <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>URI</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #URI - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType URI_LITERAL = new XMLSchemaDefinedType(URI, "URI"); //$NON-NLS-1$ - - /** - * The '<em><b>INTEGER</b></em>' literal object. <!-- begin-user-doc - * --> - * <p> - * If the meaning of '<em><b>INTEGER</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #INTEGER - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType INTEGER_LITERAL = new XMLSchemaDefinedType(INTEGER, "INTEGER"); //$NON-NLS-1$ - - /** - * The '<em><b>DATE</b></em>' literal object. <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>DATE</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #DATE - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType DATE_LITERAL = new XMLSchemaDefinedType(DATE, "DATE"); //$NON-NLS-1$ - - /** - * The '<em><b>TIME</b></em>' literal object. <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>TIME</b></em>' literal object isn't - * clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @see #TIME - * @generated - * @ordered - */ - public static final XMLSchemaDefinedType TIME_LITERAL = new XMLSchemaDefinedType(TIME, "TIME"); //$NON-NLS-1$ - - /** - * An array of all the '<em><b>XML Schema Defined Type</b></em>' - * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private static final XMLSchemaDefinedType[] VALUES_ARRAY = new XMLSchemaDefinedType[]{NONE_LITERAL, STRING_LITERAL, BOOLEAN_LITERAL, FLOAT_LITERAL, DOUBLE_LITERAL, DECIMAL_LITERAL, TIMEINSTANT_LITERAL, TIMEDURATION_LITERAL, RECURRINGINSTANT_LITERAL, BINARY_LITERAL, URI_LITERAL, INTEGER_LITERAL, DATE_LITERAL, TIME_LITERAL,}; - - /** - * A public read-only list of all the '<em><b>XML Schema Defined Type</b></em>' - * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the '<em><b>XML Schema Defined Type</b></em>' literal with - * the specified name. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static XMLSchemaDefinedType get(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - XMLSchemaDefinedType result = VALUES_ARRAY[i]; - if (result.toString().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the '<em><b>XML Schema Defined Type</b></em>' literal with - * the specified value. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static XMLSchemaDefinedType get(int value) { - switch (value) { - case NONE : - return NONE_LITERAL; - case STRING : - return STRING_LITERAL; - case BOOLEAN : - return BOOLEAN_LITERAL; - case FLOAT : - return FLOAT_LITERAL; - case DOUBLE : - return DOUBLE_LITERAL; - case DECIMAL : - return DECIMAL_LITERAL; - case TIMEINSTANT : - return TIMEINSTANT_LITERAL; - case TIMEDURATION : - return TIMEDURATION_LITERAL; - case RECURRINGINSTANT : - return RECURRINGINSTANT_LITERAL; - case BINARY : - return BINARY_LITERAL; - case URI : - return URI_LITERAL; - case INTEGER : - return INTEGER_LITERAL; - case DATE : - return DATE_LITERAL; - case TIME : - return TIME_LITERAL; - } - return null; - } - - /** - * Only this class can construct instances. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - private XMLSchemaDefinedType(int value, String name) { - super(value, name); - } - -} // XMLSchemaDefinedType diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAnyContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAnyContentImpl.java deleted file mode 100644 index 2e81288764..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAnyContentImpl.java +++ /dev/null @@ -1,181 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; - - - -/** - * <!-- begin-user-doc --> An implementation of the model object '<em><b>Any Content</b></em>'. - * <!-- end-user-doc --> - * <p> - * </p> - * - * @generated - */ -public class DTDAnyContentImpl extends DTDElementContentImpl implements DTDAnyContent { - public String getContentName() { - return "ANY"; //$NON-NLS-1$ - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected DTDAnyContentImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDAnyContent(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ANY_CONTENT__GROUP : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ANY_CONTENT__GROUP, msgs); - case DTDPackage.DTD_ANY_CONTENT__ELEMENT : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ANY_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ANY_CONTENT__GROUP : - return eBasicSetContainer(null, DTDPackage.DTD_ANY_CONTENT__GROUP, msgs); - case DTDPackage.DTD_ANY_CONTENT__ELEMENT : - return eBasicSetContainer(null, DTDPackage.DTD_ANY_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_ANY_CONTENT__GROUP : - return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs); - case DTDPackage.DTD_ANY_CONTENT__ELEMENT : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ANY_CONTENT__GROUP : - return getGroup(); - case DTDPackage.DTD_ANY_CONTENT__ELEMENT : - return getElement(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ANY_CONTENT__GROUP : - setGroup((DTDGroupContent) newValue); - return; - case DTDPackage.DTD_ANY_CONTENT__ELEMENT : - setElement((DTDElement) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ANY_CONTENT__GROUP : - setGroup((DTDGroupContent) null); - return; - case DTDPackage.DTD_ANY_CONTENT__ELEMENT : - setElement((DTDElement) null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ANY_CONTENT__GROUP : - return getGroup() != null; - case DTDPackage.DTD_ANY_CONTENT__ELEMENT : - return getElement() != null; - } - return eDynamicIsSet(eFeature); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAttributeImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAttributeImpl.java deleted file mode 100644 index a860207f2a..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAttributeImpl.java +++ /dev/null @@ -1,980 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.impl.NotificationChainImpl; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EEnumLiteral; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcoreFactory; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EAttributeImpl; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType; -import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.DTDType; - - -/** - * <!-- begin-user-doc --> An implementation of the model object '<em><b>Attribute</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getComment <em>Comment</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getDefaultKind <em>Default Kind</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getDefaultValueString <em>Default Value String</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getAttributeNameReferencedEntity <em>Attribute Name Referenced Entity</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getAttributeTypeReferencedEntity <em>Attribute Type Referenced Entity</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getDTDElement <em>DTD Element</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class DTDAttributeImpl extends EAttributeImpl implements DTDAttribute { - - public DTDAttributeImpl() { - super(); - } - - public DTDType getDTDType() { - return (DTDType) getEType(); - } - - - public void setDTDType(DTDType type) { - setEType((EClassifier) type); - } - - public void setDTDBasicType(int value) { - DTDFactoryImpl factory = (DTDFactoryImpl) DTDFactoryImpl.instance(); - // set attribute type - switch (value) { - case 0 : - setDTDType(factory.getDTDBasicType_NONE()); - break; - case 1 : - setDTDType(factory.getDTDBasicType_CDATA()); - break; - case 2 : - setDTDType(factory.getDTDBasicType_ID()); - break; - case 3 : - setDTDType(factory.getDTDBasicType_IDREF()); - break; - case 4 : - setDTDType(factory.getDTDBasicType_IDREFS()); - break; - case 5 : - setDTDType(factory.getDTDBasicType_ENTITY()); - break; - case 6 : - setDTDType(factory.getDTDBasicType_ENTITIES()); - break; - case 7 : - setDTDType(factory.getDTDBasicType_NMTOKEN()); - break; - case 8 : - setDTDType(factory.getDTDBasicType_NMTOKENS()); - break; - } - } - - public String unparse() { - StringBuffer result = new StringBuffer(128); - - - result.append(getName()); - - - StringBuffer value = new StringBuffer(); - switch (getDefaultKind().getValue()) { - case DTDDefaultKind.IMPLIED : - value.append("#IMPLIED"); //$NON-NLS-1$ - break; - case DTDDefaultKind.REQUIRED : - value.append("#REQUIRED"); //$NON-NLS-1$ - break; - case DTDDefaultKind.FIXED : - String type = getDTDType().toString(); - if (!(type.equals(DTDType.ID) || type.equals(DTDType.IDREF) || type.equals(DTDType.ENUM_NAME_TOKEN_GROUP) || type.equals(DTDType.IDREFS))) { - value.append("#FIXED \"").append(getDefaultValueString()).append("\""); //$NON-NLS-1$ //$NON-NLS-2$ - } - break; - case DTDDefaultKind.NOFIXED : - String defaultValue = getDefaultValueString(); - if (defaultValue != null) - value.append("\"").append(defaultValue).append("\""); //$NON-NLS-1$ //$NON-NLS-2$ - break; - } - - - // Get the attribute type - DTDEntity typeEnt = getAttributeTypeReferencedEntity(); - if (typeEnt != null) { - result.append(" %" + typeEnt.getName() + "; ").append(value); //$NON-NLS-1$ //$NON-NLS-2$ - } - else { - DTDType dtdType = getDTDType(); - if (dtdType instanceof DTDBasicType) { - switch (((DTDBasicType) dtdType).getKind().getValue()) { - case DTDBasicTypeKind.CDATA : - result.append(" CDATA ").append(value); //$NON-NLS-1$ - break; - case DTDBasicTypeKind.ID : - result.append(" ID ").append(value); //$NON-NLS-1$ - break; - case DTDBasicTypeKind.IDREF : - result.append(" IDREF ").append(value); //$NON-NLS-1$ - break; - case DTDBasicTypeKind.IDREFS : - result.append(" IDREFS ").append(value); //$NON-NLS-1$ - break; - case DTDBasicTypeKind.ENTITY : - result.append(" ENTITY ").append(value); //$NON-NLS-1$ - break; - case DTDBasicTypeKind.ENTITIES : - result.append(" ENTITIES ").append(value); //$NON-NLS-1$ - break; - case DTDBasicTypeKind.NMTOKEN : - result.append(" NMTOKEN ").append(value); //$NON-NLS-1$ - break; - case DTDBasicTypeKind.NMTOKENS : - result.append(" NMTOKENS ").append(value); //$NON-NLS-1$ - break; - } - } - else if (dtdType instanceof DTDEnumerationType) { - result.append(" ").append(buildEnumString((DTDEnumerationType) dtdType)).append(value); //$NON-NLS-1$ - } - } - - - return result.toString(); - } - - - private String buildEnumString(DTDEnumerationType enumType) { - String result = ""; //$NON-NLS-1$ - - - if (enumType.getKind().getValue() == DTDEnumGroupKind.NOTATION_GROUP) - result += "NOTATION "; //$NON-NLS-1$ - - - Iterator i = enumType.getEnumLiterals().iterator(); - if (i.hasNext()) { - result += "(" + ((EEnumLiteral) i.next()).toString(); //$NON-NLS-1$ - while (i.hasNext()) { - result += " | " + ((EEnumLiteral) i.next()).toString(); //$NON-NLS-1$ - } - result += ") "; //$NON-NLS-1$ - } - - - return result; - } - - public DTDEnumerationType createDTDEnumeration(String[] enumValues, int enumKind) { - DTDEnumerationType enumeration = DTDFactoryImpl.instance().createDTDEnumerationType(); - // enum.setID("Enum_" + ((DTDElement)getMOFDomain()).getName() + "_" + - // getName()); - DTDEnumGroupKind groupKind = DTDEnumGroupKind.get(enumKind); - enumeration.setKind(groupKind); - // Enumeration values - if (enumValues != null) { - for (int i = 0; i < enumValues.length; i++) { - EcorePackage ePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - EEnumLiteral enumLiteral = ((EcoreFactory) ePackage.getEFactoryInstance()).createEEnumLiteral(); - // MOF2EMF Port - // enumLiteral.refSetLiteral(enumValues[i]); - enumLiteral.setName(enumValues[i]); - // MOF2EMF Port - // enumLiteral.refSetLiteral(i); - enumLiteral.setValue(i); - - enumeration.getEnumLiterals().add(enumLiteral); - } - } - getDTDElement().getDTDFile().getDTDEnumerationType().add(enumeration); - return enumeration; - } - - public String getPathname() { - return null; - // TODO: finish port - // return DTDPathnameUtil.makePath(getDTDElement().getPathname(), - // "Attr", getName(), -1); - } - - - public DTDObject findObject(String relativePath) { - return null; - // TODO: finish port - /* - * Object[] result = DTDPathnameUtil.parsePathComponent(relativePath); - * - * - * String type = (String)result[0]; - * - * - * if (type == null) return null; - * - * - * DTDObject obj = null; if (type.equals("Type")) { obj = - * getDataType(); } else { return null; } - * - * - * String restPath = (String)result[3]; - * - * if ((restPath == null) || (obj == null)) { return obj; } else { - * return obj.findObject(restPath); } - */ - } - - public Collection getEnumeratedValues() { - Collection result = new ArrayList(); - - - DTDType type = getDTDType(); - if (type instanceof DTDEnumerationType) { - DTDEnumerationType enumType = (DTDEnumerationType) type; - Iterator i = enumType.getEnumLiterals().iterator(); - while (i.hasNext()) { - result.add(((EEnumLiteral) i.next()).toString()); - } - } - return result; - } - - - // ugly hack for now since we don't have multiple inheritance. - // Would rather have all this stuff in a base class but these - // classes are inheriting from sometimes different mof classes - DTDLexicalInfo lexInfo = new DTDLexicalInfo(); - - /** - * Get the value of startOffset. - * - * @return value of startOffset. - */ - public int getStartOffset() { - return lexInfo.getStartOffset(); - } - - - /** - * Set the value of startOffset. - * - * @param v - * Value to assign to startOffset. - */ - public void setStartOffset(int v) { - lexInfo.setStartOffset(v); - } - - - /** - * Get the value of endOffset. - * - * @return value of endOffset. - */ - public int getEndOffset() { - return lexInfo.getEndOffset(); - } - - - /** - * Set the value of endOffset. - * - * @param v - * Value to assign to endOffset. - */ - public void setEndOffset(int v) { - lexInfo.setEndOffset(v); - } - - - /** - * The default value of the '{@link #getComment() <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getComment() - * @generated - * @ordered - */ - protected static final String COMMENT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getComment() <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getComment() - * @generated - * @ordered - */ - protected String comment = COMMENT_EDEFAULT; - - /** - * The default value of the '{@link #getDefaultKind() <em>Default Kind</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getDefaultKind() - * @generated - * @ordered - */ - protected static final DTDDefaultKind DEFAULT_KIND_EDEFAULT = DTDDefaultKind.IMPLIED_LITERAL; - - /** - * The cached value of the '{@link #getDefaultKind() <em>Default Kind</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getDefaultKind() - * @generated - * @ordered - */ - protected DTDDefaultKind defaultKind = DEFAULT_KIND_EDEFAULT; - - /** - * The default value of the '{@link #getDefaultValueString() <em>Default Value String</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getDefaultValueString() - * @generated - * @ordered - */ - protected static final String DEFAULT_VALUE_STRING_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDefaultValueString() <em>Default Value String</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getDefaultValueString() - * @generated - * @ordered - */ - protected String defaultValueString = DEFAULT_VALUE_STRING_EDEFAULT; - - /** - * The cached value of the '{@link #getAttributeNameReferencedEntity() <em>Attribute Name Referenced Entity</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getAttributeNameReferencedEntity() - * @generated - * @ordered - */ - protected DTDEntity attributeNameReferencedEntity = null; - - /** - * The cached value of the '{@link #getAttributeTypeReferencedEntity() <em>Attribute Type Referenced Entity</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getAttributeTypeReferencedEntity() - * @generated - * @ordered - */ - protected DTDEntity attributeTypeReferencedEntity = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDAttribute(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String getComment() { - return comment; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setComment(String newComment) { - String oldComment = comment; - comment = newComment; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__COMMENT, oldComment, comment)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDDefaultKind getDefaultKind() { - return defaultKind; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setDefaultKind(DTDDefaultKind newDefaultKind) { - DTDDefaultKind oldDefaultKind = defaultKind; - defaultKind = newDefaultKind == null ? DEFAULT_KIND_EDEFAULT : newDefaultKind; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND, oldDefaultKind, defaultKind)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String getDefaultValueString() { - return defaultValueString; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setDefaultValueString(String newDefaultValueString) { - String oldDefaultValueString = defaultValueString; - defaultValueString = newDefaultValueString; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING, oldDefaultValueString, defaultValueString)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEntity getAttributeNameReferencedEntity() { - if (attributeNameReferencedEntity != null && attributeNameReferencedEntity.eIsProxy()) { - DTDEntity oldAttributeNameReferencedEntity = attributeNameReferencedEntity; - attributeNameReferencedEntity = (DTDEntity) EcoreUtil.resolve(attributeNameReferencedEntity, this); - if (attributeNameReferencedEntity != oldAttributeNameReferencedEntity) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY, oldAttributeNameReferencedEntity, attributeNameReferencedEntity)); - } - } - return attributeNameReferencedEntity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEntity basicGetAttributeNameReferencedEntity() { - return attributeNameReferencedEntity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetAttributeNameReferencedEntity(DTDEntity newAttributeNameReferencedEntity, NotificationChain msgs) { - DTDEntity oldAttributeNameReferencedEntity = attributeNameReferencedEntity; - attributeNameReferencedEntity = newAttributeNameReferencedEntity; - if (eNotificationRequired()) { - if (msgs == null) - msgs = new NotificationChainImpl(4); - msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY, oldAttributeNameReferencedEntity, newAttributeNameReferencedEntity)); - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setAttributeNameReferencedEntity(DTDEntity newAttributeNameReferencedEntity) { - if (newAttributeNameReferencedEntity != attributeNameReferencedEntity) { - NotificationChain msgs = null; - if (attributeNameReferencedEntity != null) - msgs = ((InternalEObject) attributeNameReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE, DTDEntity.class, msgs); - if (newAttributeNameReferencedEntity != null) - msgs = ((InternalEObject) newAttributeNameReferencedEntity).eInverseAdd(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE, DTDEntity.class, msgs); - msgs = basicSetAttributeNameReferencedEntity(newAttributeNameReferencedEntity, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY, newAttributeNameReferencedEntity, newAttributeNameReferencedEntity)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEntity getAttributeTypeReferencedEntity() { - if (attributeTypeReferencedEntity != null && attributeTypeReferencedEntity.eIsProxy()) { - DTDEntity oldAttributeTypeReferencedEntity = attributeTypeReferencedEntity; - attributeTypeReferencedEntity = (DTDEntity) EcoreUtil.resolve(attributeTypeReferencedEntity, this); - if (attributeTypeReferencedEntity != oldAttributeTypeReferencedEntity) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY, oldAttributeTypeReferencedEntity, attributeTypeReferencedEntity)); - } - } - return attributeTypeReferencedEntity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEntity basicGetAttributeTypeReferencedEntity() { - return attributeTypeReferencedEntity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetAttributeTypeReferencedEntity(DTDEntity newAttributeTypeReferencedEntity, NotificationChain msgs) { - DTDEntity oldAttributeTypeReferencedEntity = attributeTypeReferencedEntity; - attributeTypeReferencedEntity = newAttributeTypeReferencedEntity; - if (eNotificationRequired()) { - if (msgs == null) - msgs = new NotificationChainImpl(4); - msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY, oldAttributeTypeReferencedEntity, newAttributeTypeReferencedEntity)); - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setAttributeTypeReferencedEntity(DTDEntity newAttributeTypeReferencedEntity) { - if (newAttributeTypeReferencedEntity != attributeTypeReferencedEntity) { - NotificationChain msgs = null; - if (attributeTypeReferencedEntity != null) - msgs = ((InternalEObject) attributeTypeReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE, DTDEntity.class, msgs); - if (newAttributeTypeReferencedEntity != null) - msgs = ((InternalEObject) newAttributeTypeReferencedEntity).eInverseAdd(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE, DTDEntity.class, msgs); - msgs = basicSetAttributeTypeReferencedEntity(newAttributeTypeReferencedEntity, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY, newAttributeTypeReferencedEntity, newAttributeTypeReferencedEntity)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDElement getDTDElement() { - if (eContainerFeatureID != DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT) - return null; - return (DTDElement) eContainer; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setDTDElement(DTDElement newDTDElement) { - if (newDTDElement != eContainer || (eContainerFeatureID != DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT && newDTDElement != null)) { - if (EcoreUtil.isAncestor(this, newDTDElement)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newDTDElement != null) - msgs = ((InternalEObject) newDTDElement).eInverseAdd(this, DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE, DTDElement.class, msgs); - msgs = eBasicSetContainer((InternalEObject) newDTDElement, DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT, newDTDElement, newDTDElement)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS : - return ((InternalEList) getEAnnotations()).basicAdd(otherEnd, msgs); - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY : - if (attributeNameReferencedEntity != null) - msgs = ((InternalEObject) attributeNameReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE, DTDEntity.class, msgs); - return basicSetAttributeNameReferencedEntity((DTDEntity) otherEnd, msgs); - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY : - if (attributeTypeReferencedEntity != null) - msgs = ((InternalEObject) attributeTypeReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE, DTDEntity.class, msgs); - return basicSetAttributeTypeReferencedEntity((DTDEntity) otherEnd, msgs); - case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS : - return ((InternalEList) getEAnnotations()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY : - return basicSetAttributeNameReferencedEntity(null, msgs); - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY : - return basicSetAttributeTypeReferencedEntity(null, msgs); - case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT : - return eBasicSetContainer(null, DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE, DTDElement.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS : - return getEAnnotations(); - case DTDPackage.DTD_ATTRIBUTE__NAME : - return getName(); - case DTDPackage.DTD_ATTRIBUTE__ETYPE : - if (resolve) - return getEType(); - return basicGetEType(); - case DTDPackage.DTD_ATTRIBUTE__CHANGEABLE : - return isChangeable() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ATTRIBUTE__VOLATILE : - return isVolatile() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ATTRIBUTE__TRANSIENT : - return isTransient() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ATTRIBUTE__UNIQUE : - return isUnique() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL : - return getDefaultValueLiteral(); - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE : - return getDefaultValue(); - case DTDPackage.DTD_ATTRIBUTE__LOWER_BOUND : - return new Integer(getLowerBound()); - case DTDPackage.DTD_ATTRIBUTE__UPPER_BOUND : - return new Integer(getUpperBound()); - case DTDPackage.DTD_ATTRIBUTE__MANY : - return isMany() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ATTRIBUTE__REQUIRED : - return isRequired() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ATTRIBUTE__ECONTAINING_CLASS : - return getEContainingClass(); - case DTDPackage.DTD_ATTRIBUTE__UNSETTABLE : - return isUnsettable() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ATTRIBUTE__ID : - return isID() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ATTRIBUTE__EATTRIBUTE_TYPE : - if (resolve) - return getEAttributeType(); - return basicGetEAttributeType(); - case DTDPackage.DTD_ATTRIBUTE__COMMENT : - return getComment(); - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND : - return getDefaultKind(); - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING : - return getDefaultValueString(); - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY : - if (resolve) - return getAttributeNameReferencedEntity(); - return basicGetAttributeNameReferencedEntity(); - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY : - if (resolve) - return getAttributeTypeReferencedEntity(); - return basicGetAttributeTypeReferencedEntity(); - case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT : - return getDTDElement(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS : - getEAnnotations().clear(); - getEAnnotations().addAll((Collection) newValue); - return; - case DTDPackage.DTD_ATTRIBUTE__NAME : - setName((String) newValue); - return; - case DTDPackage.DTD_ATTRIBUTE__ETYPE : - setEType((EClassifier) newValue); - return; - case DTDPackage.DTD_ATTRIBUTE__CHANGEABLE : - setChangeable(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_ATTRIBUTE__VOLATILE : - setVolatile(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_ATTRIBUTE__TRANSIENT : - setTransient(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_ATTRIBUTE__UNIQUE : - setUnique(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL : - setDefaultValueLiteral((String) newValue); - return; - case DTDPackage.DTD_ATTRIBUTE__LOWER_BOUND : - setLowerBound(((Integer) newValue).intValue()); - return; - case DTDPackage.DTD_ATTRIBUTE__UPPER_BOUND : - setUpperBound(((Integer) newValue).intValue()); - return; - case DTDPackage.DTD_ATTRIBUTE__UNSETTABLE : - setUnsettable(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_ATTRIBUTE__ID : - setID(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_ATTRIBUTE__COMMENT : - setComment((String) newValue); - return; - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND : - setDefaultKind((DTDDefaultKind) newValue); - return; - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING : - setDefaultValueString((String) newValue); - return; - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY : - setAttributeNameReferencedEntity((DTDEntity) newValue); - return; - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY : - setAttributeTypeReferencedEntity((DTDEntity) newValue); - return; - case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT : - setDTDElement((DTDElement) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS : - getEAnnotations().clear(); - return; - case DTDPackage.DTD_ATTRIBUTE__NAME : - setName(NAME_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__ETYPE : - setEType((EClassifier) null); - return; - case DTDPackage.DTD_ATTRIBUTE__CHANGEABLE : - setChangeable(CHANGEABLE_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__VOLATILE : - setVolatile(VOLATILE_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__TRANSIENT : - setTransient(TRANSIENT_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__UNIQUE : - setUnique(UNIQUE_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL : - setDefaultValueLiteral(DEFAULT_VALUE_LITERAL_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__LOWER_BOUND : - setLowerBound(LOWER_BOUND_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__UPPER_BOUND : - setUpperBound(UPPER_BOUND_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__UNSETTABLE : - setUnsettable(UNSETTABLE_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__ID : - setID(ID_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__COMMENT : - setComment(COMMENT_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND : - setDefaultKind(DEFAULT_KIND_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING : - setDefaultValueString(DEFAULT_VALUE_STRING_EDEFAULT); - return; - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY : - setAttributeNameReferencedEntity((DTDEntity) null); - return; - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY : - setAttributeTypeReferencedEntity((DTDEntity) null); - return; - case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT : - setDTDElement((DTDElement) null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS : - return eAnnotations != null && !getEAnnotations().isEmpty(); - case DTDPackage.DTD_ATTRIBUTE__NAME : - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case DTDPackage.DTD_ATTRIBUTE__ETYPE : - return eType != null; - case DTDPackage.DTD_ATTRIBUTE__CHANGEABLE : - return ((eFlags & CHANGEABLE_EFLAG) != 0) != CHANGEABLE_EDEFAULT; - case DTDPackage.DTD_ATTRIBUTE__VOLATILE : - return ((eFlags & VOLATILE_EFLAG) != 0) != VOLATILE_EDEFAULT; - case DTDPackage.DTD_ATTRIBUTE__TRANSIENT : - return ((eFlags & TRANSIENT_EFLAG) != 0) != TRANSIENT_EDEFAULT; - case DTDPackage.DTD_ATTRIBUTE__UNIQUE : - return ((eFlags & UNIQUE_EFLAG) != 0) != UNIQUE_EDEFAULT; - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL : - return DEFAULT_VALUE_LITERAL_EDEFAULT == null ? defaultValueLiteral != null : !DEFAULT_VALUE_LITERAL_EDEFAULT.equals(defaultValueLiteral); - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE : - return getDefaultValue() != null; - case DTDPackage.DTD_ATTRIBUTE__LOWER_BOUND : - return lowerBound != LOWER_BOUND_EDEFAULT; - case DTDPackage.DTD_ATTRIBUTE__UPPER_BOUND : - return upperBound != UPPER_BOUND_EDEFAULT; - case DTDPackage.DTD_ATTRIBUTE__MANY : - return isMany() != false; - case DTDPackage.DTD_ATTRIBUTE__REQUIRED : - return isRequired() != false; - case DTDPackage.DTD_ATTRIBUTE__ECONTAINING_CLASS : - return getEContainingClass() != null; - case DTDPackage.DTD_ATTRIBUTE__UNSETTABLE : - return ((eFlags & UNSETTABLE_EFLAG) != 0) != UNSETTABLE_EDEFAULT; - case DTDPackage.DTD_ATTRIBUTE__ID : - return ((eFlags & ID_EFLAG) != 0) != ID_EDEFAULT; - case DTDPackage.DTD_ATTRIBUTE__EATTRIBUTE_TYPE : - return basicGetEAttributeType() != null; - case DTDPackage.DTD_ATTRIBUTE__COMMENT : - return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment); - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND : - return defaultKind != DEFAULT_KIND_EDEFAULT; - case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING : - return DEFAULT_VALUE_STRING_EDEFAULT == null ? defaultValueString != null : !DEFAULT_VALUE_STRING_EDEFAULT.equals(defaultValueString); - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY : - return attributeNameReferencedEntity != null; - case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY : - return attributeTypeReferencedEntity != null; - case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT : - return getDTDElement() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (comment: "); //$NON-NLS-1$ - result.append(comment); - result.append(", defaultKind: "); //$NON-NLS-1$ - result.append(defaultKind); - result.append(", defaultValueString: "); //$NON-NLS-1$ - result.append(defaultValueString); - result.append(')'); - return result.toString(); - } - -} // DTDAttributeImpl diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDBasicTypeImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDBasicTypeImpl.java deleted file mode 100644 index f7f9a8834f..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDBasicTypeImpl.java +++ /dev/null @@ -1,427 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EClassImpl; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.wst.dtd.core.internal.DTDCoreMessages; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.DTDType; - - -/** - * <!-- begin-user-doc --> An implementation of the model object '<em><b>Basic Type</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDBasicTypeImpl#getKind <em>Kind</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class DTDBasicTypeImpl extends EClassImpl implements DTDBasicType, EClass { - - public final static String basicTypeStrings[] = {DTDType.NONE, DTDType.CDATA, DTDType.ID, DTDType.IDREF, DTDType.IDREFS, DTDType.ENTITY, DTDType.ENTITIES, DTDType.NMTOKEN, DTDType.NMTOKENS}; - - public final static String basicTypeDescriptions[] = {DTDCoreMessages._UI_NONE_DESC, DTDCoreMessages._UI_CHARACTER_DATA_DESC, DTDCoreMessages._UI_IDENTIFIER_DESC, DTDCoreMessages._UI_ID_REFERENCE_DESC, DTDCoreMessages._UI_ID_REFERENCES_DESC, DTDCoreMessages._UI_ENTITY_NAME_DESC, DTDCoreMessages._UI_ENTITY_NAMES_DESC, DTDCoreMessages._UI_NAME_TOKEN_DESC, DTDCoreMessages._UI_NAME_TOKENS_DESC}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ - - public final static int basicTypeKinds[] = {DTDBasicTypeKind.NONE, DTDBasicTypeKind.CDATA, DTDBasicTypeKind.ID, DTDBasicTypeKind.IDREF, DTDBasicTypeKind.IDREFS, DTDBasicTypeKind.ENTITY, DTDBasicTypeKind.ENTITIES, DTDBasicTypeKind.NMTOKEN, DTDBasicTypeKind.NMTOKENS}; - - public String unparse() { - return getTypeString(); - } - - public String getTypeString() { - int kind = getKind().getValue(); - if (kind >= 0 && kind < basicTypeStrings.length) { - return basicTypeStrings[kind]; - } // end of if () - - return null; - } - - - public String getTypeDescription() { - return getTypeDescription(getKind().getValue()); - } - - - public static String getTypeDescription(int typeKind) { - if (typeKind >= 0 && typeKind < basicTypeDescriptions.length) { - return basicTypeDescriptions[typeKind]; - } - return null; - } - - public String getPathname() { - // TBD - return ""; //$NON-NLS-1$ - } - - public DTDObject findObject(String relativePath) { - return null; - } - - - - /** - * The default value of the '{@link #getKind() <em>Kind</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getKind() - * @generated - * @ordered - */ - protected static final DTDBasicTypeKind KIND_EDEFAULT = DTDBasicTypeKind.NONE_LITERAL; - - /** - * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getKind() - * @generated - * @ordered - */ - protected DTDBasicTypeKind kind = KIND_EDEFAULT; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected DTDBasicTypeImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDBasicType(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDBasicTypeKind getKind() { - return kind; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setKind(DTDBasicTypeKind newKind) { - DTDBasicTypeKind oldKind = kind; - kind = newKind == null ? KIND_EDEFAULT : newKind; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_BASIC_TYPE__KIND, oldKind, kind)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS : - return ((InternalEList) getEAnnotations()).basicAdd(otherEnd, msgs); - case DTDPackage.DTD_BASIC_TYPE__EPACKAGE : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_BASIC_TYPE__EPACKAGE, msgs); - case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS : - return ((InternalEList) getEOperations()).basicAdd(otherEnd, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS : - return ((InternalEList) getEAnnotations()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_BASIC_TYPE__EPACKAGE : - return eBasicSetContainer(null, DTDPackage.DTD_BASIC_TYPE__EPACKAGE, msgs); - case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS : - return ((InternalEList) getEOperations()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_BASIC_TYPE__EREFERENCES : - return ((InternalEList) getEReferences()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_BASIC_TYPE__EATTRIBUTES : - return ((InternalEList) getEAttributes()).basicRemove(otherEnd, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_BASIC_TYPE__EPACKAGE : - return eContainer.eInverseRemove(this, EcorePackage.EPACKAGE__ECLASSIFIERS, EPackage.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS : - return getEAnnotations(); - case DTDPackage.DTD_BASIC_TYPE__NAME : - return getName(); - case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS_NAME : - return getInstanceClassName(); - case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS : - return getInstanceClass(); - case DTDPackage.DTD_BASIC_TYPE__DEFAULT_VALUE : - return getDefaultValue(); - case DTDPackage.DTD_BASIC_TYPE__EPACKAGE : - return getEPackage(); - case DTDPackage.DTD_BASIC_TYPE__ABSTRACT : - return isAbstract() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_BASIC_TYPE__INTERFACE : - return isInterface() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_BASIC_TYPE__ESUPER_TYPES : - return getESuperTypes(); - case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS : - return getEOperations(); - case DTDPackage.DTD_BASIC_TYPE__EALL_ATTRIBUTES : - return getEAllAttributes(); - case DTDPackage.DTD_BASIC_TYPE__EALL_REFERENCES : - return getEAllReferences(); - case DTDPackage.DTD_BASIC_TYPE__EREFERENCES : - return getEReferences(); - case DTDPackage.DTD_BASIC_TYPE__EATTRIBUTES : - return getEAttributes(); - case DTDPackage.DTD_BASIC_TYPE__EALL_CONTAINMENTS : - return getEAllContainments(); - case DTDPackage.DTD_BASIC_TYPE__EALL_OPERATIONS : - return getEAllOperations(); - case DTDPackage.DTD_BASIC_TYPE__EALL_STRUCTURAL_FEATURES : - return getEAllStructuralFeatures(); - case DTDPackage.DTD_BASIC_TYPE__EALL_SUPER_TYPES : - return getEAllSuperTypes(); - case DTDPackage.DTD_BASIC_TYPE__EID_ATTRIBUTE : - return getEIDAttribute(); - case DTDPackage.DTD_BASIC_TYPE__KIND : - return getKind(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS : - getEAnnotations().clear(); - getEAnnotations().addAll((Collection) newValue); - return; - case DTDPackage.DTD_BASIC_TYPE__NAME : - setName((String) newValue); - return; - case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS_NAME : - setInstanceClassName((String) newValue); - return; - case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS : - setInstanceClass((Class) newValue); - return; - case DTDPackage.DTD_BASIC_TYPE__ABSTRACT : - setAbstract(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_BASIC_TYPE__INTERFACE : - setInterface(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_BASIC_TYPE__ESUPER_TYPES : - getESuperTypes().clear(); - getESuperTypes().addAll((Collection) newValue); - return; - case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS : - getEOperations().clear(); - getEOperations().addAll((Collection) newValue); - return; - case DTDPackage.DTD_BASIC_TYPE__EREFERENCES : - getEReferences().clear(); - getEReferences().addAll((Collection) newValue); - return; - case DTDPackage.DTD_BASIC_TYPE__EATTRIBUTES : - getEAttributes().clear(); - getEAttributes().addAll((Collection) newValue); - return; - case DTDPackage.DTD_BASIC_TYPE__KIND : - setKind((DTDBasicTypeKind) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS : - getEAnnotations().clear(); - return; - case DTDPackage.DTD_BASIC_TYPE__NAME : - setName(NAME_EDEFAULT); - return; - case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS_NAME : - setInstanceClassName(INSTANCE_CLASS_NAME_EDEFAULT); - return; - case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS : - setInstanceClass(INSTANCE_CLASS_EDEFAULT); - return; - case DTDPackage.DTD_BASIC_TYPE__ABSTRACT : - setAbstract(ABSTRACT_EDEFAULT); - return; - case DTDPackage.DTD_BASIC_TYPE__INTERFACE : - setInterface(INTERFACE_EDEFAULT); - return; - case DTDPackage.DTD_BASIC_TYPE__ESUPER_TYPES : - getESuperTypes().clear(); - return; - case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS : - getEOperations().clear(); - return; - case DTDPackage.DTD_BASIC_TYPE__EREFERENCES : - getEReferences().clear(); - return; - case DTDPackage.DTD_BASIC_TYPE__EATTRIBUTES : - getEAttributes().clear(); - return; - case DTDPackage.DTD_BASIC_TYPE__KIND : - setKind(KIND_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS : - return eAnnotations != null && !getEAnnotations().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__NAME : - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS_NAME : - return INSTANCE_CLASS_NAME_EDEFAULT == null ? instanceClassName != null : !INSTANCE_CLASS_NAME_EDEFAULT.equals(instanceClassName); - case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS : - return INSTANCE_CLASS_EDEFAULT == null ? instanceClass != null : !INSTANCE_CLASS_EDEFAULT.equals(instanceClass); - case DTDPackage.DTD_BASIC_TYPE__DEFAULT_VALUE : - return getDefaultValue() != null; - case DTDPackage.DTD_BASIC_TYPE__EPACKAGE : - return getEPackage() != null; - case DTDPackage.DTD_BASIC_TYPE__ABSTRACT : - return ((eFlags & ABSTRACT_EFLAG) != 0) != ABSTRACT_EDEFAULT; - case DTDPackage.DTD_BASIC_TYPE__INTERFACE : - return ((eFlags & INTERFACE_EFLAG) != 0) != INTERFACE_EDEFAULT; - case DTDPackage.DTD_BASIC_TYPE__ESUPER_TYPES : - return eSuperTypes != null && !getESuperTypes().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS : - return eOperations != null && !getEOperations().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__EALL_ATTRIBUTES : - return !getEAllAttributes().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__EALL_REFERENCES : - return !getEAllReferences().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__EREFERENCES : - return eReferences != null && !getEReferences().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__EATTRIBUTES : - return eAttributes != null && !getEAttributes().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__EALL_CONTAINMENTS : - return !getEAllContainments().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__EALL_OPERATIONS : - return !getEAllOperations().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__EALL_STRUCTURAL_FEATURES : - return !getEAllStructuralFeatures().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__EALL_SUPER_TYPES : - return !getEAllSuperTypes().isEmpty(); - case DTDPackage.DTD_BASIC_TYPE__EID_ATTRIBUTE : - return getEIDAttribute() != null; - case DTDPackage.DTD_BASIC_TYPE__KIND : - return kind != KIND_EDEFAULT; - } - return eDynamicIsSet(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (kind: "); //$NON-NLS-1$ - result.append(kind); - result.append(')'); - return result.toString(); - } - -} // DTDBasicTypeImpl diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDContentImpl.java deleted file mode 100644 index b6147cdb8b..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDContentImpl.java +++ /dev/null @@ -1,189 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENamedElementImpl; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.wst.dtd.core.internal.emf.DTDContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; - - -public class DTDContentImpl extends ENamedElementImpl implements DTDContent, EObject { - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected DTDContentImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDContent(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDFile getDTDFile() { - if (eContainerFeatureID != DTDPackage.DTD_CONTENT__DTD_FILE) - return null; - return (DTDFile) eContainer; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setDTDFile(DTDFile newDTDFile) { - if (newDTDFile != eContainer || (eContainerFeatureID != DTDPackage.DTD_CONTENT__DTD_FILE && newDTDFile != null)) { - if (EcoreUtil.isAncestor(this, newDTDFile)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newDTDFile != null) - msgs = ((InternalEObject) newDTDFile).eInverseAdd(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs); - msgs = eBasicSetContainer((InternalEObject) newDTDFile, DTDPackage.DTD_CONTENT__DTD_FILE, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_CONTENT__DTD_FILE, newDTDFile, newDTDFile)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_CONTENT__DTD_FILE : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_CONTENT__DTD_FILE, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_CONTENT__DTD_FILE : - return eBasicSetContainer(null, DTDPackage.DTD_CONTENT__DTD_FILE, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_CONTENT__DTD_FILE : - return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_CONTENT__DTD_FILE : - return getDTDFile(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_CONTENT__DTD_FILE : - setDTDFile((DTDFile) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_CONTENT__DTD_FILE : - setDTDFile((DTDFile) null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_CONTENT__DTD_FILE : - return getDTDFile() != null; - } - return eDynamicIsSet(eFeature); - } - -} // DTDContentImpl diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementContentImpl.java deleted file mode 100644 index 7c669483df..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementContentImpl.java +++ /dev/null @@ -1,377 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf.impl; - - -import java.util.Iterator; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil; - - -/** - * <!-- begin-user-doc --> An implementation of the model object '<em><b>Element Content</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementContentImpl#getGroup <em>Group</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementContentImpl#getElement <em>Element</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public abstract class DTDElementContentImpl extends EObjectImpl implements DTDElementContent { - - public DTDElementContentImpl() { - super(); - } - - public DTDElement getDTDElement() { - DTDElementContent c = getDTDGroupContent(); - if (c != null) - return c.getElement(); - else - return getElement(); - } - - // get the most outer DTDGroupContent - public DTDGroupContent getDTDGroupContent() { - DTDElementContent c = this; - while (c.getGroup() != null) { - c = c.getGroup(); - } - return ((c instanceof DTDGroupContent) ? (DTDGroupContent) c : null); - } - - public String getPathname() { - int cnt = 0; - DTDObject parent = getGroup(); - if (parent == null) { - parent = getElement(); - } - else { - DTDGroupContent group = (DTDGroupContent) parent; - Iterator i = group.getContent().iterator(); - while (i.hasNext()) { - DTDElementContent content = (DTDElementContent) i.next(); - if (content == this) { - break; - } - if ((content instanceof DTDElementReferenceContent) || (content instanceof DTDEntityReferenceContent)) { - continue; - } - cnt++; - } - } - return DTDPathnameUtil.makePath(((parent == null) ? "NULL_PARENT" : parent.getPathname()), "Content", null, cnt); //$NON-NLS-1$ //$NON-NLS-2$ - } - - public DTDObject findObject(String relativePath) { - return null; - } - - public boolean isFirstElementContent() { - DTDElement element = getElement(); - - if (element != null) { - // This means this is the only element content in the element - return true; - } // end of if () - - DTDGroupContent group = getGroup(); - int pos = group.getContentPosition(this); - if (pos == 0) { - // now recurse and ensure this group is the first group - return group.isFirstElementContent(); - } // end of if () - else { - return false; - } - } - - public String getContentDetail() { - // most times, content name is fine. However for groups, - // we didn't want a long name to show up in the tree, - // so we created a get contentdetail to get to the long - // name (getContentName will get the short one. - return getContentName(); - } - - // ugly hack for now since we don't have multiple inheritance. - // Would rather have all this stuff in a base class but these - // classes are inheriting from sometimes different mof classes - DTDLexicalInfo lexInfo = new DTDLexicalInfo(); - - /** - * Get the value of startOffset. - * - * @return value of startOffset. - */ - public int getStartOffset() { - return lexInfo.getStartOffset(); - } - - /** - * Set the value of startOffset. - * - * @param v - * Value to assign to startOffset. - */ - public void setStartOffset(int v) { - lexInfo.setStartOffset(v); - } - - /** - * Get the value of endOffset. - * - * @return value of endOffset. - */ - public int getEndOffset() { - return lexInfo.getEndOffset(); - } - - /** - * Set the value of endOffset. - * - * @param v - * Value to assign to endOffset. - */ - public void setEndOffset(int v) { - lexInfo.setEndOffset(v); - } - - /* - * @see DTDElementContent#getContentName() - */ - public String getContentName() { - return null; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDElementContent(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDGroupContent getGroup() { - if (eContainerFeatureID != DTDPackage.DTD_ELEMENT_CONTENT__GROUP) - return null; - return (DTDGroupContent) eContainer; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setGroup(DTDGroupContent newGroup) { - if (newGroup != eContainer || (eContainerFeatureID != DTDPackage.DTD_ELEMENT_CONTENT__GROUP && newGroup != null)) { - if (EcoreUtil.isAncestor(this, newGroup)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newGroup != null) - msgs = ((InternalEObject) newGroup).eInverseAdd(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs); - msgs = eBasicSetContainer((InternalEObject) newGroup, DTDPackage.DTD_ELEMENT_CONTENT__GROUP, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT_CONTENT__GROUP, newGroup, newGroup)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDElement getElement() { - if (eContainerFeatureID != DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT) - return null; - return (DTDElement) eContainer; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setElement(DTDElement newElement) { - if (newElement != eContainer || (eContainerFeatureID != DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT && newElement != null)) { - if (EcoreUtil.isAncestor(this, newElement)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newElement != null) - msgs = ((InternalEObject) newElement).eInverseAdd(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs); - msgs = eBasicSetContainer((InternalEObject) newElement, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, newElement, newElement)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ELEMENT_CONTENT__GROUP : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT_CONTENT__GROUP, msgs); - case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ELEMENT_CONTENT__GROUP : - return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT_CONTENT__GROUP, msgs); - case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT : - return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_ELEMENT_CONTENT__GROUP : - return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs); - case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT_CONTENT__GROUP : - return getGroup(); - case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT : - return getElement(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT_CONTENT__GROUP : - setGroup((DTDGroupContent) newValue); - return; - case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT : - setElement((DTDElement) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT_CONTENT__GROUP : - setGroup((DTDGroupContent) null); - return; - case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT : - setElement((DTDElement) null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT_CONTENT__GROUP : - return getGroup() != null; - case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT : - return getElement() != null; - } - return eDynamicIsSet(eFeature); - } - -} // DTDElementContentImpl diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementImpl.java deleted file mode 100644 index 4a274d7a67..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementImpl.java +++ /dev/null @@ -1,654 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.impl.NotificationChainImpl; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EClassImpl; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDVisitor; - - -/** - * @generated - */ -public class DTDElementImpl extends EClassImpl implements DTDElement { - /** - * The default value of the '{@link #getComment() <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getComment() - * @generated - * @ordered - */ - protected static final String COMMENT_EDEFAULT = null; - - public DTDElementImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDElement(); - } - - public void addDTDAttribute(DTDAttribute attribute) { - getDTDAttribute().add(attribute); - } - - public String getPathname() { - return DTDPathnameUtil.makePath(null, "Elem", getName(), -1); //$NON-NLS-1$ - } - - public DTDObject findObject(String relativePath) { - Object[] result = DTDPathnameUtil.parsePathComponent(relativePath); - - String type = (String) result[0]; - - if (type == null) - return null; - - DTDObject obj = null; - if (type.equals("Attr")) { //$NON-NLS-1$ - // TODO: fix port - // obj = findAttribute(name); - } - else if ((type.equals("Content")) || (type.equals("ElemRef")) || (type.equals("EntRef"))) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - obj = getContent(); - } - else { - return null; - } - - String restPath = (String) result[3]; - - if ((restPath == null) || (obj == null)) { - return obj; - } - else { - return obj.findObject(restPath); - } - } - - // returns all references in the same DTDFile that reference this element - public Collection getReferences() { - DTDFile file = getDTDFile(); - final Collection result = new ArrayList(); - - DTDVisitor visitRefs = new DTDVisitor() { - public void visitDTDElementReferenceContent(DTDElementReferenceContent elementReferenceContent) { - if (elementReferenceContent.getReferencedElement() == DTDElementImpl.this) { - result.add(elementReferenceContent); - } // end of if () - } - }; - visitRefs.visitDTDFile(file); - return result; - } - - public String getAttributeDetail() { - String attributeString = ""; //$NON-NLS-1$ - Collection attributes = getDTDAttribute(); - if (attributes != null) { - boolean seenOne = false; - for (java.util.Iterator i = attributes.iterator(); i.hasNext();) { - if (seenOne) { - attributeString = attributeString + ", "; //$NON-NLS-1$ - } - else { - seenOne = true; - } // end of else - - attributeString = attributeString + ((DTDAttribute) i.next()).getName(); - } - } // end of if () - return attributeString; - } - - - // ugly hack for now since we don't have multiple inheritance. - // Would rather have all this stuff in a base class but these - // classes are inheriting from sometimes different mof classes - DTDLexicalInfo lexInfo = new DTDLexicalInfo(); - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String comment = COMMENT_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected DTDElementContent content = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList dtdAttribute = null; - - /** - * Get the value of startOffset. - * - * @return value of startOffset. - */ - public int getStartOffset() { - return lexInfo.getStartOffset(); - } - - /** - * Set the value of startOffset. - * - * @param v - * Value to assign to startOffset. - */ - public void setStartOffset(int v) { - lexInfo.setStartOffset(v); - } - - /** - * Get the value of endOffset. - * - * @return value of endOffset. - */ - public int getEndOffset() { - return lexInfo.getEndOffset(); - } - - /** - * Set the value of endOffset. - * - * @param v - * Value to assign to endOffset. - */ - public void setEndOffset(int v) { - lexInfo.setEndOffset(v); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getComment() { - return comment; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setComment(String newComment) { - String oldComment = comment; - comment = newComment; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT__COMMENT, oldComment, comment)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public DTDElementContent getContent() { - return content; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetContent(DTDElementContent newContent, NotificationChain msgs) { - DTDElementContent oldContent = content; - content = newContent; - if (eNotificationRequired()) { - if (msgs == null) - msgs = new NotificationChainImpl(4); - msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT__CONTENT, oldContent, newContent)); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setContent(DTDElementContent newContent) { - if (newContent != content) { - NotificationChain msgs = null; - if (content != null) - msgs = ((InternalEObject) content).eInverseRemove(this, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, DTDElementContent.class, msgs); - if (newContent != null) - msgs = ((InternalEObject) newContent).eInverseAdd(this, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, DTDElementContent.class, msgs); - msgs = basicSetContent(newContent, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT__CONTENT, newContent, newContent)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getDTDAttribute() { - if (dtdAttribute == null) { - dtdAttribute = new EObjectContainmentWithInverseEList(DTDAttribute.class, this, DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE, DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT); - } - return dtdAttribute; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ELEMENT__EANNOTATIONS : - return ((InternalEList) getEAnnotations()).basicAdd(otherEnd, msgs); - case DTDPackage.DTD_ELEMENT__EPACKAGE : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT__EPACKAGE, msgs); - case DTDPackage.DTD_ELEMENT__EOPERATIONS : - return ((InternalEList) getEOperations()).basicAdd(otherEnd, msgs); - case DTDPackage.DTD_ELEMENT__DTD_FILE : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT__DTD_FILE, msgs); - case DTDPackage.DTD_ELEMENT__CONTENT : - if (content != null) - msgs = ((InternalEObject) content).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DTDPackage.DTD_ELEMENT__CONTENT, null, msgs); - return basicSetContent((DTDElementContent) otherEnd, msgs); - case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE : - return ((InternalEList) getDTDAttribute()).basicAdd(otherEnd, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ELEMENT__EANNOTATIONS : - return ((InternalEList) getEAnnotations()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_ELEMENT__EPACKAGE : - return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT__EPACKAGE, msgs); - case DTDPackage.DTD_ELEMENT__EOPERATIONS : - return ((InternalEList) getEOperations()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_ELEMENT__EREFERENCES : - return ((InternalEList) getEReferences()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_ELEMENT__EATTRIBUTES : - return ((InternalEList) getEAttributes()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_ELEMENT__DTD_FILE : - return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT__DTD_FILE, msgs); - case DTDPackage.DTD_ELEMENT__CONTENT : - return basicSetContent(null, msgs); - case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE : - return ((InternalEList) getDTDAttribute()).basicRemove(otherEnd, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_ELEMENT__EPACKAGE : - return eContainer.eInverseRemove(this, EcorePackage.EPACKAGE__ECLASSIFIERS, EPackage.class, msgs); - case DTDPackage.DTD_ELEMENT__DTD_FILE : - return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT__EANNOTATIONS : - return getEAnnotations(); - case DTDPackage.DTD_ELEMENT__NAME : - return getName(); - case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS_NAME : - return getInstanceClassName(); - case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS : - return getInstanceClass(); - case DTDPackage.DTD_ELEMENT__DEFAULT_VALUE : - return getDefaultValue(); - case DTDPackage.DTD_ELEMENT__EPACKAGE : - return getEPackage(); - case DTDPackage.DTD_ELEMENT__ABSTRACT : - return isAbstract() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ELEMENT__INTERFACE : - return isInterface() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ELEMENT__ESUPER_TYPES : - return getESuperTypes(); - case DTDPackage.DTD_ELEMENT__EOPERATIONS : - return getEOperations(); - case DTDPackage.DTD_ELEMENT__EALL_ATTRIBUTES : - return getEAllAttributes(); - case DTDPackage.DTD_ELEMENT__EALL_REFERENCES : - return getEAllReferences(); - case DTDPackage.DTD_ELEMENT__EREFERENCES : - return getEReferences(); - case DTDPackage.DTD_ELEMENT__EATTRIBUTES : - return getEAttributes(); - case DTDPackage.DTD_ELEMENT__EALL_CONTAINMENTS : - return getEAllContainments(); - case DTDPackage.DTD_ELEMENT__EALL_OPERATIONS : - return getEAllOperations(); - case DTDPackage.DTD_ELEMENT__EALL_STRUCTURAL_FEATURES : - return getEAllStructuralFeatures(); - case DTDPackage.DTD_ELEMENT__EALL_SUPER_TYPES : - return getEAllSuperTypes(); - case DTDPackage.DTD_ELEMENT__EID_ATTRIBUTE : - return getEIDAttribute(); - case DTDPackage.DTD_ELEMENT__DTD_FILE : - return getDTDFile(); - case DTDPackage.DTD_ELEMENT__COMMENT : - return getComment(); - case DTDPackage.DTD_ELEMENT__CONTENT : - return getContent(); - case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE : - return getDTDAttribute(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT__EANNOTATIONS : - return eAnnotations != null && !getEAnnotations().isEmpty(); - case DTDPackage.DTD_ELEMENT__NAME : - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS_NAME : - return INSTANCE_CLASS_NAME_EDEFAULT == null ? instanceClassName != null : !INSTANCE_CLASS_NAME_EDEFAULT.equals(instanceClassName); - case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS : - return INSTANCE_CLASS_EDEFAULT == null ? instanceClass != null : !INSTANCE_CLASS_EDEFAULT.equals(instanceClass); - case DTDPackage.DTD_ELEMENT__DEFAULT_VALUE : - return getDefaultValue() != null; - case DTDPackage.DTD_ELEMENT__EPACKAGE : - return getEPackage() != null; - case DTDPackage.DTD_ELEMENT__ABSTRACT : - return ((eFlags & ABSTRACT_EFLAG) != 0) != ABSTRACT_EDEFAULT; - case DTDPackage.DTD_ELEMENT__INTERFACE : - return ((eFlags & INTERFACE_EFLAG) != 0) != INTERFACE_EDEFAULT; - case DTDPackage.DTD_ELEMENT__ESUPER_TYPES : - return eSuperTypes != null && !getESuperTypes().isEmpty(); - case DTDPackage.DTD_ELEMENT__EOPERATIONS : - return eOperations != null && !getEOperations().isEmpty(); - case DTDPackage.DTD_ELEMENT__EALL_ATTRIBUTES : - return !getEAllAttributes().isEmpty(); - case DTDPackage.DTD_ELEMENT__EALL_REFERENCES : - return !getEAllReferences().isEmpty(); - case DTDPackage.DTD_ELEMENT__EREFERENCES : - return eReferences != null && !getEReferences().isEmpty(); - case DTDPackage.DTD_ELEMENT__EATTRIBUTES : - return eAttributes != null && !getEAttributes().isEmpty(); - case DTDPackage.DTD_ELEMENT__EALL_CONTAINMENTS : - return !getEAllContainments().isEmpty(); - case DTDPackage.DTD_ELEMENT__EALL_OPERATIONS : - return !getEAllOperations().isEmpty(); - case DTDPackage.DTD_ELEMENT__EALL_STRUCTURAL_FEATURES : - return !getEAllStructuralFeatures().isEmpty(); - case DTDPackage.DTD_ELEMENT__EALL_SUPER_TYPES : - return !getEAllSuperTypes().isEmpty(); - case DTDPackage.DTD_ELEMENT__EID_ATTRIBUTE : - return getEIDAttribute() != null; - case DTDPackage.DTD_ELEMENT__DTD_FILE : - return getDTDFile() != null; - case DTDPackage.DTD_ELEMENT__COMMENT : - return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment); - case DTDPackage.DTD_ELEMENT__CONTENT : - return content != null; - case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE : - return dtdAttribute != null && !getDTDAttribute().isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { - if (baseClass == DTDContent.class) { - switch (derivedFeatureID) { - case DTDPackage.DTD_ELEMENT__DTD_FILE : - return DTDPackage.DTD_CONTENT__DTD_FILE; - default : - return -1; - } - } - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { - if (baseClass == DTDContent.class) { - switch (baseFeatureID) { - case DTDPackage.DTD_CONTENT__DTD_FILE : - return DTDPackage.DTD_ELEMENT__DTD_FILE; - default : - return -1; - } - } - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (comment: "); //$NON-NLS-1$ - result.append(comment); - result.append(')'); - return result.toString(); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT__EANNOTATIONS : - getEAnnotations().clear(); - getEAnnotations().addAll((Collection) newValue); - return; - case DTDPackage.DTD_ELEMENT__NAME : - setName((String) newValue); - return; - case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS_NAME : - setInstanceClassName((String) newValue); - return; - case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS : - setInstanceClass((Class) newValue); - return; - case DTDPackage.DTD_ELEMENT__ABSTRACT : - setAbstract(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_ELEMENT__INTERFACE : - setInterface(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_ELEMENT__ESUPER_TYPES : - getESuperTypes().clear(); - getESuperTypes().addAll((Collection) newValue); - return; - case DTDPackage.DTD_ELEMENT__EOPERATIONS : - getEOperations().clear(); - getEOperations().addAll((Collection) newValue); - return; - case DTDPackage.DTD_ELEMENT__EREFERENCES : - getEReferences().clear(); - getEReferences().addAll((Collection) newValue); - return; - case DTDPackage.DTD_ELEMENT__EATTRIBUTES : - getEAttributes().clear(); - getEAttributes().addAll((Collection) newValue); - return; - case DTDPackage.DTD_ELEMENT__DTD_FILE : - setDTDFile((DTDFile) newValue); - return; - case DTDPackage.DTD_ELEMENT__COMMENT : - setComment((String) newValue); - return; - case DTDPackage.DTD_ELEMENT__CONTENT : - setContent((DTDElementContent) newValue); - return; - case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE : - getDTDAttribute().clear(); - getDTDAttribute().addAll((Collection) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT__EANNOTATIONS : - getEAnnotations().clear(); - return; - case DTDPackage.DTD_ELEMENT__NAME : - setName(NAME_EDEFAULT); - return; - case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS_NAME : - setInstanceClassName(INSTANCE_CLASS_NAME_EDEFAULT); - return; - case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS : - setInstanceClass(INSTANCE_CLASS_EDEFAULT); - return; - case DTDPackage.DTD_ELEMENT__ABSTRACT : - setAbstract(ABSTRACT_EDEFAULT); - return; - case DTDPackage.DTD_ELEMENT__INTERFACE : - setInterface(INTERFACE_EDEFAULT); - return; - case DTDPackage.DTD_ELEMENT__ESUPER_TYPES : - getESuperTypes().clear(); - return; - case DTDPackage.DTD_ELEMENT__EOPERATIONS : - getEOperations().clear(); - return; - case DTDPackage.DTD_ELEMENT__EREFERENCES : - getEReferences().clear(); - return; - case DTDPackage.DTD_ELEMENT__EATTRIBUTES : - getEAttributes().clear(); - return; - case DTDPackage.DTD_ELEMENT__DTD_FILE : - setDTDFile((DTDFile) null); - return; - case DTDPackage.DTD_ELEMENT__COMMENT : - setComment(COMMENT_EDEFAULT); - return; - case DTDPackage.DTD_ELEMENT__CONTENT : - setContent((DTDElementContent) null); - return; - case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE : - getDTDAttribute().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public DTDFile getDTDFile() { - if (eContainerFeatureID != DTDPackage.DTD_ELEMENT__DTD_FILE) - return null; - return (DTDFile) eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDTDFile(DTDFile newDTDFile) { - if (newDTDFile != eContainer || (eContainerFeatureID != DTDPackage.DTD_ELEMENT__DTD_FILE && newDTDFile != null)) { - if (EcoreUtil.isAncestor(this, newDTDFile)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newDTDFile != null) - msgs = ((InternalEObject) newDTDFile).eInverseAdd(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs); - msgs = eBasicSetContainer((InternalEObject) newDTDFile, DTDPackage.DTD_ELEMENT__DTD_FILE, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT__DTD_FILE, newDTDFile, newDTDFile)); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementReferenceContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementReferenceContentImpl.java deleted file mode 100644 index cbd9933680..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementReferenceContentImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; - - -/** - * @generated - */ -public class DTDElementReferenceContentImpl extends DTDRepeatableContentImpl implements DTDElementReferenceContent { - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected DTDElement referencedElement = null; - - public DTDElementReferenceContentImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDElementReferenceContent(); - } - - public String unparseRepeatableContent() { - return getContentName(); - } - - public String getContentName() { - DTDElement e = getReferencedElement(); - if (e == null) - return ""; //$NON-NLS-1$ - return e.getName(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public DTDElement getReferencedElement() { - if (referencedElement != null && referencedElement.eIsProxy()) { - DTDElement oldReferencedElement = referencedElement; - referencedElement = (DTDElement) EcoreUtil.resolve(referencedElement, this); - if (referencedElement != oldReferencedElement) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT, oldReferencedElement, referencedElement)); - } - } - return referencedElement; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDElement basicGetReferencedElement() { - return referencedElement; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setReferencedElement(DTDElement newReferencedElement) { - DTDElement oldReferencedElement = referencedElement; - referencedElement = newReferencedElement; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT, oldReferencedElement, referencedElement)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP, msgs); - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP : - return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP, msgs); - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT : - return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP : - return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs); - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP : - return getGroup(); - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT : - return getElement(); - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__OCCURRENCE : - return getOccurrence(); - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT : - if (resolve) - return getReferencedElement(); - return basicGetReferencedElement(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP : - return getGroup() != null; - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT : - return getElement() != null; - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__OCCURRENCE : - return occurrence != OCCURRENCE_EDEFAULT; - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT : - return referencedElement != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP : - setGroup((DTDGroupContent) newValue); - return; - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT : - setElement((DTDElement) newValue); - return; - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__OCCURRENCE : - setOccurrence((DTDOccurrenceType) newValue); - return; - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT : - setReferencedElement((DTDElement) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP : - setGroup((DTDGroupContent) null); - return; - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT : - setElement((DTDElement) null); - return; - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__OCCURRENCE : - setOccurrence(OCCURRENCE_EDEFAULT); - return; - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT : - setReferencedElement((DTDElement) null); - return; - } - eDynamicUnset(eFeature); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEmptyContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEmptyContentImpl.java deleted file mode 100644 index 8689c516b5..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEmptyContentImpl.java +++ /dev/null @@ -1,172 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; - -/** - * @generated - */ -public class DTDEmptyContentImpl extends DTDElementContentImpl implements DTDEmptyContent { - - public DTDEmptyContentImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDEmptyContent(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_EMPTY_CONTENT__GROUP : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_EMPTY_CONTENT__GROUP, msgs); - case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_EMPTY_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_EMPTY_CONTENT__GROUP : - return eBasicSetContainer(null, DTDPackage.DTD_EMPTY_CONTENT__GROUP, msgs); - case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT : - return eBasicSetContainer(null, DTDPackage.DTD_EMPTY_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_EMPTY_CONTENT__GROUP : - return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs); - case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_EMPTY_CONTENT__GROUP : - return getGroup(); - case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT : - return getElement(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_EMPTY_CONTENT__GROUP : - setGroup((DTDGroupContent) newValue); - return; - case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT : - setElement((DTDElement) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_EMPTY_CONTENT__GROUP : - setGroup((DTDGroupContent) null); - return; - case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT : - setElement((DTDElement) null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_EMPTY_CONTENT__GROUP : - return getGroup() != null; - case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT : - return getElement() != null; - } - return eDynamicIsSet(eFeature); - } - - public String getContentName() { - return "EMPTY"; //$NON-NLS-1$ - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityContentImpl.java deleted file mode 100644 index 2617d336bc..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityContentImpl.java +++ /dev/null @@ -1,193 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil; - -/** - * @generated - */ -public abstract class DTDEntityContentImpl extends EObjectImpl implements DTDEntityContent { - - public DTDEntityContentImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDEntityContent(); - } - - public String getPathname() { - return DTDPathnameUtil.makePath(getDTDEntity().getPathname(), "Content", null, -1); //$NON-NLS-1$ - } - - public DTDObject findObject(String relativePath) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public DTDEntity getDTDEntity() { - if (eContainerFeatureID != DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY) - return null; - return (DTDEntity) eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDTDEntity(DTDEntity newDTDEntity) { - if (newDTDEntity != eContainer || (eContainerFeatureID != DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY && newDTDEntity != null)) { - if (EcoreUtil.isAncestor(this, newDTDEntity)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newDTDEntity != null) - msgs = ((InternalEObject) newDTDEntity).eInverseAdd(this, DTDPackage.DTD_ENTITY__CONTENT, DTDEntity.class, msgs); - msgs = eBasicSetContainer((InternalEObject) newDTDEntity, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, newDTDEntity, newDTDEntity)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY : - return eBasicSetContainer(null, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ENTITY__CONTENT, DTDEntity.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY : - return getDTDEntity(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY : - return getDTDEntity() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY : - setDTDEntity((DTDEntity) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY : - setDTDEntity((DTDEntity) null); - return; - } - eDynamicUnset(eFeature); - } - - /* - * @see DTDEntityContent#unparse() - */ - public String unparse() { - return null; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityImpl.java deleted file mode 100644 index b3f7963568..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityImpl.java +++ /dev/null @@ -1,1198 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.impl.NotificationChainImpl; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil; - - - -/** - * <!-- begin-user-doc --> An implementation of the model object '<em><b>Entity</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getComment <em>Comment</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#isParameterEntity <em>Parameter Entity</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getContent <em>Content</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getParmEntityRef <em>Parm Entity Ref</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getEntityReference <em>Entity Reference</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getAttributeNameReference <em>Attribute Name Reference</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getAttributeTypeReference <em>Attribute Type Reference</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class DTDEntityImpl extends DTDContentImpl implements DTDEntity, ENamedElement, DTDContent { - - public String getPathname() { - return DTDPathnameUtil.makePath(null, "Ent", getName(), -1); //$NON-NLS-1$ - } - - - public DTDObject findObject(String relativePath) { - Object[] result = DTDPathnameUtil.parsePathComponent(relativePath); - - - String type = (String) result[0]; - - - if (type == null) - return null; - - - DTDObject obj = null; - if (type.equals("Content")) { //$NON-NLS-1$ - obj = getContent(); - } - else { - return null; - } - - - String restPath = (String) result[3]; - - if ((restPath == null) || (obj == null)) { - return obj; - } - else { - return obj.findObject(restPath); - } - } - - - // ugly hack for now since we don't have multiple inheritance. - // Would rather have all this stuff in a base class but these - // classes are inheriting from sometimes different mof classes - DTDLexicalInfo lexInfo = new DTDLexicalInfo(); - - /** - * Get the value of startOffset. - * - * @return value of startOffset. - */ - public int getStartOffset() { - return lexInfo.getStartOffset(); - } - - /** - * Set the value of startOffset. - * - * @param v - * Value to assign to startOffset. - */ - public void setStartOffset(int v) { - lexInfo.setStartOffset(v); - } - - /** - * Get the value of endOffset. - * - * @return value of endOffset. - */ - public int getEndOffset() { - return lexInfo.getEndOffset(); - } - - /** - * Set the value of endOffset. - * - * @param v - * Value to assign to endOffset. - */ - public void setEndOffset(int v) { - lexInfo.setEndOffset(v); - } - - - - /** - * The default value of the '{@link #getComment() <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getComment() - * @generated - * @ordered - */ - protected static final String COMMENT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getComment() <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getComment() - * @generated - * @ordered - */ - protected String comment = COMMENT_EDEFAULT; - - /** - * The default value of the '{@link #isParameterEntity() <em>Parameter Entity</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #isParameterEntity() - * @generated - * @ordered - */ - protected static final boolean PARAMETER_ENTITY_EDEFAULT = false; - - /** - * The cached value of the '{@link #isParameterEntity() <em>Parameter Entity</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #isParameterEntity() - * @generated - * @ordered - */ - protected boolean parameterEntity = PARAMETER_ENTITY_EDEFAULT; - - /** - * The cached value of the '{@link #getContent() <em>Content</em>}' - * containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getContent() - * @generated - * @ordered - */ - protected DTDEntityContent content = null; - - /** - * The cached value of the '{@link #getParmEntityRef() <em>Parm Entity Ref</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getParmEntityRef() - * @generated - * @ordered - */ - protected DTDParameterEntityReference parmEntityRef = null; - - /** - * The cached value of the '{@link #getEntityReference() <em>Entity Reference</em>}' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getEntityReference() - * @generated - * @ordered - */ - protected EList entityReference = null; - - /** - * The cached value of the '{@link #getAttributeNameReference() <em>Attribute Name Reference</em>}' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getAttributeNameReference() - * @generated - * @ordered - */ - protected EList attributeNameReference = null; - - /** - * The cached value of the '{@link #getAttributeTypeReference() <em>Attribute Type Reference</em>}' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getAttributeTypeReference() - * @generated - * @ordered - */ - protected EList attributeTypeReference = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected DTDEntityImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDEntity(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String getComment() { - return comment; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setComment(String newComment) { - String oldComment = comment; - comment = newComment; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__COMMENT, oldComment, comment)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean isParameterEntity() { - return parameterEntity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setParameterEntity(boolean newParameterEntity) { - boolean oldParameterEntity = parameterEntity; - parameterEntity = newParameterEntity; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__PARAMETER_ENTITY, oldParameterEntity, parameterEntity)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEntityContent getContent() { - return content; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetContent(DTDEntityContent newContent, NotificationChain msgs) { - DTDEntityContent oldContent = content; - content = newContent; - if (eNotificationRequired()) { - if (msgs == null) - msgs = new NotificationChainImpl(4); - msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__CONTENT, oldContent, newContent)); - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setContent(DTDEntityContent newContent) { - if (newContent != content) { - NotificationChain msgs = null; - if (content != null) - msgs = ((InternalEObject) content).eInverseRemove(this, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, DTDEntityContent.class, msgs); - if (newContent != null) - msgs = ((InternalEObject) newContent).eInverseAdd(this, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, DTDEntityContent.class, msgs); - msgs = basicSetContent(newContent, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__CONTENT, newContent, newContent)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDParameterEntityReference getParmEntityRef() { - if (parmEntityRef != null && parmEntityRef.eIsProxy()) { - DTDParameterEntityReference oldParmEntityRef = parmEntityRef; - parmEntityRef = (DTDParameterEntityReference) EcoreUtil.resolve(parmEntityRef, this); - if (parmEntityRef != oldParmEntityRef) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, oldParmEntityRef, parmEntityRef)); - } - } - return parmEntityRef; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDParameterEntityReference basicGetParmEntityRef() { - return parmEntityRef; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetParmEntityRef(DTDParameterEntityReference newParmEntityRef, NotificationChain msgs) { - DTDParameterEntityReference oldParmEntityRef = parmEntityRef; - parmEntityRef = newParmEntityRef; - if (eNotificationRequired()) { - if (msgs == null) - msgs = new NotificationChainImpl(4); - msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, oldParmEntityRef, newParmEntityRef)); - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setParmEntityRef(DTDParameterEntityReference newParmEntityRef) { - if (newParmEntityRef != parmEntityRef) { - NotificationChain msgs = null; - if (parmEntityRef != null) - msgs = ((InternalEObject) parmEntityRef).eInverseRemove(this, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, DTDParameterEntityReference.class, msgs); - if (newParmEntityRef != null) - msgs = ((InternalEObject) newParmEntityRef).eInverseAdd(this, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, DTDParameterEntityReference.class, msgs); - msgs = basicSetParmEntityRef(newParmEntityRef, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, newParmEntityRef, newParmEntityRef)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EList getEntityReference() { - if (entityReference == null) { - entityReference = new EObjectWithInverseResolvingEList(DTDEntityReferenceContent.class, this, DTDPackage.DTD_ENTITY__ENTITY_REFERENCE, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY); - } - return entityReference; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EList getAttributeNameReference() { - if (attributeNameReference == null) { - attributeNameReference = new EObjectWithInverseResolvingEList(DTDAttribute.class, this, DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY); - } - return attributeNameReference; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EList getAttributeTypeReference() { - if (attributeTypeReference == null) { - attributeTypeReference = new EObjectWithInverseResolvingEList(DTDAttribute.class, this, DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY); - } - return attributeTypeReference; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ENTITY__DTD_FILE : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENTITY__DTD_FILE, msgs); - case DTDPackage.DTD_ENTITY__CONTENT : - if (content != null) - msgs = ((InternalEObject) content).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DTDPackage.DTD_ENTITY__CONTENT, null, msgs); - return basicSetContent((DTDEntityContent) otherEnd, msgs); - case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF : - if (parmEntityRef != null) - msgs = ((InternalEObject) parmEntityRef).eInverseRemove(this, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, DTDParameterEntityReference.class, msgs); - return basicSetParmEntityRef((DTDParameterEntityReference) otherEnd, msgs); - case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE : - return ((InternalEList) getEntityReference()).basicAdd(otherEnd, msgs); - case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE : - return ((InternalEList) getAttributeNameReference()).basicAdd(otherEnd, msgs); - case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE : - return ((InternalEList) getAttributeTypeReference()).basicAdd(otherEnd, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ENTITY__DTD_FILE : - return eBasicSetContainer(null, DTDPackage.DTD_ENTITY__DTD_FILE, msgs); - case DTDPackage.DTD_ENTITY__CONTENT : - return basicSetContent(null, msgs); - case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF : - return basicSetParmEntityRef(null, msgs); - case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE : - return ((InternalEList) getEntityReference()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE : - return ((InternalEList) getAttributeNameReference()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE : - return ((InternalEList) getAttributeTypeReference()).basicRemove(otherEnd, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_ENTITY__DTD_FILE : - return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY__DTD_FILE : - return getDTDFile(); - case DTDPackage.DTD_ENTITY__COMMENT : - return getComment(); - case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY : - return isParameterEntity() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ENTITY__CONTENT : - return getContent(); - case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF : - if (resolve) - return getParmEntityRef(); - return basicGetParmEntityRef(); - case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE : - return getEntityReference(); - case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE : - return getAttributeNameReference(); - case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE : - return getAttributeTypeReference(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY__DTD_FILE : - setDTDFile((DTDFile) newValue); - return; - case DTDPackage.DTD_ENTITY__COMMENT : - setComment((String) newValue); - return; - case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY : - setParameterEntity(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_ENTITY__CONTENT : - setContent((DTDEntityContent) newValue); - return; - case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF : - setParmEntityRef((DTDParameterEntityReference) newValue); - return; - case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE : - getEntityReference().clear(); - getEntityReference().addAll((Collection) newValue); - return; - case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE : - getAttributeNameReference().clear(); - getAttributeNameReference().addAll((Collection) newValue); - return; - case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE : - getAttributeTypeReference().clear(); - getAttributeTypeReference().addAll((Collection) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY__DTD_FILE : - setDTDFile((DTDFile) null); - return; - case DTDPackage.DTD_ENTITY__COMMENT : - setComment(COMMENT_EDEFAULT); - return; - case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY : - setParameterEntity(PARAMETER_ENTITY_EDEFAULT); - return; - case DTDPackage.DTD_ENTITY__CONTENT : - setContent((DTDEntityContent) null); - return; - case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF : - setParmEntityRef((DTDParameterEntityReference) null); - return; - case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE : - getEntityReference().clear(); - return; - case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE : - getAttributeNameReference().clear(); - return; - case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE : - getAttributeTypeReference().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY__DTD_FILE : - return getDTDFile() != null; - case DTDPackage.DTD_ENTITY__COMMENT : - return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment); - case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY : - return parameterEntity != PARAMETER_ENTITY_EDEFAULT; - case DTDPackage.DTD_ENTITY__CONTENT : - return content != null; - case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF : - return parmEntityRef != null; - case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE : - return entityReference != null && !getEntityReference().isEmpty(); - case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE : - return attributeNameReference != null && !getAttributeNameReference().isEmpty(); - case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE : - return attributeTypeReference != null && !getAttributeTypeReference().isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (comment: "); //$NON-NLS-1$ - result.append(comment); - result.append(", parameterEntity: "); //$NON-NLS-1$ - result.append(parameterEntity); - result.append(')'); - return result.toString(); - } - -} // DTDEntityImpl - -// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ -// - -// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ -// //public class DTDEntityImpl extends ENamespaceImpl implements DTDEntity, -// ENamespace, DTDContent{ -// -------------------GENERICRULES.JSED------------------- - -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected String comment = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected Boolean parameterEntity = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected DTDEntityContent content = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected DTDParameterEntityReference parmEntityRef = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected EList entityReference = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected EList attributeNameReference = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected EList attributeTypeReference = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected boolean setComment = false; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected boolean setParameterEntity = false; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected boolean setContent = false; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected boolean setParmEntityRef = false; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// private DTDContentImpl dtdContentDelegate = null; - -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EObject initInstance() { -// setEMetaObj(eClassDTDEntity()); -// initInstanceDelegates(); -// return this; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected void initInstanceDelegates() { -// super.initInstanceDelegates(); -// -// getDtdContentDelegate().refSetDelegateOwner(this); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public DTDPackage ePackageDTD() { -// return -// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EClass eClassDTDEntity() { -// return -// ((DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI)).getDTDEntity(); -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public String getComment() { -// if (this.setComment) return this.comment; -// else return -// (String)DTDPackage.eINSTANCE.getDTDEntity_Comment().getDefaultValue(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setComment(String value) { -// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDEntity_Comment(),this.comment,value); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetComment() { -// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDEntity_Comment())); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetComment() { -// return setComment; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public Boolean getParameterEntity() { -// if (this.setParameterEntity) return this.parameterEntity; -// else return -// (Boolean)DTDPackage.eINSTANCE.getDTDEntity_ParameterEntity().getDefaultValue(); -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public boolean isParameterEntity() { -// Boolean result = getParameterEntity(); -// return result != null ? result.booleanValue() : false; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setParameterEntity(Boolean value) { -// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDEntity_ParameterEntity(),this.parameterEntity,value); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setParameterEntity(boolean value) { -// setParameterEntity(value?Boolean.TRUE:Boolean.FALSE); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetParameterEntity() { -// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDEntity_ParameterEntity())); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetParameterEntity() { -// return setParameterEntity; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public DTDEntityContent getContent() { -// try { -// if (this.content == null) return null; -// this.content = (DTDEntityContent) -// ((InternalEObject)this.content).resolve(this); -// if (this.content==null) this.setContent = false; -// return this.content; -// } catch (Exception e) { -// return null; -// } -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setContent(DTDEntityContent l) { -// refSetValueForRefObjectSF(DTDPackage.eINSTANCE.getDTDEntity_Content(),this.content,l); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetContent() { -// refUnsetValueForRefObjectSF(DTDPackage.eINSTANCE.getDTDEntity_Content(),this.content); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetContent() { -// return setContent; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public DTDParameterEntityReference getParmEntityRef() { -// try { -// if (this.parmEntityRef == null) return null; -// this.parmEntityRef = (DTDParameterEntityReference) -// ((InternalEObject)this.parmEntityRef).resolve(this, -// DTDPackage.eINSTANCE.getDTDEntity_ParmEntityRef()); -// if (this.parmEntityRef==null) this.setParmEntityRef = false; -// return this.parmEntityRef; -// } catch (Exception e) { -// return null; -// } -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setParmEntityRef(DTDParameterEntityReference l) { -// refSetValueForSVReference(DTDPackage.eINSTANCE.getDTDEntity_ParmEntityRef(),this.parmEntityRef,l); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetParmEntityRef() { -// refUnsetValueForSVReference(DTDPackage.eINSTANCE.getDTDEntity_ParmEntityRef(),this.parmEntityRef); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetParmEntityRef() { -// return setParmEntityRef; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public EList getEntityReference() { -// if (this.entityReference==null) { -// this.entityReference=newCollection(this,DTDPackage.eINSTANCE.getDTDEntity_EntityReference(), -// true); -// } -// return this.entityReference; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public EList getAttributeNameReference() { -// if (this.attributeNameReference==null) { -// this.attributeNameReference=newCollection(this,DTDPackage.eINSTANCE.getDTDEntity_AttributeNameReference(), -// true); -// } -// return this.attributeNameReference; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public EList getAttributeTypeReference() { -// if (this.attributeTypeReference==null) { -// this.attributeTypeReference=newCollection(this,DTDPackage.eINSTANCE.getDTDEntity_AttributeTypeReference(), -// true); -// } -// return this.attributeTypeReference; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Object eGet(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eGet(feature); -// } -// switch (eClassDTDEntity().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_ENTITY__COMMENT: return getComment(); -// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: return getParameterEntity(); -// case DTDPackage.DTD_ENTITY__CONTENT: return getContent(); -// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: return getParmEntityRef(); -// case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE: return getEntityReference(); -// case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE: return -// getAttributeNameReference(); -// case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE: return -// getAttributeTypeReference(); -// case DTDPackage.DTD_ENTITY__DTD_FILE: return getDTDFile(); -// -// } -// return super.eGet(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Object refBasicValue(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.refBasicValue(feature); -// } -// switch (eClassDTDEntity().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_ENTITY__COMMENT: -// return this.setComment? this.comment : null; -// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: -// return this.setParameterEntity? this.parameterEntity : null; -// case DTDPackage.DTD_ENTITY__CONTENT: -// if (!this.setContent||this.content==null) return null; -// if (((InternalEObject)this.content).refIsDeleted()) {this.content=null; -// this.setContent=false;} -// return this.content; -// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: -// if (!this.setParmEntityRef||this.parmEntityRef==null) return null; -// if (((InternalEObject)this.parmEntityRef).refIsDeleted()) -// {this.parmEntityRef=null; this.setParmEntityRef=false;} -// return this.parmEntityRef; -// case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE: -// return this.entityReference; -// case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE: -// return this.attributeNameReference; -// case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE: -// return this.attributeTypeReference; -// case DTDPackage.DTD_ENTITY__DTD_FILE: return -// ((InternalEObject)getDtdContentDelegate()).refBasicValue(feature); -// -// } -// return super.refBasicValue(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean eIsSet(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eIsSet(feature); -// } -// switch (eClassDTDEntity().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_ENTITY__COMMENT: return isSetComment(); -// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: return -// isSetParameterEntity(); -// case DTDPackage.DTD_ENTITY__CONTENT: return isSetContent(); -// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: return isSetParmEntityRef(); -// case DTDPackage.DTD_ENTITY__DTD_FILE: return isSetDTDFile(); -// -// } -// return super.eIsSet(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void eSet(EStructuralFeature feature, Object newValue) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// super.eSet(feature, newValue); -// } -// switch (eClassDTDEntity().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_ENTITY__COMMENT: { -// setComment((String)newValue); -// return; -// } -// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: { -// setParameterEntity((newValue instanceof -// String)?Boolean.valueOf((String)newValue):(Boolean)newValue); -// return; -// } -// case DTDPackage.DTD_ENTITY__CONTENT: { -// setContent((DTDEntityContent)newValue); -// return; -// } -// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: { -// setParmEntityRef((DTDParameterEntityReference)newValue); -// return; -// } -// case DTDPackage.DTD_ENTITY__DTD_FILE: { -// setDTDFile((DTDFile)newValue); -// return; -// } -// -// } -// super.eSet(feature, newValue); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Notification eBasicSet(EStructuralFeature feature, Object newValue) -// { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eBasicSet(feature, newValue); -// } -// switch (eClassDTDEntity().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_ENTITY__COMMENT: { -// Object oldValue = this.comment; -// this.comment = (String)newValue; -// this.setComment = true; -// return new -// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_Comment(),oldValue,newValue); -// } -// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: { -// Object oldValue = this.parameterEntity; -// this.parameterEntity = (Boolean)newValue; -// this.setParameterEntity = true; -// return new -// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_ParameterEntity(),oldValue,newValue); -// } -// case DTDPackage.DTD_ENTITY__CONTENT: { -// Object oldValue = this.content; -// this.content = (DTDEntityContent)newValue; -// this.setContent = true; -// return new -// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_Content(),oldValue,newValue); -// } -// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: { -// Object oldValue = this.parmEntityRef; -// this.parmEntityRef = (DTDParameterEntityReference)newValue; -// this.setParmEntityRef = true; -// return new -// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_ParmEntityRef(),oldValue,newValue); -// } -// -// } -// return super.eBasicSet(feature, newValue); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void eUnset(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// super.eUnset(feature); -// } -// switch (eClassDTDEntity().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_ENTITY__COMMENT: { -// unsetComment(); -// return; -// } -// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: { -// unsetParameterEntity(); -// return; -// } -// case DTDPackage.DTD_ENTITY__CONTENT: { -// unsetContent(); -// return; -// } -// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: { -// unsetParmEntityRef(); -// return; -// } -// case DTDPackage.DTD_ENTITY__DTD_FILE: { -// unsetDTDFile(); -// return; -// } -// -// } -// super.eUnset(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Notification refBasicUnsetValue(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.refBasicUnsetValue(feature); -// } -// switch (eClassDTDEntity().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_ENTITY__COMMENT: { -// Object oldValue = this.comment; -// this.comment = null; -// this.setComment = false; -// return new -// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_Comment(),oldValue,getComment()); -// } -// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: { -// Object oldValue = this.parameterEntity; -// this.parameterEntity = null; -// this.setParameterEntity = false; -// return new -// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_ParameterEntity(),oldValue,getParameterEntity()); -// } -// case DTDPackage.DTD_ENTITY__CONTENT: { -// Object oldValue = this.content; -// this.content = null; -// this.setContent = false; -// return new -// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_Content(),oldValue,null); -// } -// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: { -// Object oldValue = this.parmEntityRef; -// this.parmEntityRef = null; -// this.setParmEntityRef = false; -// return new -// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_ParmEntityRef(),oldValue,null); -// } -// -// } -// return super.refBasicUnsetValue(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected DTDContentImpl getDtdContentDelegate() { -// if (dtdContentDelegate == null) { -// DTDPackage pkg = -// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI); -// dtdContentDelegate=(DTDContentImpl)pkg.eCreateInstance(pkg.DTD_CONTENT); -// dtdContentDelegate.initInstance(); -// } -// return dtdContentDelegate; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EClass eClassDTDContent() { -// return getDtdContentDelegate().eClass(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public DTDFile getDTDFile() { -// return getDtdContentDelegate().getDTDFile(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setDTDFile(DTDFile value) { -// getDtdContentDelegate().setDTDFile(value); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetDTDFile() { -// getDtdContentDelegate().unsetDTDFile(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetDTDFile() { -// return getDtdContentDelegate().isSetDTDFile(); -// } -// } -// -------------------GENERICRULES.JSED------------------- diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityReferenceContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityReferenceContentImpl.java deleted file mode 100644 index 3e97fff8aa..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityReferenceContentImpl.java +++ /dev/null @@ -1,323 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.impl.NotificationChainImpl; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo; -import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; - - -/** - * @generated - */ -public class DTDEntityReferenceContentImpl extends DTDRepeatableContentImpl implements DTDEntityReferenceContent { - - public DTDEntityReferenceContentImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDEntityReferenceContent(); - } - - public String getContentName() { - DTDEntity e = getElementReferencedEntity(); - if (e == null) - return ""; //$NON-NLS-1$ - return e.getName(); - } - - public String unparseRepeatableContent() { - DTDEntity entityRef = getElementReferencedEntity(); - if (entityRef.isParameterEntity()) { - return "%" + getContentName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$ - } - else { - return "&" + getContentName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - // ugly hack for now since we don't have multiple inheritance. - // Would rather have all this stuff in a base class but these - // classes are inheriting from sometimes different mof classes - DTDLexicalInfo lexInfo = new DTDLexicalInfo(); - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected DTDEntity elementReferencedEntity = null; - - /** - * Get the value of startOffset. - * - * @return value of startOffset. - */ - public int getStartOffset() { - return lexInfo.getStartOffset(); - } - - /** - * Set the value of startOffset. - * - * @param v - * Value to assign to startOffset. - */ - public void setStartOffset(int v) { - lexInfo.setStartOffset(v); - } - - /** - * Get the value of endOffset. - * - * @return value of endOffset. - */ - public int getEndOffset() { - return lexInfo.getEndOffset(); - } - - /** - * Set the value of endOffset. - * - * @param v - * Value to assign to endOffset. - */ - public void setEndOffset(int v) { - lexInfo.setEndOffset(v); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public DTDEntity getElementReferencedEntity() { - if (elementReferencedEntity != null && elementReferencedEntity.eIsProxy()) { - DTDEntity oldElementReferencedEntity = elementReferencedEntity; - elementReferencedEntity = (DTDEntity) EcoreUtil.resolve(elementReferencedEntity, this); - if (elementReferencedEntity != oldElementReferencedEntity) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY, oldElementReferencedEntity, elementReferencedEntity)); - } - } - return elementReferencedEntity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEntity basicGetElementReferencedEntity() { - return elementReferencedEntity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetElementReferencedEntity(DTDEntity newElementReferencedEntity, NotificationChain msgs) { - DTDEntity oldElementReferencedEntity = elementReferencedEntity; - elementReferencedEntity = newElementReferencedEntity; - if (eNotificationRequired()) { - if (msgs == null) - msgs = new NotificationChainImpl(4); - msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY, oldElementReferencedEntity, newElementReferencedEntity)); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setElementReferencedEntity(DTDEntity newElementReferencedEntity) { - if (newElementReferencedEntity != elementReferencedEntity) { - NotificationChain msgs = null; - if (elementReferencedEntity != null) - msgs = ((InternalEObject) elementReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ENTITY_REFERENCE, DTDEntity.class, msgs); - if (newElementReferencedEntity != null) - msgs = ((InternalEObject) newElementReferencedEntity).eInverseAdd(this, DTDPackage.DTD_ENTITY__ENTITY_REFERENCE, DTDEntity.class, msgs); - msgs = basicSetElementReferencedEntity(newElementReferencedEntity, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY, newElementReferencedEntity, newElementReferencedEntity)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP, msgs); - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT, msgs); - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY : - if (elementReferencedEntity != null) - msgs = ((InternalEObject) elementReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ENTITY_REFERENCE, DTDEntity.class, msgs); - return basicSetElementReferencedEntity((DTDEntity) otherEnd, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP : - return eBasicSetContainer(null, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP, msgs); - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT : - return eBasicSetContainer(null, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT, msgs); - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY : - return basicSetElementReferencedEntity(null, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP : - return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs); - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP : - return getGroup(); - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT : - return getElement(); - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__OCCURRENCE : - return getOccurrence(); - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY : - if (resolve) - return getElementReferencedEntity(); - return basicGetElementReferencedEntity(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP : - return getGroup() != null; - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT : - return getElement() != null; - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__OCCURRENCE : - return occurrence != OCCURRENCE_EDEFAULT; - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY : - return elementReferencedEntity != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP : - setGroup((DTDGroupContent) newValue); - return; - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT : - setElement((DTDElement) newValue); - return; - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__OCCURRENCE : - setOccurrence((DTDOccurrenceType) newValue); - return; - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY : - setElementReferencedEntity((DTDEntity) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP : - setGroup((DTDGroupContent) null); - return; - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT : - setElement((DTDElement) null); - return; - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__OCCURRENCE : - setOccurrence(OCCURRENCE_EDEFAULT); - return; - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY : - setElementReferencedEntity((DTDEntity) null); - return; - } - eDynamicUnset(eFeature); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEnumerationTypeImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEnumerationTypeImpl.java deleted file mode 100644 index a93f6531d4..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEnumerationTypeImpl.java +++ /dev/null @@ -1,362 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EEnumImpl; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.wst.dtd.core.internal.DTDCoreMessages; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; - - -/** - * @generated - */ -public class DTDEnumerationTypeImpl extends EEnumImpl implements DTDEnumerationType { - /** - * The default value of the '{@link #getKind() <em>Kind</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getKind() - * @generated - * @ordered - */ - protected static final DTDEnumGroupKind KIND_EDEFAULT = DTDEnumGroupKind.NAME_TOKEN_GROUP_LITERAL; - - public final static String enumerationTypeDescriptions[] = {DTDCoreMessages._UI_ENUM_NAME_TOKENS_DESC, DTDCoreMessages._UI_ENUM_NOTATION_DESC}; //$NON-NLS-1$ //$NON-NLS-2$ - - public final static int enumerationTypeKinds[] = {DTDEnumGroupKind.NAME_TOKEN_GROUP, DTDEnumGroupKind.NOTATION_GROUP}; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected DTDEnumGroupKind kind = KIND_EDEFAULT; - - public DTDEnumerationTypeImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDEnumerationType(); - } - - public EList getEnumLiterals() { - return getELiterals(); - } - - public String getEnumerationTypeDescription() { - return getEnumerationTypeDescription(getKind().getValue()); - } - - public static String getEnumerationTypeDescription(int kind) { - // it can only be 1 or 2, but maybe later... - if (kind >= 1 && kind <= 2) { - // we subtract 1 since the kind is 1 - based not zero based - return enumerationTypeDescriptions[kind - 1]; - } - return null; - } - - public String getPathname() { - // TBD - return ""; //$NON-NLS-1$ - } - - public DTDObject findObject(String relativePath) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public DTDEnumGroupKind getKind() { - return kind; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setKind(DTDEnumGroupKind newKind) { - DTDEnumGroupKind oldKind = kind; - kind = newKind == null ? KIND_EDEFAULT : newKind; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENUMERATION_TYPE__KIND, oldKind, kind)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public DTDFile getDTDFile() { - if (eContainerFeatureID != DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE) - return null; - return (DTDFile) eContainer; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDTDFile(DTDFile newDTDFile) { - if (newDTDFile != eContainer || (eContainerFeatureID != DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE && newDTDFile != null)) { - if (EcoreUtil.isAncestor(this, newDTDFile)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$ - NotificationChain msgs = null; - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newDTDFile != null) - msgs = ((InternalEObject) newDTDFile).eInverseAdd(this, DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE, DTDFile.class, msgs); - msgs = eBasicSetContainer((InternalEObject) newDTDFile, DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE, newDTDFile, newDTDFile)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS : - return ((InternalEList) getEAnnotations()).basicAdd(otherEnd, msgs); - case DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE, msgs); - case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS : - return ((InternalEList) getELiterals()).basicAdd(otherEnd, msgs); - case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS : - return ((InternalEList) getEAnnotations()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE : - return eBasicSetContainer(null, DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE, msgs); - case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS : - return ((InternalEList) getELiterals()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE : - return eBasicSetContainer(null, DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE : - return eContainer.eInverseRemove(this, EcorePackage.EPACKAGE__ECLASSIFIERS, EPackage.class, msgs); - case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE : - return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE, DTDFile.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS : - return getEAnnotations(); - case DTDPackage.DTD_ENUMERATION_TYPE__NAME : - return getName(); - case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS_NAME : - return getInstanceClassName(); - case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS : - return getInstanceClass(); - case DTDPackage.DTD_ENUMERATION_TYPE__DEFAULT_VALUE : - return getDefaultValue(); - case DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE : - return getEPackage(); - case DTDPackage.DTD_ENUMERATION_TYPE__SERIALIZABLE : - return isSerializable() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS : - return getELiterals(); - case DTDPackage.DTD_ENUMERATION_TYPE__KIND : - return getKind(); - case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE : - return getDTDFile(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS : - return eAnnotations != null && !getEAnnotations().isEmpty(); - case DTDPackage.DTD_ENUMERATION_TYPE__NAME : - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS_NAME : - return INSTANCE_CLASS_NAME_EDEFAULT == null ? instanceClassName != null : !INSTANCE_CLASS_NAME_EDEFAULT.equals(instanceClassName); - case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS : - return INSTANCE_CLASS_EDEFAULT == null ? instanceClass != null : !INSTANCE_CLASS_EDEFAULT.equals(instanceClass); - case DTDPackage.DTD_ENUMERATION_TYPE__DEFAULT_VALUE : - return getDefaultValue() != null; - case DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE : - return getEPackage() != null; - case DTDPackage.DTD_ENUMERATION_TYPE__SERIALIZABLE : - return ((eFlags & SERIALIZABLE_EFLAG) != 0) != SERIALIZABLE_EDEFAULT; - case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS : - return eLiterals != null && !getELiterals().isEmpty(); - case DTDPackage.DTD_ENUMERATION_TYPE__KIND : - return kind != KIND_EDEFAULT; - case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE : - return getDTDFile() != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS : - getEAnnotations().clear(); - getEAnnotations().addAll((Collection) newValue); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__NAME : - setName((String) newValue); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS_NAME : - setInstanceClassName((String) newValue); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS : - setInstanceClass((Class) newValue); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__SERIALIZABLE : - setSerializable(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS : - getELiterals().clear(); - getELiterals().addAll((Collection) newValue); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__KIND : - setKind((DTDEnumGroupKind) newValue); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE : - setDTDFile((DTDFile) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS : - getEAnnotations().clear(); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__NAME : - setName(NAME_EDEFAULT); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS_NAME : - setInstanceClassName(INSTANCE_CLASS_NAME_EDEFAULT); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS : - setInstanceClass(INSTANCE_CLASS_EDEFAULT); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__SERIALIZABLE : - setSerializable(SERIALIZABLE_EDEFAULT); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS : - getELiterals().clear(); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__KIND : - setKind(KIND_EDEFAULT); - return; - case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE : - setDTDFile((DTDFile) null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (kind: "); //$NON-NLS-1$ - result.append(kind); - result.append(')'); - return result.toString(); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDExternalEntityImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDExternalEntityImpl.java deleted file mode 100644 index 7bb5d03af3..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDExternalEntityImpl.java +++ /dev/null @@ -1,400 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.impl.NotificationChainImpl; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; - - -/** - * @generated - */ -public class DTDExternalEntityImpl extends DTDEntityContentImpl implements DTDExternalEntity { - /** - * The default value of the '{@link #getSystemID() <em>System ID</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getSystemID() - * @generated - * @ordered - */ - protected static final String SYSTEM_ID_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String systemID = SYSTEM_ID_EDEFAULT; - /** - * The default value of the '{@link #getPublicID() <em>Public ID</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getPublicID() - * @generated - * @ordered - */ - protected static final String PUBLIC_ID_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String publicID = PUBLIC_ID_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected DTDNotation notation = null; - /** - * @generated This field/method will be replaced during code generation. - */ - protected DTDFile entityReferencedFromAnotherFile = null; - - public DTDExternalEntityImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDExternalEntity(); - } - - public String unparse() { - StringBuffer text = new StringBuffer(100); - if (getPublicID() == null || getPublicID().equals("")) { //$NON-NLS-1$ - text.append("SYSTEM "); //$NON-NLS-1$ - } - else { - text.append("PUBLIC \"").append(getPublicID()).append("\" "); //$NON-NLS-1$ //$NON-NLS-2$ - } - String systemId = getSystemID(); - - text.append("\"").append(systemId).append("\""); //$NON-NLS-1$ //$NON-NLS-2$ - - DTDNotation notation = getNotation(); - if (notation != null) - text.append(" NDATA ").append(notation.getName()); //$NON-NLS-1$ - - return text.toString(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getSystemID() { - return systemID; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSystemID(String newSystemID) { - String oldSystemID = systemID; - systemID = newSystemID; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_EXTERNAL_ENTITY__SYSTEM_ID, oldSystemID, systemID)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getPublicID() { - return publicID; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setPublicID(String newPublicID) { - String oldPublicID = publicID; - publicID = newPublicID; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_EXTERNAL_ENTITY__PUBLIC_ID, oldPublicID, publicID)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public DTDNotation getNotation() { - if (notation != null && notation.eIsProxy()) { - DTDNotation oldNotation = notation; - notation = (DTDNotation) EcoreUtil.resolve(notation, this); - if (notation != oldNotation) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION, oldNotation, notation)); - } - } - return notation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDNotation basicGetNotation() { - return notation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetNotation(DTDNotation newNotation, NotificationChain msgs) { - DTDNotation oldNotation = notation; - notation = newNotation; - if (eNotificationRequired()) { - if (msgs == null) - msgs = new NotificationChainImpl(4); - msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION, oldNotation, newNotation)); - } - return msgs; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setNotation(DTDNotation newNotation) { - if (newNotation != notation) { - NotificationChain msgs = null; - if (notation != null) - msgs = ((InternalEObject) notation).eInverseRemove(this, DTDPackage.DTD_NOTATION__ENTITY, DTDNotation.class, msgs); - if (newNotation != null) - msgs = ((InternalEObject) newNotation).eInverseAdd(this, DTDPackage.DTD_NOTATION__ENTITY, DTDNotation.class, msgs); - msgs = basicSetNotation(newNotation, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION, newNotation, newNotation)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public DTDFile getEntityReferencedFromAnotherFile() { - if (entityReferencedFromAnotherFile != null && entityReferencedFromAnotherFile.eIsProxy()) { - DTDFile oldEntityReferencedFromAnotherFile = entityReferencedFromAnotherFile; - entityReferencedFromAnotherFile = (DTDFile) EcoreUtil.resolve(entityReferencedFromAnotherFile, this); - if (entityReferencedFromAnotherFile != oldEntityReferencedFromAnotherFile) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE, oldEntityReferencedFromAnotherFile, entityReferencedFromAnotherFile)); - } - } - return entityReferencedFromAnotherFile; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDFile basicGetEntityReferencedFromAnotherFile() { - return entityReferencedFromAnotherFile; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setEntityReferencedFromAnotherFile(DTDFile newEntityReferencedFromAnotherFile) { - DTDFile oldEntityReferencedFromAnotherFile = entityReferencedFromAnotherFile; - entityReferencedFromAnotherFile = newEntityReferencedFromAnotherFile; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE, oldEntityReferencedFromAnotherFile, entityReferencedFromAnotherFile)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY, msgs); - case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION : - if (notation != null) - msgs = ((InternalEObject) notation).eInverseRemove(this, DTDPackage.DTD_NOTATION__ENTITY, DTDNotation.class, msgs); - return basicSetNotation((DTDNotation) otherEnd, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY : - return eBasicSetContainer(null, DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY, msgs); - case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION : - return basicSetNotation(null, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ENTITY__CONTENT, DTDEntity.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY : - return getDTDEntity(); - case DTDPackage.DTD_EXTERNAL_ENTITY__SYSTEM_ID : - return getSystemID(); - case DTDPackage.DTD_EXTERNAL_ENTITY__PUBLIC_ID : - return getPublicID(); - case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION : - if (resolve) - return getNotation(); - return basicGetNotation(); - case DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE : - if (resolve) - return getEntityReferencedFromAnotherFile(); - return basicGetEntityReferencedFromAnotherFile(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY : - return getDTDEntity() != null; - case DTDPackage.DTD_EXTERNAL_ENTITY__SYSTEM_ID : - return SYSTEM_ID_EDEFAULT == null ? systemID != null : !SYSTEM_ID_EDEFAULT.equals(systemID); - case DTDPackage.DTD_EXTERNAL_ENTITY__PUBLIC_ID : - return PUBLIC_ID_EDEFAULT == null ? publicID != null : !PUBLIC_ID_EDEFAULT.equals(publicID); - case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION : - return notation != null; - case DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE : - return entityReferencedFromAnotherFile != null; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY : - setDTDEntity((DTDEntity) newValue); - return; - case DTDPackage.DTD_EXTERNAL_ENTITY__SYSTEM_ID : - setSystemID((String) newValue); - return; - case DTDPackage.DTD_EXTERNAL_ENTITY__PUBLIC_ID : - setPublicID((String) newValue); - return; - case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION : - setNotation((DTDNotation) newValue); - return; - case DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE : - setEntityReferencedFromAnotherFile((DTDFile) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY : - setDTDEntity((DTDEntity) null); - return; - case DTDPackage.DTD_EXTERNAL_ENTITY__SYSTEM_ID : - setSystemID(SYSTEM_ID_EDEFAULT); - return; - case DTDPackage.DTD_EXTERNAL_ENTITY__PUBLIC_ID : - setPublicID(PUBLIC_ID_EDEFAULT); - return; - case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION : - setNotation((DTDNotation) null); - return; - case DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE : - setEntityReferencedFromAnotherFile((DTDFile) null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (systemID: "); //$NON-NLS-1$ - result.append(systemID); - result.append(", publicID: "); //$NON-NLS-1$ - result.append(publicID); - result.append(')'); - return result.toString(); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFactoryImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFactoryImpl.java deleted file mode 100644 index a2defc4d33..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFactoryImpl.java +++ /dev/null @@ -1,448 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType; -import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDFactory; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType; -import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.DTDType; -import org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType; - -/** - * @generated - */ -public class DTDFactoryImpl extends EFactoryImpl implements DTDFactory { - protected DTDBasicType dtdBasicType_NONE; - protected DTDBasicType dtdBasicType_CDATA; - protected DTDBasicType dtdBasicType_ID; - protected DTDBasicType dtdBasicType_IDREF; - protected DTDBasicType dtdBasicType_IDREFS; - protected DTDBasicType dtdBasicType_ENTITY; - protected DTDBasicType dtdBasicType_ENTITIES; - protected DTDBasicType dtdBasicType_NMTOKEN; - protected DTDBasicType dtdBasicType_NMTOKENS; - - - - public static DTDFactory instance() { - return (DTDFactory) getPackage().getEFactoryInstance(); - } - - /** - * Gets the dtdBasicType_NONE. - * - * @return Returns a DTDType - */ - public DTDType getDTDBasicType_NONE() { - if (dtdBasicType_NONE == null) { - (dtdBasicType_NONE = createDTDBasicType()).setKind(DTDBasicTypeKind.CDATA_LITERAL); - } - return dtdBasicType_NONE; - } - - /** - * Gets the dtdBasicType_CDATA. - * - * @return Returns a DTDType - */ - public DTDType getDTDBasicType_CDATA() { - if (dtdBasicType_CDATA == null) { - (dtdBasicType_CDATA = createDTDBasicType()).setKind(DTDBasicTypeKind.CDATA_LITERAL); - } - return dtdBasicType_CDATA; - } - - /** - * Gets the dtdBasicType_ID. - * - * @return Returns a DTDType - */ - public DTDType getDTDBasicType_ID() { - if (dtdBasicType_ID == null) { - (dtdBasicType_ID = createDTDBasicType()).setKind(DTDBasicTypeKind.ID_LITERAL); - } - return dtdBasicType_ID; - } - - /** - * Gets the dtdBasicType_IDREF. - * - * @return Returns a DTDType - */ - public DTDType getDTDBasicType_IDREF() { - if (dtdBasicType_IDREF == null) { - (dtdBasicType_IDREF = createDTDBasicType()).setKind(DTDBasicTypeKind.IDREF_LITERAL); - } - return dtdBasicType_IDREF; - } - - /** - * Gets the dtdBasicType_IDREFS. - * - * @return Returns a DTDType - */ - public DTDType getDTDBasicType_IDREFS() { - if (dtdBasicType_IDREFS == null) { - (dtdBasicType_IDREFS = createDTDBasicType()).setKind(DTDBasicTypeKind.IDREFS_LITERAL); - } - return dtdBasicType_IDREFS; - } - - /** - * Gets the dtdBasicType_ENTITY. - * - * @return Returns a DTDType - */ - public DTDType getDTDBasicType_ENTITY() { - if (dtdBasicType_ENTITY == null) { - (dtdBasicType_ENTITY = createDTDBasicType()).setKind(DTDBasicTypeKind.ENTITY_LITERAL); - } - return dtdBasicType_ENTITY; - } - - /** - * Gets the dtdBasicType_ENTITIES. - * - * @return Returns a DTDType - */ - public DTDType getDTDBasicType_ENTITIES() { - if (dtdBasicType_ENTITIES == null) { - (dtdBasicType_ENTITIES = createDTDBasicType()).setKind(DTDBasicTypeKind.ENTITIES_LITERAL); - } - return dtdBasicType_ENTITIES; - } - - /** - * Gets the dtdBasicType_NMTOKEN. - * - * @return Returns a DTDType - */ - public DTDType getDTDBasicType_NMTOKEN() { - if (dtdBasicType_NMTOKEN == null) { - (dtdBasicType_NMTOKEN = createDTDBasicType()).setKind(DTDBasicTypeKind.NMTOKEN_LITERAL); - } - return dtdBasicType_NMTOKEN; - } - - /** - * Gets the dtdBasicType_NMTOKENS. - * - * @return Returns a DTDType - */ - public DTDType getDTDBasicType_NMTOKENS() { - if (dtdBasicType_NMTOKENS == null) { - (dtdBasicType_NMTOKENS = createDTDBasicType()).setKind(DTDBasicTypeKind.NMTOKENS_LITERAL); - } - return dtdBasicType_NMTOKENS; - } - - /** - * Creates and instance of the factory. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - public DTDFactoryImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case DTDPackage.DTD_GROUP_CONTENT : - return createDTDGroupContent(); - case DTDPackage.DTD_ATTRIBUTE : - return createDTDAttribute(); - case DTDPackage.DTD_ELEMENT : - return createDTDElement(); - case DTDPackage.DTD_EMPTY_CONTENT : - return createDTDEmptyContent(); - case DTDPackage.DTD_ANY_CONTENT : - return createDTDAnyContent(); - case DTDPackage.DTD_PC_DATA_CONTENT : - return createDTDPCDataContent(); - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT : - return createDTDElementReferenceContent(); - case DTDPackage.DTD_FILE : - return createDTDFile(); - case DTDPackage.DTD_BASIC_TYPE : - return createDTDBasicType(); - case DTDPackage.DTD_ENUMERATION_TYPE : - return createDTDEnumerationType(); - case DTDPackage.DTD_NOTATION : - return createDTDNotation(); - case DTDPackage.DTD_ENTITY : - return createDTDEntity(); - case DTDPackage.DTD_EXTERNAL_ENTITY : - return createDTDExternalEntity(); - case DTDPackage.DTD_INTERNAL_ENTITY : - return createDTDInternalEntity(); - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE : - return createDTDParameterEntityReference(); - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT : - return createDTDEntityReferenceContent(); - } - return null; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case DTDPackage.DTD_OCCURRENCE_TYPE : - return DTDOccurrenceType.get(initialValue); - case DTDPackage.DTD_DEFAULT_KIND : - return DTDDefaultKind.get(initialValue); - case DTDPackage.DTD_BASIC_TYPE_KIND : - return DTDBasicTypeKind.get(initialValue); - case DTDPackage.DTD_ENUM_GROUP_KIND : - return DTDEnumGroupKind.get(initialValue); - case DTDPackage.DTD_GROUP_KIND : - return DTDGroupKind.get(initialValue); - case DTDPackage.XML_SCHEMA_DEFINED_TYPE : - return XMLSchemaDefinedType.get(initialValue); - } - return null; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case DTDPackage.DTD_OCCURRENCE_TYPE : - return instanceValue == null ? null : instanceValue.toString(); - case DTDPackage.DTD_DEFAULT_KIND : - return instanceValue == null ? null : instanceValue.toString(); - case DTDPackage.DTD_BASIC_TYPE_KIND : - return instanceValue == null ? null : instanceValue.toString(); - case DTDPackage.DTD_ENUM_GROUP_KIND : - return instanceValue == null ? null : instanceValue.toString(); - case DTDPackage.DTD_GROUP_KIND : - return instanceValue == null ? null : instanceValue.toString(); - case DTDPackage.XML_SCHEMA_DEFINED_TYPE : - return instanceValue == null ? null : instanceValue.toString(); - } - return null; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDGroupContent createDTDGroupContent() { - DTDGroupContentImpl dtdGroupContent = new DTDGroupContentImpl(); - return dtdGroupContent; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDAttribute createDTDAttribute() { - DTDAttributeImpl dtdAttribute = new DTDAttributeImpl(); - return dtdAttribute; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDElement createDTDElement() { - DTDElementImpl dtdElement = new DTDElementImpl(); - return dtdElement; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEmptyContent createDTDEmptyContent() { - DTDEmptyContentImpl dtdEmptyContent = new DTDEmptyContentImpl(); - return dtdEmptyContent; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDAnyContent createDTDAnyContent() { - DTDAnyContentImpl dtdAnyContent = new DTDAnyContentImpl(); - return dtdAnyContent; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDPCDataContent createDTDPCDataContent() { - DTDPCDataContentImpl dtdpcDataContent = new DTDPCDataContentImpl(); - return dtdpcDataContent; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDElementReferenceContent createDTDElementReferenceContent() { - DTDElementReferenceContentImpl dtdElementReferenceContent = new DTDElementReferenceContentImpl(); - return dtdElementReferenceContent; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDFile createDTDFile() { - DTDFileImpl dtdFile = new DTDFileImpl(); - return dtdFile; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDBasicType createDTDBasicType() { - DTDBasicTypeImpl dtdBasicType = new DTDBasicTypeImpl(); - return dtdBasicType; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEnumerationType createDTDEnumerationType() { - DTDEnumerationTypeImpl dtdEnumerationType = new DTDEnumerationTypeImpl(); - return dtdEnumerationType; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDNotation createDTDNotation() { - DTDNotationImpl dtdNotation = new DTDNotationImpl(); - return dtdNotation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEntity createDTDEntity() { - DTDEntityImpl dtdEntity = new DTDEntityImpl(); - return dtdEntity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDExternalEntity createDTDExternalEntity() { - DTDExternalEntityImpl dtdExternalEntity = new DTDExternalEntityImpl(); - return dtdExternalEntity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDInternalEntity createDTDInternalEntity() { - DTDInternalEntityImpl dtdInternalEntity = new DTDInternalEntityImpl(); - return dtdInternalEntity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDParameterEntityReference createDTDParameterEntityReference() { - DTDParameterEntityReferenceImpl dtdParameterEntityReference = new DTDParameterEntityReferenceImpl(); - return dtdParameterEntityReference; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEntityReferenceContent createDTDEntityReferenceContent() { - DTDEntityReferenceContentImpl dtdEntityReferenceContent = new DTDEntityReferenceContentImpl(); - return dtdEntityReferenceContent; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDPackage getDTDPackage() { - return (DTDPackage) getEPackage(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public static DTDPackage getPackage() { - return DTDPackage.eINSTANCE; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFileImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFileImpl.java deleted file mode 100644 index 0c846dc606..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFileImpl.java +++ /dev/null @@ -1,821 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENamedElementImpl; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.wst.dtd.core.internal.emf.DTDContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDPrinter; - - - -/** - * <!-- begin-user-doc --> An implementation of the model object '<em><b>File</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl#getComment <em>Comment</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl#isParseError <em>Parse Error</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl#getDTDContent <em>DTD Content</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl#getDTDEnumerationType <em>DTD Enumeration Type</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class DTDFileImpl extends ENamedElementImpl implements DTDFile, ENamedElement { - - public EList getDTDObject() { - return getDTDContent(); - } - - - public List listDTDElement() { - return getContentListOf(DTDElement.class, null); - } - - - public List listDTDNotation() { - return getContentListOf(DTDNotation.class, null); - } - - public List listDTDEntity() { - return getContentListOf(DTDEntity.class, null); - } - - public List listDTDParameterEntityReference() { - return getContentListOf(DTDParameterEntityReference.class, null); - } - - public List listDTDElementAndDTDParameterEntityReference() { - return getContentListOf(DTDElement.class, DTDParameterEntityReference.class); - } - - private List getContentListOf(Class class1, Class class2) { - List v = new ArrayList(); - Iterator i = getDTDContent().iterator(); - while (i.hasNext()) { - Object obj = i.next(); - if (class1.isInstance(obj)) { - v.add(obj); - } - else if ((class2 != null) && (class2.isInstance(obj))) { - v.add(obj); - } - } - return v; - } - - public DTDElement findElement(String name) { - for (Iterator i = listDTDElement().iterator(); i.hasNext();) { - DTDElement e = (DTDElement) i.next(); - if (e.getName().equals(name)) { - return e; - } - } - return null; - } - - public DTDEntity findEntity(String name) { - for (Iterator i = listDTDEntity().iterator(); i.hasNext();) { - DTDEntity e = (DTDEntity) i.next(); - if (e.getName().equals(name)) { - return e; - } - } - return null; - } - - public DTDNotation findNotation(String name) { - for (Iterator i = listDTDNotation().iterator(); i.hasNext();) { - DTDNotation e = (DTDNotation) i.next(); - if (e.getName().equals(name)) { - return e; - } - } - return null; - } - - public DTDParameterEntityReference findParameterEntityReference(String name) { - for (Iterator i = listDTDParameterEntityReference().iterator(); i.hasNext();) { - DTDParameterEntityReference e = (DTDParameterEntityReference) i.next(); - if (e.getName().equals(name)) { - return e; - } - } - return null; - } - - public String unparse(boolean include) { - DTDPrinter printer = new DTDPrinter(true); - printer.visitDTDFile(this); - return printer.getBuffer().toString(); - } - - - public String getPathname() { - return ""; //$NON-NLS-1$ - } - - - public DTDObject findObject(String relativePath) { - Object[] result = DTDPathnameUtil.parsePathComponent(relativePath); - - - String type = (String) result[0]; - - - if (type == null) - return null; - - - String name = (String) result[1]; - - DTDObject obj = null; - if (type.equals("Elem")) { //$NON-NLS-1$ - obj = findElement(name); - } - else if (type.equals("Ent")) { //$NON-NLS-1$ - obj = findEntity(name); - } - else if (type.equals("PEnt")) { //$NON-NLS-1$ - obj = findParameterEntityReference(name); - } - else if (type.equals("Nota")) { //$NON-NLS-1$ - obj = findNotation(name); - } - else { - return null; - } - - - String restPath = (String) result[3]; - - if ((restPath == null) || (obj == null)) { - return obj; - } - else { - return obj.findObject(restPath); - } - } - - - - /** - * The default value of the '{@link #getComment() <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getComment() - * @generated - * @ordered - */ - protected static final String COMMENT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getComment() <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getComment() - * @generated - * @ordered - */ - protected String comment = COMMENT_EDEFAULT; - - /** - * The default value of the '{@link #isParseError() <em>Parse Error</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #isParseError() - * @generated - * @ordered - */ - protected static final boolean PARSE_ERROR_EDEFAULT = false; - - /** - * The cached value of the '{@link #isParseError() <em>Parse Error</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #isParseError() - * @generated - * @ordered - */ - protected boolean parseError = PARSE_ERROR_EDEFAULT; - - /** - * The cached value of the '{@link #getDTDContent() <em>DTD Content</em>}' - * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @see #getDTDContent() - * @generated - * @ordered - */ - protected EList dtdContent = null; - - /** - * The cached value of the '{@link #getDTDEnumerationType() <em>DTD Enumeration Type</em>}' - * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @see #getDTDEnumerationType() - * @generated - * @ordered - */ - protected EList dtdEnumerationType = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected DTDFileImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDFile(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String getComment() { - return comment; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setComment(String newComment) { - String oldComment = comment; - comment = newComment; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_FILE__COMMENT, oldComment, comment)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean isParseError() { - return parseError; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setParseError(boolean newParseError) { - boolean oldParseError = parseError; - parseError = newParseError; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_FILE__PARSE_ERROR, oldParseError, parseError)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EList getDTDContent() { - if (dtdContent == null) { - dtdContent = new EObjectContainmentWithInverseEList(DTDContent.class, this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDPackage.DTD_CONTENT__DTD_FILE); - } - return dtdContent; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EList getDTDEnumerationType() { - if (dtdEnumerationType == null) { - dtdEnumerationType = new EObjectContainmentWithInverseEList(DTDEnumerationType.class, this, DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE, DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE); - } - return dtdEnumerationType; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_FILE__DTD_CONTENT : - return ((InternalEList) getDTDContent()).basicAdd(otherEnd, msgs); - case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE : - return ((InternalEList) getDTDEnumerationType()).basicAdd(otherEnd, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_FILE__DTD_CONTENT : - return ((InternalEList) getDTDContent()).basicRemove(otherEnd, msgs); - case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE : - return ((InternalEList) getDTDEnumerationType()).basicRemove(otherEnd, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_FILE__COMMENT : - return getComment(); - case DTDPackage.DTD_FILE__PARSE_ERROR : - return isParseError() ? Boolean.TRUE : Boolean.FALSE; - case DTDPackage.DTD_FILE__DTD_CONTENT : - return getDTDContent(); - case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE : - return getDTDEnumerationType(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_FILE__COMMENT : - setComment((String) newValue); - return; - case DTDPackage.DTD_FILE__PARSE_ERROR : - setParseError(((Boolean) newValue).booleanValue()); - return; - case DTDPackage.DTD_FILE__DTD_CONTENT : - getDTDContent().clear(); - getDTDContent().addAll((Collection) newValue); - return; - case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE : - getDTDEnumerationType().clear(); - getDTDEnumerationType().addAll((Collection) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_FILE__COMMENT : - setComment(COMMENT_EDEFAULT); - return; - case DTDPackage.DTD_FILE__PARSE_ERROR : - setParseError(PARSE_ERROR_EDEFAULT); - return; - case DTDPackage.DTD_FILE__DTD_CONTENT : - getDTDContent().clear(); - return; - case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE : - getDTDEnumerationType().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_FILE__COMMENT : - return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment); - case DTDPackage.DTD_FILE__PARSE_ERROR : - return parseError != PARSE_ERROR_EDEFAULT; - case DTDPackage.DTD_FILE__DTD_CONTENT : - return dtdContent != null && !getDTDContent().isEmpty(); - case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE : - return dtdEnumerationType != null && !getDTDEnumerationType().isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (comment: "); //$NON-NLS-1$ - result.append(comment); - result.append(", parseError: "); //$NON-NLS-1$ - result.append(parseError); - result.append(')'); - return result.toString(); - } - -} // DTDFileImpl - -// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ -// - -// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ -// //public class DTDFileImpl extends ENamespaceImpl implements DTDFile, -// ENamespace{ -// -------------------GENERICRULES.JSED------------------- - -// public static final String copyright = "(c) Copyright IBM Corporation -// 2002."; -// -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected String comment = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected Boolean parseError = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected EList dtdContent = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected EList dtdEnumerationType = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected boolean setComment = false; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected boolean setParseError = false; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EObject initInstance() { -// setEMetaObj(eClassDTDFile()); -// initInstanceDelegates(); -// return this; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public DTDPackage ePackageDTD() { -// return -// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EClass eClassDTDFile() { -// return -// ((DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI)).getDTDFile(); -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public String getComment() { -// if (this.setComment) return this.comment; -// else return -// (String)DTDPackage.eINSTANCE.getDTDFile_Comment().getDefaultValue(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setComment(String value) { -// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDFile_Comment(),this.comment,value); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetComment() { -// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDFile_Comment())); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetComment() { -// return setComment; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public Boolean getParseError() { -// if (this.setParseError) return this.parseError; -// else return -// (Boolean)DTDPackage.eINSTANCE.getDTDFile_ParseError().getDefaultValue(); -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public boolean isParseError() { -// Boolean result = getParseError(); -// return result != null ? result.booleanValue() : false; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setParseError(Boolean value) { -// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDFile_ParseError(),this.parseError,value); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setParseError(boolean value) { -// setParseError(value?Boolean.TRUE:Boolean.FALSE); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetParseError() { -// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDFile_ParseError())); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetParseError() { -// return setParseError; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public EList getDTDContent() { -// if (this.dtdContent==null) { -// this.dtdContent=newCollection(this,DTDPackage.eINSTANCE.getDTDFile_DTDContent(), -// true); -// } -// return this.dtdContent; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public EList getDTDEnumerationType() { -// if (this.dtdEnumerationType==null) { -// this.dtdEnumerationType=newCollection(this,DTDPackage.eINSTANCE.getDTDFile_DTDEnumerationType(), -// true); -// } -// return this.dtdEnumerationType; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Object eGet(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eGet(feature); -// } -// switch (eClassDTDFile().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_FILE__COMMENT: return getComment(); -// case DTDPackage.DTD_FILE__PARSE_ERROR: return getParseError(); -// case DTDPackage.DTD_FILE__DTD_CONTENT: return getDTDContent(); -// case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE: return -// getDTDEnumerationType(); -// -// } -// return super.eGet(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Object refBasicValue(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.refBasicValue(feature); -// } -// switch (eClassDTDFile().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_FILE__COMMENT: -// return this.setComment? this.comment : null; -// case DTDPackage.DTD_FILE__PARSE_ERROR: -// return this.setParseError? this.parseError : null; -// case DTDPackage.DTD_FILE__DTD_CONTENT: -// return this.dtdContent; -// case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE: -// return this.dtdEnumerationType; -// -// } -// return super.refBasicValue(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean eIsSet(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eIsSet(feature); -// } -// switch (eClassDTDFile().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_FILE__COMMENT: return isSetComment(); -// case DTDPackage.DTD_FILE__PARSE_ERROR: return isSetParseError(); -// -// } -// return super.eIsSet(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void eSet(EStructuralFeature feature, Object newValue) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// super.eSet(feature, newValue); -// } -// switch (eClassDTDFile().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_FILE__COMMENT: { -// setComment((String)newValue); -// return; -// } -// case DTDPackage.DTD_FILE__PARSE_ERROR: { -// setParseError((newValue instanceof -// String)?Boolean.valueOf((String)newValue):(Boolean)newValue); -// return; -// } -// -// } -// super.eSet(feature, newValue); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Notification eBasicSet(EStructuralFeature feature, Object newValue) -// { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eBasicSet(feature, newValue); -// } -// switch (eClassDTDFile().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_FILE__COMMENT: { -// Object oldValue = this.comment; -// this.comment = (String)newValue; -// this.setComment = true; -// return new -// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDFile_Comment(),oldValue,newValue); -// } -// case DTDPackage.DTD_FILE__PARSE_ERROR: { -// Object oldValue = this.parseError; -// this.parseError = (Boolean)newValue; -// this.setParseError = true; -// return new -// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDFile_ParseError(),oldValue,newValue); -// } -// -// } -// return super.eBasicSet(feature, newValue); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void eUnset(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// super.eUnset(feature); -// } -// switch (eClassDTDFile().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_FILE__COMMENT: { -// unsetComment(); -// return; -// } -// case DTDPackage.DTD_FILE__PARSE_ERROR: { -// unsetParseError(); -// return; -// } -// -// } -// super.eUnset(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Notification refBasicUnsetValue(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.refBasicUnsetValue(feature); -// } -// switch (eClassDTDFile().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_FILE__COMMENT: { -// Object oldValue = this.comment; -// this.comment = null; -// this.setComment = false; -// return new -// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDFile_Comment(),oldValue,getComment()); -// } -// case DTDPackage.DTD_FILE__PARSE_ERROR: { -// Object oldValue = this.parseError; -// this.parseError = null; -// this.setParseError = false; -// return new -// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDFile_ParseError(),oldValue,getParseError()); -// } -// -// } -// return super.refBasicUnsetValue(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public String toString() { -// String out="("; //$NON-NLS-2$//$NON-NLS-1$ -// boolean first=true; -// boolean emptyList=true; -// if(isSetComment()) { -// if(!emptyList) out+=", "; //$NON-NLS-2$//$NON-NLS-1$ -// out+="comment: "+this.comment; //$NON-NLS-2$//$NON-NLS-1$ -// first=false; -// emptyList=false; -// } -// if(isSetParseError()) { -// if(!emptyList) out+=", "; //$NON-NLS-2$//$NON-NLS-1$ -// out+="parseError: "+this.parseError; //$NON-NLS-2$//$NON-NLS-1$ -// first=false; -// emptyList=false; -// } -// out+=")"; -// if (!first) return super.toString() + " " +out; //$NON-NLS-2$//$NON-NLS-1$ -// return super.toString(); -// } -// } -// -------------------GENERICRULES.JSED------------------- diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDGroupContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDGroupContentImpl.java deleted file mode 100644 index 44e021e78c..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDGroupContentImpl.java +++ /dev/null @@ -1,292 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDPrinter; - - -/** - * @generated - */ -public class DTDGroupContentImpl extends DTDRepeatableContentImpl implements DTDGroupContent { - /** - * The default value of the '{@link #getGroupKind() <em>Group Kind</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getGroupKind() - * @generated - * @ordered - */ - protected static final DTDGroupKind GROUP_KIND_EDEFAULT = DTDGroupKind.SEQUENCE_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected DTDGroupKind groupKind = GROUP_KIND_EDEFAULT; - /** - * @generated This field/method will be replaced during code generation. - */ - protected EList content = null; - - public DTDGroupContentImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDGroupContent(); - } - - public int getContentPosition(DTDElementContent content) { - EList list = getContent(); - return list.indexOf(content); - } - - public String getContentName() { - return ""; //$NON-NLS-1$ - } - - public String getContentDetail() { - DTDPrinter printer = new DTDPrinter(false); - printer.visitDTDGroupContent(this); - - return printer.getBuffer().toString(); - } - - public String unparseRepeatableContent() { - return ""; //$NON-NLS-1$ - } - - /** - * @generated This field/method will be replaced during code generation - */ - public DTDGroupKind getGroupKind() { - return groupKind; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setGroupKind(DTDGroupKind newGroupKind) { - DTDGroupKind oldGroupKind = groupKind; - groupKind = newGroupKind == null ? GROUP_KIND_EDEFAULT : newGroupKind; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_GROUP_CONTENT__GROUP_KIND, oldGroupKind, groupKind)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getContent() { - if (content == null) { - content = new EObjectContainmentWithInverseEList(DTDElementContent.class, this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDPackage.DTD_ELEMENT_CONTENT__GROUP); - } - return content; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_GROUP_CONTENT__GROUP : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_GROUP_CONTENT__GROUP, msgs); - case DTDPackage.DTD_GROUP_CONTENT__ELEMENT : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_GROUP_CONTENT__ELEMENT, msgs); - case DTDPackage.DTD_GROUP_CONTENT__CONTENT : - return ((InternalEList) getContent()).basicAdd(otherEnd, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_GROUP_CONTENT__GROUP : - return eBasicSetContainer(null, DTDPackage.DTD_GROUP_CONTENT__GROUP, msgs); - case DTDPackage.DTD_GROUP_CONTENT__ELEMENT : - return eBasicSetContainer(null, DTDPackage.DTD_GROUP_CONTENT__ELEMENT, msgs); - case DTDPackage.DTD_GROUP_CONTENT__CONTENT : - return ((InternalEList) getContent()).basicRemove(otherEnd, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_GROUP_CONTENT__GROUP : - return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs); - case DTDPackage.DTD_GROUP_CONTENT__ELEMENT : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_GROUP_CONTENT__GROUP : - return getGroup(); - case DTDPackage.DTD_GROUP_CONTENT__ELEMENT : - return getElement(); - case DTDPackage.DTD_GROUP_CONTENT__OCCURRENCE : - return getOccurrence(); - case DTDPackage.DTD_GROUP_CONTENT__GROUP_KIND : - return getGroupKind(); - case DTDPackage.DTD_GROUP_CONTENT__CONTENT : - return getContent(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_GROUP_CONTENT__GROUP : - return getGroup() != null; - case DTDPackage.DTD_GROUP_CONTENT__ELEMENT : - return getElement() != null; - case DTDPackage.DTD_GROUP_CONTENT__OCCURRENCE : - return occurrence != OCCURRENCE_EDEFAULT; - case DTDPackage.DTD_GROUP_CONTENT__GROUP_KIND : - return groupKind != GROUP_KIND_EDEFAULT; - case DTDPackage.DTD_GROUP_CONTENT__CONTENT : - return content != null && !getContent().isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_GROUP_CONTENT__GROUP : - setGroup((DTDGroupContent) newValue); - return; - case DTDPackage.DTD_GROUP_CONTENT__ELEMENT : - setElement((DTDElement) newValue); - return; - case DTDPackage.DTD_GROUP_CONTENT__OCCURRENCE : - setOccurrence((DTDOccurrenceType) newValue); - return; - case DTDPackage.DTD_GROUP_CONTENT__GROUP_KIND : - setGroupKind((DTDGroupKind) newValue); - return; - case DTDPackage.DTD_GROUP_CONTENT__CONTENT : - getContent().clear(); - getContent().addAll((Collection) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_GROUP_CONTENT__GROUP : - setGroup((DTDGroupContent) null); - return; - case DTDPackage.DTD_GROUP_CONTENT__ELEMENT : - setElement((DTDElement) null); - return; - case DTDPackage.DTD_GROUP_CONTENT__OCCURRENCE : - setOccurrence(OCCURRENCE_EDEFAULT); - return; - case DTDPackage.DTD_GROUP_CONTENT__GROUP_KIND : - setGroupKind(GROUP_KIND_EDEFAULT); - return; - case DTDPackage.DTD_GROUP_CONTENT__CONTENT : - getContent().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (groupKind: "); //$NON-NLS-1$ - result.append(groupKind); - result.append(')'); - return result.toString(); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDIdHelper.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDIdHelper.java deleted file mode 100644 index 4ddeeb03e6..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDIdHelper.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent; - -public class DTDIdHelper { - public DTDIdHelper() { - } - - public String computeContentId(DTDElementContent content) { - String id = ""; //$NON-NLS-1$ - if (content instanceof DTDEmptyContent) { - id = "#EMPTY"; //$NON-NLS-1$ - } - else if (content instanceof DTDPCDataContent) { - id = "#PCDATA"; //$NON-NLS-1$ - } - else if (content instanceof DTDEmptyContent) { - id = "#EMPTY"; //$NON-NLS-1$ - } - else if (content instanceof DTDElementReferenceContent) { - id = "#" + ((DTDElementReferenceContent) content).getReferencedElement().getName(); //$NON-NLS-1$ - } - else if (content instanceof DTDEntityReferenceContent) { - id = "#" + ((DTDEntityReferenceContent) content).getElementReferencedEntity().getName(); //$NON-NLS-1$ - } - else if (content instanceof DTDGroupContent) { - id = computeGroupId((DTDGroupContent) content); - } - return id; - } - - public String computeGroupId(DTDGroupContent grp) { - String groupId = "_"; //$NON-NLS-1$ - return groupId; - } - - /** - * @generated - */ - protected String computeContentIdGen(DTDElementContent content) { - - String id = ""; //$NON-NLS-1$ - if (content instanceof DTDEmptyContent) { - id = "#EMPTY"; //$NON-NLS-1$ - } - else if (content instanceof DTDPCDataContent) { - id = "#PCDATA"; //$NON-NLS-1$ - } - else if (content instanceof DTDEmptyContent) { - id = "#EMPTY"; //$NON-NLS-1$ - } - else if (content instanceof DTDElementReferenceContent) { - id = "#" + ((DTDElementReferenceContent) content).getReferencedElement().getName(); //$NON-NLS-1$ - } - else if (content instanceof DTDEntityReferenceContent) { - id = "#" + ((DTDEntityReferenceContent) content).getElementReferencedEntity().getName(); //$NON-NLS-1$ - } - else if (content instanceof DTDGroupContent) { - id = computeGroupId((DTDGroupContent) content); - } - return id; - } - - /** - * @generated - */ - protected String computeGroupIdGen(DTDGroupContent grp) { - - String groupId = "_"; //$NON-NLS-1$ - return groupId; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDInternalEntityImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDInternalEntityImpl.java deleted file mode 100644 index 1d47e55868..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDInternalEntityImpl.java +++ /dev/null @@ -1,239 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import java.text.CharacterIterator; -import com.ibm.icu.text.StringCharacterIterator; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; - - -/** - * @generated - */ -public class DTDInternalEntityImpl extends DTDEntityContentImpl implements DTDInternalEntity { - /** - * The default value of the '{@link #getValue() <em>Value</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final String VALUE_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String value = VALUE_EDEFAULT; - - public DTDInternalEntityImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDInternalEntity(); - } - - public String unparse() { - StringBuffer sb = new StringBuffer(64); - if (getValue() == null) - sb.append("\"\""); //$NON-NLS-1$ - else { - sb.append("\"").append(replaceDoubleQuotes(getValue())).append("\""); //$NON-NLS-1$ //$NON-NLS-2$ - } - return sb.toString(); - } - - // this method replaces any occurrence of ' " ' with the equivalent value - // of " - private String replaceDoubleQuotes(String input) { - StringBuffer newValue = new StringBuffer(); - - StringCharacterIterator characters = new StringCharacterIterator(input); - - while (characters.current() != CharacterIterator.DONE) { - char current = characters.current(); - - if (current == '"') { - newValue.append("""); //$NON-NLS-1$ - } - else { - newValue.append(current); - } - characters.next(); - } - - return newValue.toString(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getValue() { - return value; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setValue(String newValue) { - String oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_INTERNAL_ENTITY__VALUE, oldValue, value)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY : - return eBasicSetContainer(null, DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ENTITY__CONTENT, DTDEntity.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY : - return getDTDEntity(); - case DTDPackage.DTD_INTERNAL_ENTITY__VALUE : - return getValue(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY : - return getDTDEntity() != null; - case DTDPackage.DTD_INTERNAL_ENTITY__VALUE : - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY : - setDTDEntity((DTDEntity) newValue); - return; - case DTDPackage.DTD_INTERNAL_ENTITY__VALUE : - setValue((String) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY : - setDTDEntity((DTDEntity) null); - return; - case DTDPackage.DTD_INTERNAL_ENTITY__VALUE : - setValue(VALUE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (value: "); //$NON-NLS-1$ - result.append(value); - result.append(')'); - return result.toString(); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDNotationImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDNotationImpl.java deleted file mode 100644 index 47ec928cd8..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDNotationImpl.java +++ /dev/null @@ -1,904 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.wst.dtd.core.internal.emf.DTDContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil; - - -/** - * <!-- begin-user-doc --> An implementation of the model object '<em><b>Notation</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl#getComment <em>Comment</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl#getSystemID <em>System ID</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl#getPublicID <em>Public ID</em>}</li> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl#getEntity <em>Entity</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class DTDNotationImpl extends DTDContentImpl implements DTDNotation, DTDContent { - - public String getPathname() { - return DTDPathnameUtil.makePath(null, "Nota", getName(), -1); //$NON-NLS-1$ - } - - - public DTDObject findObject(String relativePath) { - return null; - } - - - // ugly hack for now since we don't have multiple inheritance. - // Would rather have all this stuff in a base class but these - // classes are inheriting from sometimes different mof classes - DTDLexicalInfo lexInfo = new DTDLexicalInfo(); - - /** - * Get the value of startOffset. - * - * @return value of startOffset. - */ - public int getStartOffset() { - return lexInfo.getStartOffset(); - } - - /** - * Set the value of startOffset. - * - * @param v - * Value to assign to startOffset. - */ - public void setStartOffset(int v) { - lexInfo.setStartOffset(v); - } - - /** - * Get the value of endOffset. - * - * @return value of endOffset. - */ - public int getEndOffset() { - return lexInfo.getEndOffset(); - } - - /** - * Set the value of endOffset. - * - * @param v - * Value to assign to endOffset. - */ - public void setEndOffset(int v) { - lexInfo.setEndOffset(v); - } - - /** - * The default value of the '{@link #getComment() <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getComment() - * @generated - * @ordered - */ - protected static final String COMMENT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getComment() <em>Comment</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getComment() - * @generated - * @ordered - */ - protected String comment = COMMENT_EDEFAULT; - - /** - * The default value of the '{@link #getSystemID() <em>System ID</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getSystemID() - * @generated - * @ordered - */ - protected static final String SYSTEM_ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSystemID() <em>System ID</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getSystemID() - * @generated - * @ordered - */ - protected String systemID = SYSTEM_ID_EDEFAULT; - - /** - * The default value of the '{@link #getPublicID() <em>Public ID</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getPublicID() - * @generated - * @ordered - */ - protected static final String PUBLIC_ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPublicID() <em>Public ID</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getPublicID() - * @generated - * @ordered - */ - protected String publicID = PUBLIC_ID_EDEFAULT; - - /** - * The cached value of the '{@link #getEntity() <em>Entity</em>}' - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getEntity() - * @generated - * @ordered - */ - protected EList entity = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected DTDNotationImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDNotation(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String getComment() { - return comment; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setComment(String newComment) { - String oldComment = comment; - comment = newComment; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_NOTATION__COMMENT, oldComment, comment)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String getSystemID() { - return systemID; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setSystemID(String newSystemID) { - String oldSystemID = systemID; - systemID = newSystemID; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_NOTATION__SYSTEM_ID, oldSystemID, systemID)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String getPublicID() { - return publicID; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setPublicID(String newPublicID) { - String oldPublicID = publicID; - publicID = newPublicID; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_NOTATION__PUBLIC_ID, oldPublicID, publicID)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EList getEntity() { - if (entity == null) { - entity = new EObjectWithInverseResolvingEList(DTDExternalEntity.class, this, DTDPackage.DTD_NOTATION__ENTITY, DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION); - } - return entity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_NOTATION__DTD_FILE : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_NOTATION__DTD_FILE, msgs); - case DTDPackage.DTD_NOTATION__ENTITY : - return ((InternalEList) getEntity()).basicAdd(otherEnd, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_NOTATION__DTD_FILE : - return eBasicSetContainer(null, DTDPackage.DTD_NOTATION__DTD_FILE, msgs); - case DTDPackage.DTD_NOTATION__ENTITY : - return ((InternalEList) getEntity()).basicRemove(otherEnd, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_NOTATION__DTD_FILE : - return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_NOTATION__DTD_FILE : - return getDTDFile(); - case DTDPackage.DTD_NOTATION__COMMENT : - return getComment(); - case DTDPackage.DTD_NOTATION__SYSTEM_ID : - return getSystemID(); - case DTDPackage.DTD_NOTATION__PUBLIC_ID : - return getPublicID(); - case DTDPackage.DTD_NOTATION__ENTITY : - return getEntity(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_NOTATION__DTD_FILE : - setDTDFile((DTDFile) newValue); - return; - case DTDPackage.DTD_NOTATION__COMMENT : - setComment((String) newValue); - return; - case DTDPackage.DTD_NOTATION__SYSTEM_ID : - setSystemID((String) newValue); - return; - case DTDPackage.DTD_NOTATION__PUBLIC_ID : - setPublicID((String) newValue); - return; - case DTDPackage.DTD_NOTATION__ENTITY : - getEntity().clear(); - getEntity().addAll((Collection) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_NOTATION__DTD_FILE : - setDTDFile((DTDFile) null); - return; - case DTDPackage.DTD_NOTATION__COMMENT : - setComment(COMMENT_EDEFAULT); - return; - case DTDPackage.DTD_NOTATION__SYSTEM_ID : - setSystemID(SYSTEM_ID_EDEFAULT); - return; - case DTDPackage.DTD_NOTATION__PUBLIC_ID : - setPublicID(PUBLIC_ID_EDEFAULT); - return; - case DTDPackage.DTD_NOTATION__ENTITY : - getEntity().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_NOTATION__DTD_FILE : - return getDTDFile() != null; - case DTDPackage.DTD_NOTATION__COMMENT : - return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment); - case DTDPackage.DTD_NOTATION__SYSTEM_ID : - return SYSTEM_ID_EDEFAULT == null ? systemID != null : !SYSTEM_ID_EDEFAULT.equals(systemID); - case DTDPackage.DTD_NOTATION__PUBLIC_ID : - return PUBLIC_ID_EDEFAULT == null ? publicID != null : !PUBLIC_ID_EDEFAULT.equals(publicID); - case DTDPackage.DTD_NOTATION__ENTITY : - return entity != null && !getEntity().isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (comment: "); //$NON-NLS-1$ - result.append(comment); - result.append(", systemID: "); //$NON-NLS-1$ - result.append(systemID); - result.append(", publicID: "); //$NON-NLS-1$ - result.append(publicID); - result.append(')'); - return result.toString(); - } - -} // DTDNotationImpl - -// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ -// - -// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ -// //public class DTDNotationImpl extends ENamespaceImpl implements -// DTDNotation, ENamespace, DTDContent{ -// -------------------GENERICRULES.JSED------------------- - -// public static final String copyright = "(c) Copyright IBM Corporation -// 2002."; -// -// public DTDNotationImpl() -// { -// super(); -// } -// public String getPathname() -// { -// return DTDPathnameUtil.makePath(null, "Nota", getName(), -1); -// } -// -// public DTDObject findObject(String relativePath) -// { -// return null; -// } -// -// // ugly hack for now since we don't have multiple inheritance. -// // Would rather have all this stuff in a base class but these -// // classes are inheriting from sometimes different mof classes -// DTDLexicalInfo lexInfo = new DTDLexicalInfo(); -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected String comment = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected String systemID = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected String publicID = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected EList entity = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected boolean setComment = false; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected boolean setSystemID = false; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected boolean setPublicID = false; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// private DTDContentImpl dtdContentDelegate = null; -// /** -// * Get the value of startOffset. -// * @return value of startOffset. -// */ -// public int getStartOffset() -// { -// return lexInfo.getStartOffset(); -// } -// -// /** -// * Set the value of startOffset. -// * @param v Value to assign to startOffset. -// */ -// public void setStartOffset(int v) -// { -// lexInfo.setStartOffset(v); -// } -// -// /** -// * Get the value of endOffset. -// * @return value of endOffset. -// */ -// public int getEndOffset() -// { -// return lexInfo.getEndOffset(); -// } -// -// /** -// * Set the value of endOffset. -// * @param v Value to assign to endOffset. -// */ -// public void setEndOffset(int v) -// { -// lexInfo.setEndOffset(v); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EObject initInstance() { -// setEMetaObj(eClassDTDNotation()); -// initInstanceDelegates(); -// return this; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected void initInstanceDelegates() { -// super.initInstanceDelegates(); -// -// getDtdContentDelegate().refSetDelegateOwner(this); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public DTDPackage ePackageDTD() { -// return -// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EClass eClassDTDNotation() { -// return -// ((DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI)).getDTDNotation(); -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public String getComment() { -// if (this.setComment) return this.comment; -// else return -// (String)DTDPackage.eINSTANCE.getDTDNotation_Comment().getDefaultValue(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setComment(String value) { -// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDNotation_Comment(),this.comment,value); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetComment() { -// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDNotation_Comment())); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetComment() { -// return setComment; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public String getSystemID() { -// if (this.setSystemID) return this.systemID; -// else return -// (String)DTDPackage.eINSTANCE.getDTDNotation_SystemID().getDefaultValue(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setSystemID(String value) { -// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDNotation_SystemID(),this.systemID,value); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetSystemID() { -// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDNotation_SystemID())); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetSystemID() { -// return setSystemID; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public String getPublicID() { -// if (this.setPublicID) return this.publicID; -// else return -// (String)DTDPackage.eINSTANCE.getDTDNotation_PublicID().getDefaultValue(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setPublicID(String value) { -// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDNotation_PublicID(),this.publicID,value); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetPublicID() { -// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDNotation_PublicID())); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetPublicID() { -// return setPublicID; -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public EList getEntity() { -// if (this.entity==null) { -// this.entity=newCollection(this,DTDPackage.eINSTANCE.getDTDNotation_Entity(), -// true); -// } -// return this.entity; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Object eGet(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eGet(feature); -// } -// switch (eClassDTDNotation().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_NOTATION__COMMENT: return getComment(); -// case DTDPackage.DTD_NOTATION__SYSTEM_ID: return getSystemID(); -// case DTDPackage.DTD_NOTATION__PUBLIC_ID: return getPublicID(); -// case DTDPackage.DTD_NOTATION__ENTITY: return getEntity(); -// case DTDPackage.DTD_NOTATION__DTD_FILE: return getDTDFile(); -// -// } -// return super.eGet(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Object refBasicValue(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.refBasicValue(feature); -// } -// switch (eClassDTDNotation().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_NOTATION__COMMENT: -// return this.setComment? this.comment : null; -// case DTDPackage.DTD_NOTATION__SYSTEM_ID: -// return this.setSystemID? this.systemID : null; -// case DTDPackage.DTD_NOTATION__PUBLIC_ID: -// return this.setPublicID? this.publicID : null; -// case DTDPackage.DTD_NOTATION__ENTITY: -// return this.entity; -// case DTDPackage.DTD_NOTATION__DTD_FILE: return -// ((InternalEObject)getDtdContentDelegate()).refBasicValue(feature); -// -// } -// return super.refBasicValue(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean eIsSet(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eIsSet(feature); -// } -// switch (eClassDTDNotation().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_NOTATION__COMMENT: return isSetComment(); -// case DTDPackage.DTD_NOTATION__SYSTEM_ID: return isSetSystemID(); -// case DTDPackage.DTD_NOTATION__PUBLIC_ID: return isSetPublicID(); -// case DTDPackage.DTD_NOTATION__DTD_FILE: return isSetDTDFile(); -// -// } -// return super.eIsSet(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void eSet(EStructuralFeature feature, Object newValue) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// super.eSet(feature, newValue); -// } -// switch (eClassDTDNotation().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_NOTATION__COMMENT: { -// setComment((String)newValue); -// return; -// } -// case DTDPackage.DTD_NOTATION__SYSTEM_ID: { -// setSystemID((String)newValue); -// return; -// } -// case DTDPackage.DTD_NOTATION__PUBLIC_ID: { -// setPublicID((String)newValue); -// return; -// } -// case DTDPackage.DTD_NOTATION__DTD_FILE: { -// setDTDFile((DTDFile)newValue); -// return; -// } -// -// } -// super.eSet(feature, newValue); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Notification eBasicSet(EStructuralFeature feature, Object newValue) -// { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eBasicSet(feature, newValue); -// } -// switch (eClassDTDNotation().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_NOTATION__COMMENT: { -// Object oldValue = this.comment; -// this.comment = (String)newValue; -// this.setComment = true; -// return new -// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_Comment(),oldValue,newValue); -// } -// case DTDPackage.DTD_NOTATION__SYSTEM_ID: { -// Object oldValue = this.systemID; -// this.systemID = (String)newValue; -// this.setSystemID = true; -// return new -// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_SystemID(),oldValue,newValue); -// } -// case DTDPackage.DTD_NOTATION__PUBLIC_ID: { -// Object oldValue = this.publicID; -// this.publicID = (String)newValue; -// this.setPublicID = true; -// return new -// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_PublicID(),oldValue,newValue); -// } -// -// } -// return super.eBasicSet(feature, newValue); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void eUnset(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// super.eUnset(feature); -// } -// switch (eClassDTDNotation().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_NOTATION__COMMENT: { -// unsetComment(); -// return; -// } -// case DTDPackage.DTD_NOTATION__SYSTEM_ID: { -// unsetSystemID(); -// return; -// } -// case DTDPackage.DTD_NOTATION__PUBLIC_ID: { -// unsetPublicID(); -// return; -// } -// case DTDPackage.DTD_NOTATION__DTD_FILE: { -// unsetDTDFile(); -// return; -// } -// -// } -// super.eUnset(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Notification refBasicUnsetValue(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.refBasicUnsetValue(feature); -// } -// switch (eClassDTDNotation().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_NOTATION__COMMENT: { -// Object oldValue = this.comment; -// this.comment = null; -// this.setComment = false; -// return new -// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_Comment(),oldValue,getComment()); -// } -// case DTDPackage.DTD_NOTATION__SYSTEM_ID: { -// Object oldValue = this.systemID; -// this.systemID = null; -// this.setSystemID = false; -// return new -// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_SystemID(),oldValue,getSystemID()); -// } -// case DTDPackage.DTD_NOTATION__PUBLIC_ID: { -// Object oldValue = this.publicID; -// this.publicID = null; -// this.setPublicID = false; -// return new -// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_PublicID(),oldValue,getPublicID()); -// } -// -// } -// return super.refBasicUnsetValue(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected DTDContentImpl getDtdContentDelegate() { -// if (dtdContentDelegate == null) { -// DTDPackage pkg = -// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI); -// dtdContentDelegate=(DTDContentImpl)pkg.eCreateInstance(pkg.DTD_CONTENT); -// dtdContentDelegate.initInstance(); -// } -// return dtdContentDelegate; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EClass eClassDTDContent() { -// return getDtdContentDelegate().eClass(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public DTDFile getDTDFile() { -// return getDtdContentDelegate().getDTDFile(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setDTDFile(DTDFile value) { -// getDtdContentDelegate().setDTDFile(value); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetDTDFile() { -// getDtdContentDelegate().unsetDTDFile(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetDTDFile() { -// return getDtdContentDelegate().isSetDTDFile(); -// } -// } -// -------------------GENERICRULES.JSED------------------- - diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPCDataContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPCDataContentImpl.java deleted file mode 100644 index e8c00f0cb5..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPCDataContentImpl.java +++ /dev/null @@ -1,171 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; - -/** - * @generated - */ -public class DTDPCDataContentImpl extends DTDElementContentImpl implements DTDPCDataContent { - - public DTDPCDataContentImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDPCDataContent(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_PC_DATA_CONTENT__GROUP : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_PC_DATA_CONTENT__GROUP, msgs); - case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_PC_DATA_CONTENT__GROUP : - return eBasicSetContainer(null, DTDPackage.DTD_PC_DATA_CONTENT__GROUP, msgs); - case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT : - return eBasicSetContainer(null, DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_PC_DATA_CONTENT__GROUP : - return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs); - case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_PC_DATA_CONTENT__GROUP : - return getGroup(); - case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT : - return getElement(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_PC_DATA_CONTENT__GROUP : - setGroup((DTDGroupContent) newValue); - return; - case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT : - setElement((DTDElement) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_PC_DATA_CONTENT__GROUP : - setGroup((DTDGroupContent) null); - return; - case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT : - setElement((DTDElement) null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_PC_DATA_CONTENT__GROUP : - return getGroup() != null; - case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT : - return getElement() != null; - } - return eDynamicIsSet(eFeature); - } - - public String getContentName() { - return "#PCDATA"; //$NON-NLS-1$ - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPackageImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPackageImpl.java deleted file mode 100644 index 5ab1d2b0fa..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPackageImpl.java +++ /dev/null @@ -1,1215 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.emf.ecore.impl.EcorePackageImpl; -import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType; -import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDFactory; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType; -import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent; -import org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType; - - -/** - * @lastgen class DTDPackageImpl extends EPackageImpl implements DTDPackage, - * EPackage {} - */ -public class DTDPackageImpl extends EPackageImpl implements DTDPackage { - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdElementContentEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdGroupContentEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdAttributeEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdElementEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdEmptyContentEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdAnyContentEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdpcDataContentEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdElementReferenceContentEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdRepeatableContentEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdFileEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdBasicTypeEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdEnumerationTypeEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdNotationEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdEntityEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdEntityContentEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdExternalEntityEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdInternalEntityEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdParameterEntityReferenceEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdEntityReferenceContentEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EClass dtdContentEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EEnum dtdOccurrenceTypeEEnum = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EEnum dtdDefaultKindEEnum = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EEnum dtdBasicTypeKindEEnum = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EEnum dtdEnumGroupKindEEnum = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EEnum dtdGroupKindEEnum = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private EEnum xmlSchemaDefinedTypeEEnum = null; - - /** - * Creates an instance of the model <b>Package</b>, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by - * the package package URI value. - * <p> - * Note: the correct way to create the package is via the static factory - * method {@link #init init()}, which also performs initialization of the - * package, or returns the registered package, if one already exists. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#eNS_URI - * @see #init() - * @generated - */ - private DTDPackageImpl() { - super(eNS_URI, DTDFactory.eINSTANCE); - } - - // public DTDPackageImpl() - // { - // super(eNS_URI); - // initializePackage(null); - // } - - - /** - * Creates, registers, and initializes the <b>Package</b> for this model, - * and for any others upon which it depends. Simple dependencies are - * satisfied by calling this method on all dependent packages before doing - * anything else. This method drives initialization for interdependent - * packages directly, in parallel with this package, itself. - * <p> - * Of this package and its interdependencies, all packages which have not - * yet been registered by their URI values are first created and - * registered. The packages are then initialized in two steps: meta-model - * objects for all of the packages are created before any are initialized, - * since one package's meta-model objects may refer to those of another. - * <p> - * Invocation of this method will not affect any packages that have - * already been initialized. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static DTDPackage init() { - // Obtain or create and register package and interdependencies - DTDPackageImpl theDTDPackage = (DTDPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DTDPackageImpl()); - EcorePackageImpl theEcorePackage = (EcorePackageImpl) (EPackage.Registry.INSTANCE.get(EcorePackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.get(EcorePackage.eNS_URI) : EcorePackage.eINSTANCE); - - // Step 1: create meta-model objects - theDTDPackage.createPackageContents(); - theEcorePackage.createPackageContents(); - - // Step 2: complete initialization - theDTDPackage.initializePackageContents(); - theEcorePackage.initializePackageContents(); - - return theDTDPackage; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDElementContent() { - return dtdElementContentEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDElementContent_Group() { - return (EReference) dtdElementContentEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDElementContent_Element() { - return (EReference) dtdElementContentEClass.getEReferences().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDGroupContent() { - return dtdGroupContentEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDGroupContent_GroupKind() { - return (EAttribute) dtdGroupContentEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDGroupContent_Content() { - return (EReference) dtdGroupContentEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDAttribute() { - return dtdAttributeEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDAttribute_Comment() { - return (EAttribute) dtdAttributeEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDAttribute_DefaultKind() { - return (EAttribute) dtdAttributeEClass.getEAttributes().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDAttribute_DefaultValueString() { - return (EAttribute) dtdAttributeEClass.getEAttributes().get(2); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDAttribute_AttributeNameReferencedEntity() { - return (EReference) dtdAttributeEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDAttribute_AttributeTypeReferencedEntity() { - return (EReference) dtdAttributeEClass.getEReferences().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDAttribute_DTDElement() { - return (EReference) dtdAttributeEClass.getEReferences().get(2); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDElement() { - return dtdElementEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDElement_Comment() { - return (EAttribute) dtdElementEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDElement_Content() { - return (EReference) dtdElementEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDElement_DTDAttribute() { - return (EReference) dtdElementEClass.getEReferences().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDEmptyContent() { - return dtdEmptyContentEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDAnyContent() { - return dtdAnyContentEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDPCDataContent() { - return dtdpcDataContentEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDElementReferenceContent() { - return dtdElementReferenceContentEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDElementReferenceContent_ReferencedElement() { - return (EReference) dtdElementReferenceContentEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDRepeatableContent() { - return dtdRepeatableContentEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDRepeatableContent_Occurrence() { - return (EAttribute) dtdRepeatableContentEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDFile() { - return dtdFileEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDFile_Comment() { - return (EAttribute) dtdFileEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDFile_ParseError() { - return (EAttribute) dtdFileEClass.getEAttributes().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDFile_DTDContent() { - return (EReference) dtdFileEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDFile_DTDEnumerationType() { - return (EReference) dtdFileEClass.getEReferences().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDBasicType() { - return dtdBasicTypeEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDBasicType_Kind() { - return (EAttribute) dtdBasicTypeEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDEnumerationType() { - return dtdEnumerationTypeEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDEnumerationType_Kind() { - return (EAttribute) dtdEnumerationTypeEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDEnumerationType_DTDFile() { - return (EReference) dtdEnumerationTypeEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDNotation() { - return dtdNotationEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDNotation_Comment() { - return (EAttribute) dtdNotationEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDNotation_SystemID() { - return (EAttribute) dtdNotationEClass.getEAttributes().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDNotation_PublicID() { - return (EAttribute) dtdNotationEClass.getEAttributes().get(2); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDNotation_Entity() { - return (EReference) dtdNotationEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDEntity() { - return dtdEntityEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDEntity_Comment() { - return (EAttribute) dtdEntityEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDEntity_ParameterEntity() { - return (EAttribute) dtdEntityEClass.getEAttributes().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDEntity_Content() { - return (EReference) dtdEntityEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDEntity_ParmEntityRef() { - return (EReference) dtdEntityEClass.getEReferences().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDEntity_EntityReference() { - return (EReference) dtdEntityEClass.getEReferences().get(2); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDEntity_AttributeNameReference() { - return (EReference) dtdEntityEClass.getEReferences().get(3); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDEntity_AttributeTypeReference() { - return (EReference) dtdEntityEClass.getEReferences().get(4); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDEntityContent() { - return dtdEntityContentEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDEntityContent_DTDEntity() { - return (EReference) dtdEntityContentEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDExternalEntity() { - return dtdExternalEntityEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDExternalEntity_SystemID() { - return (EAttribute) dtdExternalEntityEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDExternalEntity_PublicID() { - return (EAttribute) dtdExternalEntityEClass.getEAttributes().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDExternalEntity_Notation() { - return (EReference) dtdExternalEntityEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDExternalEntity_EntityReferencedFromAnotherFile() { - return (EReference) dtdExternalEntityEClass.getEReferences().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDInternalEntity() { - return dtdInternalEntityEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EAttribute getDTDInternalEntity_Value() { - return (EAttribute) dtdInternalEntityEClass.getEAttributes().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDParameterEntityReference() { - return dtdParameterEntityReferenceEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDParameterEntityReference_Entity() { - return (EReference) dtdParameterEntityReferenceEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDEntityReferenceContent() { - return dtdEntityReferenceContentEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDEntityReferenceContent_ElementReferencedEntity() { - return (EReference) dtdEntityReferenceContentEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EClass getDTDContent() { - return dtdContentEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EReference getDTDContent_DTDFile() { - return (EReference) dtdContentEClass.getEReferences().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EEnum getDTDOccurrenceType() { - return dtdOccurrenceTypeEEnum; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EEnum getDTDDefaultKind() { - return dtdDefaultKindEEnum; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EEnum getDTDBasicTypeKind() { - return dtdBasicTypeKindEEnum; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EEnum getDTDEnumGroupKind() { - return dtdEnumGroupKindEEnum; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EEnum getDTDGroupKind() { - return dtdGroupKindEEnum; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public EEnum getXMLSchemaDefinedType() { - return xmlSchemaDefinedTypeEEnum; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDFactory getDTDFactory() { - return (DTDFactory) getEFactoryInstance(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is guarded - * to have no affect on any invocation but its first. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @generated - */ - public void createPackageContents() { - if (isCreated) - return; - isCreated = true; - - // Create classes and their features - dtdElementContentEClass = createEClass(DTD_ELEMENT_CONTENT); - createEReference(dtdElementContentEClass, DTD_ELEMENT_CONTENT__GROUP); - createEReference(dtdElementContentEClass, DTD_ELEMENT_CONTENT__ELEMENT); - - dtdGroupContentEClass = createEClass(DTD_GROUP_CONTENT); - createEAttribute(dtdGroupContentEClass, DTD_GROUP_CONTENT__GROUP_KIND); - createEReference(dtdGroupContentEClass, DTD_GROUP_CONTENT__CONTENT); - - dtdAttributeEClass = createEClass(DTD_ATTRIBUTE); - createEAttribute(dtdAttributeEClass, DTD_ATTRIBUTE__COMMENT); - createEAttribute(dtdAttributeEClass, DTD_ATTRIBUTE__DEFAULT_KIND); - createEAttribute(dtdAttributeEClass, DTD_ATTRIBUTE__DEFAULT_VALUE_STRING); - createEReference(dtdAttributeEClass, DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY); - createEReference(dtdAttributeEClass, DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY); - createEReference(dtdAttributeEClass, DTD_ATTRIBUTE__DTD_ELEMENT); - - dtdElementEClass = createEClass(DTD_ELEMENT); - createEAttribute(dtdElementEClass, DTD_ELEMENT__COMMENT); - createEReference(dtdElementEClass, DTD_ELEMENT__CONTENT); - createEReference(dtdElementEClass, DTD_ELEMENT__DTD_ATTRIBUTE); - - dtdEmptyContentEClass = createEClass(DTD_EMPTY_CONTENT); - - dtdAnyContentEClass = createEClass(DTD_ANY_CONTENT); - - dtdpcDataContentEClass = createEClass(DTD_PC_DATA_CONTENT); - - dtdElementReferenceContentEClass = createEClass(DTD_ELEMENT_REFERENCE_CONTENT); - createEReference(dtdElementReferenceContentEClass, DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT); - - dtdRepeatableContentEClass = createEClass(DTD_REPEATABLE_CONTENT); - createEAttribute(dtdRepeatableContentEClass, DTD_REPEATABLE_CONTENT__OCCURRENCE); - - dtdFileEClass = createEClass(DTD_FILE); - createEAttribute(dtdFileEClass, DTD_FILE__COMMENT); - createEAttribute(dtdFileEClass, DTD_FILE__PARSE_ERROR); - createEReference(dtdFileEClass, DTD_FILE__DTD_CONTENT); - createEReference(dtdFileEClass, DTD_FILE__DTD_ENUMERATION_TYPE); - - dtdBasicTypeEClass = createEClass(DTD_BASIC_TYPE); - createEAttribute(dtdBasicTypeEClass, DTD_BASIC_TYPE__KIND); - - dtdEnumerationTypeEClass = createEClass(DTD_ENUMERATION_TYPE); - createEAttribute(dtdEnumerationTypeEClass, DTD_ENUMERATION_TYPE__KIND); - createEReference(dtdEnumerationTypeEClass, DTD_ENUMERATION_TYPE__DTD_FILE); - - dtdNotationEClass = createEClass(DTD_NOTATION); - createEAttribute(dtdNotationEClass, DTD_NOTATION__COMMENT); - createEAttribute(dtdNotationEClass, DTD_NOTATION__SYSTEM_ID); - createEAttribute(dtdNotationEClass, DTD_NOTATION__PUBLIC_ID); - createEReference(dtdNotationEClass, DTD_NOTATION__ENTITY); - - dtdEntityEClass = createEClass(DTD_ENTITY); - createEAttribute(dtdEntityEClass, DTD_ENTITY__COMMENT); - createEAttribute(dtdEntityEClass, DTD_ENTITY__PARAMETER_ENTITY); - createEReference(dtdEntityEClass, DTD_ENTITY__CONTENT); - createEReference(dtdEntityEClass, DTD_ENTITY__PARM_ENTITY_REF); - createEReference(dtdEntityEClass, DTD_ENTITY__ENTITY_REFERENCE); - createEReference(dtdEntityEClass, DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE); - createEReference(dtdEntityEClass, DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE); - - dtdEntityContentEClass = createEClass(DTD_ENTITY_CONTENT); - createEReference(dtdEntityContentEClass, DTD_ENTITY_CONTENT__DTD_ENTITY); - - dtdExternalEntityEClass = createEClass(DTD_EXTERNAL_ENTITY); - createEAttribute(dtdExternalEntityEClass, DTD_EXTERNAL_ENTITY__SYSTEM_ID); - createEAttribute(dtdExternalEntityEClass, DTD_EXTERNAL_ENTITY__PUBLIC_ID); - createEReference(dtdExternalEntityEClass, DTD_EXTERNAL_ENTITY__NOTATION); - createEReference(dtdExternalEntityEClass, DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE); - - dtdInternalEntityEClass = createEClass(DTD_INTERNAL_ENTITY); - createEAttribute(dtdInternalEntityEClass, DTD_INTERNAL_ENTITY__VALUE); - - dtdParameterEntityReferenceEClass = createEClass(DTD_PARAMETER_ENTITY_REFERENCE); - createEReference(dtdParameterEntityReferenceEClass, DTD_PARAMETER_ENTITY_REFERENCE__ENTITY); - - dtdEntityReferenceContentEClass = createEClass(DTD_ENTITY_REFERENCE_CONTENT); - createEReference(dtdEntityReferenceContentEClass, DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY); - - dtdContentEClass = createEClass(DTD_CONTENT); - createEReference(dtdContentEClass, DTD_CONTENT__DTD_FILE); - - // Create enums - dtdOccurrenceTypeEEnum = createEEnum(DTD_OCCURRENCE_TYPE); - dtdDefaultKindEEnum = createEEnum(DTD_DEFAULT_KIND); - dtdBasicTypeKindEEnum = createEEnum(DTD_BASIC_TYPE_KIND); - dtdEnumGroupKindEEnum = createEEnum(DTD_ENUM_GROUP_KIND); - dtdGroupKindEEnum = createEEnum(DTD_GROUP_KIND); - xmlSchemaDefinedTypeEEnum = createEEnum(XML_SCHEMA_DEFINED_TYPE); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) - return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - EcorePackageImpl theEcorePackage = (EcorePackageImpl) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - - // Add supertypes to classes - dtdGroupContentEClass.getESuperTypes().add(this.getDTDRepeatableContent()); - dtdAttributeEClass.getESuperTypes().add(theEcorePackage.getEAttribute()); - dtdElementEClass.getESuperTypes().add(theEcorePackage.getEClass()); - dtdElementEClass.getESuperTypes().add(this.getDTDContent()); - dtdEmptyContentEClass.getESuperTypes().add(this.getDTDElementContent()); - dtdAnyContentEClass.getESuperTypes().add(this.getDTDElementContent()); - dtdpcDataContentEClass.getESuperTypes().add(this.getDTDElementContent()); - dtdElementReferenceContentEClass.getESuperTypes().add(this.getDTDRepeatableContent()); - dtdRepeatableContentEClass.getESuperTypes().add(this.getDTDElementContent()); - dtdBasicTypeEClass.getESuperTypes().add(theEcorePackage.getEClass()); - dtdEnumerationTypeEClass.getESuperTypes().add(theEcorePackage.getEEnum()); - dtdNotationEClass.getESuperTypes().add(this.getDTDContent()); - dtdEntityEClass.getESuperTypes().add(this.getDTDContent()); - dtdExternalEntityEClass.getESuperTypes().add(this.getDTDEntityContent()); - dtdInternalEntityEClass.getESuperTypes().add(this.getDTDEntityContent()); - dtdParameterEntityReferenceEClass.getESuperTypes().add(this.getDTDContent()); - dtdEntityReferenceContentEClass.getESuperTypes().add(this.getDTDRepeatableContent()); - - // Initialize classes and features; add operations and parameters - initEClass(dtdElementContentEClass, DTDElementContent.class, "DTDElementContent", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getDTDElementContent_Group(), this.getDTDGroupContent(), this.getDTDGroupContent_Content(), "group", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - initEReference(getDTDElementContent_Element(), this.getDTDElement(), this.getDTDElement_Content(), "element", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdGroupContentEClass, DTDGroupContent.class, "DTDGroupContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDGroupContent_GroupKind(), this.getDTDGroupKind(), "groupKind", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEReference(getDTDGroupContent_Content(), this.getDTDElementContent(), this.getDTDElementContent_Group(), "content", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdAttributeEClass, DTDAttribute.class, "DTDAttribute", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDAttribute_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEAttribute(getDTDAttribute_DefaultKind(), this.getDTDDefaultKind(), "defaultKind", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEAttribute(getDTDAttribute_DefaultValueString(), ecorePackage.getEString(), "defaultValueString", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEReference(getDTDAttribute_AttributeNameReferencedEntity(), this.getDTDEntity(), this.getDTDEntity_AttributeNameReference(), "attributeNameReferencedEntity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - initEReference(getDTDAttribute_AttributeTypeReferencedEntity(), this.getDTDEntity(), this.getDTDEntity_AttributeTypeReference(), "attributeTypeReferencedEntity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - initEReference(getDTDAttribute_DTDElement(), this.getDTDElement(), this.getDTDElement_DTDAttribute(), "DTDElement", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdElementEClass, DTDElement.class, "DTDElement", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDElement_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEReference(getDTDElement_Content(), this.getDTDElementContent(), this.getDTDElementContent_Element(), "content", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - initEReference(getDTDElement_DTDAttribute(), this.getDTDAttribute(), this.getDTDAttribute_DTDElement(), "DTDAttribute", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdEmptyContentEClass, DTDEmptyContent.class, "DTDEmptyContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - - initEClass(dtdAnyContentEClass, DTDAnyContent.class, "DTDAnyContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - - initEClass(dtdpcDataContentEClass, DTDPCDataContent.class, "DTDPCDataContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - - initEClass(dtdElementReferenceContentEClass, DTDElementReferenceContent.class, "DTDElementReferenceContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getDTDElementReferenceContent_ReferencedElement(), this.getDTDElement(), null, "referencedElement", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdRepeatableContentEClass, DTDRepeatableContent.class, "DTDRepeatableContent", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDRepeatableContent_Occurrence(), this.getDTDOccurrenceType(), "occurrence", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - - initEClass(dtdFileEClass, DTDFile.class, "DTDFile", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDFile_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEAttribute(getDTDFile_ParseError(), ecorePackage.getEBoolean(), "parseError", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEReference(getDTDFile_DTDContent(), this.getDTDContent(), this.getDTDContent_DTDFile(), "DTDContent", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - initEReference(getDTDFile_DTDEnumerationType(), this.getDTDEnumerationType(), this.getDTDEnumerationType_DTDFile(), "DTDEnumerationType", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdBasicTypeEClass, DTDBasicType.class, "DTDBasicType", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDBasicType_Kind(), this.getDTDBasicTypeKind(), "kind", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - - initEClass(dtdEnumerationTypeEClass, DTDEnumerationType.class, "DTDEnumerationType", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDEnumerationType_Kind(), this.getDTDEnumGroupKind(), "kind", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEReference(getDTDEnumerationType_DTDFile(), this.getDTDFile(), this.getDTDFile_DTDEnumerationType(), "DTDFile", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdNotationEClass, DTDNotation.class, "DTDNotation", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDNotation_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEAttribute(getDTDNotation_SystemID(), ecorePackage.getEString(), "systemID", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEAttribute(getDTDNotation_PublicID(), ecorePackage.getEString(), "publicID", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEReference(getDTDNotation_Entity(), this.getDTDExternalEntity(), this.getDTDExternalEntity_Notation(), "entity", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdEntityEClass, DTDEntity.class, "DTDEntity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDEntity_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEAttribute(getDTDEntity_ParameterEntity(), ecorePackage.getEBoolean(), "parameterEntity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEReference(getDTDEntity_Content(), this.getDTDEntityContent(), this.getDTDEntityContent_DTDEntity(), "content", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - initEReference(getDTDEntity_ParmEntityRef(), this.getDTDParameterEntityReference(), this.getDTDParameterEntityReference_Entity(), "parmEntityRef", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - initEReference(getDTDEntity_EntityReference(), this.getDTDEntityReferenceContent(), this.getDTDEntityReferenceContent_ElementReferencedEntity(), "entityReference", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - initEReference(getDTDEntity_AttributeNameReference(), this.getDTDAttribute(), this.getDTDAttribute_AttributeNameReferencedEntity(), "attributeNameReference", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - initEReference(getDTDEntity_AttributeTypeReference(), this.getDTDAttribute(), this.getDTDAttribute_AttributeTypeReferencedEntity(), "attributeTypeReference", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdEntityContentEClass, DTDEntityContent.class, "DTDEntityContent", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getDTDEntityContent_DTDEntity(), this.getDTDEntity(), this.getDTDEntity_Content(), "DTDEntity", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdExternalEntityEClass, DTDExternalEntity.class, "DTDExternalEntity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDExternalEntity_SystemID(), ecorePackage.getEString(), "systemID", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEAttribute(getDTDExternalEntity_PublicID(), ecorePackage.getEString(), "publicID", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - initEReference(getDTDExternalEntity_Notation(), this.getDTDNotation(), this.getDTDNotation_Entity(), "notation", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - initEReference(getDTDExternalEntity_EntityReferencedFromAnotherFile(), this.getDTDFile(), null, "entityReferencedFromAnotherFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdInternalEntityEClass, DTDInternalEntity.class, "DTDInternalEntity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEAttribute(getDTDInternalEntity_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$ - - initEClass(dtdParameterEntityReferenceEClass, DTDParameterEntityReference.class, "DTDParameterEntityReference", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getDTDParameterEntityReference_Entity(), this.getDTDEntity(), this.getDTDEntity_ParmEntityRef(), "entity", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdEntityReferenceContentEClass, DTDEntityReferenceContent.class, "DTDEntityReferenceContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getDTDEntityReferenceContent_ElementReferencedEntity(), this.getDTDEntity(), this.getDTDEntity_EntityReference(), "elementReferencedEntity", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - initEClass(dtdContentEClass, DTDContent.class, "DTDContent", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$ - initEReference(getDTDContent_DTDFile(), this.getDTDFile(), this.getDTDFile_DTDContent(), "DTDFile", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$ - - // Initialize enums and add enum literals - initEEnum(dtdOccurrenceTypeEEnum, DTDOccurrenceType.class, "DTDOccurrenceType"); //$NON-NLS-1$ - addEEnumLiteral(dtdOccurrenceTypeEEnum, DTDOccurrenceType.ONE_LITERAL); - addEEnumLiteral(dtdOccurrenceTypeEEnum, DTDOccurrenceType.OPTIONAL_LITERAL); - addEEnumLiteral(dtdOccurrenceTypeEEnum, DTDOccurrenceType.ONE_OR_MORE_LITERAL); - addEEnumLiteral(dtdOccurrenceTypeEEnum, DTDOccurrenceType.ZERO_OR_MORE_LITERAL); - - initEEnum(dtdDefaultKindEEnum, DTDDefaultKind.class, "DTDDefaultKind"); //$NON-NLS-1$ - addEEnumLiteral(dtdDefaultKindEEnum, DTDDefaultKind.IMPLIED_LITERAL); - addEEnumLiteral(dtdDefaultKindEEnum, DTDDefaultKind.REQUIRED_LITERAL); - addEEnumLiteral(dtdDefaultKindEEnum, DTDDefaultKind.FIXED_LITERAL); - addEEnumLiteral(dtdDefaultKindEEnum, DTDDefaultKind.NOFIXED_LITERAL); - - initEEnum(dtdBasicTypeKindEEnum, DTDBasicTypeKind.class, "DTDBasicTypeKind"); //$NON-NLS-1$ - addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.NONE_LITERAL); - addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.CDATA_LITERAL); - addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.ID_LITERAL); - addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.IDREF_LITERAL); - addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.IDREFS_LITERAL); - addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.ENTITY_LITERAL); - addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.ENTITIES_LITERAL); - addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.NMTOKEN_LITERAL); - addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.NMTOKENS_LITERAL); - - initEEnum(dtdEnumGroupKindEEnum, DTDEnumGroupKind.class, "DTDEnumGroupKind"); //$NON-NLS-1$ - addEEnumLiteral(dtdEnumGroupKindEEnum, DTDEnumGroupKind.NAME_TOKEN_GROUP_LITERAL); - addEEnumLiteral(dtdEnumGroupKindEEnum, DTDEnumGroupKind.NOTATION_GROUP_LITERAL); - - initEEnum(dtdGroupKindEEnum, DTDGroupKind.class, "DTDGroupKind"); //$NON-NLS-1$ - addEEnumLiteral(dtdGroupKindEEnum, DTDGroupKind.SEQUENCE_LITERAL); - addEEnumLiteral(dtdGroupKindEEnum, DTDGroupKind.CHOICE_LITERAL); - - initEEnum(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.class, "XMLSchemaDefinedType"); //$NON-NLS-1$ - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.NONE_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.STRING_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.BOOLEAN_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.FLOAT_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.DOUBLE_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.DECIMAL_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.TIMEINSTANT_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.TIMEDURATION_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.RECURRINGINSTANT_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.BINARY_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.URI_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.INTEGER_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.DATE_LITERAL); - addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.TIME_LITERAL); - - // Create resource - createResource(eNS_URI); - } - - -} // DTDPackageImpl diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDParameterEntityReferenceImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDParameterEntityReferenceImpl.java deleted file mode 100644 index e1e26bee57..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDParameterEntityReferenceImpl.java +++ /dev/null @@ -1,610 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.impl.NotificationChainImpl; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.wst.dtd.core.internal.emf.DTDContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil; - - - -/** - * <!-- begin-user-doc --> An implementation of the model object '<em><b>Parameter Entity Reference</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDParameterEntityReferenceImpl#getEntity <em>Entity</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class DTDParameterEntityReferenceImpl extends DTDContentImpl implements DTDParameterEntityReference, ENamedElement, DTDContent { - - public String getName() { - DTDEntity entity = getEntity(); - if (entity != null) { - return getEntity().getName(); - } // end of if () - return ""; //$NON-NLS-1$ - } - - public String getPathname() { - return DTDPathnameUtil.makePath(null, "PEnt", getName(), -1); //$NON-NLS-1$ - } - - public DTDObject findObject(String relativePath) { - return null; - } - - // ugly hack for now since we don't have multiple inheritance. - // Would rather have all this stuff in a base class but these - // classes are inheriting from sometimes different mof classes - DTDLexicalInfo lexInfo = new DTDLexicalInfo(); - - /** - * Get the value of startOffset. - * - * @return value of startOffset. - */ - public int getStartOffset() { - return lexInfo.getStartOffset(); - } - - /** - * Set the value of startOffset. - * - * @param v - * Value to assign to startOffset. - */ - public void setStartOffset(int v) { - lexInfo.setStartOffset(v); - } - - /** - * Get the value of endOffset. - * - * @return value of endOffset. - */ - public int getEndOffset() { - return lexInfo.getEndOffset(); - } - - /** - * Set the value of endOffset. - * - * @param v - * Value to assign to endOffset. - */ - public void setEndOffset(int v) { - lexInfo.setEndOffset(v); - } - - - /** - * The cached value of the '{@link #getEntity() <em>Entity</em>}' - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getEntity() - * @generated - * @ordered - */ - protected DTDEntity entity = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected DTDParameterEntityReferenceImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDParameterEntityReference(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEntity getEntity() { - if (entity != null && entity.eIsProxy()) { - DTDEntity oldEntity = entity; - entity = (DTDEntity) EcoreUtil.resolve(entity, this); - if (entity != oldEntity) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, oldEntity, entity)); - } - } - return entity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public DTDEntity basicGetEntity() { - return entity; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetEntity(DTDEntity newEntity, NotificationChain msgs) { - DTDEntity oldEntity = entity; - entity = newEntity; - if (eNotificationRequired()) { - if (msgs == null) - msgs = new NotificationChainImpl(4); - msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, oldEntity, newEntity)); - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setEntity(DTDEntity newEntity) { - if (newEntity != entity) { - NotificationChain msgs = null; - if (entity != null) - msgs = ((InternalEObject) entity).eInverseRemove(this, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, DTDEntity.class, msgs); - if (newEntity != null) - msgs = ((InternalEObject) newEntity).eInverseAdd(this, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, DTDEntity.class, msgs); - msgs = basicSetEntity(newEntity, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, newEntity, newEntity)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE, msgs); - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY : - if (entity != null) - msgs = ((InternalEObject) entity).eInverseRemove(this, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, DTDEntity.class, msgs); - return basicSetEntity((DTDEntity) otherEnd, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE : - return eBasicSetContainer(null, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE, msgs); - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY : - return basicSetEntity(null, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE : - return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE : - return getDTDFile(); - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY : - if (resolve) - return getEntity(); - return basicGetEntity(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE : - setDTDFile((DTDFile) newValue); - return; - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY : - setEntity((DTDEntity) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE : - setDTDFile((DTDFile) null); - return; - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY : - setEntity((DTDEntity) null); - return; - } - eDynamicUnset(eFeature); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE : - return getDTDFile() != null; - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY : - return entity != null; - } - return eDynamicIsSet(eFeature); - } - -} // DTDParameterEntityReferenceImpl - -// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ -// //public class DTDParameterEntityReferenceImpl extends ENamespaceImpl -// implements DTDParameterEntityReference, ENamespace, DTDContent{ -// -------------------GENERICRULES.JSED------------------- - -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected DTDEntity entity = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected boolean setEntity = false; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// private DTDContentImpl dtdContentDelegate = null; -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EObject initInstance() { -// setEMetaObj(eClassDTDParameterEntityReference()); -// initInstanceDelegates(); -// return this; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected void initInstanceDelegates() { -// super.initInstanceDelegates(); -// - -// getDtdContentDelegate().refSetDelegateOwner(this); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public DTDPackage ePackageDTD() { -// return -// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EClass eClassDTDParameterEntityReference() { -// return -// ((DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI)).getDTDParameterEntityReference(); -// } -// /** -// * @generated This field/method will be replaced during code generation -// */ -// public DTDEntity getEntity() { -// try { -// if (this.entity == null) return null; -// this.entity = (DTDEntity) ((InternalEObject)this.entity).resolve(this, -// DTDPackage.eINSTANCE.getDTDParameterEntityReference_Entity()); -// if (this.entity==null) this.setEntity = false; -// return this.entity; -// } catch (Exception e) { -// return null; -// } -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setEntity(DTDEntity l) { -// refSetValueForSVReference(DTDPackage.eINSTANCE.getDTDParameterEntityReference_Entity(),this.entity,l); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetEntity() { -// refUnsetValueForSVReference(DTDPackage.eINSTANCE.getDTDParameterEntityReference_Entity(),this.entity); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetEntity() { -// return setEntity; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Object eGet(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eGet(feature); -// } -// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: return getEntity(); -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE: return -// getDTDFile(); -// - -// } -// return super.eGet(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Object refBasicValue(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.refBasicValue(feature); -// } -// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: -// if (!this.setEntity||this.entity==null) return null; -// if (((InternalEObject)this.entity).refIsDeleted()) {this.entity=null; -// this.setEntity=false;} -// return this.entity; -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE: return -// ((InternalEObject)getDtdContentDelegate()).refBasicValue(feature); -// - -// } -// return super.refBasicValue(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean eIsSet(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eIsSet(feature); -// } -// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: return -// isSetEntity(); -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE: return -// isSetDTDFile(); -// - -// } -// return super.eIsSet(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void eSet(EStructuralFeature feature, Object newValue) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// super.eSet(feature, newValue); -// } -// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: { -// setEntity((DTDEntity)newValue); -// return; -// } -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE: { -// setDTDFile((DTDFile)newValue); -// return; -// } -// - -// } -// super.eSet(feature, newValue); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Notification eBasicSet(EStructuralFeature feature, Object newValue) -// { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.eBasicSet(feature, newValue); -// } -// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: { -// Object oldValue = this.entity; -// this.entity = (DTDEntity)newValue; -// this.setEntity = true; -// return new -// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDParameterEntityReference_Entity(),oldValue,newValue); -// } -// - -// } -// return super.eBasicSet(feature, newValue); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void eUnset(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// super.eUnset(feature); -// } -// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: { -// unsetEntity(); -// return; -// } -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE: { -// unsetDTDFile(); -// return; -// } -// - -// } -// super.eUnset(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public Notification refBasicUnsetValue(EStructuralFeature feature) { -// EStructuralFeature eFeature=null; -// try { -// eFeature=(EStructuralFeature)feature; -// } catch (ClassCastException e) { -// return super.refBasicUnsetValue(feature); -// } -// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) { -// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: { -// Object oldValue = this.entity; -// this.entity = null; -// this.setEntity = false; -// return new -// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDParameterEntityReference_Entity(),oldValue,null); -// } -// - -// } -// return super.refBasicUnsetValue(feature); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// protected DTDContentImpl getDtdContentDelegate() { -// if (dtdContentDelegate == null) { -// DTDPackage pkg = -// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI); -// dtdContentDelegate=(DTDContentImpl)pkg.eCreateInstance(pkg.DTD_CONTENT); -// dtdContentDelegate.initInstance(); -// } -// return dtdContentDelegate; -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public EClass eClassDTDContent() { -// return getDtdContentDelegate().eClass(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public DTDFile getDTDFile() { -// return getDtdContentDelegate().getDTDFile(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void setDTDFile(DTDFile value) { -// getDtdContentDelegate().setDTDFile(value); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public void unsetDTDFile() { -// getDtdContentDelegate().unsetDTDFile(); -// } -// /** -// * @generated This field/method will be replaced during code generation. -// */ -// public boolean isSetDTDFile() { -// return getDtdContentDelegate().isSetDTDFile(); -// } -// } -// -------------------GENERICRULES.JSED------------------- diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDRepeatableContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDRepeatableContentImpl.java deleted file mode 100644 index c8f227cbd9..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDRepeatableContentImpl.java +++ /dev/null @@ -1,265 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent; - -/** - * @generated - */ -public abstract class DTDRepeatableContentImpl extends DTDElementContentImpl implements DTDRepeatableContent { - /** - * The default value of the '{@link #getOccurrence() <em>Occurrence</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getOccurrence() - * @generated - * @ordered - */ - protected static final DTDOccurrenceType OCCURRENCE_EDEFAULT = DTDOccurrenceType.ONE_LITERAL; - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected DTDOccurrenceType occurrence = OCCURRENCE_EDEFAULT; - - public DTDRepeatableContentImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected EClass eStaticClass() { - return DTDPackage.eINSTANCE.getDTDRepeatableContent(); - } - - public String unparse() { - StringBuffer sb = new StringBuffer(128); - if (getOccurrence().getValue() != DTDOccurrenceType.ONE) { - if (this instanceof DTDEntityReferenceContent) { - sb.append("(").append(unparseRepeatableContent()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ - } - else { - sb.append(unparseRepeatableContent()); - } - - // MOF2EMF Port - // EEnumLiteral lit = getOccurrence(); - DTDOccurrenceType lit = getOccurrence(); - if (lit != null) { - sb.append((char) lit.getValue()); - } - } - else { - sb.append(unparseRepeatableContent()); - } - - return sb.toString(); - } - - /** - * @generated This field/method will be replaced during code generation - * JUST_ONE= -1 ONE_OR_MORE=43 OPTIONAL=63 ZERO_OR_MORE=42 - */ - public DTDOccurrenceType getOccurrence() { - return occurrence; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public void setOccurrence(DTDOccurrenceType newOccurrence) { - DTDOccurrenceType oldOccurrence = occurrence; - occurrence = newOccurrence == null ? OCCURRENCE_EDEFAULT : newOccurrence; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_REPEATABLE_CONTENT__OCCURRENCE, oldOccurrence, occurrence)); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_REPEATABLE_CONTENT__GROUP, msgs); - case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT : - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eContainer != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) { - case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP : - return eBasicSetContainer(null, DTDPackage.DTD_REPEATABLE_CONTENT__GROUP, msgs); - case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT : - return eBasicSetContainer(null, DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT, msgs); - default : - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { - if (eContainerFeatureID >= 0) { - switch (eContainerFeatureID) { - case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP : - return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs); - case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT : - return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs); - default : - return eDynamicBasicRemoveFromContainer(msgs); - } - } - return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP : - return getGroup(); - case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT : - return getElement(); - case DTDPackage.DTD_REPEATABLE_CONTENT__OCCURRENCE : - return getOccurrence(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP : - return getGroup() != null; - case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT : - return getElement() != null; - case DTDPackage.DTD_REPEATABLE_CONTENT__OCCURRENCE : - return occurrence != OCCURRENCE_EDEFAULT; - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP : - setGroup((DTDGroupContent) newValue); - return; - case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT : - setElement((DTDElement) newValue); - return; - case DTDPackage.DTD_REPEATABLE_CONTENT__OCCURRENCE : - setOccurrence((DTDOccurrenceType) newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { - case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP : - setGroup((DTDGroupContent) null); - return; - case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT : - setElement((DTDElement) null); - return; - case DTDPackage.DTD_REPEATABLE_CONTENT__OCCURRENCE : - setOccurrence(OCCURRENCE_EDEFAULT); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (occurrence: "); //$NON-NLS-1$ - result.append(occurrence); - result.append(')'); - return result.toString(); - } - - /* - * @see DTDRepeatableContent#unparseRepeatableContent() - */ - public String unparseRepeatableContent() { - return null; - } - - /* - * @see DTDElementContent#getContentName() - */ - public String getContentName() { - return null; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDAdapterFactory.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDAdapterFactory.java deleted file mode 100644 index 3dab6b526d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDAdapterFactory.java +++ /dev/null @@ -1,440 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.ETypedElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType; -import org.eclipse.wst.dtd.core.internal.emf.DTDContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType; -import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent; - - - -public class DTDAdapterFactory extends AdapterFactoryImpl { - /** - * @generated This field/method will be replaced during code generation. - */ - - /** - * @generated This field/method will be replaced during code generation. - */ - protected static DTDPackage modelPackage; - - /** - * @generated This field/method will be replaced during code generation. - */ - public DTDAdapterFactory() { - if (modelPackage == null) { - modelPackage = DTDPackage.eINSTANCE; - } - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject) object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the <code>createXXX</code> methods. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected DTDSwitch modelSwitch = new DTDSwitch() { - public Object caseDTDElementContent(DTDElementContent object) { - return createDTDElementContentAdapter(); - } - - public Object caseDTDGroupContent(DTDGroupContent object) { - return createDTDGroupContentAdapter(); - } - - public Object caseDTDAttribute(DTDAttribute object) { - return createDTDAttributeAdapter(); - } - - public Object caseDTDElement(DTDElement object) { - return createDTDElementAdapter(); - } - - public Object caseDTDEmptyContent(DTDEmptyContent object) { - return createDTDEmptyContentAdapter(); - } - - public Object caseDTDAnyContent(DTDAnyContent object) { - return createDTDAnyContentAdapter(); - } - - public Object caseDTDPCDataContent(DTDPCDataContent object) { - return createDTDPCDataContentAdapter(); - } - - public Object caseDTDElementReferenceContent(DTDElementReferenceContent object) { - return createDTDElementReferenceContentAdapter(); - } - - public Object caseDTDRepeatableContent(DTDRepeatableContent object) { - return createDTDRepeatableContentAdapter(); - } - - public Object caseDTDFile(DTDFile object) { - return createDTDFileAdapter(); - } - - public Object caseDTDBasicType(DTDBasicType object) { - return createDTDBasicTypeAdapter(); - } - - public Object caseDTDEnumerationType(DTDEnumerationType object) { - return createDTDEnumerationTypeAdapter(); - } - - public Object caseDTDNotation(DTDNotation object) { - return createDTDNotationAdapter(); - } - - public Object caseDTDEntity(DTDEntity object) { - return createDTDEntityAdapter(); - } - - public Object caseDTDEntityContent(DTDEntityContent object) { - return createDTDEntityContentAdapter(); - } - - public Object caseDTDExternalEntity(DTDExternalEntity object) { - return createDTDExternalEntityAdapter(); - } - - public Object caseDTDInternalEntity(DTDInternalEntity object) { - return createDTDInternalEntityAdapter(); - } - - public Object caseDTDParameterEntityReference(DTDParameterEntityReference object) { - return createDTDParameterEntityReferenceAdapter(); - } - - public Object caseDTDEntityReferenceContent(DTDEntityReferenceContent object) { - return createDTDEntityReferenceContentAdapter(); - } - - public Object caseDTDContent(DTDContent object) { - return createDTDContentAdapter(); - } - - public Object caseEModelElement(EModelElement object) { - return createEModelElementAdapter(); - } - - public Object caseENamedElement(ENamedElement object) { - return createENamedElementAdapter(); - } - - public Object caseETypedElement(ETypedElement object) { - return createETypedElementAdapter(); - } - - public Object caseEStructuralFeature(EStructuralFeature object) { - return createEStructuralFeatureAdapter(); - } - - public Object caseEAttribute(EAttribute object) { - return createEAttributeAdapter(); - } - - public Object caseEClassifier(EClassifier object) { - return createEClassifierAdapter(); - } - - public Object caseEClass(EClass object) { - return createEClassAdapter(); - } - - public Object caseEDataType(EDataType object) { - return createEDataTypeAdapter(); - } - - public Object caseEEnum(EEnum object) { - return createEEnumAdapter(); - } - - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createAdapter(Notifier target) { - return (Adapter) modelSwitch.doSwitch((EObject) target); - } - - - /** - * By default create methods return null so that we can easily ignore - * cases. It's useful to ignore a case when inheritance will catch all the - * cases anyway. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDFileAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDNotationAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDContentAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDEntityAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDEntityContentAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDExternalEntityAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDInternalEntityAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDParameterEntityReferenceAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDEntityReferenceContentAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDRepeatableContentAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDElementReferenceContentAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDElementAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDElementContentAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDEmptyContentAdapter() { - return null; - } - - /** - * By default create methods return null so that we can easily ignore - * cases. It's useful to ignore a case when inheritance will catch all the - * cases anyway. - */ - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDAnyContentAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDPCDataContentAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDGroupContentAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDAttributeAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDEnumerationTypeAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createDTDBasicTypeAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEClassAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEAttributeAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEEnumAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEModelElementAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createENamedElementAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEStructuralFeatureAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEDataTypeAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEObjectAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createETypedElementAdapter() { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Adapter createEClassifierAdapter() { - return null; - } - -} // DTDAdapterFactory diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDMetrics.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDMetrics.java deleted file mode 100644 index 31188de37f..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDMetrics.java +++ /dev/null @@ -1,125 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import java.util.Collection; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.Vector; - -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; - - -public class DTDMetrics { - protected DTDFile dtdFile; - protected Hashtable elementReferenceMap; - - public DTDMetrics(DTDFile dtdFile) { - this.dtdFile = dtdFile; - } - - public Hashtable getElementReferences() { - if (elementReferenceMap == null) { - elementReferenceMap = new Hashtable(); - new DTDVisitor() { - - public void visitDTDElementReferenceContent(DTDElementReferenceContent elementReferenceContent) { - DTDElement dtdElement = elementReferenceContent.getReferencedElement(); - Object visitation = elementReferenceMap.get(dtdElement); - if (visitation == null) { - elementReferenceMap.put(dtdElement, visitation = new Vector()); - } - ((Vector) visitation).addElement(elementReferenceContent); - } - }.visitDTDFile(dtdFile); - } - - return elementReferenceMap; - } - - public int getElementReferenceCount(DTDElement dtdElement) { - Object elementReferences = getElementReferences().get(dtdElement); - return elementReferences == null ? 0 : ((Vector) elementReferences).size(); - } - - public DTDElement getLeastReferencedElement() { - DTDElement result = null; - int lowestReferenceCount = Integer.MAX_VALUE; - - Collection elements = dtdFile.listDTDElement(); - for (Iterator i = elements.iterator(); i.hasNext();) { - DTDElement element = (DTDElement) i.next(); - int count = getElementReferenceCount(element); - if (count < lowestReferenceCount) { - result = element; - lowestReferenceCount = count; - } - } - - return result; - } - - /** - * @generated - */ - protected Hashtable getElementReferencesGen() { - - if (elementReferenceMap == null) { - elementReferenceMap = new Hashtable(); - new DTDVisitor() { - - public void visitDTDElementReferenceContent(DTDElementReferenceContent elementReferenceContent) { - DTDElement dtdElement = elementReferenceContent.getReferencedElement(); - Object visitation = elementReferenceMap.get(dtdElement); - if (visitation == null) { - elementReferenceMap.put(dtdElement, visitation = new Vector()); - } - ((Vector) visitation).addElement(elementReferenceContent); - } - }.visitDTDFile(dtdFile); - } - - return elementReferenceMap; - } - - /** - * @generated - */ - protected int getElementReferenceCountGen(DTDElement dtdElement) { - - Object elementReferences = getElementReferences().get(dtdElement); - return elementReferences == null ? 0 : ((Vector) elementReferences).size(); - } - - /** - * @generated - */ - protected DTDElement getLeastReferencedElementGen() { - - DTDElement result = null; - int lowestReferenceCount = Integer.MAX_VALUE; - - Collection elements = dtdFile.listDTDElement(); - for (Iterator i = elements.iterator(); i.hasNext();) { - DTDElement element = (DTDElement) i.next(); - int count = getElementReferenceCount(element); - if (count < lowestReferenceCount) { - result = element; - lowestReferenceCount = count; - } - } - - return result; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDModelBuilder.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDModelBuilder.java deleted file mode 100644 index e8dd1daa56..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDModelBuilder.java +++ /dev/null @@ -1,1844 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import java.util.Enumeration; -import java.util.Iterator; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EEnumLiteral; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver; -import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin; -import org.eclipse.wst.dtd.core.internal.DTDCoreMessages; -import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType; -import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDFactory; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType; -import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.DTDType; -import org.eclipse.wst.dtd.core.internal.emf.impl.DTDFactoryImpl; -import org.eclipse.wst.dtd.core.internal.saxparser.AttNode; -import org.eclipse.wst.dtd.core.internal.saxparser.Attlist; -import org.eclipse.wst.dtd.core.internal.saxparser.CMBasicNode; -import org.eclipse.wst.dtd.core.internal.saxparser.CMGroupNode; -import org.eclipse.wst.dtd.core.internal.saxparser.CMNode; -import org.eclipse.wst.dtd.core.internal.saxparser.CMNodeType; -import org.eclipse.wst.dtd.core.internal.saxparser.CMReferenceNode; -import org.eclipse.wst.dtd.core.internal.saxparser.CMRepeatableNode; -import org.eclipse.wst.dtd.core.internal.saxparser.DTD; -import org.eclipse.wst.dtd.core.internal.saxparser.DTDSaxArtifactVisitor; -import org.eclipse.wst.dtd.core.internal.saxparser.ElementDecl; -import org.eclipse.wst.dtd.core.internal.saxparser.EntityDecl; -import org.eclipse.wst.dtd.core.internal.saxparser.ErrorMessage; -import org.eclipse.wst.dtd.core.internal.saxparser.NotationDecl; - -public class DTDModelBuilder extends DTDSaxArtifactVisitor { - DTD dtd; - DTDUtil dtdUtil; - DTDFile dtdFile; - ResourceSet resources; - - public DTDModelBuilder(ResourceSet resources, DTDUtil dtdUtil, DTD dtd, DTDFile dtdFile) { - this.resources = resources; - this.dtdUtil = dtdUtil; - this.dtd = dtd; - this.dtdFile = dtdFile; - } - - public DTDFactoryImpl getFactory() { - return (DTDFactoryImpl) dtdUtil.getFactory(); - } - - public DTDFile getDTDFile() { - return dtdFile; - } - - public void visitDTD(DTD dtd) { - super.visitDTD(dtd); - - // - 2nd pass - - // do final processing for Attlists and adding contentModel - addAttlistAndContentModel(dtd, dtdFile); - } - - public void visitElementDecl(ElementDecl element) { - // Element might have been added earlier because it is referenced - String declName = element.getNodeName(); - // System.out.println("process ElementDecl:" + declName ); - DTDElement dtdelement = (DTDElement) dtdUtil.getElementPool().get(declName); - if (dtdelement == null) { - // System.out.println("process ElementDecl - not found - create" - // ); - dtdelement = getFactory().createDTDElement(); - dtdelement.setName(declName); - dtdFile.getDTDObject().add(dtdelement); - dtdUtil.getElementPool().put(declName, dtdelement); - } - - super.visitElementDecl(element); - } - - public void visitNotationDecl(NotationDecl notation) { - // Notation might have been added earlier because it is referenced - // by an entity - DTDNotation dtdnot = dtdFile.findNotation(notation.getNodeName()); - if (dtdnot == null) { - dtdnot = getFactory().createDTDNotation(); - dtdFile.getDTDObject().add(dtdnot); - } - dtdnot.setName(notation.getNodeName()); - - if (notation.getSystemId() != null) - dtdnot.setSystemID(notation.getSystemId()); - if (notation.getPublicId() != null) - dtdnot.setPublicID(notation.getPublicId()); - - if (notation.getComment() != null) - dtdnot.setComment(notation.getComment()); - if (notation.getErrorMessage() != null) { - addErrorMessage(notation.getErrorMessage(), dtdnot); - } - - super.visitNotationDecl(notation); - } - - public void visitParameterEntityReferenceDecl(EntityDecl entity) { - // This is a parameter entity reference. - // Add the link to the real entity that it references - DTDParameterEntityReference parmEntRef = getFactory().createDTDParameterEntityReference(); - dtdFile.getDTDObject().add(parmEntRef); - - String entityName = entity.getNodeName(); - - // Add the reference to the DTDEntity - DTDEntity dtdentity = getDTDFile().findEntity(entityName); - if (dtdentity != null) { - parmEntRef.setEntity(dtdentity); - } - if (entity.getErrorMessage() != null) { - addErrorMessage(entity.getErrorMessage(), dtdentity); - } - // System.out.println("adding PE reference: " + declName); - - super.visitParameterEntityReferenceDecl(entity); - } - - public void visitExternalEntityDecl(EntityDecl entity) { - DTDEntity dtdEntity = createDTDEntity(entity); - // System.out.println("adding entity: " + declName); - DTDExternalEntity extEntity = getFactory().createDTDExternalEntity(); - dtdEntity.setContent(extEntity); - - finishExternalEntity(extEntity, entity); - // System.out.println(" ext entity toMof: " ); - if (dtdEntity.isParameterEntity()) { - - dtdUtil.getPEPool().put("%" + entity.getNodeName() + ";", dtdEntity); //$NON-NLS-1$ //$NON-NLS-2$ - } - - super.visitExternalEntityDecl(entity); - } - - public void visitInternalEntityDecl(EntityDecl entity) { - DTDEntity dtdEntity = createDTDEntity(entity); - - DTDInternalEntity intEntity = getFactory().createDTDInternalEntity(); - dtdEntity.setContent(intEntity); - intEntity.setValue(entity.getValue()); - // System.out.println(" int entity toMof: " ); - if (dtdEntity.isParameterEntity()) { - dtdUtil.getPEPool().put("%" + entity.getNodeName() + ";", dtdEntity); //$NON-NLS-1$ //$NON-NLS-2$ - } - - super.visitInternalEntityDecl(entity); - } - - private void addAttlistAndContentModel(DTD dtd, DTDFile dFile) { - // System.out.println("addAttListAndCotentModel - dtd:" + - // dtd.getName()); - Enumeration en = dtd.externalElements(); - while (en.hasMoreElements()) { - Object e = en.nextElement(); - if (e instanceof ElementDecl) { - DTDElement dtdelement = (DTDElement) dtdUtil.getElementPool().get(((ElementDecl) e).getNodeName()); - if (dtdelement == null) { - dtdelement = getFactory().createDTDElement(); - dtdFile.getDTDObject().add(dtdelement); - } - finishElementDecl(dtdelement, (ElementDecl) e); - } - else if (e instanceof Attlist) { - processAttList((Attlist) e); - } - } - } - - - private void processAttList(Attlist attList) { - DTDElement e = (DTDElement) dtdUtil.getElementPool().get(attList.getNodeName()); - if (e != null) { - // Element has been added. Add the attributes - // System.out.println(" processAttlist - adding Attlist:" + - // attList.getNodeName()); - createAttributes(e, attList); - } - else { - // System.out.println("!!!!!!!!! element is null "); - } - } - - // ///////////////////////////////////////////////////////////// - // - // Methods for finishing the import of a DTDExternalEntity - // - // ///////////////////////////////////////////////////////////// - void finishExternalEntity(DTDExternalEntity extEntity, EntityDecl entityDecl) { - updateSystemID(extEntity, entityDecl); - extEntity.setPublicID(entityDecl.getPublicId()); - - String notationName = entityDecl.getNotationName(); - if (notationName != null) { - DTDNotation dtdNotation = createOrFindNotation(extEntity, notationName, true); - extEntity.setNotation(dtdNotation); - } - } - - public DTDNotation createOrFindNotation(DTDExternalEntity extEntity, String name, boolean create) { - DTDNotation aNotation = extEntity.getDTDEntity().getDTDFile().findNotation(name); - if (aNotation != null) { - return aNotation; - } - - // - // Create a notation for the reference - // - if (create) { - aNotation = getFactory().createDTDNotation(); - dtdFile.getDTDObject().add(aNotation); - aNotation.setName(name); - } - return aNotation; - } - - /** - * The SystemID attribute is set to whatever the user enters e.g. - * com/ibm/b2b/xmimodels/xxx.dtd.xmi - * - * In the unparse() method, parse out the DTD file name from the classpath - * name. e.g. returns xxx.dtd - */ - private void updateSystemID(DTDExternalEntity extEntity, EntityDecl entityDecl) { - String systemId = entityDecl.getSystemId(); - String publicId = entityDecl.getPublicId(); - if (systemId != null) { - URIResolver idResolver = URIResolverPlugin.createResolver(); - String uri = idResolver.resolve(dtd.getName(), publicId, systemId); - ExternalDTDModel ed = dtdUtil.getExternalDTDModel(resources, uri); - if (ed != null) { - DTDFile referenceDtdFile = ed.getExternalDTDFile(); - extEntity.setEntityReferencedFromAnotherFile(referenceDtdFile); - extEntity.setSystemID(systemId); - } - else { - if (entityDecl.getErrorMessage() == null) { - ErrorMessage dtdError = new ErrorMessage(); - dtdError.setErrorMessage(DTDCoreMessages._ERROR_INCL_FILE_LOAD_FAILURE + " '" + systemId + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - addErrorMessage(dtdError, extEntity.getDTDEntity()); - } - - if (systemId != null) { - extEntity.setSystemID(systemId); - } - else { - extEntity.setSystemID(""); //$NON-NLS-1$ - } - } - } // end of if () - else { - // set the system id to be "" - extEntity.setSystemID(""); //$NON-NLS-1$ - } - } - - public DTDEntity createDTDEntity(EntityDecl entity) { - // create and do what we can to fill in some basic things - DTDEntity dtdEntity = getFactory().createDTDEntity(); - dtdFile.getDTDObject().add(dtdEntity); - - dtdEntity.setName(entity.getNodeName()); - dtdEntity.setParameterEntity(entity.isParameter()); - if (entity.getComment() != null) { - dtdEntity.setComment(entity.getComment()); - } - if (entity.getErrorMessage() != null) { - addErrorMessage(entity.getErrorMessage(), dtdEntity); - } - - return dtdEntity; - } - - - // ///////////////////////////////////////////////////////////// - // - // Methods for finishing the import of a DTDElement - // - // ///////////////////////////////////////////////////////////// - public void finishElementDecl(DTDElement dtdElement, ElementDecl ed) { - dtdElement.setName(ed.getNodeName()); - - CMNode cmNode = ed.getContentModelNode(); - - if (ed.getComment() != null) { - dtdElement.setComment(ed.getComment()); - } - if (ed.getErrorMessage() != null) { - addErrorMessage(ed.getErrorMessage(), dtdElement); - } - - if (cmNode instanceof CMBasicNode) { - CMBasicNode bn = (CMBasicNode) cmNode; - switch (bn.getType()) { - case CMNodeType.EMPTY : - DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent(); - dtdElement.setContent(emptyContent); - break; - - case CMNodeType.ANY : - DTDAnyContent anyContent = getFactory().createDTDAnyContent(); - dtdElement.setContent(anyContent); - break; - - case CMNodeType.PCDATA : - DTDPCDataContent pcData = getFactory().createDTDPCDataContent(); - dtdElement.setContent(pcData); - } - - } - else if (cmNode instanceof CMReferenceNode) { - CMReferenceNode rn = (CMReferenceNode) cmNode; - if (rn.getType() == CMNodeType.ENTITY_REFERENCE) { - String entityName = rn.getName().trim(); - - DTDEntity anEntity = (DTDEntity) dtdUtil.getPEPool().get(entityName); - if (anEntity != null) { - // - // Create an DTDEntityReference and set its referenced - // element - // - DTDEntityReferenceContent enRef = getFactory().createDTDEntityReferenceContent(); - enRef.setElementReferencedEntity(anEntity); - - DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(rn)); - enRef.setOccurrence(occurrenceType); - - dtdElement.setContent(enRef); - } - else { // create default content - DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent(); - dtdElement.setContent(emptyContent); - } - } - else { - // - // Find the real element for this element references - // If the real element does not yet exist, create it - // - DTDElement anElement = createOrFindElement(rn.getName(), dtdElement); - - // - // Create an DTDElementReference and set its referenced - // element - // - DTDElementReferenceContent elemRef = getFactory().createDTDElementReferenceContent(); - elemRef.setReferencedElement(anElement); - - DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(rn)); - elemRef.setOccurrence(occurrenceType); - - // setContent to DTDElementReference - dtdElement.setContent(elemRef); - - } - } - else if (cmNode instanceof CMGroupNode) { - CMGroupNode grpNode = (CMGroupNode) cmNode; - DTDGroupContent groupContent = getFactory().createDTDGroupContent(); - DTDGroupKind groupKind = DTDGroupKind.get(computeMofGroupKind(grpNode.getGroupKind())); - groupContent.setGroupKind(groupKind); - DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(grpNode)); - groupContent.setOccurrence(occurrenceType); - - // just use the locator for the element as the closest guess - processGroupContent(groupContent, grpNode); - dtdElement.setContent(groupContent); - } - else if (cmNode == null) { - // bad thing happened here, just create a pcdata - DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent(); - dtdElement.setContent(emptyContent); - } - - - } - - - /** - * Add a new group to the current group - * - * @param parent - - * the parent node for this group element - * @param op1Node - - * the group e.g. (a,b) - * @param op2Node - - * set only if called by processCM1op e.g. (a,b)+ - */ - void processGroupContent(DTDGroupContent parent, CMGroupNode grpNode) { - Enumeration children = grpNode.getChildren().elements(); - DTDFactory factory = getFactory(); - while (children.hasMoreElements()) { - CMNode cnode = (CMNode) children.nextElement(); - - if (cnode instanceof CMGroupNode) { - CMGroupNode gNode = (CMGroupNode) cnode; - DTDGroupContent groupContent = factory.createDTDGroupContent(); - DTDGroupKind groupKind = DTDGroupKind.get(computeMofGroupKind(gNode.getGroupKind())); - groupContent.setGroupKind(groupKind); - DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(gNode)); - groupContent.setOccurrence(occurrenceType); - - parent.getContent().add(groupContent); - processGroupContent(groupContent, gNode); - } - else if (cnode instanceof CMBasicNode) { - CMBasicNode n = (CMBasicNode) cnode; - if (n.getType() == CMNodeType.PCDATA) { - // Create a DTDPCDataContent for a leaf PCData node - // - DTDPCDataContent pcData = factory.createDTDPCDataContent(); - // Add #PCDATA to the Group, i.e Mixed content model - parent.getContent().add(pcData); - } - } - else if (cnode instanceof CMReferenceNode) { - CMReferenceNode rn = (CMReferenceNode) cnode; - if (rn.getType() == CMNodeType.ELEMENT_REFERENCE) { - // System.out.println("CM Element Ref name: " + - // rn.getName()); - // - // Create an DTDElementReference and set its referenced - // element - // - DTDElementReferenceContent elemRef = factory.createDTDElementReferenceContent(); - - // - // Find the real element for this element references - // If the real element does not yet exist, create it - // - DTDElement anElement = createOrFindElement(rn.getName(), elemRef); - - elemRef.setReferencedElement(anElement); - - DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(rn)); - elemRef.setOccurrence(occurrenceType); - - // Add DTDElementReference to the Group - parent.getContent().add(elemRef); - } - else // PE Reference - { - String entityName = rn.getName().trim(); - - // System.out.println("CM PE Ref name: " + entityName); - DTDEntity anEntity = (DTDEntity) dtdUtil.getPEPool().get(entityName); - if (anEntity != null) { - // - // Create an DTDEntityReference and set its referenced - // element - // - DTDEntityReferenceContent enRef = factory.createDTDEntityReferenceContent(); - enRef.setElementReferencedEntity(anEntity); - - DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(rn)); - enRef.setOccurrence(occurrenceType); - - // Add DTDEntityReference to the Group - parent.getContent().add(enRef); - - } - } - } - } - } - - /** - * Find the real element that is referenced by the current element - */ - private DTDElement createOrFindElement(String name, Object obj) { - // DTDElement aElement = getDTDFile().findElement(name); - - DTDElement aElement = (DTDElement) dtdUtil.getElementPool().get(name); - - if (aElement != null) { - return aElement; - } - - String errorMsg = DTDCoreMessages._ERROR_UNDECLARED_ELEMENT_1; //$NON-NLS-1$ - errorMsg += "\"" + name + "\""; //$NON-NLS-1$ //$NON-NLS-2$ - errorMsg += DTDCoreMessages._UI_ERRORPART_UNDECLARED_ELEMENT_2; //$NON-NLS-1$ - - ErrorMessage dtdError = new ErrorMessage(); - - dtdError.setErrorMessage(errorMsg); - addErrorMessage(dtdError, obj); - // System.out.println(errorMsg); - // setDTDErrorMessage(errorMsg); - getDTDFile().setParseError(true); - - // - // Create an empty element for the reference to make it valid - // - - DTDFactory factory = getFactory(); - DTDElement dtdelement = factory.createDTDElement(); - dtdelement.setName(name); - - DTDEmptyContent emptyContent = factory.createDTDEmptyContent(); - dtdelement.setContent(emptyContent); - - getDTDFile().getDTDObject().add(dtdelement); - dtdUtil.getElementPool().put(name, dtdelement); - return dtdelement; - } - - - /** - * Compute the MOF occurrence from the xml4j occurrence - */ - private int computeMofOccurrence(CMRepeatableNode rnode) { - int occurrence = rnode.getOccurrence(); - int mofoccur = DTDOccurrenceType.ONE; - - if (occurrence == CMNodeType.ZERO_OR_MORE) { - mofoccur = DTDOccurrenceType.ZERO_OR_MORE; - } - else if (occurrence == CMNodeType.ONE_OR_MORE) { - mofoccur = DTDOccurrenceType.ONE_OR_MORE; - } - else if (occurrence == CMNodeType.OPTIONAL) { - mofoccur = DTDOccurrenceType.OPTIONAL; - } - return mofoccur; - } - - /** - * Compute the MOF model group from the xml4j model group - */ - private int computeMofGroupKind(int type) { - if (type == CMNodeType.GROUP_CHOICE) { - return DTDGroupKind.CHOICE; - } - else { - return DTDGroupKind.SEQUENCE; - } - } - - - // ///////////////////////////////////////////////////////////// - // - // Methods for creating the attributes of a DTDElement - // - // ///////////////////////////////////////////////////////////// - public void createAttributes(DTDElement element, Attlist attList) { - if (attList.getErrorMessage() != null) { - addErrorMessage(attList.getErrorMessage(), element); - } - - for (int i = 0; i < attList.size(); i++) { - AttNode ad = attList.elementAt(i); - // DTDAttributeElement dtdAtt= - // getDTDAttributeElement(a.getName()); - - // only add the AttDef if it is not added yet - // ignore the dup AttDef as documented in the XML 1.0 specs - // if( dtdAtt==null) - addAttribute(element, ad); - } - - } - - /** - * Create a DTDAttribute from the xml4j attribute - */ - public void addAttribute(DTDElement dtdelement, AttNode ad) { - DTDAttribute dtdattr = getFactory().createDTDAttribute(); - dtdelement.getDTDAttribute().add(dtdattr); - finishAttribute(dtdattr, ad); - } - - // Stuff for populating attribute - public void finishAttribute(DTDAttribute dtdattr, AttNode attdef) { - boolean parseError = false; - - if (attdef.name.startsWith("%")) { //$NON-NLS-1$ - String peName = attdef.name.trim(); - DTDEntity en = (DTDEntity) dtdUtil.getPEPool().get(peName); - if (en != null) { - dtdattr.setAttributeNameReferencedEntity(en); - } - } - - dtdattr.setName(attdef.name); - - int attrType = attdef.getDeclaredType(); - - if (attrType == AttNode.PEREFERENCE && attdef.type != null) { - String peName = attdef.type.trim(); - DTDEntity en = (DTDEntity) dtdUtil.getPEPool().get(peName); - if (en != null) { - dtdattr.setAttributeTypeReferencedEntity(en); - setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA()); // hack, - // so - // we - // can - // get - // back - // the - // default - // value - } - else - // set default type - setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA()); - - } - else { - switch (attrType) { - case AttNode.CDATA : - setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA()); - break; - - case AttNode.ENTITIES : - setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ENTITIES()); - break; - - case AttNode.ENTITY : - setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ENTITY()); - break; - - case AttNode.ID : - // check for duplicate ID attribute - if (hasIDAttribute(dtdattr)) { - String errMsg = DTDCoreMessages._ERROR_DUP_ID_ATTRIBUTE_1; //$NON-NLS-1$ - errMsg += attdef.name + DTDCoreMessages._UI_ERRORPART_DUP_ID_ATTRIBUTE_2; //$NON-NLS-1$ - // dtdattr.getDTDElement().getIElement().setDTDErrorMessage(errMsg); - // dtdattr.getDTDElement().getDTDFile().setParseError(true); - parseError = true; - } - setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ID()); - break; - - case AttNode.IDREF : - setAttrDTDType(dtdattr, getFactory().getDTDBasicType_IDREF()); - break; - - case AttNode.IDREFS : - setAttrDTDType(dtdattr, getFactory().getDTDBasicType_IDREFS()); - break; - - case AttNode.ENUMERATION : - setAttrDTDType(dtdattr, createDTDEnumeration(dtdattr, attdef, DTDEnumGroupKind.NAME_TOKEN_GROUP)); - break; - - case AttNode.NOTATION : - setAttrDTDType(dtdattr, createDTDEnumeration(dtdattr, attdef, DTDEnumGroupKind.NOTATION_GROUP)); - break; - - case AttNode.NMTOKEN : - setAttrDTDType(dtdattr, getFactory().getDTDBasicType_NMTOKEN()); - break; - - case AttNode.NMTOKENS : - setAttrDTDType(dtdattr, getFactory().getDTDBasicType_NMTOKENS()); - break; - - default : - // System.out.println("DTDATTR '" +attdef.name + "'Unknown - // type..." + attrType); - } - } - - int attrDefault = attdef.getDefaultType(); - int defaultKind = DTDDefaultKind.IMPLIED; - switch (attrDefault) { - case AttNode.FIXED : - defaultKind = DTDDefaultKind.FIXED; - break; - - case AttNode.IMPLIED : - defaultKind = DTDDefaultKind.IMPLIED; - break; - - case AttNode.REQUIRED : - defaultKind = DTDDefaultKind.REQUIRED; - break; - - case AttNode.NOFIXED : - defaultKind = DTDDefaultKind.NOFIXED; - break; - - default : - // System.out.println("DTDATTR '" +attdef.name + "' Unknown default - // type... " + attrDefault); - } - - DTDDefaultKind defaultKindObj = DTDDefaultKind.get(defaultKind); - dtdattr.setDefaultKind(defaultKindObj); - - if (parseError) { - return; - } - - String defaultValue = attdef.defaultValue; - if (defaultValue != null) { - if (attrType == AttNode.ENUMERATION || attrType == AttNode.NOTATION) { - if (!isDefaultEnumValueValid(attdef, defaultValue)) { - String typeString = (attrType == AttNode.ENUMERATION ? "enumeration" : "notation"); //$NON-NLS-1$ //$NON-NLS-2$ - String errMsg = DTDCoreMessages._ERROR_INVALID_DEFAULT_ATTR_VALUE_1; //$NON-NLS-1$ - errMsg += typeString + DTDCoreMessages._UI_ERRORPART_INVALID_DEFAULT_ATTR_VALUE_2; //$NON-NLS-1$ - errMsg += attdef.name + "'"; //$NON-NLS-1$ - - // dtdattr.getDTDElement().getIElement().setDTDErrorMessage(errMsg); - // dtdattr.getDTDElement().getDTDFile().setParseError(true); - return; - } - } - dtdattr.setDefaultValueString(defaultValue); - } - // System.out.println("DTDAttr - toMof getDefaultValueString " + - // getDefaultValueString()); - // System.out.println("DTDAttr - toMof getDefaultValue: " + - // getDefaultValue()); - } - - public boolean hasIDAttribute(DTDAttribute dtdattr) { - boolean hasID = false; - - DTDElement element = dtdattr.getDTDElement(); - EList attrs = element.getDTDAttribute(); - - Iterator i = attrs.iterator(); - while (i.hasNext()) { - DTDAttribute attr = (DTDAttribute) i.next(); - DTDType dType = attr.getDTDType(); - if (dType instanceof DTDBasicType) { - if (((DTDBasicType) dType).getKind().getValue() == DTDBasicTypeKind.ID) { - hasID = true; - break; - } - } - } - return hasID; - } - - public DTDEnumerationType createDTDEnumeration(DTDAttribute dtdattr, String[] enumValues, int enumKind) { - DTDEnumerationType enumeration = getFactory().createDTDEnumerationType(); - DTDEnumGroupKind groupKind = DTDEnumGroupKind.get(enumKind); - enumeration.setKind(groupKind); - // Enumeration values - if (enumValues != null) { - for (int i = 0; i < enumValues.length; i++) { - EEnumLiteral enumLiteral = createEEnumLiteral(); - // enumVal.setXMIDocument(dtdattr.getXMIDocument()); - // MOF2EMF Port - // enumLiteral.refSetLiteral(enumValues[i]); - enumLiteral.setName(enumValues[i]); - - // enumLiteral.setNumber(i); - enumeration.getEnumLiterals().add(enumLiteral); - } - } - dtdattr.getDTDElement().getDTDFile().getDTDEnumerationType().add(enumeration); - return enumeration; - } - - private EEnumLiteral createEEnumLiteral() { - EcorePackage ePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - // MOF2EMF Port - // return ((EcoreFactory)ePackage.getFactory()).createEEnumLiteral(); - return ePackage.getEcoreFactory().createEEnumLiteral(); - } - - private DTDEnumerationType createDTDEnumeration(DTDAttribute dtdattr, AttNode attdef, int enumKind) { - DTDEnumerationType enumeration = getFactory().createDTDEnumerationType(); - DTDEnumGroupKind groupKind = DTDEnumGroupKind.get(enumKind); - enumeration.setKind(groupKind); - dtdattr.getDTDElement().getDTDFile().getDTDEnumerationType().add(enumeration); - - // Enumeration values - Enumeration tokenIter = attdef.elements(); - if (tokenIter != null) { - while (tokenIter.hasMoreElements()) { - String val = (String) tokenIter.nextElement(); - EEnumLiteral enumLiteral = createEEnumLiteral(); - // enumLiteral.setXMIDocument(dtdattr.getXMIDocument()); - // MOF2EMF Port - // enumLiteral.refSetLiteral(val); - enumLiteral.setName(val); - - - // enumLiteral.setNumber(i++); - enumeration.getEnumLiterals().add(enumLiteral); - } - } - - return enumeration; - } - - private boolean isDefaultEnumValueValid(AttNode attdef, String defaultValue) { - boolean valid = false; - boolean containsPercent = false; - - // Enumeration values - Enumeration enumValues = attdef.elements(); - while (enumValues.hasMoreElements()) { - String val = (String) enumValues.nextElement(); - if (val.equals(defaultValue)) { - valid = true; - break; - } - if (val.indexOf('%') >= 0) { - containsPercent = true; - } - } - return valid || containsPercent; - } - - public void setAttrDTDType(DTDAttribute dtdattr, DTDType type) { - dtdattr.setDTDType(type); - } - - protected void addErrorMessage(ErrorMessage errMsg, Object obj) { - errMsg.setObject(obj); - dtdUtil.addErrorMessage(errMsg); - } - - // /** - // * @generated - // */ - // protected DTDFactoryImpl getFactoryGen() { - // - // return (DTDFactoryImpl)dtdUtil.getFactory(); - // } - // /** - // * @generated - // */ - // protected DTDFile getDTDFileGen() { - // - // return dtdFile; - // } - // /** - // * @generated - // */ - // protected void visitDTDGen(DTD dtd) { - // - // super.visitDTD(dtd); - // - // - // // - 2nd pass - - // // do final processing for Attlists and adding contentModel - // addAttlistAndContentModel(dtd,dtdFile); - // } - // /** - // * @generated - // */ - // protected void visitElementDeclGen(ElementDecl element) { - // - // // Element might have been added earlier because it is referenced - // String declName = element.getNodeName() ; - // // System.out.println("process ElementDecl:" + declName ); - // DTDElement dtdelement = (DTDElement) - // dtdUtil.getElementPool().get(declName); - // if (dtdelement == null) - // { - // // System.out.println("process ElementDecl - not found - create" ); - // dtdelement = getFactory().createDTDElement(); - // dtdelement.setName(declName); - // dtdFile.getDTDObject().add(dtdelement); - // dtdUtil.getElementPool().put(declName,dtdelement); - // } - // - // - // super.visitElementDecl(element); - // } - // /** - // * @generated - // */ - // protected void visitNotationDeclGen(NotationDecl notation) { - // - // // Notation might have been added earlier because it is referenced - // // by an entity - // DTDNotation dtdnot = dtdFile.findNotation( notation.getNodeName() ); - // if (dtdnot == null) - // { - // dtdnot = getFactory().createDTDNotation(); - // dtdFile.getDTDObject().add(dtdnot); - // } - // dtdnot.setName(notation.getNodeName()); - // - // - // if (notation.getSystemId()!= null ) - // dtdnot.setSystemID(notation.getSystemId()); - // if (notation.getPublicId()!= null ) - // dtdnot.setPublicID(notation.getPublicId()); - // - // - // if (notation.getComment()!=null) - // dtdnot.setComment(notation.getComment()); - // if (notation.getErrorMessage()!=null) - // { - // addErrorMessage(notation.getErrorMessage(), dtdnot); - // } - // - // - // super.visitNotationDecl(notation); - // } - // /** - // * @generated - // */ - // protected void visitParameterEntityReferenceDeclGen(EntityDecl entity) - // { - // - // // This is a parameter entity reference. - // // Add the link to the real entity that it references - // DTDParameterEntityReference parmEntRef = - // getFactory().createDTDParameterEntityReference(); - // dtdFile.getDTDObject().add(parmEntRef); - // - // - // String entityName = entity.getNodeName(); - // - // - // // Add the reference to the DTDEntity - // DTDEntity dtdentity = getDTDFile().findEntity(entityName); - // if (dtdentity != null) - // { - // parmEntRef.setEntity(dtdentity); - // } - // if (entity.getErrorMessage()!=null) - // { - // addErrorMessage(entity.getErrorMessage(), dtdentity); - // } - // // System.out.println("adding PE reference: " + declName); - // - // - // super.visitParameterEntityReferenceDecl(entity); - // } - // /** - // * @generated - // */ - // protected void visitExternalEntityDeclGen(EntityDecl entity) { - // - // DTDEntity dtdEntity = createDTDEntity(entity); - // // System.out.println("adding entity: " + declName); - // DTDExternalEntity extEntity = getFactory().createDTDExternalEntity(); - // dtdEntity.setContent(extEntity); - // - // - // finishExternalEntity(extEntity, entity); - // // System.out.println(" ext entity toMof: " ); - // if (dtdEntity.isParameterEntity()) - // { - // - // - // dtdUtil.getPEPool().put("%"+entity.getNodeName()+";", dtdEntity); - // } - // - // - // super.visitExternalEntityDecl(entity); - // } - // /** - // * @generated - // */ - // protected void visitInternalEntityDeclGen(EntityDecl entity) { - // - // DTDEntity dtdEntity = createDTDEntity(entity); - // - // - // DTDInternalEntity intEntity = getFactory().createDTDInternalEntity(); - // dtdEntity.setContent(intEntity); - // intEntity.setValue(entity.getValue()); - // // System.out.println(" int entity toMof: " ); - // if (dtdEntity.isParameterEntity()) - // { - // dtdUtil.getPEPool().put("%"+entity.getNodeName()+";", dtdEntity); - // } - // - // - // super.visitInternalEntityDecl(entity); - // } - // /** - // * @generated - // */ - // protected void addAttlistAndContentModelGen(DTD dtd, DTDFile dFile) { - // - // //System.out.println("addAttListAndCotentModel - dtd:" + - // dtd.getName()); - // Enumeration en = dtd.externalElements(); - // while (en.hasMoreElements()) - // { - // Object e = en.nextElement(); - // if ( e instanceof ElementDecl ) - // { - // DTDElement dtdelement = (DTDElement) dtdUtil.getElementPool().get( - // ((ElementDecl)e).getNodeName() ); - // if (dtdelement == null) - // { - // dtdelement = getFactory().createDTDElement(); - // dtdFile.getDTDObject().add(dtdelement); - // } - // finishElementDecl(dtdelement, (ElementDecl) e); - // } - // else if ( e instanceof Attlist ) - // { - // processAttList((Attlist) e); - // } - // } - // } - // /** - // * @generated - // */ - // protected void processAttListGen(Attlist attList) { - // - // DTDElement e = (DTDElement) - // dtdUtil.getElementPool().get(attList.getNodeName()); - // if ( e != null ) - // { - // // Element has been added. Add the attributes - // //System.out.println(" processAttlist - adding Attlist:" + - // attList.getNodeName()); - // createAttributes(e, attList); - // } - // else - // { - // //System.out.println("!!!!!!!!! element is null "); - // } - // } - // /** - // * @generated - // */ - // protected void finishExternalEntityGen(DTDExternalEntity extEntity, - // EntityDecl entityDecl) { - // - // updateSystemID(extEntity, entityDecl); - // extEntity.setPublicID(entityDecl.getPublicId()); - // - // - // String notationName = entityDecl.getNotationName(); - // if (notationName != null) - // { - // DTDNotation dtdNotation = createOrFindNotation(extEntity, - // notationName,true); - // extEntity.setNotation(dtdNotation); - // } - // } - // /** - // * @generated - // */ - // protected DTDNotation createOrFindNotationGen(DTDExternalEntity - // extEntity, String name, boolean create) { - // - // DTDNotation aNotation = - // extEntity.getDTDEntity().getDTDFile().findNotation(name); - // if (aNotation != null) - // { - // return aNotation; - // } - // - // - // // - // // Create a notation for the reference - // // - // if (create) - // { - // aNotation = getFactory().createDTDNotation(); - // dtdFile.getDTDObject().add(aNotation); - // aNotation.setName(name); - // } - // return aNotation; - // } - // /** - // * The SystemID attribute is set to whatever the user enters - // * e.g. com/ibm/b2b/xmimodels/xxx.dtd.xmi - // * - // * In the unparse() method, parse out the DTD file name from - // * the classpath name. - // * e.g. returns xxx.dtd - // */ - // protected void updateSystemIDGen(DTDExternalEntity extEntity, - // EntityDecl entityDecl) { - // - // String systemId = entityDecl.getSystemId(); - // String publicId = entityDecl.getPublicId(); - // if (systemId != null) - // { - // IdResolver idResolver = new IdResolverImpl(dtd.getName()); - // String uri = idResolver.resolveId(publicId, systemId); - // ExternalDTDModel ed = dtdUtil.getExternalDTDModel(resources, uri); - // if (ed != null) - // { - // DTDFile referenceDtdFile = ed.getExternalDTDFile(); - // extEntity.setEntityReferencedFromAnotherFile(referenceDtdFile); - // extEntity.setSystemID(systemId); - // } - // else - // { - // if (entityDecl.getErrorMessage() == null) - // { - // ErrorMessage dtdError = new ErrorMessage(); - // dtdError.setErrorMessage(DTDCoreMessages.getString("_ERROR_INCL_FILE_LOAD_FAILURE") - // + " '" + systemId + "'"); - // addErrorMessage(dtdError, extEntity.getDTDEntity()); - // } - // - // if (systemId != null) - // { - // extEntity.setSystemID(systemId); - // } - // else - // { - // extEntity.setSystemID(""); - // } - // } - // } // end of if () - // else - // { - // // set the system id to be "" - // extEntity.setSystemID(""); - // } - // } - // /** - // * @generated - // */ - // protected DTDEntity createDTDEntityGen(EntityDecl entity) { - // - // // create and do what we can to fill in some basic things - // DTDEntity dtdEntity = getFactory().createDTDEntity(); - // dtdFile.getDTDObject().add(dtdEntity); - // - // - // dtdEntity.setName(entity.getNodeName()); - // dtdEntity.setParameterEntity(entity.isParameter()); - // if (entity.getComment()!=null) - // { - // dtdEntity.setComment(entity.getComment()); - // } - // if (entity.getErrorMessage()!=null) - // { - // addErrorMessage(entity.getErrorMessage(), dtdEntity); - // } - // - // - // return dtdEntity; - // } - // /** - // * @generated - // */ - // protected void finishElementDeclGen(DTDElement dtdElement, ElementDecl - // ed) { - // - // dtdElement.setName(ed.getNodeName()); - // - // - // CMNode cmNode = ed.getContentModelNode(); - // - // - // if (ed.getComment()!=null) - // { - // dtdElement.setComment(ed.getComment()); - // } - // if (ed.getErrorMessage()!=null) - // { - // addErrorMessage(ed.getErrorMessage(), dtdElement); - // } - // - // - // if (cmNode instanceof CMBasicNode) - // { - // CMBasicNode bn = (CMBasicNode)cmNode; - // switch (bn.getType()) - // { - // case CMNodeType.EMPTY : - // DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent(); - // dtdElement.setContent(emptyContent); - // break; - // - // - // case CMNodeType.ANY : - // DTDAnyContent anyContent = getFactory().createDTDAnyContent(); - // dtdElement.setContent(anyContent); - // break; - // - // - // case CMNodeType.PCDATA: - // DTDPCDataContent pcData = getFactory().createDTDPCDataContent(); - // dtdElement.setContent(pcData); - // } - // - // - // } - // else if (cmNode instanceof CMReferenceNode) - // { - // CMReferenceNode rn = (CMReferenceNode) cmNode; - // if (rn.getType() == CMNodeType.ENTITY_REFERENCE) - // { - // String entityName = rn.getName().trim(); - // - // - // DTDEntity anEntity = (DTDEntity) dtdUtil.getPEPool().get(entityName); - // if (anEntity!=null) - // { - // // - // // Create an DTDEntityReference and set its referenced element - // // - // DTDEntityReferenceContent enRef = - // getFactory().createDTDEntityReferenceContent(); - // enRef.setElementReferencedEntity(anEntity); - // - // DTDOccurrenceType occurrenceType = - // DTDOccurrenceType.get(computeMofOccurrence(rn)); - // enRef.setOccurrence(occurrenceType); - // - // dtdElement.setContent(enRef); - // } - // else - // { // create default content - // DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent(); - // dtdElement.setContent(emptyContent); - // } - // } - // else - // { - // // - // // Find the real element for this element references - // // If the real element does not yet exist, create it - // // - // DTDElement anElement = createOrFindElement(rn.getName(), dtdElement); - // - // - // // - // // Create an DTDElementReference and set its referenced element - // // - // DTDElementReferenceContent elemRef = - // getFactory().createDTDElementReferenceContent(); - // elemRef.setReferencedElement(anElement); - // - // DTDOccurrenceType occurrenceType = - // DTDOccurrenceType.get(computeMofOccurrence(rn)); - // elemRef.setOccurrence(occurrenceType); - // - // // setContent to DTDElementReference - // dtdElement.setContent(elemRef); - // - // - // } - // } - // else if (cmNode instanceof CMGroupNode) - // { - // CMGroupNode grpNode = (CMGroupNode)cmNode; - // DTDGroupContent groupContent = getFactory().createDTDGroupContent(); - // DTDGroupKind groupKind = - // DTDGroupKind.get(computeMofGroupKind(grpNode.getGroupKind())); - // groupContent.setGroupKind(groupKind); - // DTDOccurrenceType occurrenceType = - // DTDOccurrenceType.get(computeMofOccurrence(grpNode)); - // groupContent.setOccurrence(occurrenceType); - // - // // just use the locator for the element as the closest guess - // processGroupContent(groupContent, grpNode); - // dtdElement.setContent(groupContent); - // } - // else if (cmNode == null) - // { - // // bad thing happened here, just create a pcdata - // DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent(); - // dtdElement.setContent(emptyContent); - // } - // } - // /** - // * Add a new group to the current group - // * @param parent - the parent node for this group element - // * @param op1Node - the group - // * e.g. (a,b) - // * @param op2Node - set only if called by processCM1op - // * e.g. (a,b)+ - // */ - // protected void processGroupContentGen(DTDGroupContent parent, - // CMGroupNode grpNode) { - // - // Enumeration children = grpNode.getChildren().elements(); - // DTDFactory factory = getFactory(); - // while (children.hasMoreElements()) - // { - // CMNode cnode = (CMNode) children.nextElement(); - // - // - // if (cnode instanceof CMGroupNode) - // { - // CMGroupNode gNode = (CMGroupNode)cnode; - // DTDGroupContent groupContent = factory.createDTDGroupContent(); - // DTDGroupKind groupKind = - // DTDGroupKind.get(computeMofGroupKind(gNode.getGroupKind())); - // groupContent.setGroupKind(groupKind); - // DTDOccurrenceType occurrenceType = - // DTDOccurrenceType.get(computeMofOccurrence(gNode)); - // groupContent.setOccurrence(occurrenceType); - // - // parent.getContent().add(groupContent); - // processGroupContent(groupContent,gNode); - // } - // else if (cnode instanceof CMBasicNode) - // { - // CMBasicNode n = (CMBasicNode)cnode; - // if (n.getType() == CMNodeType.PCDATA) - // { - // // Create a DTDPCDataContent for a leaf PCData node - // // - // DTDPCDataContent pcData = factory.createDTDPCDataContent(); - // // Add #PCDATA to the Group, i.e Mixed content model - // parent.getContent().add(pcData); - // } - // } - // else if (cnode instanceof CMReferenceNode) - // { - // CMReferenceNode rn = (CMReferenceNode)cnode; - // if (rn.getType()==CMNodeType.ELEMENT_REFERENCE) - // { - // // System.out.println("CM Element Ref name: " + rn.getName()); - // // - // // Create an DTDElementReference and set its referenced element - // // - // DTDElementReferenceContent elemRef = - // factory.createDTDElementReferenceContent(); - // - // - // // - // // Find the real element for this element references - // // If the real element does not yet exist, create it - // // - // DTDElement anElement = createOrFindElement(rn.getName(), elemRef); - // - // - // elemRef.setReferencedElement(anElement); - // DTDOccurrenceType occurrenceType = - // DTDOccurrenceType.get(computeMofOccurrence(rn)); - // elemRef.setOccurrence(occurrenceType); - // - // // Add DTDElementReference to the Group - // parent.getContent().add(elemRef); - // } - // else // PE Reference - // { - // String entityName = rn.getName().trim(); - // - // - // // System.out.println("CM PE Ref name: " + entityName); - // DTDEntity anEntity = (DTDEntity) dtdUtil.getPEPool().get(entityName); - // if (anEntity!=null) - // { - // // - // // Create an DTDEntityReference and set its referenced element - // // - // DTDEntityReferenceContent enRef = - // factory.createDTDEntityReferenceContent(); - // enRef.setElementReferencedEntity(anEntity); - // - // DTDOccurrenceType occurrenceType = - // DTDOccurrenceType.get(computeMofOccurrence(rn)); - // enRef.setOccurrence(occurrenceType); - // - // - // // Add DTDEntityReference to the Group - // parent.getContent().add(enRef); - // - // - // } - // } - // } - // } - // } - // /** - // * Find the real element that is referenced by the current element - // */ - // protected DTDElement createOrFindElementGen(String name, Object obj) { - // - // // DTDElement aElement = getDTDFile().findElement(name); - // - // - // DTDElement aElement = (DTDElement) dtdUtil.getElementPool().get(name); - // - // - // if (aElement != null) - // { - // return aElement; - // } - // - // - // String errorMsg = - // DTDCoreMessages.getString("_ERROR_UNDECLARED_ELEMENT_1"); - // errorMsg += "\"" + name + "\""; - // errorMsg += - // DTDCoreMessages.getString("_UI_ERRORPART_UNDECLARED_ELEMENT_2"); - // - // - // ErrorMessage dtdError = new ErrorMessage(); - // - // dtdError.setErrorMessage(errorMsg); - // addErrorMessage(dtdError, obj); - // // System.out.println(errorMsg); - // // setDTDErrorMessage(errorMsg); - // getDTDFile().setParseError(true); - // - // - // // - // // Create an empty element for the reference to make it valid - // // - // - // - // DTDFactory factory = getFactory(); - // DTDElement dtdelement = factory.createDTDElement(); - // dtdelement.setName(name); - // - // - // DTDEmptyContent emptyContent = factory.createDTDEmptyContent(); - // dtdelement.setContent(emptyContent); - // - // - // getDTDFile().getDTDObject().add(dtdelement); - // dtdUtil.getElementPool().put(name,dtdelement); - // return dtdelement; - // } - // /** - // * Compute the MOF occurrence from the xml4j occurrence - // */ - // protected int computeMofOccurrenceGen(CMRepeatableNode rnode) { - // - // int occurrence = rnode.getOccurrence(); - // int mofoccur = DTDOccurrenceType.ONE; - // - // - // if (occurrence == CMNodeType.ZERO_OR_MORE) - // { - // mofoccur = DTDOccurrenceType.ZERO_OR_MORE; - // } - // else if (occurrence == CMNodeType.ONE_OR_MORE) - // { - // mofoccur = DTDOccurrenceType.ONE_OR_MORE; - // } - // else if (occurrence == CMNodeType.OPTIONAL) - // { - // mofoccur = DTDOccurrenceType.OPTIONAL; - // } - // return mofoccur; - // } - // /** - // * Compute the MOF model group from the xml4j model group - // */ - // protected int computeMofGroupKindGen(int type) { - // - // if (type == CMNodeType.GROUP_CHOICE) - // { - // return DTDGroupKind.CHOICE; - // } - // else - // { - // return DTDGroupKind.SEQUENCE; - // } - // } - // /** - // * @generated - // */ - // protected void createAttributesGen(DTDElement element, Attlist attList) - // { - // - // if (attList.getErrorMessage()!=null) - // { - // addErrorMessage(attList.getErrorMessage(), element); - // } - // - // - // for (int i=0;i<attList.size();i++) - // { - // AttNode ad = (AttNode) attList.elementAt(i); - // // DTDAttributeElement dtdAtt= getDTDAttributeElement(a.getName()); - // - // - // // only add the AttDef if it is not added yet - // // ignore the dup AttDef as documented in the XML 1.0 specs - // //if( dtdAtt==null) - // addAttribute(element, ad); - // } - // } - // /** - // * Create a DTDAttribute from the xml4j attribute - // */ - // protected void addAttributeGen(DTDElement dtdelement, AttNode ad) { - // - // DTDAttribute dtdattr = getFactory().createDTDAttribute(); - // dtdelement.getDTDAttribute().add(dtdattr); - // finishAttribute(dtdattr, ad); - // } - // /** - // * @generated - // */ - // protected void finishAttributeGen(DTDAttribute dtdattr, AttNode attdef) - // { - // - // boolean parseError = false; - // - // - // if (attdef.name.startsWith("%")) - // { - // String peName = attdef.name.trim(); - // DTDEntity en = (DTDEntity) dtdUtil.getPEPool().get(peName); - // if (en!=null) - // { - // dtdattr.setAttributeNameReferencedEntity(en); - // } - // } - // - // - // dtdattr.setName(attdef.name); - // - // - // int attrType = attdef.getDeclaredType(); - // - // - // if (attrType==AttNode.PEREFERENCE && attdef.type!=null) - // { - // String peName = attdef.type.trim(); - // DTDEntity en = (DTDEntity) dtdUtil.getPEPool().get(peName); - // if (en!=null) - // { - // dtdattr.setAttributeTypeReferencedEntity(en); - // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA()); // hack, - // so we can get back the default value - // } - // else //set default type - // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA()); - // - // - // } - // else - // { - // switch (attrType) - // { - // case AttNode.CDATA: - // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA()); - // break; - // - // - // case AttNode.ENTITIES: - // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ENTITIES()); - // break; - // - // - // case AttNode.ENTITY: - // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ENTITY()); - // break; - // - // - // case AttNode.ID: - // // check for duplicate ID attribute - // if (hasIDAttribute(dtdattr)) - // { - // String errMsg = DTDCoreMessages.getString("_ERROR_DUP_ID_ATTRIBUTE_1"); - // errMsg += attdef.name + - // DTDCoreMessages.getString("_UI_ERRORPART_DUP_ID_ATTRIBUTE_2"); - // // dtdattr.getDTDElement().getIElement().setDTDErrorMessage(errMsg); - // // dtdattr.getDTDElement().getDTDFile().setParseError(true); - // parseError = true; - // } - // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ID()); - // break; - // - // - // case AttNode.IDREF: - // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_IDREF()); - // break; - // - // - // case AttNode.IDREFS: - // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_IDREFS()); - // break; - // - // - // case AttNode.ENUMERATION: - // setAttrDTDType(dtdattr, createDTDEnumeration(dtdattr, attdef, - // DTDEnumGroupKind.NAME_TOKEN_GROUP)); - // break; - // - // - // case AttNode.NOTATION: - // setAttrDTDType(dtdattr, createDTDEnumeration(dtdattr, attdef, - // DTDEnumGroupKind.NOTATION_GROUP)); - // break; - // - // - // case AttNode.NMTOKEN: - // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_NMTOKEN()); - // break; - // - // - // case AttNode.NMTOKENS: - // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_NMTOKENS()); - // break; - // - // - // default: - // // System.out.println("DTDATTR '" +attdef.name + "'Unknown type..." + - // attrType); - // } - // } - // - // - // int attrDefault = attdef.getDefaultType(); - // int defaultKind = DTDDefaultKind.IMPLIED; - // switch (attrDefault) - // { - // case AttNode.FIXED: - // defaultKind = DTDDefaultKind.FIXED; - // break; - // - // - // case AttNode.IMPLIED: - // defaultKind = DTDDefaultKind.IMPLIED; - // break; - // - // - // case AttNode.REQUIRED: - // defaultKind = DTDDefaultKind.REQUIRED; - // break; - // - // - // case AttNode.NOFIXED: - // defaultKind = DTDDefaultKind.NOFIXED; - // break; - // - // - // default: - // // System.out.println("DTDATTR '" +attdef.name + "' Unknown default - // type... " + attrDefault); - // } - // - // DTDDefaultKind defaultKindObj = DTDDefaultKind.get(defaultKind); - // dtdattr.setDefaultKind(defaultKindObj); - // - // if (parseError) - // { - // return; - // } - // - // - // String defaultValue = attdef.defaultValue; - // if (defaultValue != null) - // { - // if (attrType == AttNode.ENUMERATION || attrType == AttNode.NOTATION) - // { - // if (! isDefaultEnumValueValid(attdef,defaultValue)) - // { - // String typeString = - // (attrType==AttNode.ENUMERATION?"enumeration":"notation"); - // String errMsg = - // DTDCoreMessages.getString("_ERROR_INVALID_DEFAULT_ATTR_VALUE_1"); - // errMsg += typeString + - // DTDCoreMessages.getString("_UI_ERRORPART_INVALID_DEFAULT_ATTR_VALUE_2"); - // errMsg += attdef.name + "'"; - // - // - // // dtdattr.getDTDElement().getIElement().setDTDErrorMessage(errMsg); - // // dtdattr.getDTDElement().getDTDFile().setParseError(true); - // return; - // } - // } - // dtdattr.setDefaultValueString(defaultValue); - // } - // // System.out.println("DTDAttr - toMof getDefaultValueString " + - // getDefaultValueString()); - // // System.out.println("DTDAttr - toMof getDefaultValue: " + - // getDefaultValue()); - // } - // /** - // * @generated - // */ - // protected boolean hasIDAttributeGen(DTDAttribute dtdattr) { - // - // boolean hasID = false; - // - // - // DTDElement element = dtdattr.getDTDElement(); - // EList attrs = element.getDTDAttribute(); - // - // - // Iterator i = attrs.iterator(); - // while (i.hasNext()) - // { - // DTDAttribute attr = (DTDAttribute) i.next(); - // DTDType dType = attr.getDTDType(); - // if (dType instanceof DTDBasicType) - // { - // if ( ((DTDBasicType)dType).getKind().getValue() == DTDBasicTypeKind.ID) - // { - // hasID = true; - // break; - // } - // } - // } - // return hasID; - // } - // /** - // * @generated - // */ - // protected DTDEnumerationType createDTDEnumerationGen(DTDAttribute - // dtdattr, String[] enumValues, int enumKind) { - // - // DTDEnumerationType enum = getFactory().createDTDEnumerationType(); - // // This is gross, but this is what was done before. - // DTDAttributeImpl dtdattrimpl = (DTDAttributeImpl) dtdattr; - // // enum.setID("Enum_" + - // ((DTDElement)dtdattrimpl.getMOFDomain()).getName() + "_" + - // dtdattr.getName()); - // DTDEnumGroupKind groupKind = DTDEnumGroupKind.get(enumKind); - // enum.setKind(groupKind); - // // Enumeration values - // if (enumValues!=null) - // { - // for(int i=0;i<enumValues.length;i++) - // { - // EEnumLiteral enumLiteral = createEEnumLiteral(); - // // enumVal.setXMIDocument(dtdattr.getXMIDocument()); - // enumLiteral.refSetLiteral(enumValues[i]); - // // enumLiteral.setNumber(i); - // enum.getEnumLiterals().add(enumLiteral); - // } - // } - // dtdattr.getDTDElement().getDTDFile().getDTDEnumerationType().add(enum); - // return enum; - // } - // /** - // * @generated - // */ - // protected EEnumLiteral createEEnumLiteralGen() { - // - // EcorePackage ePackage = - // (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - // return ((EcoreFactory)ePackage.getFactory()).createEEnumLiteral(); - // } - // /** - // * @generated - // */ - // protected DTDEnumerationType createDTDEnumerationGen(DTDAttribute - // dtdattr, AttNode attdef, int enumKind) { - // - // DTDEnumerationType enum = getFactory().createDTDEnumerationType(); - // // This is gross, but this is what was done before. - // DTDAttributeImpl dtdattrimpl = (DTDAttributeImpl) dtdattr; - // // enum.setID("Enum_" + - // ((DTDElement)dtdattrimpl.getMOFDomain()).getName() + "_" + - // dtdattr.getName()); - // DTDEnumGroupKind groupKind = DTDEnumGroupKind.get(enumKind); - // enum.setKind(groupKind); - // dtdattr.getDTDElement().getDTDFile().getDTDEnumerationType().add(enum); - // - // - // // Enumeration values - // Enumeration tokenIter = attdef.elements(); - // if (tokenIter != null) { - // int i=0; - // while (tokenIter.hasMoreElements()) - // { - // String val = (String)tokenIter.nextElement(); - // EEnumLiteral enumLiteral = createEEnumLiteral(); - // // enumLiteral.setXMIDocument(dtdattr.getXMIDocument()); - // - // - // enumLiteral.refSetLiteral(val); - // // enumLiteral.setNumber(i++); - // enum.getEnumLiterals().add(enumLiteral); - // } - // } - // - // - // return enum; - // } - // /** - // * @generated - // */ - // protected boolean isDefaultEnumValueValidGen(AttNode attdef, String - // defaultValue) { - // - // boolean valid = false; - // boolean containsPercent = false; - // - // - // // Enumeration values - // Enumeration enumValues = attdef.elements(); - // while (enumValues.hasMoreElements()) - // { - // String val = (String)enumValues.nextElement(); - // if (val.equals(defaultValue)) - // { - // valid = true; - // break; - // } - // if (val.indexOf('%') >= 0) - // { - // containsPercent = true; - // } - // } - // return valid || containsPercent; - // } - // /** - // * @generated - // */ - // protected void setAttrDTDTypeGen(DTDAttribute dtdattr, DTDType type) { - // - // dtdattr.setDTDType(type); - // } - // /** - // * @generated - // */ - // protected void addErrorMessageGen(ErrorMessage errMsg, Object obj) { - // - // errMsg.setObject(obj); - // dtdUtil.addErrorMessage(errMsg); - // } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDObjectFinder.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDObjectFinder.java deleted file mode 100644 index 0f4a31943b..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDObjectFinder.java +++ /dev/null @@ -1,173 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.DTDSourceOffset; - -public class DTDObjectFinder extends DTDVisitor { - public class SourceOffset { - // Convenience class to find containment of object - private int start, end; - - public SourceOffset(int start, int end) { - this.start = start; - this.end = end; - } - - public boolean contains(SourceOffset other) { - if (this.start <= other.start && other.start <= this.end) { - return true; - } // end of if () - return false; - } - - } - - SourceOffset searchLocation; - - private SourceOffset offsetObjectFor(DTDSourceOffset s) { - return new SourceOffset(s.getStartOffset(), s.getEndOffset()); - } - - private void checkContainment(DTDObject o) { - if (offsetObjectFor((DTDSourceOffset) o).contains(searchLocation)) { - closestObject = o; - } // end of if () - } - - public DTDObjectFinder(int startOffset, int endOffset) { - searchLocation = new SourceOffset(startOffset, endOffset); - } - - public void visitDTDNotation(DTDNotation notation) { - checkContainment(notation); - super.visitDTDNotation(notation); - } - - public void visitDTDEntity(DTDEntity entity) { - checkContainment(entity); - super.visitDTDEntity(entity); - } - - public void visitDTDElement(DTDElement element) { - checkContainment(element); - super.visitDTDElement(element); - } - - public void visitDTDAttribute(DTDAttribute attribute) { - checkContainment(attribute); - super.visitDTDAttribute(attribute); - } - - public void visitDTDParameterEntityReference(DTDParameterEntityReference parmEntity) { - checkContainment(parmEntity); - super.visitDTDParameterEntityReference(parmEntity); - } - - public void visitDTDElementContent(DTDElementContent content) { - checkContainment(content); - super.visitDTDElementContent(content); - } - - private DTDObject closestObject = null; - - public DTDObject getClosestObject() { - return closestObject; - } - - /** - * @generated - */ - protected SourceOffset offsetObjectForGen(DTDSourceOffset s) { - - return new SourceOffset(s.getStartOffset(), s.getEndOffset()); - } - - /** - * @generated - */ - protected void checkContainmentGen(DTDObject o) { - - if (offsetObjectFor((DTDSourceOffset) o).contains(searchLocation)) { - closestObject = o; - } // end of if () - } - - /** - * @generated - */ - protected void visitDTDNotationGen(DTDNotation notation) { - - checkContainment(notation); - super.visitDTDNotation(notation); - } - - /** - * @generated - */ - protected void visitDTDEntityGen(DTDEntity entity) { - - checkContainment(entity); - super.visitDTDEntity(entity); - } - - /** - * @generated - */ - protected void visitDTDElementGen(DTDElement element) { - - checkContainment(element); - super.visitDTDElement(element); - } - - /** - * @generated - */ - protected void visitDTDAttributeGen(DTDAttribute attribute) { - - checkContainment(attribute); - super.visitDTDAttribute(attribute); - } - - /** - * @generated - */ - protected void visitDTDParameterEntityReferenceGen(DTDParameterEntityReference parmEntity) { - - checkContainment(parmEntity); - super.visitDTDParameterEntityReference(parmEntity); - } - - /** - * @generated - */ - protected void visitDTDElementContentGen(DTDElementContent content) { - - checkContainment(content); - super.visitDTDElementContent(content); - } - - /** - * @generated - */ - protected DTDObject getClosestObjectGen() { - - return closestObject; - } -}// DTDObjectFinder diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPathnameUtil.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPathnameUtil.java deleted file mode 100644 index 72063c4811..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPathnameUtil.java +++ /dev/null @@ -1,352 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - - - -public class DTDPathnameUtil { - static public String makePath(String parentPath, String type, String name, int cnt) { - String pn = null; - name = encode(name); - if ((name == null) && (cnt <= 0)) { - pn = type; - } - else if (cnt <= 0) { - pn = type + ":" + ((name == null) ? "" : name); //$NON-NLS-1$ //$NON-NLS-2$ - } - else { - pn = type + ":" + ((name == null) ? "" : name) + ":" + cnt; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - - if (parentPath != null) { - return parentPath + "." + pn; //$NON-NLS-1$ - } - else { - return pn; - } - } - - static public Object[] parsePathComponent(String path) { - /* - * This routine parse the first component of the path and returns the - * result in an arrray of Strings. result[0] = type (String) result[1] = - * name (String) result[2] = count (Integer) result[3] = the rest of - * the path (String) - * - * E.g. PathComponent result[0] result[1] result[2] result[3] - * ------------------------------------------------------------- type - * type <null> <null> <null> type.rest type <null> <null> rest - * type:name type name <null> <null> type:name.rest type name <null> - * rest type::n type <null> n <null> type::n.rest type <null> n rest - * type:name:n type name n <null> type:name:n.rest type name n rest - */ - - Object[] result = new Object[4]; - if (path == null) - return result; - - int i = path.indexOf('.'); - int length = path.length(); - - if (i < 0) { - i = length; - } - - String type = null; - String name = null; - Integer n = null; - String rest = null; - - // get the type - int j = path.indexOf(':'); - if (j > i) - j = -1; - if (j < 0) { - type = path.substring(0, i); - } - else { - type = path.substring(0, j); - - // get the name - int k = path.indexOf(':', j + 1); - if (k > i) - k = -1; - if (k < 0) { - name = path.substring(j + 1, i); - } - else { - name = path.substring(j + 1, k); - - // get the count - try { - n = new Integer(path.substring(k + 1, i)); - } - catch (Exception exc) { - } - if ((n != null) && (n.intValue() < 0)) { - n = null; - } - } - } - - if ((name != null) && (name.length() == 0)) { - name = null; - } - - if (i < length) { - rest = path.substring(i + 1); - } - - result[0] = type; - result[1] = decode(name); - result[2] = n; - result[3] = rest; - return result; - } - - static private String encode(String s) { - if (s == null) - return null; - StringBuffer o = new StringBuffer(s.length()); - int len = s.length(); - for (int i = 0; i < len; i++) { - char c = s.charAt(i); - if (Character.isLetterOrDigit(c) || (c == '-')) { - o.append(c); - } - else { // if ((c == '.') || (c == ':') || (c == '_') || ...) - // convert the character to a 4 digit hex code prefixed by "_" - String hex = Integer.toHexString(c); - int l = hex.length(); - if (l == 1) { - o.append("_000"); //$NON-NLS-1$ - o.append(hex); - } - else if (l == 2) { - o.append("_00"); //$NON-NLS-1$ - o.append(hex); - } - else if (l == 3) { - o.append("_0"); //$NON-NLS-1$ - o.append(hex); - } - else { - o.append('_'); - o.append(hex); - } - } - } // for - return o.toString(); - } - - static private String decode(String s) { - if (s == null) - return null; - StringBuffer o = new StringBuffer(s.length()); - int len = s.length(); - for (int i = 0; i < len; i++) { - char c = s.charAt(i); - if (c != '_') { - o.append(c); - } - else { // next 4 characters are the hex code - String hex; - if (len > i + 4) { - hex = s.substring(i + 1, i + 5); - i += 4; - } - else { - hex = s.substring(i + 1); - i = len - 1; - } - o.append((char) Integer.parseInt(hex, 16)); - } - } // for - return o.toString(); - } - - /** - * @generated - */ - protected static String makePathGen(String parentPath, String type, String name, int cnt) { - - String pn = null; - name = encode(name); - if ((name == null) && (cnt <= 0)) { - pn = type; - } - else if (cnt <= 0) { - pn = type + ":" + ((name == null) ? "" : name); //$NON-NLS-1$ //$NON-NLS-2$ - } - else { - pn = type + ":" + ((name == null) ? "" : name) + ":" + cnt; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - - if (parentPath != null) { - return parentPath + "." + pn; //$NON-NLS-1$ - } - else { - return pn; - } - } - - /** - * @generated - */ - protected static Object[] parsePathComponentGen(String path) { - - /* - * This routine parse the first component of the path and returns the - * result in an arrray of Strings. result[0] = type (String) result[1] = - * name (String) result[2] = count (Integer) result[3] = the rest of - * the path (String) - * - * E.g. PathComponent result[0] result[1] result[2] result[3] - * ------------------------------------------------------------- type - * type <null> <null> <null> type.rest type <null> <null> rest - * type:name type name <null> <null> type:name.rest type name <null> - * rest type::n type <null> n <null> type::n.rest type <null> n rest - * type:name:n type name n <null> type:name:n.rest type name n rest - */ - - Object[] result = new Object[4]; - if (path == null) - return result; - - int i = path.indexOf('.'); - int length = path.length(); - - if (i < 0) { - i = length; - } - - String type = null; - String name = null; - Integer n = null; - String rest = null; - - // get the type - int j = path.indexOf(':'); - if (j > i) - j = -1; - if (j < 0) { - type = path.substring(0, i); - } - else { - type = path.substring(0, j); - - // get the name - int k = path.indexOf(':', j + 1); - if (k > i) - k = -1; - if (k < 0) { - name = path.substring(j + 1, i); - } - else { - name = path.substring(j + 1, k); - - // get the count - try { - n = new Integer(path.substring(k + 1, i)); - } - catch (Exception exc) { - } - if ((n != null) && (n.intValue() < 0)) { - n = null; - } - } - } - - if ((name != null) && (name.length() == 0)) { - name = null; - } - - if (i < length) { - rest = path.substring(i + 1); - } - - result[0] = type; - result[1] = decode(name); - result[2] = n; - result[3] = rest; - return result; - } - - /** - * @generated - */ - protected static String encodeGen(String s) { - - if (s == null) - return null; - StringBuffer o = new StringBuffer(s.length()); - int len = s.length(); - for (int i = 0; i < len; i++) { - char c = s.charAt(i); - if (Character.isLetterOrDigit(c) || (c == '-')) { - o.append(c); - } - else { // if ((c == '.') || (c == ':') || (c == '_') || ...) - // convert the character to a 4 digit hex code prefixed by "_" - String hex = Integer.toHexString(c); - int l = hex.length(); - if (l == 1) { - o.append("_000"); //$NON-NLS-1$ - o.append(hex); - } - else if (l == 2) { - o.append("_00"); //$NON-NLS-1$ - o.append(hex); - } - else if (l == 3) { - o.append("_0"); //$NON-NLS-1$ - o.append(hex); - } - else { - o.append('_'); - o.append(hex); - } - } - } // for - return o.toString(); - } - - /** - * @generated - */ - protected static String decodeGen(String s) { - - if (s == null) - return null; - StringBuffer o = new StringBuffer(s.length()); - int len = s.length(); - for (int i = 0; i < len; i++) { - char c = s.charAt(i); - if (c != '_') { - o.append(c); - } - else { // next 4 characters are the hex code - String hex; - if (len > i + 4) { - hex = s.substring(i + 1, i + 5); - i += 4; - } - else { - hex = s.substring(i + 1); - i = len - 1; - } - o.append((char) Integer.parseInt(hex, 16)); - } - } // for - return o.toString(); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPrinter.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPrinter.java deleted file mode 100644 index 544f8567a4..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPrinter.java +++ /dev/null @@ -1,525 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import java.util.Collection; -import java.util.Iterator; - -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType; -import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDSourceOffset; - - -public class DTDPrinter extends DTDVisitor { - StringBuffer sb = new StringBuffer(); - boolean updateOffset = true; - - public DTDPrinter(boolean updateOffset) { - this.updateOffset = updateOffset; - } - - public StringBuffer getBuffer() { - return sb; - } - - public void visitDTDFile(DTDFile file) { - super.visitDTDFile(file); - } - - public void visitDTDNotation(DTDNotation notation) { - generateComment(notation); - updateStartOffset(notation, sb.length()); - sb.append("<!NOTATION "); //$NON-NLS-1$ - sb.append(notation.getName()).append(" "); //$NON-NLS-1$ - - String publicID = notation.getPublicID(); - String systemID = notation.getSystemID(); - if (publicID == null || publicID.equals("")) { //$NON-NLS-1$ - sb.append("SYSTEM "); //$NON-NLS-1$ - } - else { - sb.append("PUBLIC \"").append(publicID).append("\" "); //$NON-NLS-1$ //$NON-NLS-2$ - } - - if (systemID == null) { - sb.append("\"\""); //$NON-NLS-1$ - } - else { - sb.append("\"").append(systemID).append("\""); //$NON-NLS-1$ //$NON-NLS-2$ - } - endTag(); - updateEndOffset(notation, sb.length() - 1); // -1 for the newline char - super.visitDTDNotation(notation); - } - - public void visitDTDEntity(DTDEntity entity) { - generateComment(entity); - updateStartOffset(entity, sb.length()); - sb.append("<!ENTITY "); //$NON-NLS-1$ - - if (entity.isParameterEntity()) - sb.append("% "); //$NON-NLS-1$ - - sb.append(entity.getName()).append(" "); //$NON-NLS-1$ - sb.append(entity.getContent().unparse()); - - endTag(); - updateEndOffset(entity, sb.length() - 1); // -1 for the newline char - super.visitDTDEntity(entity); - } - - public void visitDTDElement(DTDElement element) { - generateComment(element); - updateStartOffset(element, sb.length()); - sb.append("<!ELEMENT " + element.getName()); //$NON-NLS-1$ - DTDElementContent content = element.getContent(); - if (content instanceof DTDPCDataContent || content instanceof DTDElementReferenceContent) { - sb.append(" ("); //$NON-NLS-1$ - super.visitDTDElement(element); - sb.append(")"); //$NON-NLS-1$ - } // end of if () - else { - sb.append(" "); //$NON-NLS-1$ - super.visitDTDElement(element); - } // end of else - endTag(); - updateEndOffset(element, sb.length() - 1); // -1 for the newline char - visitAttributes(element); - } - - public void visitDTDParameterEntityReference(DTDParameterEntityReference parmEntity) { - generateComment(parmEntity); - updateStartOffset(parmEntity, sb.length()); - sb.append("%" + parmEntity.getName() + ";\n"); //$NON-NLS-1$ //$NON-NLS-2$ - updateEndOffset(parmEntity, sb.length() - 1); // -1 for the newline - // char - } - - public void visitDTDElementContent(DTDElementContent content) { - updateStartOffset(content, sb.length()); - String trailingChars = ""; //$NON-NLS-1$ - if (content instanceof DTDRepeatableContent) { - DTDRepeatableContent repeatContent = (DTDRepeatableContent) content; - DTDOccurrenceType occurrenceType = repeatContent.getOccurrence(); - // Integer occurrence = repeatContent.getOccurrence(); - if (occurrenceType != null) { - int occurType = occurrenceType.getValue(); - if (occurType != DTDOccurrenceType.ONE) { - if (repeatContent instanceof DTDEntityReferenceContent) { - sb.append("("); //$NON-NLS-1$ - trailingChars = ")"; //$NON-NLS-1$ - } - trailingChars += (char) occurType; - } - } // end of if () - } // end of if () - - if (content instanceof DTDGroupContent) { - super.visitDTDElementContent(content); - } // end of if () - else if (content instanceof DTDElementReferenceContent || content instanceof DTDEntityReferenceContent) { - sb.append(((DTDRepeatableContent) content).unparseRepeatableContent()); - } // end of if () - else { - // handle DTDPCDataContent, DTDAnyContent and DTDEmptyContent here - sb.append(content.getContentName()); - } // end of else - sb.append(trailingChars); - updateEndOffset(content, sb.length()); - } - - public void visitDTDGroupContent(DTDGroupContent group) { - sb.append("("); //$NON-NLS-1$ - DTDGroupKind kind = group.getGroupKind(); - // MOF2EMF Port - // Integer groupKind = group.getGroupKind(); - if (kind == null) { - group.setGroupKind(DTDGroupKind.get(DTDGroupKind.SEQUENCE)); - } // end of if () - - String con = group.getGroupKind().getValue() == DTDGroupKind.CHOICE ? " | " : ", "; //$NON-NLS-1$ //$NON-NLS-2$ - - // Loop thru the children of the current group - Collection content = group.getContent(); - if (content != null) { - boolean firstContent = true; - for (Iterator i = content.iterator(); i.hasNext();) { - if (!firstContent) { - sb.append(con); - } // end of if () - else { - firstContent = false; - } // end of else - visitDTDElementContent((DTDElementContent) i.next()); - } - } - - sb.append(")"); //$NON-NLS-1$ - } - - private void visitAttributes(DTDElement elem) { - Collection attrs = elem.getDTDAttribute(); - Iterator i = attrs.iterator(); - if (attrs != null && i.hasNext()) { - DTDAttribute attrib = (DTDAttribute) i.next(); - String comment = attrib.getComment(); - if (comment != null && comment.length() > 0) - sb.append("<!--\n ").append(comment).append("\n-->\n"); //$NON-NLS-1$ //$NON-NLS-2$ - sb.append("<!ATTLIST " + elem.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ - sb.append(" "); //$NON-NLS-1$ - updateStartOffset(attrib, sb.length()); - sb.append(attrib.unparse()); - updateEndOffset(attrib, sb.length()); - sb.append("\n"); //$NON-NLS-1$ - for (; i.hasNext();) { - attrib = (DTDAttribute) i.next(); - comment = attrib.getComment(); - if (comment != null && comment.length() > 0) { - sb.append(">\n"); //$NON-NLS-1$ - if (comment != null && comment.length() > 0) - sb.append("<!--\n ").append(comment).append("\n-->\n"); //$NON-NLS-1$ //$NON-NLS-2$ - sb.append("<!ATTLIST " + elem.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ - } - sb.append(" "); //$NON-NLS-1$ - updateStartOffset(attrib, sb.length()); - sb.append(attrib.unparse()); - updateEndOffset(attrib, sb.length()); - sb.append("\n"); //$NON-NLS-1$ - } - sb.append(">\n"); //$NON-NLS-1$ - } - } - - private void endTag() { - sb.append(">\n"); //$NON-NLS-1$ - } - - private void updateStartOffset(DTDSourceOffset o, int offset) { - if (updateOffset) { - o.setStartOffset(offset); - } // end of if () - } - - private void updateEndOffset(DTDSourceOffset o, int offset) { - if (updateOffset) { - o.setEndOffset(offset); - } // end of if () - } - - private void generateComment(DTDObject dtdObject) { - String commentString = null; - - if (dtdObject instanceof DTDElement) - commentString = ((DTDElement) dtdObject).getComment(); - else if (dtdObject instanceof DTDEntity) - commentString = ((DTDEntity) dtdObject).getComment(); - else if (dtdObject instanceof DTDNotation) - commentString = ((DTDNotation) dtdObject).getComment(); - - if (commentString != null && commentString.length() > 0) { - sb.append("<!--").append(commentString).append("-->\n"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - - // /** - // * @generated - // */ - // protected StringBuffer getBufferGen() { - // - // return sb; - // } - // /** - // * @generated - // */ - // protected void visitDTDFileGen(DTDFile file) { - // - // super.visitDTDFile(file); - // } - // /** - // * @generated - // */ - // protected void visitDTDNotationGen(DTDNotation notation) { - // - // generateComment(notation); - // updateStartOffset(notation, sb.length()); - // sb.append("<!NOTATION "); - // sb.append(notation.getName()).append(" "); - // - // - // String publicID = notation.getPublicID(); - // String systemID = notation.getSystemID(); - // if (publicID == null || publicID.equals("")) - // { - // sb.append("SYSTEM "); - // } - // else - // { - // sb.append("PUBLIC \"").append(publicID).append("\" "); - // } - // - // - // if (systemID==null) - // { - // sb.append("\"\""); - // } - // else - // { - // sb.append("\"").append(systemID).append("\""); - // } - // endTag(); - // updateEndOffset(notation, sb.length() - 1); // -1 for the newline char - // super.visitDTDNotation(notation); - // } - // /** - // * @generated - // */ - // protected void visitDTDEntityGen(DTDEntity entity) { - // - // generateComment(entity); - // updateStartOffset(entity, sb.length()); - // sb.append("<!ENTITY "); - // - // - // if (entity.isParameterEntity()) - // sb.append("% "); - // - // - // sb.append(entity.getName()).append(" "); - // sb.append(entity.getContent().unparse()); - // - // - // endTag(); - // updateEndOffset(entity, sb.length() - 1); // -1 for the newline char - // super.visitDTDEntity(entity); - // } - // /** - // * @generated - // */ - // protected void visitDTDElementGen(DTDElement element) { - // - // generateComment(element); - // updateStartOffset(element, sb.length()); - // sb.append("<!ELEMENT " + element.getName()); - // DTDElementContent content = element.getContent(); - // if (content instanceof DTDPCDataContent || - // content instanceof DTDElementReferenceContent) - // { - // sb.append(" ("); - // super.visitDTDElement(element); - // sb.append(")"); - // } // end of if () - // else - // { - // sb.append(" "); - // super.visitDTDElement(element); - // } // end of else - // endTag(); - // updateEndOffset(element, sb.length() - 1); // -1 for the newline char - // visitAttributes(element); - // } - // /** - // * @generated - // */ - // protected void - // visitDTDParameterEntityReferenceGen(DTDParameterEntityReference - // parmEntity) { - // - // generateComment(parmEntity); - // updateStartOffset(parmEntity, sb.length()); - // sb.append("%" + parmEntity.getName() + ";\n"); - // updateEndOffset(parmEntity, sb.length() - 1); // -1 for the newline - // char - // } - // /** - // * @generated - // */ - // protected void visitDTDElementContentGen(DTDElementContent content) { - // - // updateStartOffset(content, sb.length()); - // String trailingChars = ""; - // if (content instanceof DTDRepeatableContent ) - // { - // DTDRepeatableContent repeatContent = (DTDRepeatableContent) content; - // Integer occurrence = repeatContent.getOccurrence(); - // if (occurrence != null) - // { - // int occurType = occurrence.intValue(); - // if (occurType != DTDOccurrenceType.ONE) - // { - // if (repeatContent instanceof DTDEntityReferenceContent) - // { - // sb.append("("); - // trailingChars = ")"; - // } - // trailingChars += (char) occurType; - // } - // } // end of if () - // } // end of if () - // - // if (content instanceof DTDGroupContent) - // { - // super.visitDTDElementContent(content); - // } // end of if () - // else if (content instanceof DTDElementReferenceContent || - // content instanceof DTDEntityReferenceContent) - // { - // sb.append(((DTDRepeatableContent)content).unparseRepeatableContent()); - // } // end of if () - // else - // { - // // handle DTDPCDataContent, DTDAnyContent and DTDEmptyContent here - // sb.append(content.getContentName()); - // } // end of else - // sb.append(trailingChars); - // updateEndOffset(content, sb.length()); - // } - // /** - // * @generated - // */ - // protected void visitDTDGroupContentGen(DTDGroupContent group) { - // - // sb.append("("); - // - // Integer groupKind = group.getGroupKind(); - // if (groupKind == null) - // { - // group.setGroupKind(DTDGroupKind.SEQUENCE); - // } // end of if () - // - // String con = group.getGroupKind().intValue() == DTDGroupKind.CHOICE ? " - // | " : ", "; - // - // - // // Loop thru the children of the current group - // Collection content = group.getContent(); - // if (content != null) - // { - // boolean firstContent = true; - // for (Iterator i = content.iterator(); i.hasNext(); ) - // { - // if (!firstContent) - // { - // sb.append(con); - // } // end of if () - // else - // { - // firstContent = false; - // } // end of else - // visitDTDElementContent((DTDElementContent) i.next()); - // } - // } - // - // - // sb.append(")"); - // } - // /** - // * @generated - // */ - // protected void visitAttributesGen(DTDElement elem) { - // - // Collection attrs = elem.getDTDAttribute(); - // Iterator i = attrs.iterator(); - // if (attrs != null && i.hasNext()) - // { - // DTDAttribute attrib = (DTDAttribute) i.next(); - // String comment = attrib.getComment(); - // if (comment!=null && comment.length()>0) - // sb.append("<!--\n ").append(comment).append("\n-->\n"); - // sb.append("<!ATTLIST " + elem.getName() + "\n"); - // sb.append(" "); - // updateStartOffset(attrib, sb.length()); - // sb.append(attrib.unparse()); - // updateEndOffset(attrib, sb.length()); - // sb.append("\n"); - // for (; i.hasNext(); ) - // { - // attrib = (DTDAttribute) i.next(); - // comment = attrib.getComment(); - // if (comment!=null && comment.length()>0) - // { - // sb.append(">\n"); - // if (comment!=null && comment.length()>0) - // sb.append("<!--\n ").append(comment).append("\n-->\n"); - // sb.append("<!ATTLIST " + elem.getName() + "\n"); - // } - // sb.append(" "); - // updateStartOffset(attrib, sb.length()); - // sb.append(attrib.unparse()); - // updateEndOffset(attrib, sb.length()); - // sb.append("\n"); - // } - // sb.append(">\n"); - // } - // } - // /** - // * @generated - // */ - // protected void endTagGen() { - // - // sb.append(">\n"); - // } - // /** - // * @generated - // */ - // protected void updateStartOffsetGen(DTDSourceOffset o, int offset) { - // - // if (updateOffset) - // { - // o.setStartOffset(offset); - // } // end of if () - // } - // /** - // * @generated - // */ - // protected void updateEndOffsetGen(DTDSourceOffset o, int offset) { - // - // if (updateOffset) - // { - // o.setEndOffset(offset); - // } // end of if () - // } - // /** - // * @generated - // */ - // protected void generateCommentGen(DTDObject dtdObject) { - // - // String commentString = null; - // - // - // if (dtdObject instanceof DTDElement) - // commentString = ((DTDElement)dtdObject).getComment(); - // else if (dtdObject instanceof DTDEntity) - // commentString = ((DTDEntity)dtdObject).getComment(); - // else if (dtdObject instanceof DTDNotation) - // commentString = ((DTDNotation)dtdObject).getComment(); - // - // - // if ( commentString!=null && commentString.length()>0) - // { - // sb.append("<!--").append(commentString).append("-->\n"); - // } - // } -}// DTDPrinter diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceFactoryImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceFactoryImpl.java deleted file mode 100644 index 5986c3e42c..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceFactoryImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; - - -public class DTDResourceFactoryImpl extends ResourceFactoryImpl { - public DTDResourceFactoryImpl() { - super(); - } - - public Resource createResource(String filename) { - return new DTDResourceImpl(filename); - } - - public Resource createResource(URI uri) { - return new DTDResourceImpl(uri); - } - - public Resource createResource(ResourceSet resources, URI uri) { - Resource resource = new DTDResourceImpl(uri); - resources.getResources().add(resource); - return resource; - } - - public Resource createResource(ResourceSet resources, String uri) { - Resource resource = new DTDResourceImpl(uri); - resources.getResources().add(resource); - return resource; - } - - public Resource load(String uri) throws Exception { - Resource resource = createResource(uri); - resource.load(new HashMap()); - return resource; - } - - public Resource load(URI uri) throws Exception { - Resource resource = createResource(uri); - resource.load(new HashMap()); - return resource; - } - - public Resource load(ResourceSet resources, String uri) throws Exception { - return load(resources, uri, new HashMap()); - } - - public Resource load(ResourceSet resources, URI uri) throws Exception { - return load(resources, uri, new HashMap()); - } - - public Resource load(ResourceSet resources, String uri, Map options) throws Exception { - Resource resource = createResource(resources, uri); - resource.load(options); - return resource; - } - - public Resource load(ResourceSet resources, URI uri, Map options) throws Exception { - Resource resource = createResource(resources, uri); - resource.load(options); - return resource; - } -} // DTDResourceFactoryImpl diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceImpl.java deleted file mode 100644 index 9d085be4d6..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceImpl.java +++ /dev/null @@ -1,166 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import java.io.OutputStream; -import java.util.Iterator; -import java.util.Map; -import java.util.zip.ZipOutputStream; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.impl.ResourceImpl; -import org.eclipse.wst.dtd.core.internal.DTDCoreMessages; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; - - -public class DTDResourceImpl extends ResourceImpl { - - public DTDResourceImpl() { - super(); - } - - public DTDResourceImpl(String filename) { - super(URI.createURI(filename)); - // System.out.println(">>>> DTDResourceImpl ctor 1"); - } - - public DTDResourceImpl(URI uri) { - super(uri); - // System.out.println(">>>> DTDResourceImpl ctor 2"); - } - - /** - * Returns the resolved object for the given URI - * {@link URI#fragment fragment}. - * <p> - * The fragment encoding will typically be that produced by - * {@link #getURIFragment getURIFragment}. - * </p> - * - * @param uriFragment - * the fragment to resolve. - * @return the resolved object for the given fragment. - * @see #getURIFragment(EObject) - * @see org.eclipse.emf.ecore.resource.ResourceSet#getEObject(URI, boolean) - * @see org.eclipse.emf.ecore.util.EcoreUtil#resolve(EObject, org.eclipse.emf.ecore.resource.ResourceSet) - * @see org.eclipse.emf.ecore.InternalEObject#eObjectForURIFragmentSegment(String) - * @throws org.eclipse.emf.common.util.WrappedException - * if a problem occurs navigating the fragment. - */ - public EObject getEObject(java.lang.String uriFragment) { - EList contents = getContents(); - if (contents != null) { - Iterator i = contents.iterator(); - while (i.hasNext()) { - Object obj = i.next(); - if (obj instanceof DTDFile) { - // there should only be one DTDFile in a DTD extent - EObject result = ((DTDFile) obj).findObject(uriFragment); - return result; - } - } - } - System.out.println(">>> DTDKey Error: cannot find object " + uriFragment); //$NON-NLS-1$ - return super.getEObject(uriFragment); - } - - /** - * Returns the URI {@link URI#fragment fragment} that, when passed to - * {@link #getEObject getEObject} will return the given object. - * <p> - * In other words, the following is <code>true</code> for any object - * contained by a resource: - * - * <pre> - * - * Resource resource = eObject.eResource(); - * eObject == resource.getEObject(resource.getURIFragment(eObject)) - * - * </pre> - * - * An implementation may choose to use IDs or to use structured URI - * fragments, as supported by - * {@link org.eclipse.emf.ecore.InternalEObject#eURIFragmentSegment eURIFragmentSegment}. - * </p> - * - * @param eObject - * the object to identify. - * @return the URI {@link URI#fragment fragment} for the object. - * @see #getEObject(String) - * @see org.eclipse.emf.ecore.InternalEObject#eURIFragmentSegment(org.eclipse.emf.core.EStructuralFeature, - * EObject) - */ - public java.lang.String getURIFragment(EObject eObject) { - if (eObject instanceof DTDObject) { - return ((DTDObject) eObject).getPathname(); - } - return super.getURIFragment(eObject); - } - - private DTDUtil dtdUtil; - - public DTDUtil getDTDUtil() { - return dtdUtil; - } - - public void setDTDUtil(DTDUtil dtdUtil) { - this.dtdUtil = dtdUtil; - } - - public void load(Map options) { - - String uriString = getURI().toString(); - try { - DTDUtil dtdUtil = new DTDUtil(); - dtdUtil.parse(getResourceSet(), uriString); - dtdUtil.setResource(this); - setDTDUtil(dtdUtil); - getContents().add(dtdUtil.getDTDFile()); - - // Reset the dirty flag after the resource is loaded - setModified(false); - } - catch (Exception exc) { - exc.printStackTrace(); - } - } - - public void save(OutputStream os, Object options) throws Exception { - if (contents != null) { - Iterator i = contents.iterator(); - while (i.hasNext()) { - Object obj = i.next(); - if (obj instanceof DTDFile) { - try { - DTDPrinter printer = new DTDPrinter(true); - printer.visitDTDFile((DTDFile) obj); - - String s = printer.getBuffer().toString(); - os.write(s.getBytes()); - // Reset the dirty flag after the resource is saved - setModified(false); - } - catch (Exception e) { - } - break; - } - } - } - } - - public void save(ZipOutputStream zos, String entry, String metaModelName) throws Exception { - throw new Exception(DTDCoreMessages._EXC_OPERATION_NOT_SUPPORTED); //$NON-NLS-1$ - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDSwitch.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDSwitch.java deleted file mode 100644 index d903b643e1..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDSwitch.java +++ /dev/null @@ -1,489 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EModelElement; -import org.eclipse.emf.ecore.ENamedElement; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.ETypedElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType; -import org.eclipse.wst.dtd.core.internal.emf.DTDContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType; -import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDPackage; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent; - - - -public class DTDSwitch { - /** - * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected static DTDPackage modelPackage; - - /** - * @generated This field/method will be replaced during code generation. - */ - public DTDSwitch() { - if (modelPackage == null) { - modelPackage = DTDPackage.eINSTANCE; - } - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object doSwitch(EObject theEObject) { - EClass theEClass = theEObject.eClass(); - if (theEClass.eContainer() == modelPackage) { - switch (theEClass.getClassifierID()) { - case DTDPackage.DTD_GROUP_CONTENT : { - DTDGroupContent dtdGroupContent = (DTDGroupContent) theEObject; - Object result = caseDTDGroupContent(dtdGroupContent); - if (result == null) - result = caseDTDRepeatableContent(dtdGroupContent); - if (result == null) - result = caseDTDElementContent(dtdGroupContent); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_ATTRIBUTE : { - DTDAttribute dtdAttribute = (DTDAttribute) theEObject; - Object result = caseDTDAttribute(dtdAttribute); - if (result == null) - result = caseEAttribute(dtdAttribute); - if (result == null) - result = caseEStructuralFeature(dtdAttribute); - if (result == null) - result = caseETypedElement(dtdAttribute); - if (result == null) - result = caseENamedElement(dtdAttribute); - if (result == null) - result = caseEModelElement(dtdAttribute); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_ELEMENT : { - DTDElement dtdElement = (DTDElement) theEObject; - Object result = caseDTDElement(dtdElement); - if (result == null) - result = caseEClass(dtdElement); - if (result == null) - result = caseDTDContent(dtdElement); - if (result == null) - result = caseEClassifier(dtdElement); - if (result == null) - result = caseENamedElement(dtdElement); - if (result == null) - result = caseEModelElement(dtdElement); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_EMPTY_CONTENT : { - DTDEmptyContent dtdEmptyContent = (DTDEmptyContent) theEObject; - Object result = caseDTDEmptyContent(dtdEmptyContent); - if (result == null) - result = caseDTDElementContent(dtdEmptyContent); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_ANY_CONTENT : { - DTDAnyContent dtdAnyContent = (DTDAnyContent) theEObject; - Object result = caseDTDAnyContent(dtdAnyContent); - if (result == null) - result = caseDTDElementContent(dtdAnyContent); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_PC_DATA_CONTENT : { - DTDPCDataContent dtdpcDataContent = (DTDPCDataContent) theEObject; - Object result = caseDTDPCDataContent(dtdpcDataContent); - if (result == null) - result = caseDTDElementContent(dtdpcDataContent); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT : { - DTDElementReferenceContent dtdElementReferenceContent = (DTDElementReferenceContent) theEObject; - Object result = caseDTDElementReferenceContent(dtdElementReferenceContent); - if (result == null) - result = caseDTDRepeatableContent(dtdElementReferenceContent); - if (result == null) - result = caseDTDElementContent(dtdElementReferenceContent); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_FILE : { - DTDFile dtdFile = (DTDFile) theEObject; - Object result = caseDTDFile(dtdFile); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_BASIC_TYPE : { - DTDBasicType dtdBasicType = (DTDBasicType) theEObject; - Object result = caseDTDBasicType(dtdBasicType); - if (result == null) - result = caseEClass(dtdBasicType); - if (result == null) - result = caseEClassifier(dtdBasicType); - if (result == null) - result = caseENamedElement(dtdBasicType); - if (result == null) - result = caseEModelElement(dtdBasicType); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_ENUMERATION_TYPE : { - DTDEnumerationType dtdEnumerationType = (DTDEnumerationType) theEObject; - Object result = caseDTDEnumerationType(dtdEnumerationType); - if (result == null) - result = caseEEnum(dtdEnumerationType); - if (result == null) - result = caseEDataType(dtdEnumerationType); - if (result == null) - result = caseEClassifier(dtdEnumerationType); - if (result == null) - result = caseENamedElement(dtdEnumerationType); - if (result == null) - result = caseEModelElement(dtdEnumerationType); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_NOTATION : { - DTDNotation dtdNotation = (DTDNotation) theEObject; - Object result = caseDTDNotation(dtdNotation); - if (result == null) - result = caseDTDContent(dtdNotation); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_ENTITY : { - DTDEntity dtdEntity = (DTDEntity) theEObject; - Object result = caseDTDEntity(dtdEntity); - if (result == null) - result = caseDTDContent(dtdEntity); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_EXTERNAL_ENTITY : { - DTDExternalEntity dtdExternalEntity = (DTDExternalEntity) theEObject; - Object result = caseDTDExternalEntity(dtdExternalEntity); - if (result == null) - result = caseDTDEntityContent(dtdExternalEntity); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_INTERNAL_ENTITY : { - DTDInternalEntity dtdInternalEntity = (DTDInternalEntity) theEObject; - Object result = caseDTDInternalEntity(dtdInternalEntity); - if (result == null) - result = caseDTDEntityContent(dtdInternalEntity); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE : { - DTDParameterEntityReference dtdParameterEntityReference = (DTDParameterEntityReference) theEObject; - Object result = caseDTDParameterEntityReference(dtdParameterEntityReference); - if (result == null) - result = caseDTDContent(dtdParameterEntityReference); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT : { - DTDEntityReferenceContent dtdEntityReferenceContent = (DTDEntityReferenceContent) theEObject; - Object result = caseDTDEntityReferenceContent(dtdEntityReferenceContent); - if (result == null) - result = caseDTDRepeatableContent(dtdEntityReferenceContent); - if (result == null) - result = caseDTDElementContent(dtdEntityReferenceContent); - if (result == null) - result = defaultCase(theEObject); - return result; - } - default : - return defaultCase(theEObject); - } - } - return defaultCase(theEObject); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDFile(DTDFile object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDNotation(DTDNotation object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDContent(DTDContent object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDEntity(DTDEntity object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDEntityContent(DTDEntityContent object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDExternalEntity(DTDExternalEntity object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDInternalEntity(DTDInternalEntity object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDParameterEntityReference(DTDParameterEntityReference object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDEntityReferenceContent(DTDEntityReferenceContent object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDRepeatableContent(DTDRepeatableContent object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDElementReferenceContent(DTDElementReferenceContent object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDElement(DTDElement object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDElementContent(DTDElementContent object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDEmptyContent(DTDEmptyContent object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDAnyContent(DTDAnyContent object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDPCDataContent(DTDPCDataContent object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDGroupContent(DTDGroupContent object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDAttribute(DTDAttribute object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDEnumerationType(DTDEnumerationType object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseDTDBasicType(DTDBasicType object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - // +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ - // - // +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ - // // public Object caseENamespace(ENamespace object) { - // -------------------GENERICRULES.JSED------------------- - // return null; - // } - // -------------------GENERICRULES.JSED------------------- - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseEClass(EClass object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseEAttribute(EAttribute object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseEEnum(EEnum object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseEModelElement(EModelElement object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseENamedElement(ENamedElement object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseEStructuralFeature(EStructuralFeature object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseEDataType(EDataType object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseETypedElement(ETypedElement object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public Object caseEClassifier(EClassifier object) { - return null; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - // +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ - // - // +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++ - // // public Object caseInternalEClassifier(InternalEClassifier object) { - // -------------------GENERICRULES.JSED------------------- - // return null; - // } - // -------------------GENERICRULES.JSED------------------- - /** - * @generated This field/method will be replaced during code generation. - */ - public Object defaultCase(EObject object) { - return null; - } - -} // DTDSwitch diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUniqueNameHelper.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUniqueNameHelper.java deleted file mode 100644 index 2b8ff3eb83..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUniqueNameHelper.java +++ /dev/null @@ -1,174 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import java.util.Iterator; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; - - - -public class DTDUniqueNameHelper { - public DTDUniqueNameHelper() { - - } - - static public String getUniqueElementName(DTDFile dtdFile) { - List elements = dtdFile.listDTDElement(); - return getUniqueName(elements, "NewElement"); //$NON-NLS-1$ - } - - static public String getUniqueEntityName(DTDFile dtdFile) { - List entities = dtdFile.listDTDEntity(); - return getUniqueName(entities, "NewEntity"); //$NON-NLS-1$ - } - - static public String getUniqueNotationName(DTDFile dtdFile) { - List notations = dtdFile.listDTDNotation(); - return getUniqueName(notations, "NewNotation"); //$NON-NLS-1$ - } - - static public String getUniqueAttributeName(DTDElement element) { - List attrs = element.getDTDAttribute(); - return getUniqueName(attrs, "NewAttribute"); //$NON-NLS-1$ - } - - static public String getUniqueName(List objs, String token) { - int counter = 1; - - boolean uniqueName = false; - while (!uniqueName) { - String newName = token + new Integer(counter++); - uniqueName = true; - Iterator iter = objs.iterator(); - while (iter.hasNext()) { - Object obj = iter.next(); - String objName = getName(obj); - if (objName.equals(newName)) { - uniqueName = false; - break; - } - } - if (uniqueName) { - return newName; - } - } - // we shouldn't get here - return "No Name found"; //$NON-NLS-1$ - } - - static public String getName(Object obj) { - if (obj instanceof DTDElement) { - return ((DTDElement) obj).getName(); - } - else if (obj instanceof DTDEntity) { - return ((DTDEntity) obj).getName(); - } - else if (obj instanceof DTDNotation) { - return ((DTDNotation) obj).getName(); - } - else if (obj instanceof DTDAttribute) { - return ((DTDAttribute) obj).getName(); - } - return ""; //$NON-NLS-1$ - } - - - /** - * @generated - */ - protected static String getUniqueElementNameGen(DTDFile dtdFile) { - - List elements = dtdFile.listDTDElement(); - return getUniqueName(elements, "NewElement"); //$NON-NLS-1$ - } - - /** - * @generated - */ - protected static String getUniqueEntityNameGen(DTDFile dtdFile) { - - List entities = dtdFile.listDTDEntity(); - return getUniqueName(entities, "NewEntity"); //$NON-NLS-1$ - } - - /** - * @generated - */ - protected static String getUniqueNotationNameGen(DTDFile dtdFile) { - - List notations = dtdFile.listDTDNotation(); - return getUniqueName(notations, "NewNotation"); //$NON-NLS-1$ - } - - /** - * @generated - */ - protected static String getUniqueAttributeNameGen(DTDElement element) { - - List attrs = element.getDTDAttribute(); - return getUniqueName(attrs, "NewAttribute"); //$NON-NLS-1$ - } - - /** - * @generated - */ - protected static String getUniqueNameGen(List objs, String token) { - - int counter = 1; - - boolean uniqueName = false; - while (!uniqueName) { - String newName = token + new Integer(counter++); - uniqueName = true; - Iterator iter = objs.iterator(); - while (iter.hasNext()) { - Object obj = iter.next(); - String objName = getName(obj); - if (objName.equals(newName)) { - uniqueName = false; - break; - } - } - if (uniqueName) { - return newName; - } - } - // we shouldn't get here - return "No Name found"; //$NON-NLS-1$ - } - - /** - * @generated - */ - protected static String getNameGen(Object obj) { - - if (obj instanceof DTDElement) { - return ((DTDElement) obj).getName(); - } - else if (obj instanceof DTDEntity) { - return ((DTDEntity) obj).getName(); - } - else if (obj instanceof DTDNotation) { - return ((DTDNotation) obj).getName(); - } - else if (obj instanceof DTDAttribute) { - return ((DTDAttribute) obj).getName(); - } - return ""; //$NON-NLS-1$ - } -}// DTDUniqueNameHelper diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUtil.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUtil.java deleted file mode 100644 index 8f9a7df7b0..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUtil.java +++ /dev/null @@ -1,1217 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Collection; -import java.util.HashMap; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.Map; -import java.util.Vector; - -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.wst.dtd.core.internal.emf.DTDConstants; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDFactory; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.impl.DTDFactoryImpl; -import org.eclipse.wst.dtd.core.internal.saxparser.DTD; -import org.eclipse.wst.dtd.core.internal.saxparser.DTDParser; -import org.eclipse.wst.dtd.core.internal.saxparser.ErrorMessage; - -/** - * Create MOF objects from the parsed DTD If no DTD file is specifed, create - * the root MOF object - */ -public class DTDUtil { - DTDFactory factory; - EList extent; - Resource resource; - DTDFile dtdFile; - String dtdModelFile; - boolean expandEntityReferences; - - private Hashtable externalDTDModels = new Hashtable(); - private Hashtable pePool = new Hashtable(); - private Hashtable elementPool = new Hashtable(); - - private DTDParser parser; - - private Vector errorMsgs = new Vector(); - - private static Hashtable utilCache = new Hashtable(); - - static public DTDUtil getDTDUtilFor(String filename) { - DTDUtil util = (DTDUtil) utilCache.get(filename); - if (util == null) { - util = new DTDUtil(); - utilCache.put(filename, util); - } - - return util; - } - - - public void parse(String uri) { - parse(new ResourceSetImpl(), uri); - } - - /** - * Invoke parse to parse a .dtd file into a MOF object model This is - * invoked by the RegisteredDTDParser that registers this parser for MOF - * to use against the .dtd type - * - * @param filename - - * the fully qualifed name of a .dtd file - */ - public void parse(ResourceSet resources, String filename) { - // Get the dtd name from the file name - Path path = new Path(filename); - IPath iPath = path.removeFileExtension(); - String dtdName = iPath.toFile().getName(); - - try { - parser = new DTDParser(false); - if (expandEntityReferences) { - parser.setExpandEntityReferences(expandEntityReferences); - } - parser.parse(filename); - } - catch (IOException ex) { - ex.printStackTrace(System.err); - } - - dtdModelFile = filename; - - factory = DTDFactoryImpl.instance(); - - extent = new BasicEList(); - - dtdFile = factory.createDTDFile(); - extent.add(dtdFile); - - dtdFile.setName(dtdName); - - populateDTD(resources, expandEntityReferences); - } - - public DTDFactory getFactory() { - return factory; - } - - public DTDFile getDTDFile() { - return dtdFile; - } - - public Hashtable getPEPool() { - return pePool; - } - - public Hashtable getElementPool() { - return elementPool; - } - - public EList getContents() { - return extent; - } - - public void setResource(Resource resource) { - this.resource = resource; - } - - public Resource getResource(Resource resource) { - return resource; - } - - public void setexpandEntityReferences(boolean expandEntityReferences) { - this.expandEntityReferences = expandEntityReferences; - } - - public boolean getExpandEntityReferences() { - return expandEntityReferences; - } - - /** - * Return true if the model has been modified - */ - public boolean isModelDirty() { - if (resource != null) { - return resource.isModified(); - } - return false; - } - - /** - * Save the .dtd file - */ - public boolean save() { - try { - Map options = new HashMap(); - resource.save(options); - return true; - } - catch (Exception ex) { - System.out.println("Save model exception " + ex); //$NON-NLS-1$ - ex.printStackTrace(); - return false; - } - } - - public boolean saveAs(String newFilename) { - resource.setURI(URI.createURI(newFilename)); - boolean ok = save(); - - if (ok) { - Path path = new Path(newFilename); - IPath iPath = path.removeFileExtension(); - String dtdName = iPath.toFile().getName(); - - dtdFile.setName(dtdName); - } - return ok; - } - - public boolean saveDTDFile(String filename) { - boolean result = true; - try { - PrintWriter pw = new PrintWriter(new FileWriter(filename), true); - DTDPrinter printer = new DTDPrinter(true); - printer.visitDTDFile(dtdFile); - - String s = printer.getBuffer().toString(); - pw.println(s); - pw.close(); - } - - catch (Exception e) { - result = false; - } - return result; - } - - public String getDTDSource(boolean includeError) { - return dtdFile.unparse(includeError); // true = include error lines - } - - /** - * Create MOF objects from DTD - */ - private void populateDTD(ResourceSet resources, boolean expandEntityReferences) { - Vector dtdList = parser.getDTDList(); - - // create XMIModel for the included DTDs - if (dtdList.size() > 0) { - if (!expandEntityReferences) { - for (int i = dtdList.size() - 1; i > 0; i--) { - DTD dtd = (DTD) dtdList.elementAt(i); - loadIncludedDTD(resources, dtd); - } - - DTD dtd = (DTD) dtdList.elementAt(0); - populateDTD(resources, dtd, dtdFile); // populate the main - // DTD - // validateWithModel(dtd); - } - else { - for (int i = dtdList.size() - 1; i >= 0; i--) { - DTD dtd = (DTD) dtdList.elementAt(i); - populateDTD(resources, dtd, dtdFile); - // validateWithModel(dtd); - } - } - } - } - - // return the instance unique to this DTDUtil file that represents an - // externally loaded dtd (will create if one doesn't exist yet) - public ExternalDTDModel getExternalDTDModel(ResourceSet resources, String uri) { - if (expandEntityReferences) { - return null; - } - - // DefaultMsgLogger.write("External DTD name: " + uri); - - if (externalDTDModels.containsKey(uri)) { - return (ExternalDTDModel) externalDTDModels.get(uri); - } - else { - ExternalDTDModel extModel = new ExternalDTDModel(); - if (extModel.loadModel(resources, uri)) { - externalDTDModels.put(uri, extModel); - return extModel; - } - } - return null; - } - - // load xmiModels for included DTDs - private void loadIncludedDTD(ResourceSet resources, DTD dtd) { - ExternalDTDModel extModel = getExternalDTDModel(resources, dtd.getName()); - if (extModel != null) { - // now fill our hash tables for elements and parameter entities - // so that we know what can be referenced by our main dtd - DTDFile file = extModel.getExternalDTDFile(); - Collection elementList = file.listDTDElement(); - Collection entityList = file.listDTDEntity(); - - Iterator i = elementList.iterator(); - while (i.hasNext()) { - DTDObject object = (DTDObject) i.next(); - elementPool.put(getBaseName(object), object); - } - - i = entityList.iterator(); - while (i.hasNext()) { - DTDEntity entity = (DTDEntity) i.next(); - if (entity.isParameterEntity()) { - pePool.put(getBaseName(entity), entity); - } - } - } - } - - /** - * Create MOF objects from DTD - * - * 1) will create the corresponding DTD Mof object for EntityDecl, - * NotationDecl and ElementDecl declarations during the 1st pass 2) During - * the 2nd pass, it will add the contentModel and Attlist to all - * ElementDecl. - * - */ - private void populateDTD(ResourceSet resources, DTD dtd, DTDFile dFile) { - DTDModelBuilder modelBuilder = new DTDModelBuilder(resources, this, dtd, dFile); - - modelBuilder.visitDTD(dtd); - } - - - public void emptyErrorMessages() { - errorMsgs.removeAllElements(); - } - - public void addErrorMessage(ErrorMessage error) { - int vectorSize = errorMsgs.size(); - boolean add = true; - - if (vectorSize != 0) { - int index = 0; - - while (add == true && index < vectorSize) { - if (((ErrorMessage) errorMsgs.elementAt(index)).equals(error)) { - add = false; - } - else { - index++; - } - } - } - - if (add) { - errorMsgs.addElement(error); - } - } - - public Vector getErrors() { - return errorMsgs; - } - - // This gets the name without any pseudo namespace prefix - public static String getBaseName(DTDObject obj) { - return getName(obj, null); - } - - // This gets the name with pseudo namespace prefixes if dtdFile is not - // null - public static String getName(DTDObject obj, DTDFile dtdFile) { - String name = ""; //$NON-NLS-1$ - if (obj instanceof DTDEntity) { - DTDEntity entity = (DTDEntity) obj; - if (dtdFile != null && !entity.getDTDFile().equals(dtdFile)) { - name = new Path(entity.getDTDFile().getName()).lastSegment() + ": "; //$NON-NLS-1$ - } - name += "%" + ((DTDEntity) obj).getName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$ - } - else if (obj instanceof DTDElement) { - DTDElement element = (DTDElement) obj; - if (dtdFile != null && !element.getDTDFile().equals(dtdFile)) { - name = new Path(element.getDTDFile().getName()).lastSegment() + ": "; //$NON-NLS-1$ - } - name += ((DTDElement) obj).getName(); - } - else if (obj instanceof DTDElementContent) { - return ((DTDElementContent) obj).getContentName(); - } - return name; - } - - public static String getGroupType(int groupKind, int occurrence) { - String type = null; - - switch (groupKind) { - case DTDGroupKind.SEQUENCE : - type = "DTDSequence"; //$NON-NLS-1$ - break; - case DTDGroupKind.CHOICE : - type = "DTDChoice"; //$NON-NLS-1$ - break; - } - - type += getRepeatableTypeSuffix(occurrence); - return type; - } - - public static String getReferenceType(int occurrence) { - String type = "DTDReference"; //$NON-NLS-1$ - type += getRepeatableTypeSuffix(occurrence); - return type; - } - - private static String getRepeatableTypeSuffix(int occurrence) { - return "(" + (char) occurrence + ")"; //$NON-NLS-1$ //$NON-NLS-2$ - } - - public static void main(String args[]) { - System.out.println("\nStarting ..."); //$NON-NLS-1$ - - if (args.length != 1) - System.out.println("usage: DtdUtil inputfile.dtd"); //$NON-NLS-1$ - - java.io.File inputFile = new File(args[0]); - - String dtdFileName = ""; //$NON-NLS-1$ - try { - dtdFileName = inputFile.getCanonicalPath(); - } - catch (IOException ex) { - } - - String dtdModelName = dtdFileName; - - if (DTDConstants.DTD_EXTENSION.equals(new Path(dtdFileName).getFileExtension())) { - dtdModelName = new Path(dtdFileName).removeFileExtension().lastSegment(); - } - DTDUtil d2m = new DTDUtil(); - // TODO: fix port - // d2m.parse(dtdFileName); - try { - d2m.saveAs(dtdModelName + "." + DTDConstants.DTD_XMI_EXTENSION); //$NON-NLS-1$ - } - catch (Exception e) { - System.out.println("Exception thrown during model save: " + e); //$NON-NLS-1$ - } - System.out.println("Done."); //$NON-NLS-1$ - } - - public org.eclipse.core.runtime.IPath getPath() { - Path currentDTDPath = new Path(dtdModelFile); - if (currentDTDPath.segmentCount() > 1) { - return currentDTDPath.removeLastSegments(1).addTrailingSeparator(); - } - - return new Path(""); //$NON-NLS-1$ - } - - // /** - // * @generated - // */ - // protected static DTDUtil getDTDUtilForGen(String filename) { - // - // DTDUtil util = (DTDUtil) utilCache.get(filename); - // if (util == null) - // { - // util = new DTDUtil(); - // utilCache.put(filename, util); - // } - // - // return util; - // } - // /** - // * @generated - // */ - // protected void parseGen(String uri) { - // - // parse(new ResourceSetImpl(), uri); - // } - // /** - // * Invoke parse to parse a .dtd file into a MOF object model - // * This is invoked by the RegisteredDTDParser that registers this parser - // for MOF to use - // * against the .dtd type - // * @param filename - the fully qualifed name of a .dtd file - // */ - // protected void parseGen(ResourceSet resources, String filename) { - // - // // Get the dtd name from the file name - // Path path = new Path(filename); - // IPath iPath = path.removeFileExtension(); - // String dtdName = iPath.toFile().getName(); - // - // - // try - // { - // parser = new DTDParser(false); - // if (expandEntityReferences) - // { - // parser.setExpandEntityReferences(expandEntityReferences); - // } - // parser.parse(filename); - // } - // catch(IOException ex) - // { - // ex.printStackTrace(System.err); - // } - // - // - // dtdModelFile = filename; - // - // - // factory = DTDFactoryImpl.instance(); - // - // - // extent = new BasicEList(); - // - // - // dtdFile = factory.createDTDFile(); - // extent.add(dtdFile); - // - // - // dtdFile.setName(dtdName); - // - // - // populateDTD(resources, expandEntityReferences); - // } - // /** - // * @generated - // */ - // protected DTDFactory getFactoryGen() { - // - // return factory; - // } - // /** - // * @generated - // */ - // protected DTDFile getDTDFileGen() { - // - // return dtdFile; - // } - // /** - // * @generated - // */ - // protected Hashtable getPEPoolGen() { - // - // return pePool; - // } - // /** - // * @generated - // */ - // protected Hashtable getElementPoolGen() { - // - // return elementPool; - // } - // /** - // * @generated - // */ - // protected EList getExtentGen() { - // - // return extent; - // } - // /** - // * @generated - // */ - // protected void setResourceGen(Resource resource) { - // - // this.resource = resource; - // } - // /** - // * @generated - // */ - // protected Resource getResourceGen(Resource resource) { - // - // return resource; - // } - // /** - // * @generated - // */ - // protected void setexpandEntityReferencesGen(boolean - // expandEntityReferences) { - // - // this.expandEntityReferences = expandEntityReferences; - // } - // /** - // * @generated - // */ - // protected boolean getExpandEntityReferencesGen() { - // - // return expandEntityReferences; - // } - // /** - // * Return true if the model has been modified - // */ - // protected boolean isModelDirtyGen() { - // - // if (resource != null) - // { - // return resource.isModified(); - // } - // return false; - // } - // /** - // * Save the .dtd file - // */ - // protected boolean saveGen() { - // - // try - // { - // resource.save(); - // return true; - // } - // catch (Exception ex) - // { - // System.out.println("Save model exception " + ex); - // ex.printStackTrace(); - // return false; - // } - // } - // /** - // * @generated - // */ - // protected boolean saveAsGen(String newFilename) { - // - // resource.setURI(newFilename); - // boolean ok = save(); - // - // - // if (ok) - // { - // Path path = new Path(newFilename); - // IPath iPath = path.removeFileExtension(); - // String dtdName = iPath.toFile().getName(); - // - // - // dtdFile.setName(dtdName); - // } - // return ok; - // } - // /** - // * @generated - // */ - // protected boolean saveDTDFileGen(String filename) { - // - // boolean result=true; - // try - // { - // PrintWriter pw = new PrintWriter(new FileWriter(filename),true); - // DTDPrinter printer = new DTDPrinter(true); - // printer.visitDTDFile(dtdFile); - // - // - // String s = printer.getBuffer().getName().toString(); - // pw.println(s); - // pw.close(); - // } - // - // - // catch (Exception e) - // { - // result = false; - // } - // return result; - // } - // /** - // * @generated - // */ - // protected String getDTDSourceGen(boolean includeError) { - // - // return dtdFile.unparse(includeError); // true = include error lines - // } - // /** - // * Create MOF objects from DTD - // */ - // protected void populateDTDGen(ResourceSet resources, boolean - // expandEntityReferences) { - // - // Vector dtdList = parser.getDTDList(); - // - // - // // create XMIModel for the included DTDs - // if ( dtdList.size() > 0) - // { - // if (!expandEntityReferences) - // { - // for (int i=dtdList.size() - 1; i > 0; i--) - // { - // DTD dtd = (DTD) dtdList.elementAt(i); - // loadIncludedDTD(resources, dtd); - // } - // - // - // DTD dtd = (DTD) dtdList.elementAt(0); - // populateDTD(resources, dtd, dtdFile); // populate the main DTD - // // validateWithModel(dtd); - // } - // else - // { - // for (int i = dtdList.size() - 1; i >= 0; i--) - // { - // DTD dtd = (DTD) dtdList.elementAt(i); - // populateDTD(resources, dtd, dtdFile); - // // validateWithModel(dtd); - // } - // } - // } - // } - // /** - // * @generated - // */ - // protected ExternalDTDModel getExternalDTDModelGen(ResourceSet - // resources, String uri) { - // - // if (expandEntityReferences) - // { - // return null; - // } - // - // DefaultMsgLogger.write("External DTD name: " + uri); - // - // - // if (externalDTDModels.containsKey(uri)) - // { - // return (ExternalDTDModel) externalDTDModels.get(uri); - // } - // else - // { - // ExternalDTDModel extModel = new ExternalDTDModel(); - // if (extModel.loadModel(resources, uri)) - // { - // externalDTDModels.put(uri, extModel); - // return extModel; - // } - // } - // return null; - // } - // /** - // * @generated - // */ - // protected void loadIncludedDTDGen(ResourceSet resources, DTD dtd) { - // - // ExternalDTDModel extModel = getExternalDTDModel(resources, - // dtd.getName()); - // if (extModel != null) - // { - // // now fill our hash tables for elements and parameter entities - // // so that we know what can be referenced by our main dtd - // DTDFile file = extModel.getExternalDTDFile(); - // Collection elementList = file.listDTDElement(); - // Collection entityList = file.listDTDEntity(); - // - // - // Iterator i = elementList.iterator(); - // while (i.hasNext()) - // { - // DTDObject object = (DTDObject) i.next(); - // elementPool.put(getBaseName(object), object); - // } - // - // i = entityList.iterator(); - // while (i.hasNext()) - // { - // DTDEntity entity = (DTDEntity) i.next(); - // if (entity.isParameterEntity()) - // { - // pePool.put(getBaseName(entity), entity); - // } - // } - // } - // } - // /** - // * Create MOF objects from DTD - // * - // * 1) will create the corresponding DTD Mof object for EntityDecl, - // NotationDecl - // * and ElementDecl declarations during the 1st pass - // * 2) During the 2nd pass, it will add the contentModel and Attlist to - // all - // * ElementDecl. - // * - // */ - // protected void populateDTDGen(ResourceSet resources, DTD dtd, DTDFile - // dFile) { - // - // DTDModelBuilder modelBuilder = new DTDModelBuilder(resources, this, - // dtd, dFile); - // - // - // modelBuilder.visitDTD(dtd); - // } - // /** - // * @generated - // */ - // protected void emptyErrorMessagesGen() { - // - // errorMsgs.removeAllElements(); - // } - // /** - // * @generated - // */ - // protected void addErrorMessageGen(ErrorMessage error) { - // - // int vectorSize = errorMsgs.size(); - // boolean add = true; - // - // - // if (vectorSize != 0) - // { - // int index = 0; - // - // - // while (add == true && index < vectorSize) - // { - // if (((ErrorMessage) errorMsgs.elementAt(index)).equals(error)) - // { - // add =false; - // } - // else - // { - // index++; - // } - // } - // } - // - // - // if (add) - // { - // errorMsgs.addElement(error); - // } - // } - // /** - // * @generated - // */ - // protected Vector getErrorsGen() { - // - // return errorMsgs; - // } - // /** - // * @generated - // */ - // protected boolean validateDTDGen() { - // - // String tempDTDFile=getPath().toOSString()+"tempValidatingFileName.dtd"; - // try - // { - // saveDTDFile(tempDTDFile); - // - // - // parser = new DTDParser(false); - // if (FileUtility.fileExists(tempDTDFile)) - // { - // parser.parse(tempDTDFile); - // } - // Vector dtdList = parser.getDTDList(); - // if ( dtdList.size() > 0) - // { - // // reset the errors and update what we have in the element pool - // emptyErrorMessages(); - // updateElementHashtable(); - // - // - // // TODO: do we just validate the current one? - // validateWithModel((DTD)dtdList.elementAt(0)); - // } - // } - // catch(IOException ex) - // { - // ex.printStackTrace(System.err); - // FileUtility.delete(tempDTDFile); - // } - // FileUtility.delete(tempDTDFile); - // - // - // return dtdFile.isParseError(); - // } - // /** - // * @generated - // */ - // protected void validateWithModelGen(DTD dtd) { - // - // Enumeration en = dtd.externalElements(); - // while (en.hasMoreElements()) - // { - // Object e = en.nextElement(); - // - // - // if ( e instanceof EntityDecl ) - // { - // EntityDecl entity = (EntityDecl) e; - // ErrorMessage errMsg = entity.getErrorMessage(); - // if ( errMsg!= null) - // { - // addErrorMessage(errMsg); - // // dtdFile.setParseError(true); - // } - // } - // else if ( e instanceof ElementDecl ) - // { - // ElementDecl elem = (ElementDecl) e; - // ErrorMessage errMsg = elem.getErrorMessage(); - // DTDElement dtdelement = (DTDElement) - // getElementPool().get(elem.getNodeName()); - // - // - // if ( errMsg!= null) - // { - // addErrorMessage(errMsg); - // } - // checkForMissingElementReferences(dtdelement); - // } - // else if ( e instanceof NotationDecl ) - // { - // NotationDecl notation = (NotationDecl) e; - // ErrorMessage errMsg = notation.getErrorMessage(); - // if ( errMsg!= null) - // { - // addErrorMessage(errMsg); - // } - // } - // else if ( e instanceof Attlist ) - // { - // Attlist attList = (Attlist) e; - // ErrorMessage errMsg = attList.getErrorMessage(); - // if ( errMsg!= null) - // { - // addErrorMessage(errMsg); - // } - // } - // } - // - // - // checkForDuplicateIDAttribute(); - // } - // /** - // * @generated - // */ - // protected void updateElementHashtableGen() { - // - // elementPool.clear(); - // CreateListItems itemsHelper = new CreateListItems(dtdFile); - // - // - // Vector allElements = itemsHelper.getElements(); - // // go through all the dtdFiles and list the elements - // int numElements = allElements.size(); - // - // - // for (int i = 0; i < numElements; i++) - // { - // DTDElement element = (DTDElement) allElements.elementAt(i); - // elementPool.put(getBaseName(element), element); - // } - // } - // /** - // * @generated - // */ - // protected void updateEntityHashtableGen() { - // - // updateHashTable(pePool, dtdFile.listDTDEntity()); - // } - // /** - // * @generated - // */ - // protected void updateHashTableGen(Hashtable h, Collection dtdObjects) { - // - // h.clear(); - // Iterator i = dtdObjects.iterator(); - // while (i.hasNext()) - // { - // String name = ""; - // DTDObject o = (DTDObject) i.next(); - // name = getBaseName(o); - // h.put(name,o); - // } - // } - // /** - // * @generated - // */ - // protected static String getBaseNameGen(DTDObject obj) { - // - // return getName(obj, null); - // } - // /** - // * @generated - // */ - // protected static String getNameGen(DTDObject obj, DTDFile dtdFile) { - // - // String name = ""; - // if (obj instanceof DTDEntity) - // { - // DTDEntity entity = (DTDEntity) obj; - // if (dtdFile != null && - // !entity.getDTDFile().equals(dtdFile)) - // { - // name = new Path(entity.getDTDFile().getName()).lastSegment() + ": "; - // } - // name += "%" + ((DTDEntity)obj).getName() + ";"; - // } - // else if (obj instanceof DTDElement) - // { - // DTDElement element = (DTDElement) obj; - // if (dtdFile != null && - // !element.getDTDFile().equals(dtdFile)) - // { - // name = new Path(element.getDTDFile().getName()).lastSegment() + ": "; - // } - // name += ((DTDElement)obj).getName(); - // } - // else if (obj instanceof DTDElementContent) - // { - // return ((DTDElementContent) obj).getContentName(); - // } - // return name; - // } - // /** - // * @generated - // */ - // protected void checkForMissingElementReferencesGen(DTDElement element) - // { - // - // String dtdString = null; - // if ( element == null ) - // return; - // - // - // Vector elementRefs = new Vector(); - // findElementReferences(element.getContent(),elementRefs); - // - // - // Enumeration en = elementRefs.elements(); - // while (en.hasMoreElements()) - // { - // String elementRefName = ""; - // DTDObject dtdObject = (DTDObject) en.nextElement(); - // - // - // if ( dtdObject instanceof DTDElement) - // { - // elementRefName = ((DTDElement)dtdObject).getName(); - // if ( getElementPool().get(elementRefName) == null) - // { - // if (dtdString == null) - // { - // dtdString = getDTDSource(false); - // } - // String errorMsg = "Element \"" + element.getName() + "\", refers to - // undeclared element " - // + "\"" + elementRefName + "\", in content model.\n"; - // ErrorMessage dtdError = new ErrorMessage(); - // dtdError.setErrorMessage(errorMsg); - // SourceLocationHelper.LineColumn lineColumn = - // SourceLocationHelper.offsetToLineColumn(dtdString, - // element.getStartOffset()); - // dtdError.setErrorLine(lineColumn.getLine()); - // dtdError.setErrorColumn(lineColumn.getColumn()); - // addErrorMessage(dtdError); - // } - // } - // } - // } - // /** - // * @generated - // */ - // protected void findElementReferencesGen(DTDElementContent content, - // Vector result) { - // - // - // if (content instanceof DTDElementReferenceContent) - // { - // result.addElement(((DTDElementReferenceContent)content).getReferencedElement()); - // } - // else if (content instanceof DTDEntityReferenceContent) - // { - // result.addElement(((DTDEntityReferenceContent)content).getElementReferencedEntity()); - // } - // else if (content instanceof DTDGroupContent) - // { - // DTDGroupContent group = (DTDGroupContent)content; - // EList contents = group.getContent(); - // Iterator i = contents.iterator(); - // while (i.hasNext()) - // { - // findElementReferences((DTDElementContent) i.next(), result); - // } - // } - // } - // /** - // * @generated - // */ - // protected void checkForDuplicateIDAttributeGen() { - // - // String dtdString = null; - // Collection elements = dtdFile.listDTDElement(); - // Iterator i = elements.iterator(); - // while (i.hasNext()) - // { - // DTDElement element = (DTDElement) i.next(); - // Iterator k = element.getDTDAttribute().iterator(); - // boolean saw1stID = false; - // while (k.hasNext()) - // { - // DTDAttribute attr = (DTDAttribute) k.next(); - // DTDType dType = attr.getDTDType(); - // if (dType instanceof DTDBasicType) - // { - // if ( ((DTDBasicType)dType).getKind().intValue() == DTDBasicTypeKind.ID) - // { - // if (saw1stID) - // { - // if (dtdString == null) - // { - // dtdString = getDTDSource(false); - // } - // String errMsg = DTDPlugin.getDTDString("_ERROR_DUP_ID_ATTRIBUTE_1"); - // errMsg += attr.getName() + - // DTDPlugin.getDTDString("_UI_ERRORPART_DUP_ID_ATTRIBUTE_2"); - // - // ErrorMessage dtdError = new ErrorMessage(); - // dtdError.setErrorMessage(errMsg); - // SourceLocationHelper.LineColumn lineColumn = - // SourceLocationHelper.offsetToLineColumn(dtdString, - // attr.getStartOffset()); - // dtdError.setErrorLine(lineColumn.getLine()); - // dtdError.setErrorColumn(lineColumn.getColumn()); - // dtdError.setObject(attr); - // addErrorMessage(dtdError); - // // dtdFile.setParseError(true); - // break; - // } - // else - // { - // saw1stID = true; - // } - // } - // } - // } - // } - // } - // /** - // * @generated - // */ - // protected static String getGroupTypeGen(int groupKind, int occurrence) - // { - // - // String type = null; - // - // - // switch (groupKind) - // { - // case DTDGroupKind.SEQUENCE: - // type = "DTDSequence"; - // break; - // case DTDGroupKind.CHOICE: - // type = "DTDChoice"; - // break; - // } - // - // - // type += getRepeatableTypeSuffix(occurrence); - // return type; - // } - // /** - // * @generated - // */ - // protected static String getReferenceTypeGen(int occurrence) { - // - // String type = "DTDReference"; - // type += getRepeatableTypeSuffix(occurrence); - // return type; - // } - // /** - // * @generated - // */ - // protected static String getRepeatableTypeSuffixGen(int occurrence) { - // - // return "(" + (char)occurrence + ")"; - // } - // /** - // * @generated - // */ - // protected static void mainGen(String[] args) { - // - // System.out.println("\nStarting ..."); - // - // - // if (args.length != 1) - // System.out.println("usage: DtdUtil inputfile.dtd"); - // - // - // java.io.File inputFile = new File(args[0]); - // - // - // String dtdFileName = ""; - // try - // { - // dtdFileName = inputFile.getCanonicalPath(); - // } - // catch(IOException ex) - // {} - // - // - // String dtdModelName = dtdFileName; - // - // - // if (DTDConstants.DTD_EXTENSION.equals(new - // Path(dtdFileName).getFileExtension())) - // { - // dtdModelName= new - // Path(dtdFileName).removeFileExtension().lastSegment(); - // } - // DTDUtil d2m = new DTDUtil(); - // // TODO: fix port - // // d2m.parse(dtdFileName); - // try - // { - // d2m.saveAs(dtdModelName + "." + DTDConstants.DTD_XMI_EXTENSION); - // } - // catch (Exception e) - // { - // System.out.println("Exception thrown during model save: " + e); - // } - // System.out.println("Done."); - // } - // /** - // * @generated - // */ - // protected org.eclipse.core.runtime.IPath getPathGen() { - // - // Path currentDTDPath = new Path(dtdModelFile); - // if (currentDTDPath.segmentCount() > 1) - // { - // return currentDTDPath.removeLastSegments(1).addTrailingSeparator(); - // } - // - // return new Path(""); - // } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDVisitor.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDVisitor.java deleted file mode 100644 index 655657ea65..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDVisitor.java +++ /dev/null @@ -1,315 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute; -import org.eclipse.wst.dtd.core.internal.emf.DTDElement; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntity; -import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind; -import org.eclipse.wst.dtd.core.internal.emf.DTDNotation; -import org.eclipse.wst.dtd.core.internal.emf.DTDObject; -import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference; -import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent; - - - -public class DTDVisitor { - - public DTDVisitor() { - } - - public void visitDTDFile(DTDFile file) { - Collection notations = file.listDTDNotation(); - for (Iterator i = notations.iterator(); i.hasNext();) { - visitDTDNotation((DTDNotation) i.next()); - } - - Collection entities = file.listDTDEntity(); - for (Iterator i = entities.iterator(); i.hasNext();) { - visitDTDEntity((DTDEntity) i.next()); - } - - Collection objects = file.listDTDElementAndDTDParameterEntityReference(); - for (Iterator i = objects.iterator(); i.hasNext();) { - DTDObject object = (DTDObject) i.next(); - if (object instanceof DTDElement) { - visitDTDElement((DTDElement) object); - } // end of if () - else { - visitDTDParameterEntityReference((DTDParameterEntityReference) object); - } // end of if () - } - - } - - public void visitDTDNotation(DTDNotation notation) { - } - - public void visitDTDEntity(DTDEntity entity) { - } - - public void visitDTDElement(DTDElement element) { - visitDTDElementContent(element.getContent()); - visitDTDAttributeList(element.getDTDAttribute()); - } - - public void visitDTDParameterEntityReference(DTDParameterEntityReference parmEntity) { - - } - - public void visitDTDElementContent(DTDElementContent content) { - // System.out.println("visitDTDElementContent : " + content); - if (content instanceof DTDEmptyContent) { - visitDTDEmptyContent((DTDEmptyContent) content); - } - else if (content instanceof DTDAnyContent) { - visitDTDAnyContent((DTDAnyContent) content); - } - else if (content instanceof DTDPCDataContent) { - visitDTDPCDataContent((DTDPCDataContent) content); - } - if (content instanceof DTDRepeatableContent) { - if (content instanceof DTDGroupContent) { - visitDTDGroupContent((DTDGroupContent) content); - } - else if (content instanceof DTDElementReferenceContent) { - visitDTDElementReferenceContent((DTDElementReferenceContent) content); - } - else { - visitDTDEntityReferenceContent((DTDEntityReferenceContent) content); - } // end of else - - // System.out.println("occurrence: " + - // (char)((DTDRepeatableContent)content).getOccurrence()); - } - } - - public void visitDTDEmptyContent(DTDEmptyContent dtdEmptyContent) { - // System.out.println("content: EMPTY"); - } - - public void visitDTDAnyContent(DTDAnyContent dtdAnyContent) { - // System.out.println("content: ANY"); - } - - public void visitDTDPCDataContent(DTDPCDataContent pcDataContent) { - // System.out.println("content: PCDATA"); - } - - public void visitDTDGroupContent(DTDGroupContent groupContent) { - if (groupContent.getGroupKind().getValue() == DTDGroupKind.SEQUENCE) { - // System.out.println("content: Sequence"); - } - else // if (contentgetGroupKind() == DTDGroupKind.CHOICE) - { - // System.out.println("content: Choice"); - } - - Collection groupContents = groupContent.getContent(); - for (Iterator i = groupContents.iterator(); i.hasNext();) { - visitDTDElementContent((DTDElementContent) i.next()); - } - } - - public void visitDTDElementReferenceContent(DTDElementReferenceContent elementReferenceContent) { - } - - public void visitDTDEntityReferenceContent(DTDEntityReferenceContent entityReferenceContent) { - } - - public void visitDTDAttributeList(List attrs) { - Iterator iter = attrs.iterator(); - - while (iter.hasNext()) { - visitDTDAttribute((DTDAttribute) iter.next()); - } // end of while () - } - - public void visitDTDAttribute(DTDAttribute attribute) { - } - - /** - * @generated - */ - protected void visitDTDFileGen(DTDFile file) { - - Collection notations = file.listDTDNotation(); - for (Iterator i = notations.iterator(); i.hasNext();) { - visitDTDNotation((DTDNotation) i.next()); - } - - Collection entities = file.listDTDEntity(); - for (Iterator i = entities.iterator(); i.hasNext();) { - visitDTDEntity((DTDEntity) i.next()); - } - - Collection objects = file.listDTDElementAndDTDParameterEntityReference(); - for (Iterator i = objects.iterator(); i.hasNext();) { - DTDObject object = (DTDObject) i.next(); - if (object instanceof DTDElement) { - visitDTDElement((DTDElement) object); - } // end of if () - else { - visitDTDParameterEntityReference((DTDParameterEntityReference) object); - } // end of if () - } - } - - /** - * @generated - */ - protected void visitDTDNotationGen(DTDNotation notation) { - - } - - /** - * @generated - */ - protected void visitDTDEntityGen(DTDEntity entity) { - - } - - /** - * @generated - */ - protected void visitDTDElementGen(DTDElement element) { - - visitDTDElementContent(element.getContent()); - visitDTDAttributeList(element.getDTDAttribute()); - } - - /** - * @generated - */ - protected void visitDTDParameterEntityReferenceGen(DTDParameterEntityReference parmEntity) { - - } - - /** - * @generated - */ - protected void visitDTDElementContentGen(DTDElementContent content) { - - // System.out.println("visitDTDElementContent : " + content); - if (content instanceof DTDEmptyContent) { - visitDTDEmptyContent((DTDEmptyContent) content); - } - else if (content instanceof DTDAnyContent) { - visitDTDAnyContent((DTDAnyContent) content); - } - else if (content instanceof DTDPCDataContent) { - visitDTDPCDataContent((DTDPCDataContent) content); - } - if (content instanceof DTDRepeatableContent) { - if (content instanceof DTDGroupContent) { - visitDTDGroupContent((DTDGroupContent) content); - } - else if (content instanceof DTDElementReferenceContent) { - visitDTDElementReferenceContent((DTDElementReferenceContent) content); - } - else { - visitDTDEntityReferenceContent((DTDEntityReferenceContent) content); - } // end of else - - // System.out.println("occurrence: " + - // (char)((DTDRepeatableContent)content).getOccurrence()); - } - } - - /** - * @generated - */ - protected void visitDTDEmptyContentGen(DTDEmptyContent dtdEmptyContent) { - - // System.out.println("content: EMPTY"); - } - - /** - * @generated - */ - protected void visitDTDAnyContentGen(DTDAnyContent dtdAnyContent) { - - // System.out.println("content: ANY"); - } - - /** - * @generated - */ - protected void visitDTDPCDataContentGen(DTDPCDataContent pcDataContent) { - - // System.out.println("content: PCDATA"); - } - - /** - * @generated - */ - protected void visitDTDGroupContentGen(DTDGroupContent groupContent) { - - if (groupContent.getGroupKind().getValue() == DTDGroupKind.SEQUENCE) { - // System.out.println("content: Sequence"); - } - else // if (contentgetGroupKind() == DTDGroupKind.CHOICE) - { - // System.out.println("content: Choice"); - } - - Collection groupContents = groupContent.getContent(); - for (Iterator i = groupContents.iterator(); i.hasNext();) { - visitDTDElementContent((DTDElementContent) i.next()); - } - } - - /** - * @generated - */ - protected void visitDTDElementReferenceContentGen(DTDElementReferenceContent elementReferenceContent) { - - } - - /** - * @generated - */ - protected void visitDTDEntityReferenceContentGen(DTDEntityReferenceContent entityReferenceContent) { - - } - - /** - * @generated - */ - protected void visitDTDAttributeListGen(List attrs) { - - Iterator iter = attrs.iterator(); - - while (iter.hasNext()) { - visitDTDAttribute((DTDAttribute) iter.next()); - } // end of while () - } - - /** - * @generated - */ - protected void visitDTDAttributeGen(DTDAttribute attribute) { - - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/ExternalDTDModel.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/ExternalDTDModel.java deleted file mode 100644 index 2b0536cafb..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/ExternalDTDModel.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.emf.util; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.wst.dtd.core.internal.emf.DTDFile; - - -/** - * Load another DTD model - use when there is external entity references from - * another model - */ -public class ExternalDTDModel { - DTDFile dtdFile = null; - - public ExternalDTDModel() { - } - - public DTDFile getExternalDTDFile() { - return dtdFile; - } - - /** - * Load the DTD model specified by the uri e.g. - * file:C:/eclipse/examples/purchaseorder.dtd - */ - public boolean loadModel(ResourceSet resources, String uri) { - boolean rc = true; - - if (uri == null || uri.equals("")) { //$NON-NLS-1$ - return false; - } - - try { - // todo... Investigate why we can not create a new DTDUtil to load - // the external - // without breaking the bvt test bucket on the oagis cases. - // Are depending on mof's built in caching via - // resources.load(uri)? - // - URI uriObj = URI.createURI(uri); - Resource r = resources.createResource(uriObj); - Map options = new HashMap(); - r.load(options); - - for (Iterator i = resources.getResources().iterator(); i.hasNext();) { - DTDFile currentFile = (DTDFile) ((Resource) i.next()).getContents().get(0); - String currentURI = currentFile.eResource().getURI().toString(); - // note : mof stores a slightly different uri than the one we - // passed in to resources.load(uri) - // In the 'file:' protocol case, the call - // resource.load("file:D:\x.dtd") will store a resource with - // uri "D:\x.dtd". - // This is why we use 'endswith()' instead of 'equals()' to - // compare. - if (uri.endsWith(currentURI)) { - dtdFile = currentFile; - break; - } - } - if (dtdFile == null) { - rc = false; - } - } - catch (Exception ex) { - rc = false; - } - return rc; - } -} |