diff options
Diffstat (limited to 'bundles/org.eclipse.wst.dtd.core')
215 files changed, 0 insertions, 49888 deletions
diff --git a/bundles/org.eclipse.wst.dtd.core/.classpath b/bundles/org.eclipse.wst.dtd.core/.classpath deleted file mode 100644 index 9355ebac3a..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/.classpath +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src/"/> - <classpathentry kind="src" path="contentmodel/"/> - <classpathentry kind="src" path="emfmodel/"/> - <classpathentry kind="src" path="saxparser/"/> - <classpathentry kind="src" path="src-validation"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/bundles/org.eclipse.wst.dtd.core/.cvsignore b/bundles/org.eclipse.wst.dtd.core/.cvsignore deleted file mode 100644 index 06a13979a3..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -bin -runtime -dtdcore.jar -*.zip -build.xml -temp.folder -@dot -javaCompiler...args diff --git a/bundles/org.eclipse.wst.dtd.core/.project b/bundles/org.eclipse.wst.dtd.core/.project deleted file mode 100644 index 76249e5f71..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/.project +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.wst.dtd.core</name> - <comment></comment> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index afa5c91352..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Apr 04 03:36:32 EDT 2006 -eclipse.preferences.version=1 -encoding/<project>=ISO-8859-1 diff --git a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 7ec5750225..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Mon Apr 17 01:48:39 EDT 2006 -eclipse.preferences.version=1 -line.separator=\r\n diff --git a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7bf9b39137..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,79 +0,0 @@ -#Sat Mar 24 02:16:32 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=ignore
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 6c80926d79..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Wed Nov 15 02:08:45 EST 2006 -eclipse.preferences.version=1 -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates/> diff --git a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.ltk.core.refactoring.prefs deleted file mode 100644 index c59368c5e1..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.ltk.core.refactoring.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Apr 04 03:36:32 EDT 2006 -eclipse.preferences.version=1 -org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.pde.prefs deleted file mode 100644 index 26198819ab..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.pde.prefs +++ /dev/null @@ -1,16 +0,0 @@ -#Wed Nov 15 02:08:45 EST 2006
-compilers.incompatible-environment=0
-compilers.p.build=0
-compilers.p.deprecated=1
-compilers.p.illegal-att-value=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=0
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF deleted file mode 100644 index 99af7ea60e..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF +++ /dev/null @@ -1,42 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.wst.dtd.core; singleton:=true -Bundle-Version: 1.1.500.qualifier -Bundle-Activator: org.eclipse.wst.dtd.core.internal.DTDCorePlugin -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Export-Package: org.eclipse.wst.dtd.core.internal;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.content;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.contentmodel;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.document;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.emf;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.emf.impl;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.emf.util;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.encoding;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.event;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.modelhandler;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.parser;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.preferences;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.provisional.contenttype;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.provisional.document;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.provisional.text;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.saxparser;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.tasks;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.text;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.tokenizer;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.util;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.validation;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui", - org.eclipse.wst.dtd.core.internal.validation.eclipse;x-internal:=true, - org.eclipse.wst.dtd.core.text -Import-Package: com.ibm.icu.util; version="3.8", - com.ibm.icu.text; version="3.8" -Require-Bundle: org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)", - org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)", - org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)", - org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,1.2.0)", - org.eclipse.wst.sse.core;bundle-version="[1.1.300,1.2.0)", - org.eclipse.wst.xml.core;bundle-version="[1.1.300,1.2.0)", - org.eclipse.wst.validation;bundle-version="[1.2.0,1.3.0)" -Bundle-ActivationPolicy: lazy; exclude:="org.eclipse.wst.dtd.core.internal.content" -Bundle-RequiredExecutionEnvironment: J2SE-1.4 diff --git a/bundles/org.eclipse.wst.dtd.core/about.html b/bundles/org.eclipse.wst.dtd.core/about.html deleted file mode 100644 index 2199df3f05..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/about.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<HTML> - -<head> -<title>About</title> -<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1"> -</head> - -<BODY lang="EN-US"> - -<H3>About This Content</H3> - -<P>June, 2008</P> - -<H3>License</H3> - -<P>The Eclipse Foundation makes available all content in this plug-in -("Content"). Unless otherwise indicated below, the Content is provided to you -under the terms and conditions of the Eclipse Public License Version 1.0 -("EPL"). A copy of the EPL is available at -<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. -For purposes of the EPL, "Program" will mean the Content.</P> - -<P>If you did not receive this Content directly from the Eclipse Foundation, the -Content is being redistributed by another party ("Redistributor") and different -terms and conditions may apply to your use of any object code in the Content. -Check the Redistributor’s license that was provided with the Content. If no such -license exists, contact the Redistributor. Unless otherwise indicated below, the -terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at -<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P> - -</BODY> -</HTML> diff --git a/bundles/org.eclipse.wst.dtd.core/build.properties b/bundles/org.eclipse.wst.dtd.core/build.properties deleted file mode 100644 index af332a6105..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/build.properties +++ /dev/null @@ -1,27 +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 -# Jens Lukowski/Innoopract - initial renaming/restructuring -# -############################################################################### -bin.includes = plugin.xml,\ - plugin.properties,\ - icons/,\ - META-INF/,\ - .,\ - about.html -bin.excludes = bin/**,\ - @dot/**,\ - temp.folder/** -src.includes = component.xml -source.. = src/,\ - contentmodel/,\ - emfmodel/,\ - saxparser/,\ - src-validation/ diff --git a/bundles/org.eclipse.wst.dtd.core/component.xml b/bundles/org.eclipse.wst.dtd.core/component.xml deleted file mode 100644 index e4dc12c306..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/component.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<component xmlns="http://eclipse.org/wtp/releng/tools/component-model" name="org.eclipse.wst.dtd"> - <component-depends unrestricted="true" /> - <plugin id="org.eclipse.wst.dtdeditor.doc.user" fragment="false" /> - <plugin id="org.eclipse.wst.dtd.core" fragment="false" /> - <plugin id="org.eclipse.wst.dtd.ui" fragment="false" /> - <description url="http://eclipse.org/webtools/wst/components/dtd/overview.html" /> - <package name="org.eclipse.wst.dtd.ui" api="false"> - <type name="StructuredTextViewerConfigurationDTD" subclass="true" instantiate="true" /> - </package> - <package name="org.eclipse.wst.dtd.ui.views.contentoutline" api="false"> - <type name="DTDContentOutlineConfiguration" subclass="true" instantiate="true" /> - </package> - <plugin id="org.eclipse.wst.dtd.ui.infopop" fragment="false" /> -</component> diff --git a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java deleted file mode 100644 index bfe64b3b10..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java +++ /dev/null @@ -1,44 +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.contentmodel; - -import org.eclipse.wst.dtd.core.internal.Logger; -import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument; -import org.eclipse.wst.xml.core.internal.contentmodel.factory.CMDocumentFactory; - -/** - * This builder handles building .dtd grammar files - */ -public class CMDocumentFactoryDTD implements CMDocumentFactory { - public CMDocumentFactoryDTD() { - } - - - public CMDocument createCMDocument(String uri) { - // work around a bug in our parsers - // todo... revisit this - // -// https://bugs.eclipse.org/bugs/show_bug.cgi?id=100481 -// String fileProtocol = "file:"; //$NON-NLS-1$ -// if (uri.startsWith(fileProtocol)) { -// uri = uri.substring(fileProtocol.length()); -// } - - CMDocument result = null; - try { - result = DTDImpl.buildCMDocument(uri); - } - catch (Exception e) { - Logger.logException("could not create content model for URI: " + uri, e); //$NON-NLS-1$ - } - return result; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java deleted file mode 100644 index 1be7c53e9a..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java +++ /dev/null @@ -1,36 +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.contentmodel; - -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.wst.xml.core.internal.contentmodel.CMNode; - -public abstract class CMNodeImpl extends AdapterImpl implements CMNode { - protected static final String PROPERTY_DOCUMENTATION = "documentation"; //$NON-NLS-1$ - protected static final String PROPERTY_DOCUMENTATION_SOURCE = "documentationSource"; //$NON-NLS-1$ - protected static final String PROPERTY_DOCUMENTATION_LANGUAGE = "documentationLanguage"; //$NON-NLS-1$ - protected static final String PROPERTY_MOF_NOTIFIER = "key"; //$NON-NLS-1$ - protected static final String PROPERTY_DEFINITION_INFO = "http://org.eclipse.wst/cm/properties/definitionInfo"; //$NON-NLS-1$ - protected static final String PROPERTY_DEFINITION = "http://org.eclipse.wst/cm/properties/definition"; //$NON-NLS-1$ - - public abstract Object getKey(); - - public boolean supports(String propertyName) { - return propertyName.equals(PROPERTY_MOF_NOTIFIER); - } - - public Object getProperty(String propertyName) { - return null; - } - - public void setProperty(String propertyName, Object object) { - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java deleted file mode 100644 index 94705acd0f..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java +++ /dev/null @@ -1,782 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2010 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.contentmodel; - -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import com.ibm.icu.util.StringTokenizer; - -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.resource.impl.ResourceSetImpl; -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.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.DTDEnumerationType; -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.DTDOccurrenceType; -import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent; -import org.eclipse.wst.dtd.core.internal.emf.DTDType; -import org.eclipse.wst.dtd.core.internal.emf.impl.DTDBasicTypeImpl; -import org.eclipse.wst.dtd.core.internal.emf.impl.DTDPackageImpl; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDMetrics; -import org.eclipse.wst.dtd.core.internal.emf.util.DTDUtil; -import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration; -import org.eclipse.wst.xml.core.internal.contentmodel.CMContent; -import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType; -import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument; -import org.eclipse.wst.xml.core.internal.contentmodel.CMDocumentation; -import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration; -import org.eclipse.wst.xml.core.internal.contentmodel.CMEntityDeclaration; -import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup; -import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap; -import org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace; -import org.eclipse.wst.xml.core.internal.contentmodel.CMNode; -import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList; -import org.eclipse.wst.xml.core.internal.contentmodel.annotation.AnnotationMap; -import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMDataTypeImpl; -import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMEntityDeclarationImpl; -import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl; -import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNodeListImpl; -import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDescriptionBuilder; - - -public class DTDImpl { - static { - // Call init on the DTD package to avoid strange initialization bugs - // - DTDPackageImpl.init(); - } - - protected static DTDAdapterFactoryImpl dtdAdapterFactoryImpl = new DTDAdapterFactoryImpl(); - protected static CMDataTypeInfoTable cmDataTypeInfoTable = new CMDataTypeInfoTable(); - - public static CMDocument buildCMDocument(String uri) { - DTDFile dtdFile = buildDTDModel(uri); - CMDocument cmDocument = (CMDocument) getAdapter(dtdFile); - - return cmDocument; - } - - public static DTDFile buildDTDModel(String uri) { - DTDUtil dtdUtil = new DTDUtil(); - dtdUtil.setexpandEntityReferences(true); - dtdUtil.parse(new ResourceSetImpl(), uri); - return dtdUtil.getDTDFile(); - } - - public static CMDocument buildCMDocument(DTDFile dtdFile) { - return (CMDocument) getAdapter(dtdFile); - } - - public static CMNode getAdapter(Notifier o) { - return (CMNode) dtdAdapterFactoryImpl.adapt(o); - } - - public static int getMinOccurHelper(DTDRepeatableContent content) { - int occurence = content.getOccurrence().getValue(); - boolean isOptional = (occurence == DTDOccurrenceType.OPTIONAL || occurence == DTDOccurrenceType.ZERO_OR_MORE); - return isOptional ? 0 : 1; - } - - public static int getMaxOccurHelper(DTDRepeatableContent content) { - int occurence = content.getOccurrence().getValue(); - boolean isMulti = (occurence == DTDOccurrenceType.ONE_OR_MORE || occurence == DTDOccurrenceType.ZERO_OR_MORE); - return isMulti ? -1 : 1; - } - - public static class DTDAdapterFactoryImpl extends AdapterFactoryImpl { - public Adapter createAdapter(Notifier target) { - Adapter result = null; - if (target != null) { - if (target instanceof DTDAttribute) { - result = new DTDAttributeAdapter((DTDAttribute) target); - } - else if (target instanceof DTDElement) { - result = new DTDElementAdapter((DTDElement) target); - } - else if (target instanceof DTDElementReferenceContent) { - result = new DTDElementReferenceContentAdapter((DTDElementReferenceContent) target); - } - else if (target instanceof DTDFile) { - result = new DTDFileAdapter((DTDFile) target); - } - else if (target instanceof DTDGroupContent) { - result = new DTDGroupContentAdapter((DTDGroupContent) target); - } - else if (target instanceof DTDEntity) { - result = new DTDEntityAdapter((DTDEntity) target); - } - } - return result; - } - - public synchronized Adapter adapt(Notifier target) { - return adapt(target, this); - } - } - - /** - * DTDBaseAdapter - */ - public static abstract class DTDBaseAdapter extends CMNodeImpl { - public String getNodeName() { - return ""; //$NON-NLS-1$ - } - - public boolean isAdapterForType(Object type) { - return type == dtdAdapterFactoryImpl; - } - - public Object getProperty(String propertyName) { - Object result = null; - if (propertyName.equals("CMDocument")) { //$NON-NLS-1$ - result = getCMDocument(); - } - else if (propertyName.equals(PROPERTY_DOCUMENTATION)) { - result = getDocumentation(); - } - else if (propertyName.equals(PROPERTY_DEFINITION_INFO)) { - result = getDefinitionInfo(); - } - else if (propertyName.equals(PROPERTY_DEFINITION)) { - result = getDefinition(); - } - else if (propertyName.equals(PROPERTY_MOF_NOTIFIER)) { - result = getKey(); - } - else if (propertyName.equals("spec")) { //$NON-NLS-1$ - result = getSpec(); - } - else { - result = super.getProperty(propertyName); - if (result == null) { - CMDocument cmDocument = getCMDocument(); - if (cmDocument instanceof DTDFileAdapter) { - AnnotationMap map = ((DTDFileAdapter) cmDocument).annotationMap; - if (map != null) { - String spec = getSpec(); - if (spec != null) { - result = map.getProperty(getSpec(), propertyName); - } - } - if (result == null) { - Map globalPropertyMap = ((DTDFileAdapter) cmDocument).globalPropertyMap; - result = globalPropertyMap.get(propertyName); - } - } - } - } - return result; - } - - public CMDocument getCMDocument() { - return null; - } - - protected CMNodeList getDocumentation() { - return new CMNodeListImpl(); - } - - public String getDefinitionInfo() { - return null; - } - - public CMNode getDefinition() { - return null; - } - - public String getSpec() { - return getNodeName(); - } - } - - /** - * DTDAttributeAdapter - */ - public static class DTDAttributeAdapter extends DTDBaseAdapter implements CMAttributeDeclaration { - protected DTDAttribute attribute; - protected CMDataType dataType; - - public DTDAttributeAdapter(DTDAttribute attribute) { - this.attribute = attribute; - dataType = new DataTypeImpl(); - } - - public Object getKey() { - return attribute; - } - - public String getSpec() { - return attribute.getDTDElement().getName() + "/@" + attribute.getName(); //$NON-NLS-1$ - } - - public int getNodeType() { - return ATTRIBUTE_DECLARATION; - } - - public String getNodeName() { - return attribute.getName(); - } - - public String getAttrName() { - return attribute.getName(); - } - - public CMDataType getAttrType() { - return dataType; - } - - public String getDefaultValue() { - return attribute.getDefaultValueString(); - } - - public Enumeration getEnumAttr() { - return Collections.enumeration(attribute.getEnumeratedValues()); - } - - public int getUsage() { - int usage = OPTIONAL; - switch (attribute.getDefaultKind().getValue()) { - case DTDDefaultKind.REQUIRED : { - usage = REQUIRED; - break; - } - case DTDDefaultKind.FIXED : { - usage = FIXED; - break; - } - } - return usage; - } - - public CMDocument getCMDocument() { - DTDFile dtdFile = attribute.getDTDElement().getDTDFile(); - return dtdFile != null ? (CMDocument) getAdapter(dtdFile) : null; - } - - public class DataTypeImpl implements CMDataType { - public int getNodeType() { - return CMNode.DATA_TYPE; - } - - public String getNodeName() { - return getDataTypeName(); - } - - public boolean supports(String propertyName) { - return false; - } - - public Object getProperty(String propertyName) { - Object result = null; - if (propertyName.equals("isValidEmptyValue")) { //$NON-NLS-1$ - String dataTypeName = getDataTypeName(); - result = (dataTypeName == null || dataTypeName.equals(CMDataType.CDATA)) ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$ - } - return result; - } - - public String getDataTypeName() { - return cmDataTypeInfoTable.getDataTypeName(attribute.getDTDType()); - } - - public String generateInstanceValue() { - return cmDataTypeInfoTable.getInstanceValue(attribute.getDTDType()); - } - - public int getImpliedValueKind() { - int result = IMPLIED_VALUE_NONE; - int defaultValueKind = attribute.getDefaultKind().getValue(); - if (defaultValueKind == DTDDefaultKind.NOFIXED) { - result = IMPLIED_VALUE_DEFAULT; - } - else if (defaultValueKind == DTDDefaultKind.FIXED) { - result = IMPLIED_VALUE_FIXED; - } - return result; - } - - public String getImpliedValue() { - return attribute.getDefaultValueString(); - } - - public String[] getEnumeratedValues() { - Object[] objectList = attribute.getEnumeratedValues().toArray(); - String[] result = new String[objectList.length]; - for (int i = 0; i < objectList.length; i++) { - result[i] = objectList[i].toString(); - } - return result; - } - } - } - - - /** - * DTDElementBaseAdapter - */ - public static abstract class DTDElementBaseAdapter extends DTDBaseAdapter implements CMElementDeclaration { - protected CMDataType dataType; - - protected abstract DTDElement getDTDElement(); - - protected CMDocumentation documentation = null; - - public int getNodeType() { - return ELEMENT_DECLARATION; - } - - public String getNodeName() { - return getDTDElement().getName(); - } - - public CMNamedNodeMap getAttributes() { - CMNamedNodeMapImpl result = new CMNamedNodeMapImpl(); - List attributeList = getDTDElement().getDTDAttribute(); - for (Iterator i = attributeList.iterator(); i.hasNext();) { - DTDAttribute attribute = (DTDAttribute) i.next(); - result.getHashtable().put(attribute.getName(), getAdapter(attribute)); - } - return result; - } - - public CMContent getContent() { - return (CMContent) getAdapter(getDTDElement().getContent()); - } - - public int getContentType() { - // todo - int result = ELEMENT; - DTDElementContent dtdElementContent = getDTDElement().getContent(); - if (dtdElementContent instanceof DTDPCDataContent) { - result = PCDATA; - } - else if (dtdElementContent instanceof DTDGroupContent) { - DTDGroupContent groupContent = (DTDGroupContent) dtdElementContent; - int groupKind = groupContent.getGroupKind().getValue(); - if (groupKind == DTDGroupKind.CHOICE) { - List list = groupContent.getContent(); - if (list.size() > 0 && list.get(0) instanceof DTDPCDataContent) { - result = MIXED; - } - } - } - else if (dtdElementContent instanceof DTDAnyContent) { - result = ANY; - } - else if (dtdElementContent instanceof DTDEmptyContent) { - result = EMPTY; - } - - return result; - } - - public String getElementName() { - return getDTDElement().getName(); - } - - public CMDataType getDataType() { - int contentType = getContentType(); - boolean hasDataType = contentType == PCDATA || contentType == MIXED; - return hasDataType ? dataType : null; - } - - public CMNamedNodeMap getLocalElements() { - return CMNamedNodeMapImpl.EMPTY_NAMED_NODE_MAP; - } - - public CMDocument getCMDocument() { - DTDFile dtdFile = getDTDElement().getDTDFile(); - return dtdFile != null ? (CMDocument) getAdapter(dtdFile) : null; - } - - protected CMNodeList getDocumentation() { - CMNodeListImpl nodeList = new CMNodeListImpl(); - if (documentation == null) { - String comment = getDTDElement().getComment(); - if (comment != null) { - String value = ""; //$NON-NLS-1$ - StringTokenizer st = new StringTokenizer(comment, "\n"); //$NON-NLS-1$ - while (st.hasMoreTokens()) { - value += st.nextToken().trim() + "\n"; //$NON-NLS-1$ - } - documentation = new CMDocumentationImpl(value); - } - } - if (documentation != null) { - nodeList.getList().add(documentation); - } - return nodeList; - } - } - - - public static class CMDocumentationImpl implements CMDocumentation { - protected String value; - - public CMDocumentationImpl(String value) { - this.value = value; - } - - public String getNodeName() { - return ""; //$NON-NLS-1$ - } - - public int getNodeType() { - return DOCUMENTATION; - } - - public boolean supports(String propertyName) { - return false; - } - - public Object getProperty(String propertyName) { - return null; - } - - public String getValue() { - return value; - } - - public String getLanguage() { - return null; - } - - public String getSource() { - return null; - } - } - - - /** - * DTDElementAdapter - */ - public static class DTDElementAdapter extends DTDElementBaseAdapter { - protected DTDElement element; - - public DTDElementAdapter(DTDElement element) { - this.element = element; - dataType = new CMDataTypeImpl("#PCDATA", getDTDElement().getName()); //$NON-NLS-1$ - } - - public Object getKey() { - return element; - } - - protected DTDElement getDTDElement() { - return element; - } - - public int getMinOccur() { - if(element.getContent() instanceof DTDRepeatableContent){ - return getMinOccurHelper((DTDRepeatableContent) element.getContent()); - } - return 1; - } - - public int getMaxOccur() { - if(element.getContent() instanceof DTDRepeatableContent){ - return getMaxOccurHelper((DTDRepeatableContent) element.getContent()); - } - return 1; - } - - public String getDefinitionInfo() { - return "global"; //$NON-NLS-1$ - } - - public CMNode getDefinition() { - return this; - } - } - - - /** - * DTDElementReferenceContentAdapter - */ - public static class DTDElementReferenceContentAdapter extends DTDElementBaseAdapter { - protected DTDElementReferenceContent content; - - public DTDElementReferenceContentAdapter(DTDElementReferenceContent content) { - this.content = content; - dataType = new CMDataTypeImpl("#PCDATA", getDTDElement().getName()); //$NON-NLS-1$ - } - - public Object getKey() { - return content; - } - - protected DTDElement getDTDElement() { - return content.getReferencedElement(); - } - - public int getMinOccur() { - return getMinOccurHelper(content); - } - - public int getMaxOccur() { - return getMaxOccurHelper(content); - } - - - public CMNode getDefinition() { - return getAdapter(getDTDElement()); - } - } - - - /** - * DTDEntityAdapter - */ - public static class DTDEntityAdapter extends DTDBaseAdapter implements CMEntityDeclaration { - protected DTDEntity dtdEntity; - - public DTDEntityAdapter(DTDEntity dtdEntity) { - this.dtdEntity = dtdEntity; - } - - public int getNodeType() { - return ENTITY_DECLARATION; - } - - public Object getKey() { - return dtdEntity; - } - - public String getName() { - return dtdEntity.getName(); - } - - public String getValue() { - String value = ""; //$NON-NLS-1$ - if (dtdEntity.getContent() instanceof DTDInternalEntity) { - DTDInternalEntity content = (DTDInternalEntity) dtdEntity.getContent(); - value = content.getValue(); - } - return value; - } - } - - - /** - * DTDGroupContentAdapter - */ - public static class DTDGroupContentAdapter extends DTDBaseAdapter implements CMGroup { - protected DTDGroupContent content; - - public DTDGroupContentAdapter(DTDGroupContent content) { - this.content = content; - } - - public Object getKey() { - return content; - } - - public int getNodeType() { - return GROUP; - } - - public String getNodeName() { - CMDescriptionBuilder descriptionBuilder = new CMDescriptionBuilder(); - return descriptionBuilder.buildDescription(this); - } - - public CMNodeList getChildNodes() { - List list = content.getContent(); - CMNodeListImpl result = new CMNodeListImpl(); - for (Iterator i = list.iterator(); i.hasNext();) { - CMNode node = getAdapter((Notifier) i.next()); - if (node != null) { - result.getList().add(node); - } - } - return result; - } - - - public int getMaxOccur() { - return getMaxOccurHelper(content); - } - - public int getMinOccur() { - return getMinOccurHelper(content); - } - - public int getOperator() { - // todo... handle ALONE case by checkig if child count == 1 - int groupKind = content.getGroupKind().getValue(); - return (groupKind == DTDGroupKind.CHOICE) ? CHOICE : SEQUENCE; - } - } - - /** - * DTDFileAdapter - */ - public static class DTDFileAdapter extends DTDBaseAdapter implements CMDocument { - protected final String DEFAULT_ROOT_NAME = "http://org.eclipse.wst/cm/properties/defaultRootName"; //$NON-NLS-1$ - - protected DTDFile dtdFile; - protected CMNamedNodeMapImpl namedNodeMap; - protected CMNamedNodeMapImpl entityNodeMap; - - protected AnnotationMap annotationMap = new AnnotationMap(); - protected Map globalPropertyMap = new HashMap(); - - public DTDFileAdapter(DTDFile dtdFile) { - this.dtdFile = dtdFile; - } - - public Object getKey() { - return dtdFile; - } - - public AnnotationMap getAnnotationMap() { - return annotationMap; - } - - public CMNamedNodeMap getElements() { - if (namedNodeMap == null) { - namedNodeMap = new CMNamedNodeMapImpl(); - for (Iterator iterator = dtdFile.listDTDElement().iterator(); iterator.hasNext();) { - DTDElement dtdElement = (DTDElement) iterator.next(); - namedNodeMap.getHashtable().put(dtdElement.getName(), getAdapter(dtdElement)); - } - } - return namedNodeMap; - } - - public CMNamedNodeMap getEntities() { - if (entityNodeMap == null) { - entityNodeMap = new CMNamedNodeMapImpl(); - - // add the built in entity declarations - // - entityNodeMap.getHashtable().put("amp", new CMEntityDeclarationImpl("amp", "&")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - entityNodeMap.getHashtable().put("lt", new CMEntityDeclarationImpl("lt", "<")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - entityNodeMap.getHashtable().put("gt", new CMEntityDeclarationImpl("gt", ">")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - entityNodeMap.getHashtable().put("quot", new CMEntityDeclarationImpl("quot", "\"")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - entityNodeMap.getHashtable().put("apos", new CMEntityDeclarationImpl("apos", "'")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - - for (Iterator i = dtdFile.listDTDEntity().iterator(); i.hasNext();) { - DTDEntity dtdEntity = (DTDEntity) i.next(); - if (!dtdEntity.isParameterEntity() && dtdEntity.getName() != null) { - // for now... just handle DTDInternalEntity - // - if (dtdEntity.getContent() instanceof DTDInternalEntity) { - entityNodeMap.getHashtable().put(dtdEntity.getName(), getAdapter(dtdEntity)); - } - } - } - } - return entityNodeMap; - } - - public CMNamespace getNamespace() { - return null; - } - - public int getNodeType() { - return DOCUMENT; - } - - public String getNodeName() { - return dtdFile.getName() + ".dtd"; //$NON-NLS-1$ - } - - public Object getProperty(String propertyName) { - Object result = null; - if (propertyName.equals(DEFAULT_ROOT_NAME)) { - DTDMetrics metrics = new DTDMetrics(dtdFile); - DTDElement dtdElement = metrics.getLeastReferencedElement(); - if (dtdElement != null) { - result = dtdElement.getName(); - } - } - else if (propertyName.equals("annotationMap")) { //$NON-NLS-1$ - result = annotationMap; - } - else if (propertyName.equals("globalPropertyMap")) { //$NON-NLS-1$ - result = globalPropertyMap; - } - else { - result = super.getProperty(propertyName); - } - return result; - } - } - - - public static class CMDataTypeInfoTable { - protected String[] instanceValueTable; - protected String[] dataTypeNameTable; - - public CMDataTypeInfoTable() { - // hashtable.put(DTDType.CDATA, null)); - instanceValueTable = new String[DTDBasicTypeImpl.basicTypeKinds.length]; - instanceValueTable[DTDBasicTypeKind.ENTITY] = "entity"; //$NON-NLS-1$ - instanceValueTable[DTDBasicTypeKind.ENTITIES] = "entities"; //$NON-NLS-1$ - instanceValueTable[DTDBasicTypeKind.NMTOKEN] = "nmtoken"; //$NON-NLS-1$ - instanceValueTable[DTDBasicTypeKind.NMTOKENS] = "nmtokens"; //$NON-NLS-1$ - - dataTypeNameTable = new String[DTDBasicTypeImpl.basicTypeKinds.length]; - dataTypeNameTable[DTDBasicTypeKind.CDATA] = CMDataType.CDATA; - dataTypeNameTable[DTDBasicTypeKind.ID] = CMDataType.ID; - dataTypeNameTable[DTDBasicTypeKind.IDREF] = CMDataType.IDREF; - dataTypeNameTable[DTDBasicTypeKind.IDREFS] = CMDataType.IDREFS; - dataTypeNameTable[DTDBasicTypeKind.ENTITY] = CMDataType.ENTITY; - dataTypeNameTable[DTDBasicTypeKind.ENTITIES] = CMDataType.ENTITIES; - dataTypeNameTable[DTDBasicTypeKind.NMTOKEN] = CMDataType.NMTOKEN; - dataTypeNameTable[DTDBasicTypeKind.NMTOKENS] = CMDataType.NMTOKENS; - } - - public String getInstanceValue(DTDType dtdType) { - String result = null; - if (dtdType instanceof DTDBasicType) { - int kind = ((DTDBasicType) dtdType).getKind().getValue(); - if (kind >= 0 && kind < DTDBasicTypeImpl.basicTypeDescriptions.length) { - result = instanceValueTable[kind]; - } - } - return result; - } - - public String getDataTypeName(DTDType dtdType) { - String result = null; - if (dtdType instanceof DTDBasicType) { - int kind = ((DTDBasicType) dtdType).getKind().getValue(); - if (kind >= 0 && kind < DTDBasicTypeImpl.basicTypeDescriptions.length) { - result = dataTypeNameTable[kind]; - } - } - else if (dtdType instanceof DTDEnumerationType) { - result = CMDataType.ENUM; - } - return result; - } - } -} 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 3aaeb98de9..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, 2009 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 89de8836c2..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, 2009 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 ce289b5fc4..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, 2009 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 cb185d06a3..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, 2009 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 b5e767cebb..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, 2009 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 adf0b93680..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, 2009 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 b81f4c4394..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, 2009 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 d87ef09dd3..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, 2009 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 2bf7ee02ac..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, 2009 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 11d0742387..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, 2009 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 51fde41059..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, 2009 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 8e604b988d..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, 2009 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 69bd4c49bc..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, 2009 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 b2a823693d..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, 2009 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 1e36173073..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, 2009 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 java.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 b4374cc611..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, 2009 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 16aedaf85a..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, 2009 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 58fd1c4d64..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, 2009 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 4ed8dbcb85..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, 2009 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 6e7e923806..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, 2010 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; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/DTD.cat b/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/DTD.cat deleted file mode 100644 index 4097274f7b..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/DTD.cat +++ /dev/null @@ -1,3812 +0,0 @@ -
-(object Petal
- version 45
- _written "Rose 7.5.0103.1920"
- charSet 0)
-
-(object Class_Category "dtd"
- is_unit TRUE
- is_loaded TRUE
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935d5730-850b-11e1-0000-005cf4691c4c:1"))
- (object Attribute
- tool "Ecore"
- name "packageName"
- value (value Text "dtd"))
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value (value Text "org.eclipse.wst.dtd"))
- (object Attribute
- tool "Ecore"
- name "prefix"
- value (value Text "DTD")))
- quid "3857B1C00293"
- exportControl "Public"
- logical_models (list unit_reference_list
- (object Class "DTDElementContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935d5730-850b-11e1-0001-005cf4691c4c:1")))
- quid "37CBEACF0213"
- abstract TRUE)
- (object Class "DTDGroupContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0000-005cf4691c4c:1")))
- quid "37CBEAEF0232"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0001-005cf4691c4c:1")))
- quid "37D9AD920363"
- supplier "Logical View::dtd::DTDRepeatableContent"
- quidu "37D9AD4C01D1"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "groupKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0002-005cf4691c4c:1")))
- quid "37EFC9EC0189"
- type "DTDGroupKind"
- quidu "37EFCA550216"
- exportControl "Public")))
- (object Class "DTDAttribute"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0003-005cf4691c4c:1")))
- quid "37CC187900EA"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0004-005cf4691c4c:1")))
- quid "39B7F15901DA"
- supplier "Logical View::ecore::EAttribute"
- quidu "39238472039D"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "comment"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0005-005cf4691c4c:1")))
- quid "3839DC9A013B"
- type "String"
- exportControl "Public")
- (object ClassAttribute "defaultKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0006-005cf4691c4c:1")))
- quid "37E144BF0261"
- type "DTDDefaultKind"
- quidu "37E144DC03AD"
- exportControl "Public")
- (object ClassAttribute "defaultValueString"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0007-005cf4691c4c:1")))
- quid "396B9BBF006B"
- type "String"
- exportControl "Public")))
- (object Class "DTDOccurrenceType"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0008-005cf4691c4c:1")))
- quid "37CC19AF007D"
- documentation
-|ONE=49
-|OPTIONAL=63 ONE_OR_MORE=43 ZERO_OR_MORE=42
-
- stereotype "enumeration")
- (object Class "DTDElement"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0009-005cf4691c4c:1")))
- quid "37D9AAF70071"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000a-005cf4691c4c:1")))
- quid "39B7F0AF02A8"
- supplier "Logical View::ecore::EClass"
- quidu "3903D5BF000A")
- (object Inheritance_Relationship
- quid "39FE2B83029B"
- supplier "Logical View::dtd::DTDContent"
- quidu "39FE2B5E02DE"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "comment"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000b-005cf4691c4c:1")))
- quid "3839DC810062"
- type "String"
- exportControl "Public")))
- (object Class "DTDEmptyContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000c-005cf4691c4c:1")))
- quid "37D9AB47037A"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000d-005cf4691c4c:1")))
- quid "37D9ABF30327"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213")))
- (object Class "DTDAnyContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000e-005cf4691c4c:1")))
- quid "37D9AB500304"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000f-005cf4691c4c:1")))
- quid "37D9ABEE0207"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213")))
- (object Class "DTDPCDataContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0010-005cf4691c4c:1")))
- quid "37D9AB5C0135"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0011-005cf4691c4c:1")))
- quid "37D9ABE90278"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213")))
- (object Class "DTDElementReferenceContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0012-005cf4691c4c:1")))
- quid "37D9AB7D0010"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0013-005cf4691c4c:1")))
- quid "37D9AD8C03AA"
- supplier "Logical View::dtd::DTDRepeatableContent"
- quidu "37D9AD4C01D1")))
- (object Class "DTDRepeatableContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0014-005cf4691c4c:1")))
- quid "37D9AD4C01D1"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0015-005cf4691c4c:1")))
- quid "37D9ADB703C0"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "occurrence"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0016-005cf4691c4c:1")))
- quid "37CC18A90148"
- documentation "JUST_ONE= -1 ONE_OR_MORE=43 OPTIONAL=63 ZERO_OR_MORE=42"
- type "DTDOccurrenceType"
- quidu "37CC19AF007D"
- exportControl "Public"))
- abstract TRUE)
- (object Class "DTDFile"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0017-005cf4691c4c:1")))
- quid "37D9B08E018F"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0018-005cf4691c4c:1")))
- quid "39B7F07F0118"
- supplier "Logical View::ecore::eNamedElement"
- quidu "3903D4EE0014"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "comment"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0019-005cf4691c4c:1")))
- quid "3839DBEF012B"
- type "String"
- exportControl "Public")
- (object ClassAttribute "parseError"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-001a-005cf4691c4c:1")))
- quid "388C995F025B"
- type "boolean"
- exportControl "Public")))
- (object Class "DTDDefaultKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0000-005cf4691c4c:1")))
- quid "37E144DC03AD"
- documentation "IMPLIED=1 REQUIRED=2 FIXED=3 NOFIXED=4"
- stereotype "enumeration")
- (object Class "DTDBasicType"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0001-005cf4691c4c:1")))
- quid "37E1464F00DA"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0002-005cf4691c4c:1")))
- quid "39B7F2800315"
- supplier "Logical View::ecore::EClass"
- quidu "3903D5BF000A"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "kind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0003-005cf4691c4c:1")))
- quid "37E1468A0016"
- type "DTDBasicTypeKind"
- quidu "37E14905022C"
- exportControl "Public")))
- (object Class "DTDEnumerationType"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0004-005cf4691c4c:1")))
- quid "37E146680306"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0005-005cf4691c4c:1")))
- quid "39B7F2810302"
- supplier "Logical View::ecore::EEnum"
- quidu "39A473E901D4"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "kind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0006-005cf4691c4c:1")))
- quid "37E146AC03B8"
- type "DTDEnumGroupKind"
- quidu "37E149B201AD"
- exportControl "Public")))
- (object Class "DTDBasicTypeKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0007-005cf4691c4c:1")))
- quid "37E14905022C"
- documentation "NONE=0 CDATA=1 ID=2 IDREF=3 IDREFS=4 ENTITY=5 ENTITIES=6 NMTOKEN=7 NMTOKENS=8"
- stereotype "enumeration")
- (object Class "DTDEnumGroupKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0008-005cf4691c4c:1")))
- quid "37E149B201AD"
- documentation "NAME_TOKEN_GROUP=1 NOTATION_GROUP=2"
- stereotype "enumeration")
- (object Class "DTDGroupKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0009-005cf4691c4c:1")))
- quid "37EFCA550216"
- documentation "SEQUENCE=1 CHOICE=2"
- stereotype "enumeration")
- (object Class "DTDNotation"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000a-005cf4691c4c:1")))
- quid "37EFD0EF00C9"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000b-005cf4691c4c:1")))
- quid "39B7F0E30234"
- supplier "Logical View::ecore::eNamedElement"
- quidu "3903D4EE0014")
- (object Inheritance_Relationship
- quid "39FE2B850118"
- supplier "Logical View::dtd::DTDContent"
- quidu "39FE2B5E02DE"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "comment"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000c-005cf4691c4c:1")))
- quid "3839DC0A024C"
- type "String"
- exportControl "Public")
- (object ClassAttribute "systemID"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000d-005cf4691c4c:1")))
- quid "37EFD1020397"
- type "string"
- exportControl "Public")
- (object ClassAttribute "publicID"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000e-005cf4691c4c:1")))
- quid "37EFD10E018C"
- type "string"
- exportControl "Public")))
- (object Class "DTDEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000f-005cf4691c4c:1")))
- quid "37EFD12B03C8"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0010-005cf4691c4c:1")))
- quid "39B7F0E701EA"
- supplier "Logical View::ecore::eNamedElement"
- quidu "3903D4EE0014")
- (object Inheritance_Relationship
- quid "39FE2B860304"
- supplier "Logical View::dtd::DTDContent"
- quidu "39FE2B5E02DE"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "comment"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0011-005cf4691c4c:1")))
- quid "3839DC37008E"
- type "String"
- exportControl "Public")
- (object ClassAttribute "parameterEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0012-005cf4691c4c:1")))
- quid "37EFD13C017E"
- type "boolean"
- exportControl "Public")))
- (object Class "DTDEntityContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0013-005cf4691c4c:1")))
- quid "37EFD19D0083"
- abstract TRUE)
- (object Class "DTDExternalEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0014-005cf4691c4c:1")))
- quid "37EFD1F803E1"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0015-005cf4691c4c:1")))
- quid "37EFD32400F3"
- supplier "Logical View::dtd::DTDEntityContent"
- quidu "37EFD19D0083"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "systemID"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0000-005cf4691c4c:1")))
- quid "37EFD2E50161"
- type "string"
- exportControl "Public")
- (object ClassAttribute "publicID"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0001-005cf4691c4c:1")))
- quid "37EFD2EC01F7"
- type "string"
- exportControl "Public")))
- (object Class "DTDInternalEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0002-005cf4691c4c:1")))
- quid "37EFD2BA026E"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0003-005cf4691c4c:1")))
- quid "37EFD32B032E"
- supplier "Logical View::dtd::DTDEntityContent"
- quidu "37EFD19D0083"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "value"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0004-005cf4691c4c:1")))
- quid "37EFD2CB0268"
- type "string"
- exportControl "Public")))
- (object Class "DTDParameterEntityReference"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0005-005cf4691c4c:1")))
- quid "385287CA0163"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0006-005cf4691c4c:1")))
- quid "39B7F0D10076"
- supplier "Logical View::ecore::eNamedElement"
- quidu "3903D4EE0014")
- (object Inheritance_Relationship
- quid "39FE2B8A0287"
- supplier "Logical View::dtd::DTDContent"
- quidu "39FE2B5E02DE")))
- (object Class "DTDEntityReferenceContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0007-005cf4691c4c:1")))
- quid "3852900E0127"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0008-005cf4691c4c:1")))
- quid "38529044011B"
- supplier "Logical View::dtd::DTDRepeatableContent"
- quidu "37D9AD4C01D1")))
- (object Class "XMLSchemaDefinedType"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0009-005cf4691c4c:1")))
- quid "389F0C6D010E"
- documentation
-|NONE=-1
-|STRING=1
-|BOOLEAN=2
-|FLOAT=3
-|DOUBLE=4
-|DECIMAL=5
-|TIMEINSTANT=6
-|TIMEDURATION=7
-|RECURRINGINSTANT=8
-|BINARY=9
-|URI=10
-|INTEGER=11
-|DATE=12
-|TIME=13
-
- stereotype "enumeration")
- (object Class "DTDContent"
- quid "39FE2B5E02DE"
- abstract TRUE)
- (object Association "$UNNAMED$0"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000a-005cf4691c4c:1")))
- quid "37CBEB6F005D"
- roles (list role_list
- (object Role "content"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000b-005cf4691c4c:1")))
- quid "37CBEB70006D"
- label "content"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213"
- client_cardinality (value cardinality "1..n")
- Constraints "ordered"
- Containment "By Value"
- is_navigable TRUE)
- (object Role "group"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000c-005cf4691c4c:1")))
- quid "37CBEB7000AB"
- label "group"
- supplier "Logical View::dtd::DTDGroupContent"
- quidu "37CBEAEF0232"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE
- is_aggregate TRUE)))
- (object Association "$UNNAMED$1"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000d-005cf4691c4c:1")))
- quid "37D9AC0E00CD"
- roles (list role_list
- (object Role "element"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000e-005cf4691c4c:1")))
- quid "37D9AC0F039F"
- label "element"
- supplier "Logical View::dtd::DTDElement"
- quidu "37D9AAF70071"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE
- is_aggregate TRUE)
- (object Role "content"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000f-005cf4691c4c:1")))
- quid "37D9AC0F03A9"
- label "content"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213"
- client_cardinality (value cardinality "1")
- Containment "By Value"
- is_navigable TRUE)))
- (object Association "$UNNAMED$2"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0010-005cf4691c4c:1")))
- quid "37D9AF11001A"
- roles (list role_list
- (object Role "elementReference"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0011-005cf4691c4c:1")))
- quid "37D9AF1B0209"
- label "elementReference"
- supplier "Logical View::dtd::DTDElementReferenceContent"
- quidu "37D9AB7D0010"
- client_cardinality (value cardinality "0..n"))
- (object Role "referencedElement"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0012-005cf4691c4c:1")))
- quid "37D9AF1B020A"
- label "referencedElement"
- supplier "Logical View::dtd::DTDElement"
- quidu "37D9AAF70071"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$3"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0013-005cf4691c4c:1")))
- quid "37EFD1C902DF"
- roles (list role_list
- (object Role "$UNNAMED$4"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0014-005cf4691c4c:1")))
- quid "37EFD1CA031D"
- supplier "Logical View::dtd::DTDEntity"
- quidu "37EFD12B03C8"
- is_navigable TRUE
- is_aggregate TRUE)
- (object Role "content"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0015-005cf4691c4c:1")))
- quid "37EFD1CA0327"
- label "content"
- supplier "Logical View::dtd::DTDEntityContent"
- quidu "37EFD19D0083"
- client_cardinality (value cardinality "1")
- Containment "By Value"
- is_navigable TRUE)))
- (object Association "$UNNAMED$5"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0016-005cf4691c4c:1")))
- quid "37EFD34400E5"
- roles (list role_list
- (object Role "notation"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0017-005cf4691c4c:1"))
- (object Attribute
- tool "eCore"
- name "isTransient"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value TRUE))
- quid "37EFD3450209"
- label "notation"
- supplier "Logical View::dtd::DTDNotation"
- quidu "37EFD0EF00C9"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE)
- (object Role "entity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0018-005cf4691c4c:1")))
- quid "37EFD3450213"
- label "entity"
- supplier "Logical View::dtd::DTDExternalEntity"
- quidu "37EFD1F803E1"
- client_cardinality (value cardinality "0..n")
- is_navigable TRUE)))
- (object Association "$UNNAMED$6"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0019-005cf4691c4c:1")))
- quid "38528979005F"
- roles (list role_list
- (object Role "parmEntityRef"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001a-005cf4691c4c:1")))
- quid "3852897C0352"
- label "parmEntityRef"
- supplier "Logical View::dtd::DTDParameterEntityReference"
- quidu "385287CA0163"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)
- (object Role "entity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001b-005cf4691c4c:1")))
- quid "3852897C0353"
- label "entity"
- supplier "Logical View::dtd::DTDEntity"
- quidu "37EFD12B03C8"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$7"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001c-005cf4691c4c:1")))
- quid "385294EB0243"
- roles (list role_list
- (object Role "entityReference"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001d-005cf4691c4c:1"))
- (object Attribute
- tool "eCore"
- name "isTransient"
- value TRUE))
- quid "385294EF03BB"
- label "entityReference"
- supplier "Logical View::dtd::DTDEntityReferenceContent"
- quidu "3852900E0127"
- client_cardinality (value cardinality "0..n")
- is_navigable TRUE)
- (object Role "elementReferencedEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001e-005cf4691c4c:1")))
- quid "385294EF03BC"
- label "elementReferencedEntity"
- supplier "Logical View::dtd::DTDEntity"
- quidu "37EFD12B03C8"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$8"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001f-005cf4691c4c:1")))
- quid "3852972D02CB"
- roles (list role_list
- (object Role "attributeNameReference"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0020-005cf4691c4c:1"))
- (object Attribute
- tool "eCore"
- name "isTransient"
- value TRUE))
- quid "385297360291"
- label "attributeNameReference"
- supplier "Logical View::dtd::DTDAttribute"
- quidu "37CC187900EA"
- client_cardinality (value cardinality "0..n")
- is_navigable TRUE)
- (object Role "attributeNameReferencedEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0021-005cf4691c4c:1")))
- quid "38529736029B"
- label "attributeNameReferencedEntity"
- supplier "Logical View::dtd::DTDEntity"
- quidu "37EFD12B03C8"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$9"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0022-005cf4691c4c:1")))
- quid "38B68A7302B8"
- roles (list role_list
- (object Role "$UNNAMED$10"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0023-005cf4691c4c:1")))
- quid "38B68A780084"
- supplier "Logical View::dtd::DTDExternalEntity"
- quidu "37EFD1F803E1")
- (object Role "entityReferencedFromAnotherFile"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0024-005cf4691c4c:1")))
- quid "38B68A78008E"
- label "entityReferencedFromAnotherFile"
- supplier "Logical View::dtd::DTDFile"
- quidu "37D9B08E018F"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$11"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0025-005cf4691c4c:1")))
- quid "38BD4908013D"
- roles (list role_list
- (object Role "attributeTypeReference"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0026-005cf4691c4c:1"))
- (object Attribute
- tool "eCore"
- name "isTransient"
- value TRUE))
- quid "38BD49140130"
- label "attributeTypeReference"
- supplier "Logical View::dtd::DTDAttribute"
- quidu "37CC187900EA"
- client_cardinality (value cardinality "0..n")
- is_navigable TRUE)
- (object Role "attributeTypeReferencedEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0027-005cf4691c4c:1")))
- quid "38BD4914014E"
- label "attributeTypeReferencedEntity"
- supplier "Logical View::dtd::DTDEntity"
- quidu "37EFD12B03C8"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$12"
- quid "39FE2A9500CC"
- roles (list role_list
- (object Role "$UNNAMED$13"
- quid "39FE2A950311"
- supplier "Logical View::dtd::DTDElement"
- quidu "37D9AAF70071"
- is_navigable TRUE
- is_aggregate TRUE)
- (object Role "$UNNAMED$14"
- quid "39FE2A95031B"
- supplier "Logical View::dtd::DTDAttribute"
- quidu "37CC187900EA"
- client_cardinality (value cardinality "0..n")
- Containment "By Value"
- is_navigable TRUE)))
- (object Association "$UNNAMED$15"
- quid "39FE2BBE02DC"
- roles (list role_list
- (object Role "$UNNAMED$16"
- quid "39FE2BBF01B1"
- supplier "Logical View::dtd::DTDFile"
- quidu "37D9B08E018F"
- is_navigable TRUE
- is_aggregate TRUE)
- (object Role "$UNNAMED$17"
- quid "39FE2BBF01BB"
- supplier "Logical View::dtd::DTDContent"
- quidu "39FE2B5E02DE"
- client_cardinality (value cardinality "0..n")
- Containment "By Value"
- is_navigable TRUE)))
- (object Association "$UNNAMED$18"
- quid "39FE30D8033E"
- roles (list role_list
- (object Role "$UNNAMED$19"
- quid "39FE30D90105"
- supplier "Logical View::dtd::DTDFile"
- quidu "37D9B08E018F"
- is_navigable TRUE
- is_aggregate TRUE)
- (object Role "$UNNAMED$20"
- quid "39FE30D90137"
- supplier "Logical View::dtd::DTDEnumerationType"
- quidu "37E146680306"
- client_cardinality (value cardinality "0..n")
- Containment "By Value"
- is_navigable TRUE))))
- logical_presentations (list unit_reference_list
- (object ClassDiagram "Main"
- quid "37CAB0E60177"
- title "Main"
- zoom 98
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object NoteView @1
- location (3264, 240)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @1
- location (2910, 65)
- fill_color 13434879
- nlines 7
- max_width 673
- label
-|DTDElement's,
-|DTDParameterEntityReference's, DTDEntity's, and DTDNotation's are added to DTDFile's using the
-|ownedElement relationship
-|between MOFNamespace
-|and MOFObject
- )
- line_color 3342489
- fill_color 13434879
- width 733
- height 363)
- (object ClassView "Class" "Logical View::dtd::DTDInternalEntity" @2
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1824, 1872)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @2
- location (1647, 1817)
- fill_color 13434879
- nlines 1
- max_width 354
- justify 0
- label "DTDInternalEntity")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD2BA026E"
- width 372
- height 134
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDElement" @3
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (592, 1200)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @3
- location (417, 1145)
- fill_color 13434879
- nlines 1
- max_width 350
- justify 0
- label "DTDElement")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AAF70071"
- compartment (object Compartment
- Parent_View @3
- location (417, 1204)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 1
- max_width 371)
- width 368
- height 134
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDEntityContent" @4
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1520, 1488)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @4
- location (1341, 1438)
- fill_color 13434879
- nlines 1
- max_width 358
- justify 0
- label "DTDEntityContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD19D0083"
- width 376
- height 124
- annotation 8
- autoResize TRUE)
- (object InheritTreeView "" @5
- location (1520, 1640)
- line_color 3342489
- fill_color 13434879
- supplier @4
- vertices (list Points
- (1520, 1640)
- (1520, 1550)))
- (object ClassView "Class" "Logical View::dtd::DTDParameterEntityReference" @6
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2480, 1216)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @6
- location (2186, 1166)
- fill_color 13434879
- nlines 1
- max_width 588
- justify 0
- label "DTDParameterEntityReference")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "385287CA0163"
- width 606
- height 124
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDEntity" @7
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1520, 1216)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @7
- location (1270, 1137)
- fill_color 13434879
- nlines 1
- max_width 500
- justify 0
- label "DTDEntity")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD12B03C8"
- compartment (object Compartment
- Parent_View @7
- location (1270, 1196)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 2
- max_width 525)
- width 518
- height 182
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$3" @8
- location (1546, 1366)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD1C902DF"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$4" @9
- Parent_View @8
- location (-54, 246)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD1CA031D"
- client @8
- supplier @7
- line_style 3
- origin_attachment (1546, 1366)
- terminal_attachment (1546, 1307))
- (object RoleView "content" @10
- Parent_View @8
- location (-54, 246)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @11
- Parent_View @10
- location (1443, 1407)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 191
- justify 0
- label "+content"
- pctDist 0.699248
- height 104
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD1CA0327"
- client @8
- supplier @4
- line_style 3
- origin_attachment (1546, 1366)
- terminal_attachment (1546, 1426)
- label (object SegLabel @12
- Parent_View @10
- location (1568, 1408)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.721804
- height 22
- orientation 0))))
- (object AssociationViewNew "$UNNAMED$6" @13
- location (1978, 1256)
- stereotype TRUE
- line_color 3342489
- quidu "38528979005F"
- roleview_list (list RoleViews
- (object RoleView "parmEntityRef" @14
- Parent_View @13
- location (602, 488)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @15
- Parent_View @14
- location (2038, 1299)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 328
- justify 0
- label "+parmEntityRef"
- pctDist 0.305419
- height 43
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "3852897C0352"
- client @13
- supplier @6
- line_style 3
- origin_attachment (1978, 1256)
- terminal_attachment (2177, 1256)
- label (object SegLabel @16
- Parent_View @14
- location (2141, 1228)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.826484
- height 29
- orientation 0))
- (object RoleView "entity" @17
- Parent_View @13
- location (602, 488)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @18
- Parent_View @17
- location (1862, 1217)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 150
- justify 0
- label "+entity"
- pctDist 0.589109
- height 40
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "3852897C0353"
- client @13
- supplier @7
- line_style 3
- origin_attachment (1978, 1256)
- terminal_attachment (1779, 1256)
- label (object SegLabel @19
- Parent_View @17
- location (1823, 1309)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.776923
- height 53
- orientation 0))))
- (object ClassView "Class" "Logical View::ecore::eNamedElement" @20
- ShowCompartmentStereotypes TRUE
- location (1488, 176)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @20
- location (1352, 131)
- fill_color 13434879
- nlines 1
- max_width 272
- justify 0
- label "eNamedElement")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "3903D4EE0014"
- width 290
- height 115
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::ecore::EClass" @21
- ShowCompartmentStereotypes TRUE
- location (576, 960)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @21
- location (492, 863)
- fill_color 13434879
- nlines 2
- max_width 168
- justify 0
- label "EClass")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "3903D5BF000A"
- width 186
- height 218
- annotation 8
- autoResize TRUE)
- (object InheritView "" @22
- stereotype TRUE
- line_color 12615680
- quidu "39B7F0AF02A8"
- client @3
- supplier @21
- line_style 3
- origin_attachment (571, 1132)
- terminal_attachment (571, 1069))
- (object ClassView "Class" "Logical View::ecore::eNamedElement" @23
- ShowCompartmentStereotypes TRUE
- location (2560, 864)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @23
- location (2424, 819)
- fill_color 13434879
- nlines 1
- max_width 272
- justify 0
- label "eNamedElement")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "3903D4EE0014"
- width 290
- height 115
- annotation 8
- autoResize TRUE)
- (object InheritTreeView "" @24
- location (2560, 1036)
- line_color 12615680
- fill_color 13434879
- supplier @23
- vertices (list Points
- (2560, 1036)
- (2560, 921)))
- (object InheritView "" @25
- stereotype TRUE
- line_color 12615680
- quidu "39B7F0E701EA"
- client @7
- supplier @23
- line_style 3
- origin_attachment (1669, 1125)
- terminal_attachment (1669, 1036)
- drawSupplier @24)
- (object InheritView "" @26
- stereotype TRUE
- line_color 12615680
- quidu "39B7F0D10076"
- client @6
- supplier @23
- line_style 3
- origin_attachment (2618, 1153)
- terminal_attachment (2618, 1036)
- drawSupplier @24)
- (object ClassView "Class" "Logical View::dtd::DTDNotation" @27
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (992, 1232)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @27
- location (817, 1129)
- fill_color 13434879
- nlines 1
- max_width 350
- justify 0
- label "DTDNotation")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD0EF00C9"
- compartment (object Compartment
- Parent_View @27
- location (817, 1188)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 3
- max_width 371)
- width 368
- height 230
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDExternalEntity" @28
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1344, 1872)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @28
- location (1158, 1793)
- fill_color 13434879
- nlines 1
- max_width 372
- justify 0
- label "DTDExternalEntity")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD1F803E1"
- width 390
- height 182
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$5" @29
- location (969, 1677)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD34400E5"
- roleview_list (list RoleViews
- (object RoleView "notation" @30
- Parent_View @29
- location (-247, 205)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @31
- Parent_View @30
- location (834, 1390)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 203
- justify 0
- label "+notation"
- pctDist 0.870734
- height 136
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD3450209"
- client @29
- supplier @27
- line_style 3
- origin_attachment (969, 1677)
- terminal_attachment (969, 1347)
- label (object SegLabel @32
- Parent_View @30
- location (1040, 1388)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 72
- justify 0
- label "0..1"
- pctDist 0.877934
- height 71
- orientation 1))
- (object RoleView "entity" @33
- Parent_View @29
- location (-247, 205)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @34
- Parent_View @33
- location (1082, 1786)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 150
- justify 0
- label "+entity"
- pctDist 0.800000
- height 42
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD3450213"
- client @29
- supplier @28
- vertices (list Points
- (969, 1677)
- (969, 1827)
- (1149, 1827))
- line_style 3
- origin_attachment (969, 1677)
- terminal_attachment (1149, 1827)
- label (object SegLabel @35
- Parent_View @33
- location (1104, 1853)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..n"
- pctDist 0.863501
- height 26
- orientation 1))))
- (object InheritView "" @36
- stereotype TRUE
- line_color 3342489
- quidu "37EFD32400F3"
- client @28
- supplier @4
- line_style 3
- origin_attachment (1274, 1781)
- terminal_attachment (1274, 1640)
- drawSupplier @5)
- (object ClassView "Class" "Logical View::dtd::DTDContent" @37
- ShowCompartmentStereotypes TRUE
- location (1472, 800)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @37
- location (1344, 750)
- fill_color 13434879
- nlines 1
- max_width 256
- justify 0
- label "DTDContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "39FE2B5E02DE"
- width 274
- height 124
- annotation 8
- autoResize TRUE)
- (object InheritTreeView "" @38
- location (1472, 990)
- line_color 3342489
- fill_color 13434879
- supplier @37
- vertices (list Points
- (1472, 990)
- (1472, 862)))
- (object InheritView "" @39
- stereotype TRUE
- line_color 3342489
- quidu "39FE2B83029B"
- client @3
- supplier @37
- line_style 3
- origin_attachment (719, 1132)
- terminal_attachment (719, 990)
- drawSupplier @38)
- (object InheritView "" @40
- stereotype TRUE
- line_color 3342489
- quidu "39FE2B860304"
- client @7
- supplier @37
- line_style 3
- origin_attachment (1452, 1124)
- terminal_attachment (1452, 990)
- drawSupplier @38)
- (object InheritView "" @41
- stereotype TRUE
- line_color 3342489
- quidu "39FE2B8A0287"
- client @6
- supplier @37
- line_style 3
- origin_attachment (2347, 1154)
- terminal_attachment (2347, 990)
- drawSupplier @38)
- (object ClassView "Class" "Logical View::dtd::DTDFile" @42
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1488, 448)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @42
- location (1281, 369)
- fill_color 13434879
- nlines 1
- max_width 414
- justify 0
- label "DTDFile")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9B08E018F"
- compartment (object Compartment
- Parent_View @42
- location (1281, 428)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 2
- max_width 425)
- width 432
- height 182
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$9" @43
- location (354, 1049)
- stereotype TRUE
- line_color 3342489
- quidu "38B68A7302B8"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$10" @44
- Parent_View @43
- location (-109, 207)
- stereotype TRUE
- line_color 3342489
- quidu "38B68A780084"
- client @43
- supplier @28
- vertices (list Points
- (354, 1049)
- (354, 1781)
- (1149, 1781))
- line_style 3
- origin_attachment (354, 1049)
- terminal_attachment (1149, 1781))
- (object RoleView "entityReferencedFromAnotherFile" @45
- Parent_View @43
- location (-109, 207)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @46
- Parent_View @45
- location (296, 4537)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 732
- justify 0
- label "+entityReferencedFromAnotherFile"
- pctDist -2.283333
- height 59
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "38B68A78008E"
- client @43
- supplier @42
- vertices (list Points
- (354, 1049)
- (354, 439)
- (1272, 439))
- line_style 3
- origin_attachment (354, 1049)
- terminal_attachment (1272, 439)
- label (object SegLabel @47
- Parent_View @45
- location (1206, 500)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..1"
- pctDist 0.957129
- height 61
- orientation 1))))
- (object InheritView "" @48
- stereotype TRUE
- line_color 12615680
- quidu "39B7F07F0118"
- client @42
- supplier @20
- line_style 3
- origin_attachment (1488, 357)
- terminal_attachment (1488, 233))
- (object AssociationViewNew "$UNNAMED$15" @49
- location (1472, 638)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2BBE02DC"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$16" @50
- Parent_View @49
- location (0, -162)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2BBF01B1"
- client @49
- supplier @42
- line_style 3
- origin_attachment (1472, 638)
- terminal_attachment (1472, 539))
- (object RoleView "$UNNAMED$17" @51
- Parent_View @49
- location (0, -162)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2BBF01BB"
- client @49
- supplier @37
- line_style 3
- origin_attachment (1472, 638)
- terminal_attachment (1472, 738)
- label (object SegLabel @52
- Parent_View @51
- location (1526, 712)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..n"
- pctDist 0.736248
- height 54
- orientation 0))))
- (object ClassView "Class" "Logical View::dtd::DTDEnumerationType" @53
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- location (2448, 464)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @53
- location (2184, 385)
- fill_color 13434879
- nlines 1
- max_width 528
- justify 0
- label "DTDEnumerationType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37E146680306"
- compartment (object Compartment
- Parent_View @53
- location (2184, 444)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 2
- max_width 546)
- width 546
- height 182
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$18" @54
- location (1939, 449)
- stereotype TRUE
- line_color 3342489
- quidu "39FE30D8033E"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$19" @55
- Parent_View @54
- location (-461, -31)
- stereotype TRUE
- line_color 3342489
- quidu "39FE30D90105"
- client @54
- supplier @42
- line_style 3
- origin_attachment (1939, 449)
- terminal_attachment (1704, 449))
- (object RoleView "$UNNAMED$20" @56
- Parent_View @54
- location (-461, -31)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- stereotype TRUE
- line_color 3342489
- quidu "39FE30D90137"
- client @54
- supplier @53
- line_style 3
- origin_attachment (1939, 449)
- terminal_attachment (2175, 449)
- label (object SegLabel @57
- Parent_View @56
- location (2120, 486)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..n"
- pctDist 0.767837
- height 37
- orientation 1))))
- (object InheritView "" @58
- stereotype TRUE
- line_color 12615680
- quidu "39B7F0E30234"
- client @27
- supplier @23
- line_style 3
- origin_attachment (1064, 1116)
- terminal_attachment (1064, 1036)
- drawSupplier @24)
- (object InheritView "" @59
- stereotype TRUE
- line_color 3342489
- quidu "39FE2B850118"
- client @27
- supplier @37
- line_style 3
- origin_attachment (941, 1117)
- terminal_attachment (941, 990)
- drawSupplier @38)
- (object InheritView "" @60
- stereotype TRUE
- line_color 3342489
- quidu "37EFD32B032E"
- client @2
- supplier @4
- line_style 3
- origin_attachment (1782, 1805)
- terminal_attachment (1782, 1640)
- drawSupplier @5)))
- (object ClassDiagram "ElementDefinition"
- quid "37E14330032F"
- title "ElementDefinition"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 426
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::dtd::DTDEmptyContent" @61
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (467, 1448)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @61
- location (281, 1403)
- fill_color 13434879
- nlines 1
- max_width 372
- justify 0
- label "DTDEmptyContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AB47037A"
- width 390
- height 114
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDAnyContent" @62
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (886, 1445)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @62
- location (728, 1400)
- fill_color 13434879
- nlines 1
- max_width 316
- justify 0
- label "DTDAnyContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AB500304"
- width 334
- height 114
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDPCDataContent" @63
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1298, 1451)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @63
- location (1099, 1406)
- fill_color 13434879
- nlines 1
- max_width 398
- justify 0
- label "DTDPCDataContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AB5C0135"
- width 416
- height 114
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDRepeatableContent" @64
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1888, 1456)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @64
- location (1572, 1404)
- fill_color 13434879
- nlines 1
- max_width 632
- justify 0
- label "DTDRepeatableContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AD4C01D1"
- width 650
- height 128
- annotation 8
- autoResize TRUE)
- (object InheritTreeView "" @65
- location (1878, 1618)
- line_color 3342489
- fill_color 13434879
- supplier @64
- vertices (list Points
- (1878, 1618)
- (1878, 1520)))
- (object ClassView "Class" "Logical View::ecore::EAttribute" @66
- ShowCompartmentStereotypes TRUE
- location (1936, 400)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @66
- location (1855, 325)
- fill_color 13434879
- nlines 2
- max_width 162
- justify 0
- label "EAttribute")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "39238472039D"
- height 174
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::ecore::EClass" @67
- ShowCompartmentStereotypes TRUE
- location (928, 384)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @67
- location (847, 309)
- fill_color 13434879
- nlines 2
- max_width 162
- justify 0
- label "EClass")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "3903D5BF000A"
- height 174
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDGroupContent" @68
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2192, 1776)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @68
- location (1931, 1727)
- fill_color 13434879
- nlines 1
- max_width 522
- justify 0
- label "DTDGroupContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37CBEAEF0232"
- width 540
- height 122
- annotation 8
- autoResize TRUE)
- (object InheritView "" @69
- stereotype TRUE
- line_color 3342489
- quidu "37D9AD920363"
- client @68
- supplier @64
- line_style 3
- origin_attachment (2221, 1714)
- terminal_attachment (2221, 1618)
- drawSupplier @65)
- (object ClassView "Class" "Logical View::dtd::DTDEntityReferenceContent" @70
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1488, 1760)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @70
- location (1223, 1715)
- fill_color 13434879
- nlines 1
- max_width 530
- justify 0
- label "DTDEntityReferenceContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3852900E0127"
- width 548
- height 114
- annotation 8
- autoResize TRUE)
- (object InheritView "" @71
- stereotype TRUE
- line_color 3342489
- quidu "38529044011B"
- client @70
- supplier @64
- line_style 3
- origin_attachment (1474, 1702)
- terminal_attachment (1474, 1618)
- drawSupplier @65)
- (object ClassView "Class" "Logical View::dtd::DTDElementContent" @72
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (912, 1056)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @72
- location (704, 1008)
- fill_color 13434879
- nlines 1
- max_width 416
- justify 0
- label "DTDElementContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37CBEACF0213"
- width 434
- height 120
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$0" @73
- location (2289, 1048)
- stereotype TRUE
- line_color 3342489
- quidu "37CBEB6F005D"
- roleview_list (list RoleViews
- (object RoleView "content" @74
- Parent_View @73
- location (1025, 8)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @75
- Parent_View @74
- location (1223, 1001)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 168
- justify 0
- label "+content"
- pctDist 0.919424
- height 48
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "37CBEB70006D"
- client @73
- supplier @72
- line_style 3
- origin_attachment (2289, 1048)
- terminal_attachment (1129, 1048)
- label (object SegLabel @76
- Parent_View @74
- location (1186, 1083)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 72
- justify 0
- label "1..*"
- pctDist 0.951381
- height 35
- orientation 0)
- label (object SegLabel @77
- Parent_View @74
- location (1246, 941)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 3
- anchor_loc 1
- nlines 1
- max_width 159
- justify 0
- label "{ordered}"
- pctDist 0.900000
- height 108
- orientation 1))
- (object RoleView "group" @78
- Parent_View @73
- location (1025, 8)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @79
- Parent_View @78
- location (2535, 1745)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 144
- justify 0
- label "+group"
- pctDist 0.937744
- height 41
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "37CBEB7000AB"
- client @73
- supplier @68
- vertices (list Points
- (2289, 1048)
- (2587, 1048)
- (2587, 1785)
- (2462, 1785))
- line_style 3
- origin_attachment (2289, 1048)
- terminal_attachment (2462, 1785)
- label (object SegLabel @80
- Parent_View @78
- location (2526, 1827)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..1"
- pctDist 0.945085
- height 42
- orientation 0))))
- (object InheritTreeView "" @81
- location (910, 1291)
- line_color 3342489
- fill_color 13434879
- supplier @72
- vertices (list Points
- (910, 1291)
- (910, 1116)))
- (object InheritView "" @82
- stereotype TRUE
- line_color 3342489
- quidu "37D9ABE90278"
- client @63
- supplier @72
- line_style 3
- origin_attachment (1297, 1394)
- terminal_attachment (1297, 1291)
- drawSupplier @81)
- (object InheritView "" @83
- stereotype TRUE
- line_color 3342489
- quidu "37D9ABF30327"
- client @61
- supplier @72
- line_style 3
- origin_attachment (466, 1391)
- terminal_attachment (466, 1291)
- drawSupplier @81)
- (object InheritView "" @84
- stereotype TRUE
- line_color 3342489
- quidu "37D9ABEE0207"
- client @62
- supplier @72
- line_style 3
- origin_attachment (881, 1388)
- terminal_attachment (881, 1291)
- drawSupplier @81)
- (object InheritView "" @85
- stereotype TRUE
- line_color 3342489
- quidu "37D9ADB703C0"
- client @64
- supplier @72
- line_style 3
- origin_attachment (1903, 1392)
- terminal_attachment (1903, 1291)
- drawSupplier @81)
- (object ClassView "Class" "Logical View::dtd::DTDElementReferenceContent" @86
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (784, 1760)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @86
- location (492, 1715)
- fill_color 13434879
- nlines 1
- max_width 584
- justify 0
- label "DTDElementReferenceContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AB7D0010"
- width 602
- height 114
- annotation 8
- autoResize TRUE)
- (object InheritView "" @87
- stereotype TRUE
- line_color 3342489
- quidu "37D9AD8C03AA"
- client @86
- supplier @64
- line_style 3
- origin_attachment (650, 1703)
- terminal_attachment (650, 1618)
- drawSupplier @65)
- (object ClassView "Class" "Logical View::dtd::DTDEntity" @88
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1488, 2064)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @88
- location (1244, 1992)
- fill_color 13434879
- nlines 1
- max_width 488
- justify 0
- label "DTDEntity")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD12B03C8"
- width 506
- height 168
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$7" @89
- location (1480, 1898)
- stereotype TRUE
- line_color 3342489
- quidu "385294EB0243"
- roleview_list (list RoleViews
- (object RoleView "entityReference" @90
- Parent_View @89
- location (312, -70)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @91
- Parent_View @90
- location (1280, 1842)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 312
- justify 0
- label "+entityReference"
- pctDist 0.693750
- height 201
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "385294EF03BB"
- client @89
- supplier @70
- line_style 3
- origin_attachment (1480, 1898)
- terminal_attachment (1480, 1817)
- label (object SegLabel @92
- Parent_View @90
- location (1534, 1842)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.693750
- height 54
- orientation 1))
- (object RoleView "elementReferencedEntity" @93
- Parent_View @89
- location (312, -70)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @94
- Parent_View @93
- location (1220, 1954)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 480
- justify 0
- label "+elementReferencedEntity"
- pctDist 0.685315
- height 261
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "385294EF03BC"
- client @89
- supplier @88
- line_style 3
- origin_attachment (1480, 1898)
- terminal_attachment (1480, 1980)
- label (object SegLabel @95
- Parent_View @93
- location (1524, 1958)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.734234
- height 44
- orientation 0))))
- (object ClassView "Class" "Logical View::dtd::DTDElement" @96
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (912, 752)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @96
- location (744, 702)
- fill_color 13434879
- nlines 1
- max_width 336
- justify 0
- label "DTDElement")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AAF70071"
- width 354
- height 124
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$1" @97
- location (912, 904)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AC0E00CD"
- roleview_list (list RoleViews
- (object RoleView "element" @98
- Parent_View @97
- location (-25, 96)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @99
- Parent_View @98
- location (1014, 865)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 168
- justify 0
- label "+element"
- pctDist 0.428571
- height 102
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AC0F039F"
- client @97
- supplier @96
- line_style 0
- label (object SegLabel @100
- Parent_View @98
- location (857, 850)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..1"
- pctDist 0.598214
- height 56
- orientation 0))
- (object RoleView "content" @101
- Parent_View @97
- location (-25, 96)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @102
- Parent_View @101
- location (1014, 964)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 168
- justify 0
- label "+content"
- pctDist 0.664063
- height 102
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AC0F03A9"
- client @97
- supplier @72
- line_style 0
- label (object SegLabel @103
- Parent_View @101
- location (871, 962)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.640625
- height 42
- orientation 1))))
- (object AssociationViewNew "$UNNAMED$2" @104
- location (123, 1122)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AF11001A"
- roleview_list (list RoleViews
- (object RoleView "elementReference" @105
- Parent_View @104
- location (-981, 642)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @106
- Parent_View @105
- location (321, 1825)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 348
- justify 0
- label "+elementReference"
- pctDist 0.840035
- height 56
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AF1B0209"
- client @104
- supplier @86
- vertices (list Points
- (123, 1122)
- (123, 1769)
- (483, 1769))
- line_style 3
- origin_attachment (123, 1122)
- terminal_attachment (483, 1769)
- label (object SegLabel @107
- Parent_View @105
- location (422, 1726)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.940559
- height 44
- orientation 0))
- (object RoleView "referencedElement" @108
- Parent_View @104
- location (-981, 642)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @109
- Parent_View @108
- location (532, 686)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 360
- justify 0
- label "+referencedElement"
- pctDist 0.799650
- height 43
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AF1B020A"
- client @104
- supplier @96
- vertices (list Points
- (123, 1122)
- (123, 728)
- (735, 728))
- line_style 3
- origin_attachment (123, 1122)
- terminal_attachment (735, 728)
- label (object SegLabel @110
- Parent_View @108
- location (701, 773)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.966965
- height 45
- orientation 1))))
- (object InheritView "" @111
- stereotype TRUE
- line_color 12615680
- quidu "39B7F0AF02A8"
- client @96
- supplier @67
- line_style 3
- origin_attachment (923, 690)
- terminal_attachment (923, 470))
- (object ClassView "Class" "Logical View::dtd::DTDAttribute" @112
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1888, 752)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @112
- location (1612, 657)
- fill_color 13434879
- nlines 1
- max_width 552
- justify 0
- label "DTDAttribute")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37CC187900EA"
- width 570
- height 214
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$8" @113
- location (2775, 1628)
- stereotype TRUE
- line_color 3342489
- quidu "3852972D02CB"
- roleview_list (list RoleViews
- (object RoleView "attributeNameReference" @114
- Parent_View @113
- location (1591, -564)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @115
- Parent_View @114
- location (2422, 808)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 468
- justify 0
- label "+attributeNameReference"
- pctDist 0.829630
- height 39
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "385297360291"
- client @113
- supplier @112
- vertices (list Points
- (2775, 1628)
- (2775, 768)
- (2173, 768))
- line_style 3
- origin_attachment (2775, 1628)
- terminal_attachment (2173, 768)
- label (object SegLabel @116
- Parent_View @114
- location (2222, 871)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.966649
- height 102
- orientation 0))
- (object RoleView "attributeNameReferencedEntity" @117
- Parent_View @113
- location (1591, -564)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @118
- Parent_View @117
- location (2076, 2090)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 588
- justify 0
- label "+attributeNameReferencedEntity"
- pctDist 0.771469
- height 35
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "38529736029B"
- client @113
- supplier @88
- vertices (list Points
- (2775, 1628)
- (2775, 2055)
- (1741, 2055))
- line_style 3
- origin_attachment (2775, 1628)
- terminal_attachment (1741, 2055)
- label (object SegLabel @119
- Parent_View @117
- location (1813, 2018)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..1"
- pctDist 0.951442
- height 38
- orientation 1))))
- (object AssociationViewNew "$UNNAMED$11" @120
- location (2945, 1891)
- stereotype TRUE
- line_color 3342489
- quidu "38BD4908013D"
- roleview_list (list RoleViews
- (object RoleView "attributeTypeReference" @121
- Parent_View @120
- location (1489, -676)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @122
- Parent_View @121
- location (2435, 656)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 444
- justify 0
- label "+attributeTypeReference"
- pctDist 0.866026
- height 54
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "38BD49140130"
- client @120
- supplier @112
- vertices (list Points
- (2945, 1891)
- (2945, 708)
- (2173, 708))
- line_style 3
- origin_attachment (2945, 1891)
- terminal_attachment (2173, 708)
- label (object SegLabel @123
- Parent_View @121
- location (2345, 603)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.912538
- height 107
- orientation 1))
- (object RoleView "attributeTypeReferencedEntity" @124
- Parent_View @120
- location (1489, -676)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @125
- Parent_View @124
- location (1679, 2299)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 576
- justify 0
- label "+attributeTypeReferencedEntity"
- pctDist 0.828601
- height 56
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "38BD4914014E"
- client @120
- supplier @88
- vertices (list Points
- (2945, 1891)
- (2945, 2243)
- (1438, 2243)
- (1438, 2148))
- line_style 3
- origin_attachment (2945, 1891)
- terminal_attachment (1438, 2148)
- label (object SegLabel @126
- Parent_View @124
- location (1365, 2178)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..1"
- pctDist 0.984774
- height 74
- orientation 0))))
- (object InheritView "" @127
- stereotype TRUE
- line_color 12615680
- quidu "39B7F15901DA"
- client @112
- supplier @66
- line_style 3
- origin_attachment (1950, 645)
- terminal_attachment (1950, 486))
- (object AssociationViewNew "$UNNAMED$12" @128
- location (1346, 752)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2A9500CC"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$13" @129
- Parent_View @128
- location (-542, -16)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2A950311"
- client @128
- supplier @96
- line_style 3
- origin_attachment (1346, 752)
- terminal_attachment (1089, 752))
- (object RoleView "$UNNAMED$14" @130
- Parent_View @128
- location (-542, -16)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2A95031B"
- client @128
- supplier @112
- line_style 3
- origin_attachment (1346, 752)
- terminal_attachment (1603, 752)
- label (object SegLabel @131
- Parent_View @130
- location (1544, 791)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.773390
- height 39
- orientation 1))))))
- (object ClassDiagram "AttributeDefinition"
- quid "37E144570257"
- title "AttributeDefinition"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::dtd::DTDAttribute" @132
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (512, 656)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @132
- location (236, 539)
- fill_color 13434879
- nlines 1
- max_width 552
- justify 0
- label "DTDAttribute")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37CC187900EA"
- width 570
- height 258
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDBasicType" @133
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1264, 656)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @133
- location (1017, 584)
- fill_color 13434879
- nlines 1
- max_width 494
- justify 0
- label "DTDBasicType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37E1464F00DA"
- width 512
- height 168
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDEnumerationType" @134
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1904, 656)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @134
- location (1646, 584)
- fill_color 13434879
- nlines 1
- max_width 516
- justify 0
- label "DTDEnumerationType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37E146680306"
- width 534
- height 168
- annotation 8
- autoResize TRUE)
- (object NoteView @135
- location (912, 1120)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @135
- location (492, 926)
- nlines 9
- max_width 805
- label
-|A DTD attribute's type and initial
-|value are represented using the eType and default value stored in eAttribute. The eType will always be either DTDBasicType (subclass of eClass) or DTDEnumerationType (subclass of eEnum).
- )
- fill_color 16777215
- width 865
- height 400)
- (object AttachView "" @136
- stereotype TRUE
- client @132
- supplier @135
- line_style 0)
- (object ClassView "Class" "Logical View::ecore::EClass" @137
- ShowCompartmentStereotypes TRUE
- location (1264, 272)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @137
- location (1183, 197)
- fill_color 13434879
- nlines 2
- max_width 162
- justify 0
- label "EClass")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "3903D5BF000A"
- height 174
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::ecore::EEnum" @138
- ShowCompartmentStereotypes TRUE
- location (1904, 272)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @138
- location (1823, 197)
- fill_color 13434879
- nlines 2
- max_width 162
- justify 0
- label "EEnum")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "39A473E901D4"
- height 174
- annotation 8
- autoResize TRUE)
- (object InheritView "" @139
- stereotype TRUE
- line_color 12615680
- quidu "39B7F2800315"
- client @133
- supplier @137
- line_style 3
- origin_attachment (1260, 572)
- terminal_attachment (1260, 359))
- (object InheritView "" @140
- stereotype TRUE
- line_color 12615680
- quidu "39B7F2810302"
- client @134
- supplier @138
- line_style 3
- origin_attachment (1903, 572)
- terminal_attachment (1903, 359))
- (object ClassView "Class" "Logical View::ecore::EAttribute" @141
- ShowCompartmentStereotypes TRUE
- location (528, 272)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @141
- location (447, 197)
- fill_color 13434879
- nlines 2
- max_width 162
- justify 0
- label "EAttribute")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "39238472039D"
- height 174
- annotation 8
- autoResize TRUE)
- (object InheritView "" @142
- stereotype TRUE
- line_color 12615680
- quidu "39B7F15901DA"
- client @132
- supplier @141
- line_style 3
- origin_attachment (520, 527)
- terminal_attachment (520, 359))))))
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/dtdmodel.mdl b/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/dtdmodel.mdl deleted file mode 100644 index ce5627af41..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/dtdmodel.mdl +++ /dev/null @@ -1,7526 +0,0 @@ -
-(object Petal
- version 45
- _written "Rose 7.5.0103.1920"
- charSet 0)
-
-(object Design "Logical View"
- is_unit TRUE
- is_loaded TRUE
- attributes (list Attribute_Set
- (object Attribute
- tool "Java"
- name "IDE"
- value "Internal Editor"))
- quid "3E36BEB60133"
- defaults (object defaults
- rightMargin 0.250000
- leftMargin 0.250000
- topMargin 0.250000
- bottomMargin 0.500000
- pageOverlap 0.250000
- clipIconLabels TRUE
- autoResize TRUE
- snapToGrid TRUE
- gridX 16
- gridY 16
- defaultFont (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- showMessageNum 1
- showClassOfObject TRUE
- notation "Unified")
- root_usecase_package (object Class_Category "Use Case View"
- quid "3A0C75F401F7"
- exportControl "Public"
- global TRUE
- logical_models (list unit_reference_list)
- logical_presentations (list unit_reference_list
- (object UseCaseDiagram "Main"
- quid "3A0C75F4020B"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- root_category (object Class_Category "Logical View"
- quid "3A0C75F401F6"
- exportControl "Public"
- global TRUE
- subsystem "Component View"
- quidu "3A0C75F401F8"
- logical_models (list unit_reference_list
- (object Class_Category "ecore"
- is_unit TRUE
- is_loaded FALSE
- file_name "$VABASE_PLUGINS_PATH\\org.eclipse.emf.ecore\\src\\model\\org.eclipse.emf.ECore.cat"
- quid "39A5ED04004E")
- (object Class_Category "dtd"
- is_unit TRUE
- is_loaded FALSE
- file_name "$VABASE_PLUGINS_PATH\\org.eclipse.wst.dtd\\src\\rose\\DTD.cat"
- quid "3857B1C00293"))
- logical_presentations (list unit_reference_list
- (object ClassDiagram "Main"
- quid "3A0C75F401FF"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object CategoryView "Logical View::ecore" @1
- location (960, 304)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @1
- location (816, 220)
- fill_color 13434879
- nlines 2
- max_width 288
- justify 0
- label "ecore")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "39A5ED04004E"
- width 300
- height 180)
- (object CategoryView "Logical View::dtd" @2
- location (368, 256)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @2
- location (224, 172)
- fill_color 13434879
- nlines 2
- max_width 288
- justify 0
- label "dtd")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3857B1C00293"
- width 300
- height 180)))))
- root_subsystem (object SubSystem "Component View"
- quid "3A0C75F401F8"
- physical_models (list unit_reference_list)
- physical_presentations (list unit_reference_list
- (object Module_Diagram "Main"
- quid "3A0C75F4020A"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- process_structure (object Processes
- quid "3A0C75F401F9"
- ProcsNDevs (list
- (object Process_Diagram "Deployment View"
- quid "3A0C75F401FB"
- title "Deployment View"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- properties (object Properties
- attributes (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "DDL"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "DDL"
- name "DataBase"
- value ("DataBaseSet" 800))
- (object Attribute
- tool "DDL"
- name "DataBaseSet"
- value (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "ANSI"
- value 800)
- (object Attribute
- tool "DDL"
- name "Oracle"
- value 801)
- (object Attribute
- tool "DDL"
- name "SQLServer"
- value 802)
- (object Attribute
- tool "DDL"
- name "Sybase"
- value 803)
- (object Attribute
- tool "DDL"
- name "Watcom"
- value 804)))
- (object Attribute
- tool "DDL"
- name "PrimaryKeyColumnName"
- value "Id")
- (object Attribute
- tool "DDL"
- name "PrimaryKeyColumnType"
- value "NUMBER(5)")
- (object Attribute
- tool "DDL"
- name "ViewName"
- value "V_")
- (object Attribute
- tool "DDL"
- name "TableName"
- value "T_")
- (object Attribute
- tool "DDL"
- name "InheritSuffix"
- value "_V")
- (object Attribute
- tool "DDL"
- name "DropClause"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "BaseViews"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "DDLScriptFilename"
- value "DDL1.SQL")))
- (object Attribute
- tool "DDL"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "ColumnType"
- value "VARCHAR")
- (object Attribute
- tool "DDL"
- name "Length"
- value "")
- (object Attribute
- tool "DDL"
- name "NullsOK"
- value TRUE)
- (object Attribute
- tool "DDL"
- name "PrimaryKey"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "Unique"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "CompositeUnique"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "CheckConstraint"
- value "")))
- (object Attribute
- tool "DDL"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "IDL"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "StopOnError"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "GeneratePreserveRegions"
- value TRUE)))
- (object Attribute
- tool "IDL"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "ImplementationType"
- value "")
- (object Attribute
- tool "IDL"
- name "ConstValue"
- value "")
- (object Attribute
- tool "IDL"
- name "GenerateDefaultSpecifier"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "DefaultSpecifier"
- value "")
- (object Attribute
- tool "IDL"
- name "IDLElement"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "IDLSpecificationType"
- value ("IDLSpecSet" 22))
- (object Attribute
- tool "IDL"
- name "IDLSpecSet"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Interface"
- value 22)
- (object Attribute
- tool "IDL"
- name "Typedef"
- value 54)
- (object Attribute
- tool "IDL"
- name "Enumeration"
- value 8)
- (object Attribute
- tool "IDL"
- name "Const"
- value 71)
- (object Attribute
- tool "IDL"
- name "Exception"
- value 61)
- (object Attribute
- tool "IDL"
- name "Struct"
- value 51)
- (object Attribute
- tool "IDL"
- name "Union"
- value 81)))))
- (object Attribute
- tool "IDL"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "IDL"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "GenerateIDLModule"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "IncludeBySimpleName"
- value FALSE)))
- (object Attribute
- tool "IDL"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "IDL"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "IncludeBySimpleName"
- value FALSE)))
- (object Attribute
- tool "IDL"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "OperationIsOneWay"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "Context"
- value "")
- (object Attribute
- tool "IDL"
- name "Raises"
- value "")))
- (object Attribute
- tool "IDL"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "CaseSpecifier"
- value "")
- (object Attribute
- tool "IDL"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "IDL"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "IsConst"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "ConstValue"
- value "")))
- (object Attribute
- tool "IDL"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "NameIfUnlabeled"
- value "the_$supplier")
- (object Attribute
- tool "IDL"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "IDL"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "BoundedHasRelType"
- value ("HasRelTypeSet" 47))
- (object Attribute
- tool "IDL"
- name "HasRelTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Array"
- value 24)
- (object Attribute
- tool "IDL"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "IDL"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "NameIfUnlabeled"
- value "the_$supplier")
- (object Attribute
- tool "IDL"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "IDL"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "BoundedRoleType"
- value ("AssocTypeSet" 47))
- (object Attribute
- tool "IDL"
- name "AssocTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Array"
- value 24)
- (object Attribute
- tool "IDL"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "IDL"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "GenerateForwardReference"
- value FALSE)))
- (object Attribute
- tool "IDL"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Directory"
- value "AUTO GENERATE")))
- (object Attribute
- tool "IDL"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "SCC"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "eCore"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "eCore"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "eCore"
- name "Codegen Name"
- value "")))
- (object Attribute
- tool "eCore"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "eCore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "eCore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "eCore"
- name "isChangeable"
- value TRUE)))
- (object Attribute
- tool "eCore"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "eCore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "eCore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "eCore"
- name "isChangeable"
- value TRUE)))
- (object Attribute
- tool "Cplusplus"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Cplusplus"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "Const"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "InitialValue"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)))
- (object Attribute
- tool "Cplusplus"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "Copyright"
- value (value Text ""))
- (object Attribute
- tool "Cplusplus"
- name "RootPackage"
- value "C++ Reverse Engineered")
- (object Attribute
- tool "Cplusplus"
- name "InitialHeaderIncludes"
- value (value Text ""))
- (object Attribute
- tool "Cplusplus"
- name "InitialBodyIncludes"
- value (value Text ""))))
- (object Attribute
- tool "Cplusplus"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "InitialCodeBody"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "Inline"
- value FALSE)))
- (object Attribute
- tool "Cplusplus"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "ImplementationType"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "HeaderSourceFile"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "BodySourceFile"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "IsNamespace"
- value FALSE)))
- (object Attribute
- tool "Cplusplus"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "ANSI C++ Event Watcher"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "ANSIConvert"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "propertyId"
- value "838326200")
- (object Attribute
- tool "Ada83"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "SpecFileExtension"
- value "1.ada")
- (object Attribute
- tool "Ada83"
- name "SpecFileBackupExtension"
- value "1.ad~")
- (object Attribute
- tool "Ada83"
- name "SpecFileTemporaryExtension"
- value "1.ad#")
- (object Attribute
- tool "Ada83"
- name "BodyFileExtension"
- value "2.ada")
- (object Attribute
- tool "Ada83"
- name "BodyFileBackupExtension"
- value "2.ad~")
- (object Attribute
- tool "Ada83"
- name "BodyFileTemporaryExtension"
- value "2.ad#")
- (object Attribute
- tool "Ada83"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateBodies"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "DefaultCodeBody"
- value "[statement]")
- (object Attribute
- tool "Ada83"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "CommentWidth"
- value 60)
- (object Attribute
- tool "Ada83"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "Ada83"
- name "UseFileName"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "Directory"
- value "$ROSEADA83_SOURCE")))
- (object Attribute
- tool "Ada83"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "ClassName"
- value "Object")
- (object Attribute
- tool "Ada83"
- name "ClassAccess"
- value ("ImplementationSet" 43))
- (object Attribute
- tool "Ada83"
- name "ImplementationType"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "IsSubtype"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "PolymorphicUnit"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "HandleName"
- value "Handle")
- (object Attribute
- tool "Ada83"
- name "HandleAccess"
- value ("ImplementationSet" 45))
- (object Attribute
- tool "Ada83"
- name "Discriminant"
- value "")
- (object Attribute
- tool "Ada83"
- name "Variant"
- value "")
- (object Attribute
- tool "Ada83"
- name "EnumerationLiteralPrefix"
- value "A_")
- (object Attribute
- tool "Ada83"
- name "RecordFieldPrefix"
- value "The_")
- (object Attribute
- tool "Ada83"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "ClassParameterName"
- value "This")
- (object Attribute
- tool "Ada83"
- name "DefaultConstructorKind"
- value ("ConstructorKindSet" 199))
- (object Attribute
- tool "Ada83"
- name "DefaultConstructorName"
- value "Create")
- (object Attribute
- tool "Ada83"
- name "InlineDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "CopyConstructorKind"
- value ("ConstructorKindSet" 199))
- (object Attribute
- tool "Ada83"
- name "CopyConstructorName"
- value "Copy")
- (object Attribute
- tool "Ada83"
- name "InlineCopyConstructor"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "DestructorName"
- value "Free")
- (object Attribute
- tool "Ada83"
- name "InlineDestructor"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "ClassEqualityOperation"
- value "")
- (object Attribute
- tool "Ada83"
- name "HandleEqualityOperation"
- value "")
- (object Attribute
- tool "Ada83"
- name "InlineEquality"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "IsTask"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "ImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Public"
- value 45)
- (object Attribute
- tool "Ada83"
- name "Private"
- value 43)
- (object Attribute
- tool "Ada83"
- name "LimitedPrivate"
- value 200)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada83"
- name "ConstructorKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada83"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada83"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada83"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada83"
- name "GenericFormalParameters"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "AdditionalWiths"
- value (value Text ""))))
- (object Attribute
- tool "Ada83"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada83"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada83"
- name "AdditionalWiths"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "IsSubunit"
- value FALSE)))
- (object Attribute
- tool "Ada83"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "SubprogramImplementation"
- value ("SubprogramImplementationSet" 2))
- (object Attribute
- tool "Ada83"
- name "Renames"
- value "")
- (object Attribute
- tool "Ada83"
- name "ClassParameterMode"
- value ("ParameterModeSet" 203))
- (object Attribute
- tool "Ada83"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "ExitCode"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "InitialCodeBody"
- value "${default}")
- (object Attribute
- tool "Ada83"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "SubprogramImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Spec"
- value 224)
- (object Attribute
- tool "Ada83"
- name "Body"
- value 2)
- (object Attribute
- tool "Ada83"
- name "Renaming"
- value 222)
- (object Attribute
- tool "Ada83"
- name "Separate"
- value 223)))
- (object Attribute
- tool "Ada83"
- name "ParameterModeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "In"
- value 204)
- (object Attribute
- tool "Ada83"
- name "Out"
- value 205)
- (object Attribute
- tool "Ada83"
- name "InOut"
- value 203)
- (object Attribute
- tool "Ada83"
- name "FunctionReturn"
- value 206)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada83"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "NameIfUnlabeled"
- value "The_${supplier}")
- (object Attribute
- tool "Ada83"
- name "DataMemberName"
- value "${relationship}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${relationship}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${relationship}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada83"
- name "Variant"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada83"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada83"
- name "SelectorType"
- value "")))
- (object Attribute
- tool "Ada83"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "DataMemberName"
- value "${attribute}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${attribute}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${attribute}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada83"
- name "Variant"
- value "")
- (object Attribute
- tool "Ada83"
- name "Representation"
- value (value Text ""))))
- (object Attribute
- tool "Ada83"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${association}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${association}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "GenerateAssociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada83"
- name "AssociateName"
- value "Associate")
- (object Attribute
- tool "Ada83"
- name "InlineAssociate"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "GenerateDissociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada83"
- name "DissociateName"
- value "Dissociate")
- (object Attribute
- tool "Ada83"
- name "InlineDissociate"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada83"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada83"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada83"
- name "DataMemberName"
- value "${target}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${target}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${target}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada83"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada83"
- name "SelectorType"
- value "")
- (object Attribute
- tool "Ada83"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada83"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Directory"
- value "AUTO GENERATE")))
- (object Attribute
- tool "Ada83"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "propertyId"
- value "838326200")
- (object Attribute
- tool "Ada95"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "SpecFileExtension"
- value "1.ada")
- (object Attribute
- tool "Ada95"
- name "SpecFileBackupExtension"
- value "1.ad~")
- (object Attribute
- tool "Ada95"
- name "SpecFileTemporaryExtension"
- value "1.ad#")
- (object Attribute
- tool "Ada95"
- name "BodyFileExtension"
- value "2.ada")
- (object Attribute
- tool "Ada95"
- name "BodyFileBackupExtension"
- value "2.ad~")
- (object Attribute
- tool "Ada95"
- name "BodyFileTemporaryExtension"
- value "2.ad#")
- (object Attribute
- tool "Ada95"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "UseColonNotation"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateBodies"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "DefaultCodeBody"
- value "[statement]")
- (object Attribute
- tool "Ada95"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "CommentWidth"
- value 60)
- (object Attribute
- tool "Ada95"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "Ada95"
- name "UseFileName"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "Directory"
- value "$ROSEADA95_SOURCE")))
- (object Attribute
- tool "Ada95"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "TypeName"
- value "Object")
- (object Attribute
- tool "Ada95"
- name "TypeVisibility"
- value ("TypeVisibilitySet" 43))
- (object Attribute
- tool "Ada95"
- name "TypeImplementation"
- value ("TypeImplementationSet" 208))
- (object Attribute
- tool "Ada95"
- name "TypeControl"
- value ("TypeControlSet" 225))
- (object Attribute
- tool "Ada95"
- name "TypeControlName"
- value "Controlled_${type}")
- (object Attribute
- tool "Ada95"
- name "TypeDefinition"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "RecordImplementation"
- value ("RecordImplementationSet" 209))
- (object Attribute
- tool "Ada95"
- name "RecordKindPackageName"
- value "${class}_Record_Kinds")
- (object Attribute
- tool "Ada95"
- name "IsLimited"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsSubtype"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateAccessType"
- value ("GenerateAccessTypeSet" 230))
- (object Attribute
- tool "Ada95"
- name "AccessTypeName"
- value "Handle")
- (object Attribute
- tool "Ada95"
- name "AccessTypeVisibility"
- value ("TypeVisibilitySet" 45))
- (object Attribute
- tool "Ada95"
- name "AccessTypeDefinition"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "AccessClassWide"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "MaybeAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "ParameterizedImplementation"
- value ("ParameterizedImplementationSet" 11))
- (object Attribute
- tool "Ada95"
- name "ParentClassName"
- value "Superclass")
- (object Attribute
- tool "Ada95"
- name "EnumerationLiteralPrefix"
- value "A_")
- (object Attribute
- tool "Ada95"
- name "RecordFieldPrefix"
- value "The_")
- (object Attribute
- tool "Ada95"
- name "ArrayOfTypeName"
- value "Array_Of_${type}")
- (object Attribute
- tool "Ada95"
- name "AccessArrayOfTypeName"
- value "Access_Array_Of_${type}")
- (object Attribute
- tool "Ada95"
- name "ArrayOfAccessTypeName"
- value "Array_Of_${access_type}")
- (object Attribute
- tool "Ada95"
- name "AccessArrayOfAccessTypeName"
- value "Access_Array_Of_${access_type}")
- (object Attribute
- tool "Ada95"
- name "ArrayIndexDefinition"
- value "Positive range <>")
- (object Attribute
- tool "Ada95"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "ImplicitParameterName"
- value "This")
- (object Attribute
- tool "Ada95"
- name "GenerateDefaultConstructor"
- value ("SubprogramKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "DefaultConstructorName"
- value "Create")
- (object Attribute
- tool "Ada95"
- name "InlineDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateCopyConstructor"
- value ("SubprogramKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "CopyConstructorName"
- value "Copy")
- (object Attribute
- tool "Ada95"
- name "InlineCopyConstructor"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateDestructor"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "DestructorName"
- value "Free")
- (object Attribute
- tool "Ada95"
- name "InlineDestructor"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateTypeEquality"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "TypeEqualityName"
- value "${quote}=${quote}")
- (object Attribute
- tool "Ada95"
- name "InlineEquality"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "TypeImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Tagged"
- value 208)
- (object Attribute
- tool "Ada95"
- name "Record"
- value 210)
- (object Attribute
- tool "Ada95"
- name "Mixin"
- value 211)
- (object Attribute
- tool "Ada95"
- name "Protected"
- value 44)
- (object Attribute
- tool "Ada95"
- name "Task"
- value 212)))
- (object Attribute
- tool "Ada95"
- name "RecordImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "SingleType"
- value 209)
- (object Attribute
- tool "Ada95"
- name "MultipleTypes"
- value 213)))
- (object Attribute
- tool "Ada95"
- name "ParameterizedImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Generic"
- value 11)
- (object Attribute
- tool "Ada95"
- name "Unconstrained"
- value 214)))
- (object Attribute
- tool "Ada95"
- name "TypeVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Public"
- value 45)
- (object Attribute
- tool "Ada95"
- name "Private"
- value 43)))
- (object Attribute
- tool "Ada95"
- name "SubprogramKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "TypeControlSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "None"
- value 225)
- (object Attribute
- tool "Ada95"
- name "InitializationOnly"
- value 226)
- (object Attribute
- tool "Ada95"
- name "AssignmentFinalizationOnly"
- value 227)
- (object Attribute
- tool "Ada95"
- name "All"
- value 228)))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Always"
- value 229)
- (object Attribute
- tool "Ada95"
- name "Auto"
- value 230)))))
- (object Attribute
- tool "Ada95"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada95"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada95"
- name "GenericFormalParameters"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "AdditionalWiths"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "IsPrivate"
- value FALSE)))
- (object Attribute
- tool "Ada95"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada95"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada95"
- name "AdditionalWiths"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "IsSubunit"
- value FALSE)))
- (object Attribute
- tool "Ada95"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "SubprogramImplementation"
- value ("SubprogramImplementationSet" 2))
- (object Attribute
- tool "Ada95"
- name "Renames"
- value "")
- (object Attribute
- tool "Ada95"
- name "GenerateOverriding"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "ImplicitParameterMode"
- value ("ParameterModeSet" 203))
- (object Attribute
- tool "Ada95"
- name "ImplicitParameterClassWide"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateAccessOperation"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "ExitCode"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "InitialCodeBody"
- value "${default}")
- (object Attribute
- tool "Ada95"
- name "EntryBarrierCondition"
- value "True")
- (object Attribute
- tool "Ada95"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "SubprogramImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Spec"
- value 224)
- (object Attribute
- tool "Ada95"
- name "Body"
- value 2)
- (object Attribute
- tool "Ada95"
- name "Abstract"
- value 221)
- (object Attribute
- tool "Ada95"
- name "Renaming"
- value 222)
- (object Attribute
- tool "Ada95"
- name "RenamingAsBody"
- value 231)
- (object Attribute
- tool "Ada95"
- name "Separate"
- value 223)))
- (object Attribute
- tool "Ada95"
- name "ParameterModeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "In"
- value 204)
- (object Attribute
- tool "Ada95"
- name "Out"
- value 205)
- (object Attribute
- tool "Ada95"
- name "InOut"
- value 203)
- (object Attribute
- tool "Ada95"
- name "Access"
- value 220)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "NameIfUnlabeled"
- value "The_${supplier}")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementation"
- value ("RecordFieldImplementationSet" 216))
- (object Attribute
- tool "Ada95"
- name "RecordFieldName"
- value "${relationship}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessGet"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${relationship}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessSet"
- value ("ProcedureKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${relationship}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "IsAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerImplementation"
- value ("ContainerImplementationSet" 217))
- (object Attribute
- tool "Ada95"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada95"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada95"
- name "SelectorType"
- value "")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Component"
- value 216)
- (object Attribute
- tool "Ada95"
- name "Discriminant"
- value 218)
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminant"
- value 219)))
- (object Attribute
- tool "Ada95"
- name "ContainerImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Array"
- value 217)
- (object Attribute
- tool "Ada95"
- name "Generic"
- value 11)))
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementation"
- value ("RecordFieldImplementationSet" 216))
- (object Attribute
- tool "Ada95"
- name "RecordFieldName"
- value "${attribute}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessGet"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${attribute}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessSet"
- value ("ProcedureKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${attribute}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "IsAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada95"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Component"
- value 216)
- (object Attribute
- tool "Ada95"
- name "Discriminant"
- value 218)
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminant"
- value 219)))
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${association}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${association}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateAssociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "AssociateName"
- value "Associate")
- (object Attribute
- tool "Ada95"
- name "InlineAssociate"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateDissociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "DissociateName"
- value "Dissociate")
- (object Attribute
- tool "Ada95"
- name "InlineDissociate"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementation"
- value ("RecordFieldImplementationSet" 216))
- (object Attribute
- tool "Ada95"
- name "RecordFieldName"
- value "${target}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessGet"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${target}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessSet"
- value ("ProcedureKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${target}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "IsAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerImplementation"
- value ("ContainerImplementationSet" 217))
- (object Attribute
- tool "Ada95"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada95"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada95"
- name "SelectorType"
- value "")
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Component"
- value 216)
- (object Attribute
- tool "Ada95"
- name "Discriminant"
- value 218)
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminant"
- value 219)))
- (object Attribute
- tool "Ada95"
- name "ContainerImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Array"
- value 217)
- (object Attribute
- tool "Ada95"
- name "Generic"
- value 11)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Directory"
- value "AUTO GENERATE")))
- (object Attribute
- tool "Ada95"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "CORBA"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "CORBA"
- name "Editor"
- value ("EditorType" 100))
- (object Attribute
- tool "CORBA"
- name "IncludePath"
- value "")
- (object Attribute
- tool "CORBA"
- name "StopOnError"
- value TRUE)
- (object Attribute
- tool "CORBA"
- name "EditorType"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "BuiltIn"
- value 100)
- (object Attribute
- tool "CORBA"
- name "WindowsShell"
- value 101)))
- (object Attribute
- tool "CORBA"
- name "PathSeparator"
- value "")))
- (object Attribute
- tool "CORBA"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "ArrayDimensions"
- value "")
- (object Attribute
- tool "CORBA"
- name "ConstValue"
- value "")
- (object Attribute
- tool "CORBA"
- name "ImplementationType"
- value "")))
- (object Attribute
- tool "CORBA"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "CORBA"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")))
- (object Attribute
- tool "CORBA"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "CORBA"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")))
- (object Attribute
- tool "CORBA"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "Context"
- value "")
- (object Attribute
- tool "CORBA"
- name "OperationIsOneWay"
- value FALSE)))
- (object Attribute
- tool "CORBA"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "ArrayDimensions"
- value "")
- (object Attribute
- tool "CORBA"
- name "CaseSpecifier"
- value "")
- (object Attribute
- tool "CORBA"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "Order"
- value "")))
- (object Attribute
- tool "CORBA"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "ArrayDimensions"
- value "")
- (object Attribute
- tool "CORBA"
- name "CaseSpecifier"
- value "")
- (object Attribute
- tool "CORBA"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "Order"
- value "")
- (object Attribute
- tool "CORBA"
- name "BoundedRoleType"
- value ("AssocTypeSet" 47))
- (object Attribute
- tool "CORBA"
- name "AssocTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "Array"
- value 24)
- (object Attribute
- tool "CORBA"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "CORBA"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "GenerateForwardReference"
- value FALSE)))
- (object Attribute
- tool "CORBA"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Data Modeler"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "project"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TableCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ViewCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "DomainCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "SPPackageCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "TriggerCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "IndexCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ConstraintCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "StoreProcedureCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "PrimaryKeyCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ForeignKeyCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "JoinCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "TableSpaceCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "cONTAINERCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "TablePrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ViewPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DomainPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TriggerPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IndexPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ConstraintPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "StoreProcedurePrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "PrimaryKeyPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ForeignKeyPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TableSpacePrefix"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsDatabase"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "TargetDatabase"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Location"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsTableSpace"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "TableSpaceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsDeault"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "BufferPool"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ExtentSize"
- value 1)
- (object Attribute
- tool "Data Modeler"
- name "PrefetchSize"
- value 1)
- (object Attribute
- tool "Data Modeler"
- name "PageSize"
- value 4)
- (object Attribute
- tool "Data Modeler"
- name "ManagedBy"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ContainerList"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "dmSchema"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "dmDomainPackage"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsSchema"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDomainPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsRootSchema"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsRootDomainPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsSchemaPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DatabaseID"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DBMS"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsTable"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsView"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDomain"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsSPPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "Synonymns"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TableSpaceID"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceId"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "CorrelationName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SelectClause"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsUpdateable"
- value TRUE)
- (object Attribute
- tool "Data Modeler"
- name "CheckOption"
- value "None")
- (object Attribute
- tool "Data Modeler"
- name "IsSnapShot"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDistinct"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "PersistToServer"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsPackage"
- value FALSE)))
- (object Attribute
- tool "Data Modeler"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Ordinal"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "IsIdentity"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsUnique"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "NullsAllowed"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "Length"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "Scale"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ColumnType"
- value "Native")
- (object Attribute
- tool "Data Modeler"
- name "ForBitData"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DefaultValueType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DefaultValue"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceId"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "OID"
- value FALSE)))
- (object Attribute
- tool "Data Modeler"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsRelationship"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "SourceId"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RIMethod"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentUpdateRule"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentUpdateRuleName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentDeleteRule"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentDeleteRuleName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ChildInsertRestrict"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ChildInsertRestrictName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ChildMultiplicity"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ChildMultiplicityName"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ConstraintName"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsConstraint"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ConstraintType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsIndex"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsTrigger"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsStoredProcedure"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsCluster"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "TableSpace"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "FillFactor"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "KeyList"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "CheckPredicate"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsUnique"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DeferalMode"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "InitialCheckTime"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TriggerType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsInsertEvent"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsUpdateEvent"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDeleteEvent"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "RefOldTable"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RefNewTable"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RefOldRow"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RefNewRow"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsRow"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "WhenClause"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Language"
- value "SQL")
- (object Attribute
- tool "Data Modeler"
- name "ProcType"
- value "Procedure")
- (object Attribute
- tool "Data Modeler"
- name "IsDeterministic"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ParameterStyle"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ReturnedNull"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ExternalName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Length"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Scale"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ForBitData"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DefaultValue"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DefaultValueType"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Parameter"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsInParameter"
- value TRUE)
- (object Attribute
- tool "Data Modeler"
- name "IsOutParameter"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "Ordinal"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Length"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Scale"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ForBitData"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DefaultValueType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DefaultValue"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "OperationID"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Data Modeler Communicator"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "framework"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Java"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Java"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "RootDir"
- value "")
- (object Attribute
- tool "Java"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "Java"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "Java"
- name "UsePrefixes"
- value FALSE)
- (object Attribute
- tool "Java"
- name "AutoSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "NotShowRoseIDDlg"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ShowCodegenDlg"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateRoseID"
- value TRUE)
- (object Attribute
- tool "Java"
- name "GenerateDefaultReturnLine"
- value TRUE)
- (object Attribute
- tool "Java"
- name "JavadocDefaultAuthor"
- value "")
- (object Attribute
- tool "Java"
- name "JavadocDefaultVersion"
- value "")
- (object Attribute
- tool "Java"
- name "JavadocDefaultSince"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagName1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagName2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagName3"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply3"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText3"
- value "")
- (object Attribute
- tool "Java"
- name "JavadocNumAsterisks"
- value 0)
- (object Attribute
- tool "Java"
- name "MaxNumChars"
- value 80)
- (object Attribute
- tool "Java"
- name "Editor"
- value ("EditorType" 100))
- (object Attribute
- tool "Java"
- name "VM"
- value ("VMType" 200))
- (object Attribute
- tool "Java"
- name "ClassPath"
- value ".;C:\\IBM\\SQLLIB\\java\\db2java.zip;C:\\IBM\\SQLLIB\\java\\db2jcc.jar;C:\\IBM\\SQLLIB\\java\\sqlj.zip;C:\\IBM\\SQLLIB\\bin;C:\\IBM\\SQLLIB\\java\\common.jar")
- (object Attribute
- tool "Java"
- name "ReferenceClasspath"
- value "")
- (object Attribute
- tool "Java"
- name "EditorType"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "BuiltIn"
- value 100)
- (object Attribute
- tool "Java"
- name "WindowsShell"
- value 101)))
- (object Attribute
- tool "Java"
- name "VMType"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Sun"
- value 200)))
- (object Attribute
- tool "Java"
- name "VAJavaWorkingFolder"
- value "")
- (object Attribute
- tool "Java"
- name "InstanceVariablePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "ClassVariablePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "DefaultAttributeDataType"
- value "int")
- (object Attribute
- tool "Java"
- name "DefaultOperationReturnType"
- value "void")
- (object Attribute
- tool "Java"
- name "NoClassCustomDlg"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GlobalImports"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "OpenBraceClassStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "OpenBraceMethodStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "UseTabs"
- value FALSE)
- (object Attribute
- tool "Java"
- name "UseSpaces"
- value TRUE)
- (object Attribute
- tool "Java"
- name "SpacingItems"
- value 3)
- (object Attribute
- tool "Java"
- name "RoseDefaultCommentStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "AsteriskCommentStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "JavaCommentStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "JavadocAuthor"
- value FALSE)
- (object Attribute
- tool "Java"
- name "JavadocSince"
- value FALSE)
- (object Attribute
- tool "Java"
- name "JavadocVersion"
- value FALSE)
- (object Attribute
- tool "Java"
- name "BeanPrefix"
- value "")
- (object Attribute
- tool "Java"
- name "BeanSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "RemotePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "RemoteSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "HomePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "HomeSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "PrimaryKeyPrefix"
- value "")
- (object Attribute
- tool "Java"
- name "PrimaryKeySuffix"
- value "")
- (object Attribute
- tool "Java"
- name "EJBDTDLocation"
- value "")
- (object Attribute
- tool "Java"
- name "ServletDTDLocation"
- value "")
- (object Attribute
- tool "Java"
- name "DefaultEJBVersion"
- value "")
- (object Attribute
- tool "Java"
- name "DefaultServletVersion"
- value "")))
- (object Attribute
- tool "Java"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Static"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateDefaultConstructor"
- value TRUE)
- (object Attribute
- tool "Java"
- name "ConstructorIs"
- value ("Ctor_Set" 62))
- (object Attribute
- tool "Java"
- name "Ctor_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "public"
- value 62)
- (object Attribute
- tool "Java"
- name "protected"
- value 63)
- (object Attribute
- tool "Java"
- name "private"
- value 64)
- (object Attribute
- tool "Java"
- name "package"
- value 65)))
- (object Attribute
- tool "Java"
- name "GenerateFinalizer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateStaticInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateInstanceInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateCode"
- value TRUE)
- (object Attribute
- tool "Java"
- name "DisableAutoSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ReadOnly"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "Default_Servlet__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "ServletName"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContextRef"
- value FALSE)
- (object Attribute
- tool "Java"
- name "IsSingleThread"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletInitParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletInitParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletIsSecure"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcher"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcherPath"
- value "")
- (object Attribute
- tool "Java"
- name "DispatcherInclude"
- value FALSE)
- (object Attribute
- tool "Java"
- name "DispatcherForward"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "ServletgetInfo"
- value "")
- (object Attribute
- tool "Java"
- name "ServletXMLFilePath"
- value "")))
- (object Attribute
- tool "Java"
- name "Http_Servlet__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "ServletRequestAttribute"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestAttributesNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestAttributes"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestParameters"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeader"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeaderNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForHeaders"
- value "")
- (object Attribute
- tool "Java"
- name "ServletIntHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletDateHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletCookie"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForCookie"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContentType"
- value "")
- (object Attribute
- tool "Java"
- name "GenerateHTML"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "Default_EJB__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Generate_XML_DD"
- value TRUE)
- (object Attribute
- tool "Java"
- name "EJBCmpField"
- value "")
- (object Attribute
- tool "Java"
- name "EJBEnvironmentProperties"
- value "")
- (object Attribute
- tool "Java"
- name "EJBCnxFactory"
- value "")
- (object Attribute
- tool "Java"
- name "EJBReferences"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "EJBNameInJAR"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSessionType"
- value ("EJBSessionType_Set" 200))
- (object Attribute
- tool "Java"
- name "EJBSessionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 200)
- (object Attribute
- tool "Java"
- name "Stateless"
- value 201)
- (object Attribute
- tool "Java"
- name "Stateful"
- value 202)))
- (object Attribute
- tool "Java"
- name "EJBTransactionType"
- value ("EJBTransactionType_Set" 211))
- (object Attribute
- tool "Java"
- name "EJBTransactionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Container"
- value 211)
- (object Attribute
- tool "Java"
- name "Bean"
- value 212)))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType"
- value ("EJBPersistenceType_Set" 220))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 220)
- (object Attribute
- tool "Java"
- name "Bean"
- value 221)
- (object Attribute
- tool "Java"
- name "Container"
- value 222)))
- (object Attribute
- tool "Java"
- name "EJBReentrant"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBSessionSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBVersion"
- value ("EJBVersion_Set" 230))
- (object Attribute
- tool "Java"
- name "EJBVersion_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "2.0"
- value 230)
- (object Attribute
- tool "Java"
- name "1.x"
- value 231)))
- (object Attribute
- tool "Java"
- name "EJBXMLFilePath"
- value "")))
- (object Attribute
- tool "Java"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "CmIdentification"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "CopyrightNotice"
- value (value Text ""))))
- (object Attribute
- tool "Java"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "CmIdentification"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "CopyrightNotice"
- value (value Text ""))))
- (object Attribute
- tool "Java"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Abstract"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Static"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Native"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Synchronized"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateFullyQualifiedReturn"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ReplaceExistingCode"
- value TRUE)))
- (object Attribute
- tool "Java"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Transient"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Volatile"
- value FALSE)
- (object Attribute
- tool "Java"
- name "PropertyType"
- value ("BeanProperty_Set" 71))
- (object Attribute
- tool "Java"
- name "BeanProperty_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Not A Property"
- value 71)
- (object Attribute
- tool "Java"
- name "Simple"
- value 72)
- (object Attribute
- tool "Java"
- name "Bound"
- value 73)
- (object Attribute
- tool "Java"
- name "Constrained"
- value 74)))
- (object Attribute
- tool "Java"
- name "IndividualChangeMgt"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Read/Write"
- value ("Read/Write_Set" 81))
- (object Attribute
- tool "Java"
- name "Read/Write_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Read & Write"
- value 81)
- (object Attribute
- tool "Java"
- name "Read Only"
- value 82)
- (object Attribute
- tool "Java"
- name "Write Only"
- value 83)))
- (object Attribute
- tool "Java"
- name "GenerateFullyQualifiedTypes"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "Java"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Transient"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Volatile"
- value FALSE)
- (object Attribute
- tool "Java"
- name "PropertyType"
- value ("BeanProperty_Set" 71))
- (object Attribute
- tool "Java"
- name "BeanProperty_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Not A Property"
- value 71)
- (object Attribute
- tool "Java"
- name "Simple"
- value 72)
- (object Attribute
- tool "Java"
- name "Bound"
- value 73)
- (object Attribute
- tool "Java"
- name "Constrained"
- value 74)))
- (object Attribute
- tool "Java"
- name "IndividualChangeMgt"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Read/Write"
- value ("Read/Write_Set" 81))
- (object Attribute
- tool "Java"
- name "Read/Write_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Read & Write"
- value 81)
- (object Attribute
- tool "Java"
- name "Read Only"
- value 82)
- (object Attribute
- tool "Java"
- name "Write Only"
- value 83)))
- (object Attribute
- tool "Java"
- name "GenerateFullyQualifiedTypes"
- value FALSE)
- (object Attribute
- tool "Java"
- name "IsNavigable"
- value TRUE)))
- (object Attribute
- tool "Java"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "propertyId"
- value "360000002")
- (object Attribute
- tool "Oracle8"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "DDLScriptFilename"
- value "DDL1.SQL")
- (object Attribute
- tool "Oracle8"
- name "DropClause"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "PrimaryKeyColumnName"
- value "_ID")
- (object Attribute
- tool "Oracle8"
- name "PrimaryKeyColumnType"
- value "NUMBER(5,0)")
- (object Attribute
- tool "Oracle8"
- name "SchemaNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "SchemaNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TableNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TypeNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TypeNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ViewNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ViewNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "VarrayNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "VarrayNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "NestedTableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "NestedTableNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ObjectTableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ObjectTableNameSuffix"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "IsSchema"
- value FALSE)))
- (object Attribute
- tool "Oracle8"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OID"
- value "")
- (object Attribute
- tool "Oracle8"
- name "WhereClause"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CheckConstraint"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypeLength"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypePrecision"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypeScale"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionOfREFS"
- value FALSE)))
- (object Attribute
- tool "Oracle8"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "MethodKind"
- value ("MethodKindSet" 1903))
- (object Attribute
- tool "Oracle8"
- name "OverloadID"
- value "")
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")
- (object Attribute
- tool "Oracle8"
- name "IsReadNoDataState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsReadNoProcessState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsWriteNoDataState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsWriteNoProcessState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsSelfish"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "TriggerType"
- value ("TriggerTypeSet" 1801))
- (object Attribute
- tool "Oracle8"
- name "TriggerEvent"
- value ("TriggerEventSet" 1601))
- (object Attribute
- tool "Oracle8"
- name "TriggerText"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TriggerReferencingNames"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TriggerForEach"
- value ("TriggerForEachSet" 1701))
- (object Attribute
- tool "Oracle8"
- name "TriggerWhenClause"
- value "")
- (object Attribute
- tool "Oracle8"
- name "MethodKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "MapMethod"
- value 1901)
- (object Attribute
- tool "Oracle8"
- name "OrderMethod"
- value 1902)
- (object Attribute
- tool "Oracle8"
- name "Function"
- value 1903)
- (object Attribute
- tool "Oracle8"
- name "Procedure"
- value 1904)
- (object Attribute
- tool "Oracle8"
- name "Operator"
- value 1905)
- (object Attribute
- tool "Oracle8"
- name "Constructor"
- value 1906)
- (object Attribute
- tool "Oracle8"
- name "Destructor"
- value 1907)
- (object Attribute
- tool "Oracle8"
- name "Trigger"
- value 1908)
- (object Attribute
- tool "Oracle8"
- name "Calculated"
- value 1909)))
- (object Attribute
- tool "Oracle8"
- name "TriggerTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "AFTER"
- value 1801)
- (object Attribute
- tool "Oracle8"
- name "BEFORE"
- value 1802)
- (object Attribute
- tool "Oracle8"
- name "INSTEAD OF"
- value 1803)))
- (object Attribute
- tool "Oracle8"
- name "TriggerForEachSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "ROW"
- value 1701)
- (object Attribute
- tool "Oracle8"
- name "STATEMENT"
- value 1702)))
- (object Attribute
- tool "Oracle8"
- name "TriggerEventSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "INSERT"
- value 1601)
- (object Attribute
- tool "Oracle8"
- name "UPDATE"
- value 1602)
- (object Attribute
- tool "Oracle8"
- name "DELETE"
- value 1603)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR UPDATE"
- value 1604)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR DELETE"
- value 1605)
- (object Attribute
- tool "Oracle8"
- name "UPDATE OR DELETE"
- value 1606)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR UPDATE OR DELETE"
- value 1607)))))
- (object Attribute
- tool "Oracle8"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")
- (object Attribute
- tool "Oracle8"
- name "IsUnique"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "NullsAllowed"
- value TRUE)
- (object Attribute
- tool "Oracle8"
- name "Length"
- value "")
- (object Attribute
- tool "Oracle8"
- name "Precision"
- value "2")
- (object Attribute
- tool "Oracle8"
- name "Scale"
- value "6")
- (object Attribute
- tool "Oracle8"
- name "IsIndex"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsPrimaryKey"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "CompositeUnique"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "CheckConstraint"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "ComponentTest"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "cg"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "cg"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerAnnotations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerVersion"
- value FALSE)
- (object Attribute
- tool "cg"
- name "UseMSVC"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HeaderFileExtension"
- value "h")
- (object Attribute
- tool "cg"
- name "HeaderFileBackupExtension"
- value "h~")
- (object Attribute
- tool "cg"
- name "HeaderFileTemporaryExtension"
- value "h#")
- (object Attribute
- tool "cg"
- name "CodeFileExtension"
- value "cpp")
- (object Attribute
- tool "cg"
- name "CodeFileBackupExtension"
- value "cp~")
- (object Attribute
- tool "cg"
- name "CodeFileTemporaryExtension"
- value "cp#")
- (object Attribute
- tool "cg"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "cg"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "cg"
- name "Directory"
- value "$ROSECPP_SOURCE")
- (object Attribute
- tool "cg"
- name "PathSeparator"
- value "")
- (object Attribute
- tool "cg"
- name "FileNameFormat"
- value "128vx_b")
- (object Attribute
- tool "cg"
- name "BooleanType"
- value "int")
- (object Attribute
- tool "cg"
- name "AllowTemplates"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AllowExplicitInstantiations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowProtectedInheritance"
- value TRUE)
- (object Attribute
- tool "cg"
- name "CommentWidth"
- value 60)
- (object Attribute
- tool "cg"
- name "OneByValueContainer"
- value "$targetClass")
- (object Attribute
- tool "cg"
- name "OneByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "OptionalByValueContainer"
- value "OptionalByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "OptionalByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "FixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "FixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "BoundedByValueContainer"
- value "BoundedListByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByValueContainer"
- value "BoundedSetByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "BoundedByReferenceContainer"
- value "BoundedListByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByReferenceContainer"
- value "BoundedSetByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnboundedByValueContainer"
- value "UnboundedListByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByValueContainer"
- value "UnboundedSetByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnboundedByReferenceContainer"
- value "UnboundedListByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByReferenceContainer"
- value "UnboundedSetByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "QualifiedByValueContainer"
- value "AssociationByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByValueContainer"
- value "DictionaryByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "QualifiedByReferenceContainer"
- value "AssociationByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByReferenceContainer"
- value "DictionaryByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "AlwaysKeepOrphanedCode"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "compiler2.1__Project"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerAnnotations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerVersion"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HeaderFileExtension"
- value "h")
- (object Attribute
- tool "cg"
- name "HeaderFileBackupExtension"
- value "h~")
- (object Attribute
- tool "cg"
- name "HeaderFileTemporaryExtension"
- value "h#")
- (object Attribute
- tool "cg"
- name "CodeFileExtension"
- value "cpp")
- (object Attribute
- tool "cg"
- name "CodeFileBackupExtension"
- value "cp~")
- (object Attribute
- tool "cg"
- name "CodeFileTemporaryExtension"
- value "cp#")
- (object Attribute
- tool "cg"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "cg"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "cg"
- name "Directory"
- value "$ROSECPP_SOURCE")
- (object Attribute
- tool "cg"
- name "BooleanType"
- value "int")
- (object Attribute
- tool "cg"
- name "AllowTemplates"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowExplicitInstantiations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowProtectedInheritance"
- value FALSE)
- (object Attribute
- tool "cg"
- name "OneByValueContainer"
- value "$targetClass")
- (object Attribute
- tool "cg"
- name "OneByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "OptionalByValueContainer"
- value "OptionalByValue(sizeof($targetClass))")
- (object Attribute
- tool "cg"
- name "OptionalByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "FixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "FixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "BoundedByValueContainer"
- value "BoundedListByValue(sizeof($targetClass),$limit)")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByValueContainer"
- value "BoundedSetByValue(sizeof($targetClass),$limit)")
- (object Attribute
- tool "cg"
- name "BoundedByReferenceContainer"
- value "BoundedListByReference($limit)")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByReferenceContainer"
- value "BoundedSetByReference($limit)")
- (object Attribute
- tool "cg"
- name "UnboundedByValueContainer"
- value "UnboundedListByValue(sizeof($targetClass))")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByValueContainer"
- value "UnboundedSetByValue(sizeof($targetClass))")
- (object Attribute
- tool "cg"
- name "UnboundedByReferenceContainer"
- value "UnboundedListByReference")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByReferenceContainer"
- value "UnboundedSetByReference")
- (object Attribute
- tool "cg"
- name "QualifiedByValueContainer"
- value "AssociationByValue(sizeof($qualtype), sizeof($qualcont))")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByValueContainer"
- value "DictionaryByValue(sizeof($qualtype), sizeof($qualcont))")
- (object Attribute
- tool "cg"
- name "QualifiedByReferenceContainer"
- value "AssociationByReference(sizeof($qualtype), sizeof($qualcont))")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByReferenceContainer"
- value "DictionaryByReference(sizeof($qualtype), sizeof($qualcont))")
- (object Attribute
- tool "cg"
- name "PathSeparator"
- value "")
- (object Attribute
- tool "cg"
- name "FileNameFormat"
- value "128vx_b")
- (object Attribute
- tool "cg"
- name "AlwaysKeepOrphanedCode"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "compiler3.0__Project"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerAnnotations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerVersion"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HeaderFileExtension"
- value "h")
- (object Attribute
- tool "cg"
- name "HeaderFileBackupExtension"
- value "h~")
- (object Attribute
- tool "cg"
- name "HeaderFileTemporaryExtension"
- value "h#")
- (object Attribute
- tool "cg"
- name "CodeFileExtension"
- value "cpp")
- (object Attribute
- tool "cg"
- name "CodeFileBackupExtension"
- value "cp~")
- (object Attribute
- tool "cg"
- name "CodeFileTemporaryExtension"
- value "cp#")
- (object Attribute
- tool "cg"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "cg"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "cg"
- name "Directory"
- value "$ROSECPP_SOURCE")
- (object Attribute
- tool "cg"
- name "BooleanType"
- value "int")
- (object Attribute
- tool "cg"
- name "AllowTemplates"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AllowExplicitInstantiations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowProtectedInheritance"
- value TRUE)
- (object Attribute
- tool "cg"
- name "OneByValueContainer"
- value "$targetClass")
- (object Attribute
- tool "cg"
- name "OneByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "OptionalByValueContainer"
- value "OptionalByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "OptionalByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "FixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "FixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "BoundedByValueContainer"
- value "BoundedListByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByValueContainer"
- value "BoundedSetByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "BoundedByReferenceContainer"
- value "BoundedListByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByReferenceContainer"
- value "BoundedSetByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnboundedByValueContainer"
- value "UnboundedListByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByValueContainer"
- value "UnboundedSetByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnboundedByReferenceContainer"
- value "UnboundedListByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByReferenceContainer"
- value "UnboundedSetByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "QualifiedByValueContainer"
- value "AssociationByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByValueContainer"
- value "DictionaryByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "QualifiedByReferenceContainer"
- value "AssociationByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByReferenceContainer"
- value "DictionaryByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "PathSeparator"
- value "")
- (object Attribute
- tool "cg"
- name "FileNameFormat"
- value "128vx_b")
- (object Attribute
- tool "cg"
- name "AlwaysKeepOrphanedCode"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "ImplementationType"
- value "")
- (object Attribute
- tool "cg"
- name "ClassKey"
- value "class")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "PutBodiesInSpec"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDefaultConstructor"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "DefaultConstructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ExplicitDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateCopyConstructor"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "CopyConstructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineCopyConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ExplicitCopyConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDestructor"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DestructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "DestructorKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineDestructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateAssignmentOperation"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "AssignmentVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "AssignmentKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineAssignmentOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateEqualityOperations"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "EqualityVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "EqualityKind"
- value ("FriendKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineEqualityOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateRelationalOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "RelationalVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "RelationalKind"
- value ("FriendKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineRelationalOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateStorageMgmtOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "StorageMgmtVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineStorageMgmtOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateSubscriptOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "SubscriptVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "SubscriptKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "SubscriptResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineSubscriptOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDereferenceOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DereferenceVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "DereferenceKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "DereferenceResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineDereferenceOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateIndirectionOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IndirectionVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "IndirectionKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "IndirectionResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineIndirectionOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateStreamOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "StreamVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineStreamOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ThreeKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)))
- (object Attribute
- tool "cg"
- name "KindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)))
- (object Attribute
- tool "cg"
- name "FriendKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GenerateSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "DeclareAndDefine"
- value 199)
- (object Attribute
- tool "cg"
- name "DeclareOnly"
- value 205)
- (object Attribute
- tool "cg"
- name "DoNotDeclare"
- value 206)))
- (object Attribute
- tool "cg"
- name "VisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)))))
- (object Attribute
- tool "cg"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "cg"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "AllowExtensionlessFileName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "IncludeFormat"
- value (value Text
-|// $package
-|#include "$file"
-|
- ))
- (object Attribute
- tool "cg"
- name "IncludeBySimpleName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludePrecompiledHeader"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludeOrder"
- value "AMIR")
- (object Attribute
- tool "cg"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "InliningStyle"
- value ("InliningStyleSet" 207))
- (object Attribute
- tool "cg"
- name "InliningStyleSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InClassDeclaration"
- value 208)
- (object Attribute
- tool "cg"
- name "FollowingClassDeclaration"
- value 207)))
- (object Attribute
- tool "cg"
- name "TypesDefined"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "IncludeClosure"
- value (value Text ""))))
- (object Attribute
- tool "cg"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "cg"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "AllowExtensionlessFileName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludeFormat"
- value (value Text
-|// $package
-|#include "$file"
-|
- ))
- (object Attribute
- tool "cg"
- name "IncludeBySimpleName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludePrecompiledHeader"
- value TRUE)
- (object Attribute
- tool "cg"
- name "IncludeOrder"
- value "AMIR")
- (object Attribute
- tool "cg"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "InliningStyle"
- value ("InliningStyleSet" 207))
- (object Attribute
- tool "cg"
- name "InliningStyleSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InClassDeclaration"
- value 208)
- (object Attribute
- tool "cg"
- name "FollowingClassDeclaration"
- value 207)))
- (object Attribute
- tool "cg"
- name "TypesDefined"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "IncludeClosure"
- value (value Text ""))))
- (object Attribute
- tool "cg"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "OperationKind"
- value ("OperationKindSet" 200))
- (object Attribute
- tool "cg"
- name "OperationKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GenerateAbstractBody"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateFriendBody"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateFriendDecl"
- value FALSE)
- (object Attribute
- tool "cg"
- name "SpecialDeclReturnType"
- value "")
- (object Attribute
- tool "cg"
- name "OperationIsConst"
- value FALSE)
- (object Attribute
- tool "cg"
- name "OperationIsExplicit"
- value FALSE)
- (object Attribute
- tool "cg"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "cg"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "ExitCode"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "CCRegion"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "BodyAnnotations"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "Ordered"
- value TRUE)
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$supplier")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "InitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$relationship")
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$relationship")
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "cg"
- name "SelectorName"
- value "")
- (object Attribute
- tool "cg"
- name "SelectorType"
- value "")
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HasRelTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Array"
- value 24)
- (object Attribute
- tool "cg"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "cg"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$targetClass")))
- (object Attribute
- tool "cg"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InstanceArguments"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$targetClass")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$target")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "InitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "cg"
- name "ContainerGet"
- value "$data.get($keys)")
- (object Attribute
- tool "cg"
- name "ContainerSet"
- value "$data.set($keys,$value)")
- (object Attribute
- tool "cg"
- name "QualifiedContainer"
- value "")
- (object Attribute
- tool "cg"
- name "AssocClassContainer"
- value "$supplier *")
- (object Attribute
- tool "cg"
- name "AssocClassInitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetSetByReference"
- value ("QualifiedGetSetByReferenceSet" 2))
- (object Attribute
- tool "cg"
- name "QualifiedGetSetByReferenceSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_GetSetByReference"
- value 2)))
- (object Attribute
- tool "cg"
- name "GenerateQualifiedGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "QualifiedGetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "InlineQualifiedGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateQualifiedSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedSetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "QualifiedSetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineQualifiedSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateAssocClassDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberName"
- value "$target")
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AssocClassGetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GenerateAssocClassGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassGetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "AssocClassGetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassGetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "InlineAssocClassGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateAssocClassSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassSetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "AssocClassSetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineAssocClassSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassForwardReferenceOnly"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Array"
- value 24)
- (object Attribute
- tool "cg"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "cg"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$attribute")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtAttributeVisibility"
- value 211)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$attribute")
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$attribute")
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "CCRegion"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "BodyReferenceOnly"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "DirectoryIsOnSearchList"
- value FALSE)
- (object Attribute
- tool "cg"
- name "PrecompiledHeader"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "IsNamespace"
- value FALSE)
- (object Attribute
- tool "cg"
- name "Indent"
- value 2)
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))))
- (object Attribute
- tool "MSVC"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "MSVC"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Version"
- value "5.0")))
- (object Attribute
- tool "MSVC"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCClassTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCClassTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Interface_Part"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Connection_Part"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Class_Factory"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "CObjectFunctionality"
- value ("CObjectFunctionalitySet" 0))
- (object Attribute
- tool "MSVC"
- name "CObjectFunctionalitySet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "None"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Dynamic"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Dyncreate"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Serial"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "GenerateOverrideGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "GenerateDataGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DATA_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateFieldGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_FIELD_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateMessageGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "GenerateMessageMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MESSAGE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "OLEFactory"
- value ("OLEFactorySet" 0))
- (object Attribute
- tool "MSVC"
- name "OLEFactorySet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "None"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Built_in"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Simple"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Licensed"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "OLEName"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLEClassID"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateOLECtlType"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLECtlType"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateOLETypeLib"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLETypeLibID"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLETypeLibMajor"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLETypeLibMinor"
- value "")
- (object Attribute
- tool "MSVC"
- name "GeneratePropPageIDs"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLEPropPageIDs"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateDispatchMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockProperties"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockFunctions"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DispatchDefValue"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateDispIdEnum"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DISP_ID_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInterfaceMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "INTERFACE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "InitInterface"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateEventMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockEvents"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateEventSinkMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "PropNotifySinks"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateConnectionMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "CONNECTION_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "ConnectionPointIID"
- value "")
- (object Attribute
- tool "MSVC"
- name "InheritanceType"
- value "")
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLECommands"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MFCDeclares"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MFCImplements"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "ATL_Declares"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateCOMMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "COM_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateConnectionPointMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "CONNECTION_POINT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateMsgMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GeneratePropertyMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "PROPERTY_MAP_Entries"
- value (value Text ""))))
- (object Attribute
- tool "MSVC"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCOperationTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCOperationTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Virtual_Override"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Message_Handler"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dispatch_Handler"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Event_Firing_Function"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Event_Sink_Handler"
- value 5)
- (object Attribute
- tool "MSVC"
- name "Std_OLE_Method"
- value 6)
- (object Attribute
- tool "MSVC"
- name "Command_Parser"
- value 7)
- (object Attribute
- tool "MSVC"
- name "Property_Get_Function"
- value 8)
- (object Attribute
- tool "MSVC"
- name "Property_Set_Function"
- value 9)
- (object Attribute
- tool "MSVC"
- name "Property_Notify_Function"
- value 10)
- (object Attribute
- tool "MSVC"
- name "Macro_Generated_Function"
- value 11)))
- (object Attribute
- tool "MSVC"
- name "AFX_MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MESSAGE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "BodyImage"
- value (value Text ""))))
- (object Attribute
- tool "MSVC"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "GenerateIncludesGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_INCLUDES_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInsertLocation"
- value FALSE)))
- (object Attribute
- tool "MSVC"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "GenerateIncludesGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_INCLUDES_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInsertLocation"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Rose Model Integrator"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Rose Web Publisher"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "TopLink"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "COM"
- name "propertyId"
- value "783606378")
- (object Attribute
- tool "COM"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "TypeKinds"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "enum"
- value 100)
- (object Attribute
- tool "COM"
- name "record"
- value 101)
- (object Attribute
- tool "COM"
- name "module"
- value 102)
- (object Attribute
- tool "COM"
- name "interface"
- value 103)
- (object Attribute
- tool "COM"
- name "dispinterface"
- value 104)
- (object Attribute
- tool "COM"
- name "coclass"
- value 105)
- (object Attribute
- tool "COM"
- name "alias"
- value 106)
- (object Attribute
- tool "COM"
- name "union"
- value 107)
- (object Attribute
- tool "COM"
- name "max"
- value 108)
- (object Attribute
- tool "COM"
- name "(none)"
- value 109)))
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "kind"
- value ("TypeKinds" 109))
- (object Attribute
- tool "COM"
- name "uuid"
- value "")
- (object Attribute
- tool "COM"
- name "version"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "helpcontext"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")
- (object Attribute
- tool "COM"
- name "dllname"
- value "")
- (object Attribute
- tool "COM"
- name "alias"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "id"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "id"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "filename"
- value "")
- (object Attribute
- tool "COM"
- name "library"
- value "")
- (object Attribute
- tool "COM"
- name "uuid"
- value "")
- (object Attribute
- tool "COM"
- name "version"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "helpfile"
- value "")
- (object Attribute
- tool "COM"
- name "helpcontext"
- value "")
- (object Attribute
- tool "COM"
- name "lcid"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Version Control"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "propertyId"
- value "783606378")
- (object Attribute
- tool "Visual Basic"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "UpdateCode"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "UpdateModel"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "InstancingSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "Private"
- value 221)
- (object Attribute
- tool "Visual Basic"
- name "PublicNotCreatable"
- value 213)
- (object Attribute
- tool "Visual Basic"
- name "SingleUse"
- value 214)
- (object Attribute
- tool "Visual Basic"
- name "GlobalSingleUse"
- value 215)
- (object Attribute
- tool "Visual Basic"
- name "MultiUse"
- value 219)
- (object Attribute
- tool "Visual Basic"
- name "GlobalMultiUse"
- value 220)))
- (object Attribute
- tool "Visual Basic"
- name "BaseSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "(none)"
- value 222)
- (object Attribute
- tool "Visual Basic"
- name "0"
- value 223)
- (object Attribute
- tool "Visual Basic"
- name "1"
- value 224)))
- (object Attribute
- tool "Visual Basic"
- name "OptionBase"
- value ("BaseSet" 222))
- (object Attribute
- tool "Visual Basic"
- name "OptionExplicit"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "OptionCompare"
- value ("CompareSet" 202))
- (object Attribute
- tool "Visual Basic"
- name "Instancing"
- value ("InstancingSet" 219))
- (object Attribute
- tool "Visual Basic"
- name "CompareSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "(none)"
- value 202)
- (object Attribute
- tool "Visual Basic"
- name "Binary"
- value 203)
- (object Attribute
- tool "Visual Basic"
- name "Text"
- value 204)))))
- (object Attribute
- tool "Visual Basic"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "LibraryName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "AliasName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "IsStatic"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ProcedureID"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "ReplaceExistingBody"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "DefaultBody"
- value (value Text ""))))
- (object Attribute
- tool "Visual Basic"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "New"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "WithEvents"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ProcedureID"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "PropertyName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "Subscript"
- value "")))
- (object Attribute
- tool "Visual Basic"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "UpdateCode"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "New"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "WithEvents"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "FullName"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ProcedureID"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "PropertyName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "Subscript"
- value "")))
- (object Attribute
- tool "Visual Basic"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ImplementsDelegation"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "FullName"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ByVal"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ByRef"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "Optional"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ParamArray"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ProjectFile"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "UpdateCode"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "UpdateModel"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "ImportReferences"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "QuickImport"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "ImportBinary"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "VisualStudio"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Web Modeler"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "XML_DTD"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "XML_DTD"
- name "Editor"
- value ("EditorType" 100))
- (object Attribute
- tool "XML_DTD"
- name "StopOnError"
- value TRUE)
- (object Attribute
- tool "XML_DTD"
- name "EditorType"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "BuiltIn"
- value 100)
- (object Attribute
- tool "XML_DTD"
- name "WindowsShell"
- value 101)))))
- (object Attribute
- tool "XML_DTD"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "Entity_SystemID"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "Entity_PublicID"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "NotationValue"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "InternalValue"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "ParameterEntity"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "ExternalEntity"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "Notation_SystemID"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "Notation_PublicID"
- value "")))
- (object Attribute
- tool "XML_DTD"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "DefaultDeclType"
- value "")))
- (object Attribute
- tool "XML_DTD"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "Assign All"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "ComponentPath"
- value "")))
- (object Attribute
- tool "XML_DTD"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "packageName"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsPrefix"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value "")
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value "")
- (object Attribute
- tool "Ecore"
- name "prefix"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "classifierName"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "operationName"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "attributeName"
- value "")
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isChangeable"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnsettable"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isUnique"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isID"
- value FALSE)))
- (object Attribute
- tool "Ecore"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "referenceName"
- value "")
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isChangeable"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnsettable"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isResolveProxies"
- value TRUE))))
- quid "3A0C75F401FA"))
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gif Binary files differdeleted file mode 100644 index 64ee536107..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gif Binary files differdeleted file mode 100644 index 7017d91b91..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gif Binary files differdeleted file mode 100644 index 00bb7b475d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gif Binary files differdeleted file mode 100644 index 795eb5e9f4..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gif Binary files differdeleted file mode 100644 index 28c2ccb1e7..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gif Binary files differdeleted file mode 100644 index 01f4889869..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gif Binary files differdeleted file mode 100644 index 749acfc9c9..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gif Binary files differdeleted file mode 100644 index bc8e66c20f..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gif Binary files differdeleted file mode 100644 index 6a91888855..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gif Binary files differdeleted file mode 100644 index d30b26b97a..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gif Binary files differdeleted file mode 100644 index 801c13388d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gif Binary files differdeleted file mode 100644 index 2fb2ca7a92..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gif Binary files differdeleted file mode 100644 index 59096688cc..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gif Binary files differdeleted file mode 100644 index 6fd82e60e1..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gif Binary files differdeleted file mode 100644 index f849c75d58..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gif Binary files differdeleted file mode 100644 index c9f09459e6..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gif Binary files differdeleted file mode 100644 index 5f54702ffc..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gif Binary files differdeleted file mode 100644 index ce9df985b8..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gif Binary files differdeleted file mode 100644 index 694c26f273..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gif Binary files differdeleted file mode 100644 index d13ba2e5b0..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gif Binary files differdeleted file mode 100644 index 8b2b357f48..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gif Binary files differdeleted file mode 100644 index 96398c0ce1..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gif Binary files differdeleted file mode 100644 index 041db277d1..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gif Binary files differdeleted file mode 100644 index 5f9658e5b3..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gif Binary files differdeleted file mode 100644 index e7422d7738..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gif Binary files differdeleted file mode 100644 index fb4f9bd29e..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gif Binary files differdeleted file mode 100644 index f8d5289f11..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gif Binary files differdeleted file mode 100644 index efa7a38014..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gif Binary files differdeleted file mode 100644 index 358997d294..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gif Binary files differdeleted file mode 100644 index daf514dccd..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gif Binary files differdeleted file mode 100644 index a1ac131e67..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gif Binary files differdeleted file mode 100644 index 8ed4cb7374..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gif +++ /dev/null diff --git a/bundles/org.eclipse.wst.dtd.core/plugin.properties b/bundles/org.eclipse.wst.dtd.core/plugin.properties deleted file mode 100644 index 2c8c78b0ed..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/plugin.properties +++ /dev/null @@ -1,21 +0,0 @@ -############################################################################### -# Copyright (c) 2001, 2010 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 -# Jens Lukowski/Innoopract - initial renaming/restructuring -# -############################################################################### - -providerName=Eclipse Web Tools Platform -pluginName=Structured Source DTD Core -# -Structured_DTD_Document_Factory_Extension.name=Structured DTD Document Factory Extension -DTD_Content_Type_Extension_Element.name=DTD -_DTD_VALIDATOR_NAME = DTD Validator -_validationMarker.name=DTD Problem -_taskMarker.name=DTD Task diff --git a/bundles/org.eclipse.wst.dtd.core/plugin.xml b/bundles/org.eclipse.wst.dtd.core/plugin.xml deleted file mode 100644 index 812c1462f0..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/plugin.xml +++ /dev/null @@ -1,141 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> -<plugin> - - <extension point="org.eclipse.wst.sse.core.modelHandler"> - <modelHandler - class="org.eclipse.wst.dtd.core.internal.modelhandler.ModelHandlerForDTD" - associatedContentTypeId="org.eclipse.wst.dtd.core.dtdsource" - id="org.eclipse.wst.dtd.core.internal.modelhandler"> - </modelHandler> - </extension> - - <extension point="org.eclipse.wst.sse.core.taskscanner"> - <scanner - id="org.eclipse.wst.dtd.core.internal.tasks.DTDFileTaskScanner" - class="org.eclipse.wst.dtd.core.internal.tasks.DTDFileTaskScanner:org.eclipse.wst.dtd.core.taskMarker" - contentTypeIds="org.eclipse.wst.dtd.core.dtdsource" /> - </extension> - <extension - id="taskMarker" - name="%_taskMarker.name" - point="org.eclipse.core.resources.markers"> - <super type="org.eclipse.core.resources.taskmarker"/> - <persistent value="true"/> - </extension> - <extension - id="validationMarker" - name="%_validationMarker.name" - point="org.eclipse.core.resources.markers"> - <super type="org.eclipse.wst.validation.problemmarker"/> - <persistent value="true"/> - </extension> - - <extension - point="org.eclipse.core.filebuffers.documentCreation" - id="org.eclipse.wst.dtd.core.documentfactories" - name="%Structured_DTD_Document_Factory_Extension.name"> - <factory - contentTypeId="org.eclipse.wst.dtd.core.dtdsource" - class="org.eclipse.wst.sse.core.internal.filebuffers.BasicStructuredDocumentFactory" /> - </extension> - - <extension point="org.eclipse.team.core.fileTypes"> - <fileTypes - type="text" - extension="dtd" /> - <fileTypes - type="text" - extension="mod" /> - <fileTypes - type="text" - extension="ent" /> - </extension> - - <extension point="org.eclipse.core.contenttype.contentTypes"> - <content-type - file-extensions="dtd,mod,ent" - priority="normal" - name="%DTD_Content_Type_Extension_Element.name" - id="org.eclipse.wst.dtd.core.dtdsource" - base-type="org.eclipse.core.runtime.text" - default-charset="UTF-8"> - <describer - class="org.eclipse.wst.dtd.core.internal.content.ContentDescriberForDTD" /> - </content-type> - </extension> - - <extension point="org.eclipse.emf.ecore.extension_parser"> - <parser - type="dtd" - class="org.eclipse.wst.dtd.core.internal.emf.util.DTDResourceFactoryImpl"> - </parser> - </extension> - - <extension point="org.eclipse.emf.ecore.extension_parser"> - <parser - type="ent" - class="org.eclipse.wst.dtd.core.internal.emf.util.DTDResourceFactoryImpl"> - </parser> - </extension> - - <extension point="org.eclipse.emf.ecore.generated_package"> - <package - uri="DTD.xmi" - class="org.eclipse.wst.dtd.core.internal.emf.impl.DTDPackageImpl"> - </package> - </extension> - - <extension point="org.eclipse.wst.xml.core.documentFactories"> - <factory - type="dtd, ent, mod, xml" - class="org.eclipse.wst.dtd.core.internal.contentmodel.CMDocumentFactoryDTD"> - </factory> - </extension> - - <!-- initialize dtd core preferences --> - <extension point="org.eclipse.core.runtime.preferences"> - <initializer - class="org.eclipse.wst.dtd.core.internal.preferences.DTDCorePreferenceInitializer" /> - </extension> - - <!-- ====================================================== --> - <!-- Register the DTD validator with the (new) validation --> - <!-- framework. --> - <!-- ====================================================== --> - <extension id="dtdDTDValidator" name="%_DTD_VALIDATOR_NAME" point="org.eclipse.wst.validation.validatorV2"> - <validator - build="true" - class="org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator" - manual="true" - sourceid="org.eclipse.wst.dtd.dtdsourcevalidator" - version="1" - markerId="org.eclipse.wst.dtd.core.validationMarker"> - <include> - <rules> - <contentType id="org.eclipse.wst.dtd.core.dtdsource"/> - <fileext caseSensitive="false" ext="dtd"/> - <fileext caseSensitive="false" ext="ent"/> - <fileext caseSensitive="false" ext="mod"/> - </rules> - </include> - </validator> - </extension> - - <!-- ====================================================== --> - <!-- DTD as you type validation --> - <!-- ====================================================== --> - <extension point="org.eclipse.wst.sse.ui.sourcevalidation"> - <validator - scope="total" - class="org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator" - id="org.eclipse.wst.dtd.dtdsourcevalidator"> - <contentTypeIdentifier - id="org.eclipse.wst.dtd.core.dtdsource"> - <partitionType id="org.eclipse.wst.dtd.DEFAULT"> - </partitionType> - </contentTypeIdentifier> - </validator> - </extension> - -</plugin> diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/AttNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/AttNode.java deleted file mode 100644 index 2b75366c27..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/AttNode.java +++ /dev/null @@ -1,95 +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.saxparser; - -import java.util.Enumeration; -import java.util.Vector; - -public final class AttNode { - // - // attType - // - public static final int CDATA = 0, ID = 1, IDREF = 2, IDREFS = 3, ENTITY = 4, ENTITIES = 5, NMTOKEN = 6, NMTOKENS = 7, NOTATION = 8, ENUMERATION = 9, PEREFERENCE = 10; - - // - // Keep this array in-sync with the ATTTYPE definitions - // - private static final String[] fgAttTypeString = {"CDATA", // 0 //$NON-NLS-1$ - "ID", // 1 //$NON-NLS-1$ - "IDREF", // 2 //$NON-NLS-1$ - "IDREFS", // 3 //$NON-NLS-1$ - "ENTITY", // 4 //$NON-NLS-1$ - "ENTITIES", // 5 //$NON-NLS-1$ - "NMTOKEN", // 6 //$NON-NLS-1$ - "NMTOKENS", // 7 //$NON-NLS-1$ - "NOTATION", // 8 //$NON-NLS-1$ - "ENUMERATION", // 9 (replaced with "NMTOKEN" by SAX //$NON-NLS-1$ - // AttributeList handler) - "%ENTITYREFERENCE;"}; //$NON-NLS-1$ - - // - // attDefaultType - // - public static final int NOFIXED = 1, // AttValue - REQUIRED = 2, // #REQUIRED - IMPLIED = 3, // #IMPLIED - FIXED = 4; // #FIXED AttValue - - public String name = null; - public String type = null; - public String defaultType = null; - public String defaultValue = null; - public Vector enumList = null; // list of Notations or Enum values - - public int getDeclaredType() { - int t = -1; - if (type == null) - return t; - - if (type.startsWith("%") && type.endsWith(";")) //$NON-NLS-1$ //$NON-NLS-2$ - return PEREFERENCE; - - for (int i = 0; i < fgAttTypeString.length; i++) { - if (type.equals(fgAttTypeString[i])) { - t = i; - break; - } - } - return t; - } - - public Enumeration elements() { - if (enumList == null) - enumList = new Vector(); - return enumList.elements(); - } - - public int getDefaultType() { - if (defaultType == null) - return -1; - - if (defaultType.startsWith("%") && defaultType.endsWith(";")) //$NON-NLS-1$ //$NON-NLS-2$ - return PEREFERENCE; - else if (defaultType.equals("#REQUIRED")) //$NON-NLS-1$ - return REQUIRED; - else if (defaultType.equals("#IMPLIED")) //$NON-NLS-1$ - return IMPLIED; - else if (defaultType.equals("#FIXED")) //$NON-NLS-1$ - return FIXED; - else - return NOFIXED; - } - - public String toString() { - return "Att Name: " + name + " Type: " + type + " defaultType: " + defaultType + " defaultValue: " + defaultValue; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/Attlist.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/Attlist.java deleted file mode 100644 index fb77a18b78..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/Attlist.java +++ /dev/null @@ -1,146 +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.saxparser; - -import java.util.Enumeration; -import java.util.Vector; - -public class Attlist extends BaseNode { - Vector attDefs = new Vector(); - - /** - * Constructor. - * - * @param name - * This attribute list's name; this value is also known as the - * Element type. - */ - public Attlist(String name, String ownerDTD) { - this(name, ownerDTD, null, null); - } - - public Attlist(String name, String ownerDTD, String comment, ErrorMessage errorMessage) { - super(name, ownerDTD, comment, errorMessage); - } - - - /** - * Adds the specified attribute definition to the end of this attribute - * list . - * - * @param attDef - * Attribute definition to add to this atribute list. - * @return =true if the attribute definition does not already exist in - * this attribute list; otherwise, =false. - * @see #elementAt - * @see #getAttDef - * @see #contains - * @see #size - */ - public boolean addElement(AttNode attDef) { - if (contains(attDef.name)) - return false; - this.attDefs.addElement(attDef); - return true; - } - - /** - * Returns the attribute definition at the specified <var>index</var> in - * this attribute list - * - * @param index - * Index into this list of attribute definitions. - * @return Attribute definition at the specified index, or <var>null</var> - * if an invalid index. - * @see #addElement - * @see #getAttDef - * @see #contains - * @see #size - */ - public AttNode elementAt(int index) { - return (AttNode) this.attDefs.elementAt(index); - } - - /** - * Returns the attribute definition that matches the specified attribute - * definition name in this attribute list. - * - * @param attDefName - * Attribute definition name to match in this attribute list. - * @return The matching attribute definition, or <var>null</var> if the - * attribute is not currently defined. - * @see #addElement - * @see #elementAt - * @see #contains - * @see #size - * @see #elements - */ - public AttNode getAttDef(String attDefName) { - for (int i = 0; i < size(); i++) { - AttNode ad = elementAt(i); - if (attDefName.equals(ad.name)) - return ad; - } - return null; - } - - /** - * Returns whether the specified attribute definition name is currently - * defined in this attribute list. - * - * @param attDefName - * Attribute definition name to match in this attribute list. - * @return =true if <var>attDefName</var> is defined; otherwise, =false. - * @see #addElement - * @see #elementAt - * @see #getAttDef - * @see #size - * @see #elements - */ - public boolean contains(String attDefName) { - return null != getAttDef(attDefName); - } - - /** - * Returns the number of attribute definitions in this attribute list. - * - * @return Number of attribute list definitions, or <var>null</var> if no - * definitions defined. - * @see #addElement - * @see #elementAt - * @see #getAttDef - * @see #contains - */ - public int size() { - return this.attDefs.size(); - } - - /** - * Returns an enumeration of all attribute definitions in this attribute - * list. - * - * @return An enumeration of all attribute definitions, or <var>null</var> - * if none specified. - * @see #addElement - * @see #elementAt - * @see #getAttDef - * @see #contains - * @see #size - */ - public Enumeration elements() { - return this.attDefs.elements(); - } - - void setAttDefs(Vector attrs) { - attDefs = attrs; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/BaseNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/BaseNode.java deleted file mode 100644 index 39b39bc528..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/BaseNode.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.saxparser; - - -public abstract class BaseNode { - protected String name = null; - protected ErrorMessage errorMessage = null; - // protected String errorMessage = null; - protected String comment = null; - protected String ownerDTD = null; - - /** Default constructor. */ - public BaseNode(String name, String ownerDTD) { - this(name, ownerDTD, null, null); - } - - public BaseNode(String name, String ownerDTD, String comment, ErrorMessage errorMessage) { - this.name = name; - this.ownerDTD = ownerDTD; - this.comment = comment; - this.errorMessage = errorMessage; - } - - public String getNodeName() { - return name; - } - - public void setNodeName(String name) { - this.name = name; - } - - public String getOwnerDTD() { - return ownerDTD; - } - - public void setOwnerDTD(String owner) { - ownerDTD = owner; - } - - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - public ErrorMessage getErrorMessage() { - return errorMessage; - } - - public void setErrorMessage(ErrorMessage message) { - errorMessage = message; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMBasicNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMBasicNode.java deleted file mode 100644 index 15c0fc13d0..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMBasicNode.java +++ /dev/null @@ -1,42 +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.saxparser; - -public class CMBasicNode extends CMNode { - private int type = CMNodeType.EMPTY; // possible types : - - // CMNodeType.EMPTY - // CMNodeType.ANY - // CMNodeType.PCDATA - - /** Default constructor. */ - public CMBasicNode(String refName) { - super(refName); - } - - public CMBasicNode(String refName, int type) { - super(refName); - this.type = type; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public String toString() { - return " BasicNodeName: " + getName() + " Type: " + getType() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMGroupNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMGroupNode.java deleted file mode 100644 index 7be202bb43..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMGroupNode.java +++ /dev/null @@ -1,62 +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.saxparser; - -import java.util.Enumeration; -import java.util.Vector; - -public class CMGroupNode extends CMRepeatableNode { - private int type = CMNodeType.GROUP; - private int groupKind = CMNodeType.GROUP_SEQUENCE; - private Vector children = new Vector(); - - public CMGroupNode() { - super("GROUP"); //$NON-NLS-1$ - } - - public int getType() { - return type; - } - - // implement super class - public void setType(int type) { - // can't change - only one type allows - } - - public int getGroupKind() { - return groupKind; - } - - public void setGroupKind(int kind) { - groupKind = kind; - } - - public Vector getChildren() { - return children; - } - - public void addChild(CMNode child) { - children.addElement(child); - } - - public String toString() { - String result = "Group ( - kind: " + getGroupKind() + " OccType: " + getOccurrence() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - - Enumeration en = children.elements(); - while (en.hasMoreElements()) { - result += " " + en.nextElement(); //$NON-NLS-1$ - } - - result += "Group )"; //$NON-NLS-1$ - return result; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNode.java deleted file mode 100644 index 831bca5cdb..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNode.java +++ /dev/null @@ -1,30 +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.saxparser; - -public abstract class CMNode { - private String refName; - - /** Default constructor. */ - public CMNode(String refName) { - this.refName = refName; - } - - public String getName() { - return refName; - } - - public abstract int getType(); - - public abstract void setType(int type); - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNodeType.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNodeType.java deleted file mode 100644 index 12a8d8608b..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNodeType.java +++ /dev/null @@ -1,30 +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.saxparser; - -public interface CMNodeType { - static public int EMPTY = 1; - static public int ANY = 2; - static public int PCDATA = 3; - static public int ELEMENT_REFERENCE = 4; - static public int ENTITY_REFERENCE = 5; - static public int GROUP = 6; - - static public int ONE = 7; - static public int OPTIONAL = 8; - static public int ONE_OR_MORE = 9; - static public int ZERO_OR_MORE = 10; - - static public int GROUP_CHOICE = 11; - static public int GROUP_SEQUENCE = 12; - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMReferenceNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMReferenceNode.java deleted file mode 100644 index 52788f9bd6..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMReferenceNode.java +++ /dev/null @@ -1,38 +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.saxparser; - -public class CMReferenceNode extends CMRepeatableNode { - private int type = CMNodeType.ELEMENT_REFERENCE; - - public CMReferenceNode(String refName) { - this(refName, CMNodeType.ELEMENT_REFERENCE); - } - - public CMReferenceNode(String refName, int type) { - super(refName); - this.type = type; - } - - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public String toString() { - return " RefName: " + getName() + " Type: " + getType() + " OccType: " + getOccurrence() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMRepeatableNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMRepeatableNode.java deleted file mode 100644 index 056d962b63..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMRepeatableNode.java +++ /dev/null @@ -1,34 +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.saxparser; - -public abstract class CMRepeatableNode extends CMNode { - private int occType = CMNodeType.ONE; - - public CMRepeatableNode(String refName) { - super(refName); - } - - public CMRepeatableNode(String refName, int occType) { - super(refName); - this.occType = occType; - } - - public int getOccurrence() { - return occType; - } - - public void setOccurrence(int occType) { - this.occType = occType; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTD.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTD.java deleted file mode 100644 index e1509b3bf4..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTD.java +++ /dev/null @@ -1,89 +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.saxparser; - -import java.util.Enumeration; -import java.util.Vector; - -public class DTD { - // - // Constants - // - - Vector externalElements = new Vector(); - String name = null; - - boolean isExceptionDuringParse = false; - - // - // Constructors - // - - /** - * Constructor. - */ - - /** - * Constructor. - * - * @param name - * The file name of this DTD. - * @see #getName - * @see #setName - */ - public DTD(String name) { - this.name = name; - } - - /** - * Returns this DTD's file name. - * - * @return This DTD's file name, or <var>null</var> if no name. - */ - public String getName() { - return this.name; - } - - /** - * Sets this DTD's file name. - * - * @param name - * This DTD's name. - * @see #getName - */ - public void setName(String name) { - this.name = name; - } - - /** - * Returns an Enumeration instance of all external subset children of this - * DTD. - * - * @return An enumeration of all external subset children of this DTD. - */ - public Enumeration externalElements() { - return externalElements.elements(); - } - - public void addDecl(BaseNode decl) { - externalElements.addElement(decl); - } - - public void setIsExceptionDuringParse(boolean on) { - isExceptionDuringParse = on; - } - - public boolean getIsExceptionDuringParse() { - return isExceptionDuringParse; - } - -} // class DTD diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java deleted file mode 100644 index 35bb54f3a7..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java +++ /dev/null @@ -1,768 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2010 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.saxparser; - -import java.io.StringReader; -import java.io.UnsupportedEncodingException; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import java.util.Stack; -import java.util.Vector; - -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver; -import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin; -import org.eclipse.wst.common.uriresolver.internal.util.URIHelper; -import org.eclipse.wst.xml.core.internal.validation.core.LazyURLInputStream; -import org.xml.sax.ContentHandler; -import org.xml.sax.DTDHandler; -import org.xml.sax.ErrorHandler; -import org.xml.sax.InputSource; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.XMLReader; -import org.xml.sax.ext.DeclHandler; -import org.xml.sax.ext.LexicalHandler; -import org.xml.sax.helpers.DefaultHandler; - -public class DTDParser extends DefaultHandler implements ContentHandler, DTDHandler, ErrorHandler, DeclHandler, LexicalHandler { - private String contentString = ""; //$NON-NLS-1$ - //private String declString = ""; //$NON-NLS-1$ - - /* Canonical output. */ - protected boolean canonical; - - protected XMLReader reader; - int entityDepth; - - // dmw 11/15 private field never read locally - // private Vector declElements; - private String comment = null; - private ErrorMessage errorMessage = null; - private List errorMessages = new ArrayList(); - private DeclNode previousDeclNode = null; - private DeclNode currentDeclNode = null; - private BaseNode lastBaseNode = null; - - private boolean entityEnd = false; - private int lineNumber; - - private DTD currentDTD = null; - private Vector dtdList = new Vector(); - - private Stack dtdStack = new Stack(); - private Stack peRefStack = new Stack(); - private Stack parsingPERefStack = new Stack(); - - private EntityPool entityPool = new EntityPool(); - private String expandedEntityValue = null; - private Hashtable elementPool = new Hashtable(); - - boolean parsingExternalPEReference = false; - protected boolean expandEntityReferences = true; - - private Locator locator = null; - - private Locator getLocator() { - return locator; - } - - public void setDocumentLocator(Locator locator) { - this.locator = locator; - } - - public DTDParser(boolean canonical) throws UnsupportedEncodingException { - this(null, canonical); - } - - protected DTDParser(String encoding, boolean canonical) throws UnsupportedEncodingException { - - if (encoding == null) - encoding = "UTF-8"; //$NON-NLS-1$ - - this.canonical = canonical; - try { - SAXParser sparser = SAXParserFactory.newInstance().newSAXParser(); - reader = sparser.getXMLReader(); - reader.setProperty("http://xml.org/sax/properties/declaration-handler", this); //$NON-NLS-1$ - reader.setProperty("http://xml.org/sax/properties/lexical-handler", this); //$NON-NLS-1$ - reader.setContentHandler(this); - reader.setDTDHandler(this); - reader.setErrorHandler(this); - reader.setEntityResolver(this); - } - catch (Exception e) { - e.printStackTrace(); - } - - } - - /* Prints the output from the SAX callbacks. */ - public void parse(String logicalURI) { - try { - // CS ensure that the physical URI is considered where streams are required - // and the logicalURI is used as the DTD's baseLocation - String physicalURI = URIResolverPlugin.createResolver().resolvePhysicalLocation("", "", logicalURI); //$NON-NLS-1$ //$NON-NLS-2$ - boolean isReadable = URIHelper.isReadableURI(physicalURI, true); - if (!isReadable) { - throw new Exception("DTD parse error. Can not read the specified URI : " + logicalURI); //$NON-NLS-1$ - } - String document = "<!DOCTYPE root SYSTEM \"" + logicalURI + "\"><root/>"; //$NON-NLS-1$ //$NON-NLS-2$ - entityDepth = 0; - currentDTD = new DTD(logicalURI); - InputSource inputSource = new InputSource(new StringReader(document)); - inputSource.setSystemId(logicalURI + ".xml"); //$NON-NLS-1$ - reader.parse(inputSource); - } - catch (SAXParseException se) { - if (currentDTD != null) - currentDTD.setIsExceptionDuringParse(true); - } - catch (Exception e) { - if (currentDTD != null) - currentDTD.setIsExceptionDuringParse(true); - } - - } - - /* - * @deprecated Entity references are always expanded. - */ - public void setExpandEntityReferences(boolean expandEntityReferences) { - this.expandEntityReferences = true; - } - - /* - * @deprecated Entity references are always expanded. - */ - public boolean getExpandEntityReferences() { - return expandEntityReferences; - } - - public Vector getDTDList() { - return dtdList; - } - - public Hashtable getElementPool() { - return elementPool; - } - - public EntityPool getEntityPool() { - return entityPool; - } - - public List getErrorMessages() { - return errorMessages; - } - - // - // DocumentHandler methods - // - - public void startDocument() { - } - - public void endDocument() { - } - - public void processingInstruction(String target, String data) { - } - - // - // DTDHandler methods - // - - public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException { - } - - public void notationDecl(String name, String publicId, String systemId) throws SAXException { - startDeclaration(DeclNode.NOTATION); - //declString = "<!NOTATION"; //$NON-NLS-1$ - if (entityDepth == 1 || parsingExternalPEReference) { - String xs = " "; //$NON-NLS-1$ - xs += name; - if (publicId == null) - xs += " SYSTEM " + "\"" + systemId + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - else - xs += " PUBLIC " + "\"" + publicId + "\" " + "\"" + systemId + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ - contentString += xs; - parseCurrentDeclaration(); - } - } - - // - // DeclHandler methods - // - - public void elementDecl(String name, String model) throws SAXException { - startDeclaration(DeclNode.ELEMENT); - //declString = "<!ELEMENT"; //$NON-NLS-1$ - - // KB: With early versions of Xerces 2.x, startEntity("[dtd]") used to - // be called before this method - // so entityDepth was 1. Using JAXP changed that and startEntity() is - // not called back anymore. - // Because of this, we need to handle the case where entityDepth == 0 - // as well. - if (entityDepth == 0 || entityDepth == 1 || parsingExternalPEReference) - parseCurrentDeclarationHelper(name + " " + model); //$NON-NLS-1$ - } - - protected String attributeString = ""; //$NON-NLS-1$ - - public void attributeDecl(String eName, String aName, String type, String valueDefault, String value) throws SAXException { - startDeclaration(DeclNode.ATTLIST); - //declString = "<!ATTLIST"; //$NON-NLS-1$ - - attributeString += " " + aName; //$NON-NLS-1$ - if (type != null) - attributeString += " " + type; //$NON-NLS-1$ - if (valueDefault != null) - attributeString += " " + valueDefault; //$NON-NLS-1$ - if (value != null) - attributeString += " '" + value + "'"; //$NON-NLS-1$ //$NON-NLS-2$ - - attributeString = eName + " " + attributeString + ">"; //$NON-NLS-1$ //$NON-NLS-2$ - parseCurrentDeclarationHelper(attributeString); - attributeString = ""; //$NON-NLS-1$ - } - - public void internalEntityDecl(String name, String value) throws SAXException { - startDeclaration(DeclNode.INTERNAL_ENTITY); - //declString = "<!ENTITY"; //$NON-NLS-1$ - - if (entityDepth == 1 || parsingExternalPEReference) { - // build up a string: e.g. " % STRDOM "(#PCDATA)">" - String xs = " "; //$NON-NLS-1$ - if (name.startsWith("%")) { //$NON-NLS-1$ - xs += "% "; //$NON-NLS-1$ - xs += name.substring(1); - } - else - xs += name; - - xs += " \"" + value + "\">"; //$NON-NLS-1$ //$NON-NLS-2$ - - contentString += xs; - // save expanded entity value - expandedEntityValue = value; - parseCurrentDeclaration(); - - } - } - - public void externalEntityDecl(String name, String publicId, String systemId) throws SAXException { - startDeclaration(DeclNode.EXTERNAL_ENTITY); - //declString = "<!ENTITY"; //$NON-NLS-1$ - - if (entityDepth == 1 || parsingExternalPEReference) { - // build up a string: - // ex1) " % FIELD SYSTEM "oagis_fields.dtd">" - // ex2) " % FIELD PUBLIC "FOO">" - String xs = " "; //$NON-NLS-1$ - if (name.startsWith("%")) { //$NON-NLS-1$ - xs += "% "; //$NON-NLS-1$ - xs += name.substring(1); - } - else - xs += name; - - if (systemId != null) - xs += " SYSTEM \"" + systemId + "\">"; //$NON-NLS-1$ //$NON-NLS-2$ - else if (publicId != null) - xs += " PUBLIC \"" + publicId + "\">"; //$NON-NLS-1$ //$NON-NLS-2$ - - contentString += xs; - parseCurrentDeclaration(); - } - } - - // - // LexicalHandler methods - // - - public void startCDATA() throws SAXException { - } - - public void endCDATA() throws SAXException { - } - - public void startDTD(String name, String publicId, String systemId) throws SAXException { - dtdList.removeAllElements(); - dtdList.addElement(currentDTD); - } - - /** - * Report the end of DTD declarations. - * - * @exception SAXException - * The application may raise an exception. - * @see #startDTD - */ - public void endDTD() throws SAXException { - startDeclaration(DeclNode.END_DTD); - } - - /** - * Report the beginning of an entity. - * - * The start and end of the document entity are not reported. The start - * and end of the external DTD subset are reported using the pseudo-name - * "[dtd]". All other events must be properly nested within start/end - * entity events. - * - * @param name - * The name of the entity. If it is a parameter entity, the - * name will begin with '%'. - * @exception SAXException - * The application may raise an exception. - * @see #endEntity - */ - - public void startEntity(String name) throws SAXException { - if (name.equals("[dtd]")) { //$NON-NLS-1$ - startDeclaration(DeclNode.START_ENTITY_DTD); - } - else if (currentDeclNode == null) { - // PE reference in markupdecl section - if (name.startsWith("%")) { //$NON-NLS-1$ - String peName = name.substring(1); - EntityDecl en = entityPool.referPara(peName); - - peRefStack.push(name); - parsingPERefStack.push(new Boolean(parsingExternalPEReference)); - - String systemId = en.getSystemId(); - String publicId = en.getPublicId(); - if (systemId == null) { - parsingExternalPEReference = false; - } - else { - URIResolver idResolver = URIResolverPlugin.createResolver(); - String uri = idResolver.resolve(currentDTD.getName(), publicId, systemId); - if (!isDTDLoaded(uri)) { - // not loaded - // out.println(" DTD not loaded .. create new DTD: " - // ); - dtdStack.push(currentDTD); - DTD newDTD = new DTD(uri); - dtdList.addElement(newDTD); - currentDTD = newDTD; - parsingExternalPEReference = true; - } - else { - // out.println(" DTD already loaded .. " ); - parsingExternalPEReference = false; - } - } - } - } - else if (entityDepth == 1 || parsingExternalPEReference) { - String xs = (String) reader.getProperty("http://xml.org/sax/properties/xml-string"); //$NON-NLS-1$ - contentString += xs; - } - entityDepth++; - } - - /** - * Report the end of an entity. - * - * @param name - * The name of the entity that is ending. - * @exception SAXException - * The application may raise an exception. - * @see #startEntity - */ - public void endEntity(String name) throws SAXException { - if (name.equals("[dtd]")) { //$NON-NLS-1$ - startDeclaration(DeclNode.END_ENTITY_DTD); - } - else if (!peRefStack.empty()) { - parseExternalPEReference(name); - } - else if (entityDepth == 1 || parsingExternalPEReference) { - if (!contentString.endsWith(name + ";")) { //$NON-NLS-1$ - String xs = (String) reader.getProperty("http://xml.org/sax/properties/xml-string"); //$NON-NLS-1$ - contentString += xs; - } - } - entityDepth--; - entityEnd = true; - } - - protected boolean parseExternalPEReference(String name) { - if (!peRefStack.empty()) { - if (((String) peRefStack.peek()).equals(name)) { - peRefStack.pop(); - if (parsingExternalPEReference) { - currentDTD = (DTD) dtdStack.pop(); - addPEReferenceNode(name); - } - parsingExternalPEReference = ((Boolean) parsingPERefStack.pop()).booleanValue(); - return true; - } - } - return false; - } - - /** - * Report an XML comment anywhere in the document. - * - * This callback will be used for comments inside or outside the document - * element, including comments in the external DTD subset (if read). - * - * @param ch - * An array holding the characters in the comment. - * @param start - * The starting position in the array. - * @param length - * The number of characters to use from the array. - * @exception SAXException - * The application may raise an exception. - */ - public void comment(char ch[], int start, int length) throws SAXException { - startDeclaration(DeclNode.COMMENT); - - if (comment == null) - comment = new String(ch, start, length); - else - comment += "\n" + new String(ch, start, length); // append all comments. //$NON-NLS-1$ - // The comment will get reset after - // it has been attached to the following - // declaration. - } - - // - // ErrorHandler methods - // - - /* Warning. */ - public void warning(SAXParseException ex) { - /*String error = "[Source Line] " + declString + contentString + "\n"; //$NON-NLS-1$//$NON-NLS-2$ - error += "[Warning ] " + getLocationString(ex) + ": " + ex.getMessage(); //$NON-NLS-1$//$NON-NLS-2$*/ - setErrorInformation(ex, "warning"); //$NON-NLS-1$ - - parseCurrentDeclaration(); - } - - /* Error. */ - public void error(SAXParseException ex) { - /*String error = "[Source Line] " + declString + contentString + "\n"; //$NON-NLS-1$//$NON-NLS-2$ - error += "[Error ] " + getLocationString(ex) + ": " + ex.getMessage(); //$NON-NLS-1$//$NON-NLS-2$*/ - setErrorInformation(ex, "error"); //$NON-NLS-1$ - - parseCurrentDeclaration(); - } - - /* Fatal error. */ - public void fatalError(SAXParseException ex) throws SAXException { - /*String error = "[Source Line] " + declString + contentString + "\n"; //$NON-NLS-1$//$NON-NLS-2$ - error += "[Fatal Error] " + getLocationString(ex) + ": " + ex.getMessage(); //$NON-NLS-1$//$NON-NLS-2$*/ - setErrorInformation(ex, "fatal"); //$NON-NLS-1$ - - parseCurrentDeclaration(); - } - - /* Returns a string of the location. */ - /*private String getLocationString(SAXParseException ex) { - StringBuffer str = new StringBuffer(); - - String systemId = ex.getSystemId(); - if (systemId != null) { - int index = systemId.lastIndexOf('/'); - if (index != -1) - systemId = systemId.substring(index + 1); - str.append(systemId); - } - str.append(':'); - str.append(ex.getLineNumber()); - str.append(':'); - str.append(ex.getColumnNumber()); - - return str.toString(); - - }*/ - - private void startDeclaration(int type) { - if (type == DeclNode.END_DTD || type == DeclNode.END_ENTITY_DTD || type == DeclNode.COMMENT || type == DeclNode.ERROR) { - previousDeclNode = currentDeclNode; - currentDeclNode = null; - } - else { - currentDeclNode = new DeclNode(type); - contentString = ""; //$NON-NLS-1$ - //declString = ""; //$NON-NLS-1$ - expandedEntityValue = null; - } - } - - private void parseCurrentDeclaration() { - parseCurrentDeclarationHelper(contentString); - contentString = ""; //$NON-NLS-1$ - } - - private void parseCurrentDeclarationHelper(String declarationString) { - DTDScanner scanner; - String name; - - if (currentDeclNode == null && previousDeclNode != null && entityEnd) { - currentDeclNode = previousDeclNode; - } - - // save the previous declNode - if (currentDeclNode != null) { - BaseNode baseNode = null; - // strip out the ending markup symbol ">" - if (declarationString.endsWith(">")) //$NON-NLS-1$ - declarationString = declarationString.substring(0, declarationString.length() - 1); - - int sIndex; - String cString; - int type = currentDeclNode.getType(); - switch (type) { - case DeclNode.ELEMENT : { - name = TString.word(declarationString, 1); - - // strip out the name - sIndex = declarationString.indexOf(name) + name.length(); - cString = declarationString.substring(sIndex); - - baseNode = new ElementDecl(name, currentDTD.getName()); - scanner = new DTDScanner(currentDTD.getName(), cString); - CMNode contentModel = scanner.scanContentModel(); - if (contentModel == null && errorMessage == null) { - createErrorMessage("Expecting '(' in content model", "error"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - ((ElementDecl) baseNode).setContentModelNode(contentModel); - elementPool.put(name, baseNode); - break; - } - case DeclNode.INTERNAL_ENTITY : - case DeclNode.EXTERNAL_ENTITY : { - if (!parseExternalPEReference(declarationString)) { - scanner = new DTDScanner(currentDTD.getName(), declarationString); - baseNode = scanner.scanEntityDecl(); - // System.out.println("----baseNode (" + - // declarationString + ")" + baseNode); - if (type == DeclNode.INTERNAL_ENTITY && expandedEntityValue != null) { - ((EntityDecl) baseNode).expandedValue = expandedEntityValue; - } - if (baseNode != null) { - entityPool.add((EntityDecl) baseNode); - } - } - - break; - } - case DeclNode.NOTATION : { - scanner = new DTDScanner(currentDTD.getName(), declarationString); - baseNode = scanner.scanNotationDecl(); - break; - } - case DeclNode.ATTLIST : { - name = TString.word(declarationString, 1); - - // strip out the name - sIndex = declarationString.indexOf(name) + name.length(); - cString = declarationString.substring(sIndex); - - baseNode = new Attlist(name, currentDTD.getName()); - scanner = new DTDScanner(currentDTD.getName(), cString.trim()); - Vector attrs = scanner.scanAttlistDecl(entityPool); - String errorString = scanner.getErrorString(); - - if (attrs.size() > 0) { - ((Attlist) baseNode).setAttDefs(attrs); - } - if (errorString != null) { - createErrorMessage(errorString, "error"); //$NON-NLS-1$ - } - break; - } - default : { - currentDeclNode = null; - } - } - - if (baseNode != null) { - if (comment != null) { - baseNode.setComment(comment); - comment = null; - } - - if (errorMessage != null) { - baseNode.setErrorMessage(errorMessage); - errorMessage = null; - } - - if (currentDeclNode != null) { - currentDTD.addDecl(baseNode); - } - lastBaseNode = baseNode; - } - - currentDeclNode = null; - } - else { - if (lastBaseNode != null && errorMessage != null && lastBaseNode.getErrorMessage() == null) { - lastBaseNode.setErrorMessage(errorMessage); - errorMessage = null; - } - } - } - - private void addPEReferenceNode(String name) { - if (name.startsWith("%")) { //$NON-NLS-1$ - name = name.substring(1); // strip out the % from entity name - } - EntityDecl e = new EntityDecl(name, currentDTD.getName(), null, true); - e.setEntityReferenced(true); - e.setErrorMessage(errorMessage); - errorMessage = null; - currentDTD.addDecl(e); - } - - private boolean isDTDLoaded(String uri) { - boolean loaded = false; - //String list = ""; //$NON-NLS-1$ - if (dtdList != null) { - Enumeration en = dtdList.elements(); - while (en.hasMoreElements()) { - DTD dtd = (DTD) en.nextElement(); - //list += dtd.getName(); - //list += ","; //$NON-NLS-1$ - if (dtd.getName().equals(uri)) { - loaded = true; - break; - } - } - } - return loaded; - } - - public InputSource resolveEntity(String publicId, String systemId) throws SAXException { - InputSource result = null; - URIResolver idResolver = URIResolverPlugin.createResolver(); - String logicalURI = idResolver.resolve(currentDTD.getName(), publicId, systemId); - // bug 113537, ensure physical resolution gets done here - // right before we attempt to open a stream - String physicalURI = idResolver.resolvePhysicalLocation(currentDTD.getName(), publicId, logicalURI); - result = new InputSource(logicalURI); - if(!(physicalURI == null || physicalURI.equals("") || URIHelper.hasProtocol(physicalURI))) //$NON-NLS-1$ - { - physicalURI = "file:///" + physicalURI; //$NON-NLS-1$ - } - result.setByteStream(new LazyURLInputStream(physicalURI)); - return result; - } - - // - // Main - // - - /** Main program entry point. */ - public static void main(String argv[]) { - - // is there anything to do? - if (argv.length == 0) { - printUsage(); - System.exit(1); - } - - // vars - boolean canonical = false; - boolean expandEntityReferences = false; - DTDParser parser; - - // check parameters - for (int i = 0; i < argv.length; i++) { - String arg = argv[i]; - - // options - if (arg.startsWith("-")) { //$NON-NLS-1$ - - if (arg.equals("-c")) { //$NON-NLS-1$ - canonical = true; - continue; - } - - if (arg.equals("-x")) { //$NON-NLS-1$ - expandEntityReferences = true; - continue; - } - - if (arg.equals("-h")) { //$NON-NLS-1$ - printUsage(); - System.exit(1); - } - } - try { - parser = new DTDParser(canonical); - parser.setExpandEntityReferences(expandEntityReferences); - parser.parse(arg); - } - catch (Exception e) { - e.printStackTrace(); - } - } - - } // main(String[]) - - /** Prints the usage. */ - private static void printUsage() { - - System.err.println("usage: java sax.DTDParser (options) uri ..."); //$NON-NLS-1$ - System.err.println(); - System.err.println("options:"); //$NON-NLS-1$ - System.err.println(" -c Canonical XML output."); //$NON-NLS-1$ - System.err.println(" -x Expand entity references."); //$NON-NLS-1$ - System.err.println(" -h This help screen."); //$NON-NLS-1$ - - } // printUsage() - - private void setErrorInformation(SAXParseException ex, String severity) { - errorMessage = new ErrorMessage(); - - if (ex.getLineNumber() == -1) { - errorMessage.setErrorLine(lineNumber); - } - else { - errorMessage.setErrorLine(ex.getLineNumber()); - } - - - errorMessage.setErrorMessage(ex.getMessage()); - errorMessage.setErrorColumn(ex.getColumnNumber()); - errorMessage.setSeverity(severity); - errorMessages.add(errorMessage); - } - - private void createErrorMessage(String message, String severity) { - errorMessage = new ErrorMessage(); - - Locator locator = getLocator(); - - errorMessage.setErrorLine(locator.getLineNumber()); - errorMessage.setErrorColumn(locator.getColumnNumber()); - - errorMessage.setErrorMessage(message); - errorMessage.setSeverity(severity); - - errorMessages.add(errorMessage); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDSaxArtifactVisitor.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDSaxArtifactVisitor.java deleted file mode 100644 index 829063cede..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDSaxArtifactVisitor.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.saxparser; - -import java.util.Enumeration; - - - -public class DTDSaxArtifactVisitor { - public void visitDTD(DTD dtd) { - Enumeration en = dtd.externalElements(); - - while (en.hasMoreElements()) { - Object e = en.nextElement(); - if (e instanceof EntityDecl) { - visitEntityDecl((EntityDecl) e); - } - else if (e instanceof ElementDecl) { - visitElementDecl((ElementDecl) e); - } - else if (e instanceof NotationDecl) { - visitNotationDecl((NotationDecl) e); - } - } - } - - public void visitNotationDecl(NotationDecl notation) { - } - - public void visitElementDecl(ElementDecl element) { - } - - public void visitEntityDecl(EntityDecl entity) { - if (entity.isEntityReferenced()) { - visitParameterEntityReferenceDecl(entity); - } - else { - if (entity.isExternal()) { - visitExternalEntityDecl(entity); - } - else { - visitInternalEntityDecl(entity); - } - } - } - - public void visitParameterEntityReferenceDecl(EntityDecl entity) { - } - - public void visitExternalEntityDecl(EntityDecl entity) { - } - - public void visitInternalEntityDecl(EntityDecl entity) { - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDScanner.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDScanner.java deleted file mode 100644 index 865cef1903..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDScanner.java +++ /dev/null @@ -1,1128 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 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.saxparser; - -import java.util.Vector; - -/** - * Scanning / parsing the content string from the Decl statement - * - * @version - */ -public class DTDScanner { - // element content model strings - private static final char[] empty_string = {'E', 'M', 'P', 'T', 'Y'}; - private static final char[] any_string = {'A', 'N', 'Y'}; - private static final char[] pcdata_string = {'#', 'P', 'C', 'D', 'A', 'T', 'A'}; - - // attribute type and default type strings - private static final char[] cdata_string = {'C', 'D', 'A', 'T', 'A'}; - private static final char[] id_string = {'I', 'D'}; - private static final char[] ref_string = {'R', 'E', 'F'}; - private static final char[] entit_string = {'E', 'N', 'T', 'I', 'T'}; - private static final char[] ies_string = {'I', 'E', 'S'}; - private static final char[] nmtoken_string = {'N', 'M', 'T', 'O', 'K', 'E', 'N'}; - private static final char[] notation_string = {'N', 'O', 'T', 'A', 'T', 'I', 'O', 'N'}; - private static final char[] required_string = {'#', 'R', 'E', 'Q', 'U', 'I', 'R', 'E', 'D'}; - private static final char[] implied_string = {'#', 'I', 'M', 'P', 'L', 'I', 'E', 'D'}; - private static final char[] fixed_string = {'#', 'F', 'I', 'X', 'E', 'D'}; - - private static final char[] system_string = {'S', 'Y', 'S', 'T', 'E', 'M'}; - private static final char[] public_string = {'P', 'U', 'B', 'L', 'I', 'C'}; - private static final char[] ndata_string = {'N', 'D', 'A', 'T', 'A'}; - - private int[] fOpStack = null; - private CMGroupNode[] fGrpStack = null; - - private EntityPool entityPool; - - /* Attribute Def scanner state */ - static final int Att_Scanner_State_Name = 1, Att_Scanner_State_Type = 2, Att_Scanner_State_DefaultType = 3, Att_Scanner_State_DefaultValue = 4; - - private StringParser contentString; - private String cData; - private int prevNodeOffset = 0; - private int nodeOffset = 1; - private String ownerDTD; - - private String errorString; - - public DTDScanner(String ownerDTD, String cm) { - // System.out.println("Cm: " + cm); - contentString = new StringParser(cm); - cData = cm; - this.ownerDTD = ownerDTD; - } - - // - // [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children - // - // Specific to VisualDTD : also allows %PEReference; - // - public CMNode scanContentModel() { - CMNode cmNode = null; - contentString.skipPastSpaces(); - if (contentString.skippedString(empty_string)) { - cmNode = new CMBasicNode("EMPTY", CMNodeType.EMPTY); //$NON-NLS-1$ - } - else if (contentString.skippedString(any_string)) { - cmNode = new CMBasicNode("ANY", CMNodeType.ANY); //$NON-NLS-1$ - } - else if (contentString.lookingAtChar('%', true)) { - cmNode = new CMReferenceNode(contentString.getData(), CMNodeType.ENTITY_REFERENCE); - } - else if (!contentString.lookingAtChar('(', true)) { - // This means that the contentmodel string is bad... - // System.out.println("!!! exception - no ("); - return cmNode; - } - else { - // System.out.println("Remaining String = " + - // contentString.getRemainingString()); - - contentString.skipPastSpaces(); - boolean skippedPCDATA = contentString.skippedString(pcdata_string); - if (skippedPCDATA) { - cmNode = scanMixed(); - } - else { - cmNode = scanChildren(); - } - - } - return cmNode; - } - - // - // [51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? - // '#PCDATA' S? ')' - // - // Called after scanning past '(' S? '#PCDATA' - // - private CMNode scanMixed() { - // System.out.println("ScanMixed..."); - CMGroupNode cmNode = new CMGroupNode(); - cmNode.setGroupKind(CMNodeType.GROUP_CHOICE); - cmNode.addChild(new CMBasicNode("#PCDATA", CMNodeType.PCDATA)); //$NON-NLS-1$ - - // int prevNodeIndex = -1; - boolean starRequired = false; - - - while (true) { - if (contentString.lookingAtSpace(true)) { - contentString.skipPastSpaces(); - } - prevNodeOffset = contentString.getCurrentOffset(); - - if (!contentString.lookingAtChar('|', true)) { - if (!contentString.lookingAtChar(')', true)) { - break; - } - if (contentString.lookingAtChar('*', true)) { - cmNode.setOccurrence(CMNodeType.ZERO_OR_MORE); - } - else if (starRequired) { - // System.out.println(" * is required ... "); - } - break; - } - - if (contentString.lookingAtSpace(true)) { - contentString.skipPastSpaces(); - } - - nodeOffset = contentString.getCurrentOffset(); - if (nodeOffset != -1) { - // skip pass "|" - prevNodeOffset = nodeOffset; - } - - starRequired = true; - contentString.skipPastNameAndPEReference(')'); - nodeOffset = contentString.getCurrentOffset(); - - if (nodeOffset == -1) - break; - - // add leave node - int len = nodeOffset - prevNodeOffset; - String refName = contentString.getString(prevNodeOffset, len); - prevNodeOffset = nodeOffset; - if (refName.startsWith("%")) //$NON-NLS-1$ - cmNode.addChild(new CMReferenceNode(refName, CMNodeType.ENTITY_REFERENCE)); - else - cmNode.addChild(new CMReferenceNode(refName, CMNodeType.ELEMENT_REFERENCE)); - - } // end while - - - if (cmNode.getChildren().size() == 1) { - // simplify the contentModel if the CMGroupNode only has one child - // node. - return (CMBasicNode) cmNode.getChildren().elementAt(0); - } - - return cmNode; - } - - // - // [47] children ::= (choice | seq) ('?' | '*' | '+')? - // [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' - // [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' - // [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? - // - // Called after scanning past '(' - - private CMNode scanChildren() { - - // System.out.println("scanChildren..."); - - if (contentString.lookingAtSpace(true)) { - contentString.skipPastSpaces(); - } - - prevNodeOffset = contentString.getCurrentOffset(); - nodeOffset = contentString.getCurrentOffset(); - int depth = 1; - initializeContentModelStack(depth); - int len; - - String nodeName; - CMGroupNode cmNode = new CMGroupNode(); - fGrpStack[depth] = cmNode; - - while (true) { - - // System.out.println(" Begin outter while loop ..." ); - if (contentString.lookingAtChar('(', true)) { - if (contentString.lookingAtSpace(true)) { - // skip past any white spaces after the '(' - contentString.skipPastSpaces(); - } - - depth++; - initializeContentModelStack(depth); - fGrpStack[depth] = new CMGroupNode(); - fGrpStack[depth - 1].addChild(fGrpStack[depth]); - continue; - } - - prevNodeOffset = contentString.getCurrentOffset(); - contentString.skipPastNameAndPEReference(')'); - nodeOffset = contentString.getCurrentOffset(); - - /* - * System.out.println(" prevNodeOFfset " + prevNodeOffset); - * System.out.println(" currentNodeOFfset " + nodeOffset); - */ - - len = nodeOffset - prevNodeOffset; - - if (nodeOffset == -1 || len < 1) { - break; - } - - nodeName = contentString.getString(prevNodeOffset, len); - - CMRepeatableNode rn; - if (nodeName.startsWith("%")) { //$NON-NLS-1$ - rn = new CMReferenceNode(nodeName, CMNodeType.ENTITY_REFERENCE); - } - else { - rn = new CMReferenceNode(nodeName, CMNodeType.ELEMENT_REFERENCE); - } - - fGrpStack[depth].addChild(rn); - - prevNodeOffset = nodeOffset; - - if (contentString.lookingAtChar('?', true)) { - rn.setOccurrence(CMNodeType.OPTIONAL); - } - else if (contentString.lookingAtChar('*', true)) { - rn.setOccurrence(CMNodeType.ZERO_OR_MORE); - } - else if (contentString.lookingAtChar('+', true)) { - rn.setOccurrence(CMNodeType.ONE_OR_MORE); - } - - if (contentString.lookingAtSpace(true)) { - contentString.skipPastSpaces(); - } - - prevNodeOffset = contentString.getCurrentOffset(); - - while (true) { - // System.out.println(" Begin inner while loop ... depth " + - // depth ); - if (fOpStack[depth] != CMNodeType.GROUP_SEQUENCE && contentString.lookingAtChar('|', true)) { - fOpStack[depth] = CMNodeType.GROUP_CHOICE; - fGrpStack[depth].setGroupKind(CMNodeType.GROUP_CHOICE); - if (contentString.lookingAtSpace(true)) - contentString.skipPastSpaces(); - break; - } - else if (fOpStack[depth] != CMNodeType.GROUP_CHOICE && contentString.lookingAtChar(',', true)) { - fOpStack[depth] = CMNodeType.GROUP_SEQUENCE; - fGrpStack[depth].setGroupKind(CMNodeType.GROUP_SEQUENCE); - if (contentString.lookingAtSpace(true)) - contentString.skipPastSpaces(); - break; - } - else { - if (contentString.lookingAtSpace(true)) { - contentString.skipPastSpaces(); - } - if (!contentString.lookingAtChar(')', true)) { - // System.out.println(" error ) not found"); - } - // end of the curent group node - if (contentString.lookingAtChar('?', true)) { - fGrpStack[depth].setOccurrence(CMNodeType.OPTIONAL); - } - else if (contentString.lookingAtChar('*', true)) { - fGrpStack[depth].setOccurrence(CMNodeType.ZERO_OR_MORE); - } - else if (contentString.lookingAtChar('+', true)) { - fGrpStack[depth].setOccurrence(CMNodeType.ONE_OR_MORE); - } - depth--; - if (depth == 0) { - break; - } - if (contentString.lookingAtSpace(true)) - contentString.skipPastSpaces(); - - // System.out.println(" End end inner while loop ... depth - // " + depth ); - - } - } // inner while - - if (depth == 0) { - break; - } - } // outer while - - if (cmNode.getChildren().size() == 1) { - // simplify the contentModel if the CMGroupNode only has one child - // node and that node is an element ref. - CMRepeatableNode rn = (CMRepeatableNode) cmNode.getChildren().elementAt(0); - if (rn instanceof CMReferenceNode) { - CMReferenceNode ref = (CMReferenceNode) rn; - if (ref.getType() == CMNodeType.ELEMENT_REFERENCE) { - if (ref.getOccurrence() == CMNodeType.ONE) { - ref.setOccurrence(cmNode.getOccurrence()); - return ref; - } - else if (cmNode.getOccurrence() == CMNodeType.ONE) { - return ref; - } - } // end of if () - } - } - - return cmNode; - } - - // - // [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' - // [53] AttDef ::= S Name S AttType S DefaultDecl - // [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? - // AttValue) - // - - public Vector scanAttlistDecl(EntityPool entityPool) { - Vector attList = new Vector(); - this.entityPool = entityPool; - - int scannerState = Att_Scanner_State_Name; - - AttNode attNode; - - while (true) { - attNode = new AttNode(); - - // System.out.println(" scanner state: " + scannerState); - - // scanning att name - if (scannerState == Att_Scanner_State_Name) { - // System.out.println("scan att Name..."); - scannerState = checkForAttributeWithPEReference(attNode, scannerState); - if (scannerState == -1) { - return attList; - } - } - - // scanning att type - if (scannerState == Att_Scanner_State_Type) { - // System.out.println("scan att type..."); - - if (contentString.skippedString(cdata_string)) { - attNode.type = new String(cdata_string); - scannerState = Att_Scanner_State_DefaultType; - } - else if (contentString.skippedString(id_string)) { - if (!contentString.skippedString(ref_string)) { - attNode.type = new String(id_string); - } - else if (!contentString.lookingAtChar('S', true)) { - attNode.type = "IDREF"; //$NON-NLS-1$ - } - else { - attNode.type = "IDREFS"; //$NON-NLS-1$ - } - scannerState = Att_Scanner_State_DefaultType; - } - else if (contentString.skippedString(entit_string)) { - if (contentString.lookingAtChar('Y', true)) { - attNode.type = "ENTITY"; //$NON-NLS-1$ - } - else if (contentString.skippedString(ies_string)) { - attNode.type = "ENTITIES"; //$NON-NLS-1$ - } - scannerState = Att_Scanner_State_DefaultType; - } - else if (contentString.skippedString(nmtoken_string)) { - if (contentString.lookingAtChar('S', true)) { - attNode.type = "NMTOKENS"; //$NON-NLS-1$ - } - else { - attNode.type = "NMTOKEN"; //$NON-NLS-1$ - } - scannerState = Att_Scanner_State_DefaultType; - } - else if (contentString.skippedString(notation_string)) { - if (contentString.lookingAtSpace(true)) { - contentString.skipPastSpaces(); - } - if (!contentString.lookingAtChar('(', true)) { - System.out.println(" missing ( in notation "); //$NON-NLS-1$ - } - attNode.type = "NOTATION"; //$NON-NLS-1$ - attNode.enumList = scanEnumeration(contentString, true); - scannerState = Att_Scanner_State_DefaultType; - } - else if (contentString.lookingAtChar('(', true)) { - attNode.type = "ENUMERATION"; //$NON-NLS-1$ - attNode.enumList = scanEnumeration(contentString, false); - scannerState = Att_Scanner_State_DefaultType; - } - else { - scannerState = checkForAttributeWithPEReference(attNode, scannerState); - if (scannerState == Att_Scanner_State_Type) { - setErrorString("Failed to find type for attribute '" + attNode.name + "'. Please refer to the original DTD file."); //$NON-NLS-1$ //$NON-NLS-2$ - // we failed to find a type for this attribute - return attList; - } - } - } - - if (scannerState == Att_Scanner_State_DefaultType) { - contentString.skipPastSpaces(); - // System.out.println("scan default type..."); - if (contentString.skippedString(required_string)) { - attNode.defaultType = new String(required_string); - } - else if (contentString.skippedString(implied_string)) { - attNode.defaultType = new String(implied_string); - } - else { - if (contentString.skippedString(fixed_string)) { - contentString.skipPastSpaces(); - attNode.defaultType = new String(fixed_string); - } - else - // "default" - attNode.defaultType = "NOFIXED"; //$NON-NLS-1$ - - if (contentString.lookingAtSpace(true)) - contentString.skipPastSpaces(); - attNode.defaultValue = scanDefaultAttValue(contentString); - } - scannerState = Att_Scanner_State_Name; // next - } - - - attList.addElement(attNode); - if (contentString.lookingAtSpace(true)) - contentString.skipPastSpaces(); - nodeOffset = contentString.getCurrentOffset(); - - if (nodeOffset >= cData.length()) - return attList; - - prevNodeOffset = contentString.getCurrentOffset(); - - }// end while loop - } - - // - // content model stack - // - private void initializeContentModelStack(int depth) { - if (fOpStack == null) { - fOpStack = new int[8]; - fGrpStack = new CMGroupNode[8]; - } - else if (depth == fOpStack.length) { - int[] newStack = new int[depth * 2]; - System.arraycopy(fOpStack, 0, newStack, 0, depth); - fOpStack = newStack; - - CMGroupNode[] newGrpStack = new CMGroupNode[depth * 2]; - System.arraycopy(fGrpStack, 0, newGrpStack, 0, depth); - fGrpStack = newGrpStack; - } - fOpStack[depth] = -1; - fGrpStack[depth] = null; - } - - // - private int checkForAttributeWithPEReference(AttNode attNode, int scannerState) { - int state = -1; - int len; - String rawText; - EntityDecl pEntity; - - // System.out.println(" checkforATTPERReference- start scannerState: " - // + scannerState); - if (scannerState == Att_Scanner_State_Name) { - contentString.skipPastNameAndPEReference(' '); - nodeOffset = contentString.getCurrentOffset(); - len = nodeOffset - prevNodeOffset; - - rawText = contentString.getString(prevNodeOffset, len); - attNode.name = rawText; - - // System.out.println("State_name : " + rawText); - - if (rawText.startsWith("%") && rawText.endsWith(";")) { //$NON-NLS-1$ //$NON-NLS-2$ - String pe = rawText.substring(1, rawText.length() - 1); - - pEntity = entityPool.referPara(pe); - if (pEntity != null) { - // System.out.println(" name :" + rawText +" expandTo:" + - // pEntity.expandedValue); - state = whatIsTheNextAttributeScanningState(pEntity.expandedValue, scannerState); - // System.out.println("checkForAttrwithPER - nextstate: " - // + state); - } - else - state = Att_Scanner_State_Type; - } - else - state = Att_Scanner_State_Type; - - } - else if (scannerState == Att_Scanner_State_Type) { - if (contentString.lookingAtChar('%', true)) { - rawText = getPEName(); - attNode.type = "%" + rawText; //$NON-NLS-1$ - String peName = rawText.substring(0, rawText.length() - 1); - // System.out.println("State_type : pe- " + peName); - pEntity = entityPool.referPara(peName); - if (pEntity != null) { - state = whatIsTheNextAttributeScanningState(pEntity.expandedValue, scannerState); - } - else - state = Att_Scanner_State_DefaultType; - } - else - state = Att_Scanner_State_Type; - } - else if (scannerState == Att_Scanner_State_DefaultType) { - if (contentString.lookingAtChar('%', true)) { - rawText = getPEName(); - attNode.defaultType = rawText; - // System.out.println("State_defaultType : " + rawText); - pEntity = entityPool.referPara(rawText.substring(1, rawText.length() - 1)); - if (pEntity != null) { - state = whatIsTheNextAttributeScanningState(pEntity.expandedValue, scannerState); - } - else - state = Att_Scanner_State_DefaultValue; - } - else - state = Att_Scanner_State_DefaultType; - } - else if (scannerState == Att_Scanner_State_DefaultValue) { - if (contentString.lookingAtChar('%', true)) { - rawText = getPEName(); - attNode.defaultValue = rawText; - // System.out.println("State_defaultValue : " + rawText); - - pEntity = entityPool.referPara(rawText.substring(1, rawText.length() - 1)); - if (pEntity != null) { - state = whatIsTheNextAttributeScanningState(pEntity.expandedValue, scannerState); - } - else - state = Att_Scanner_State_DefaultValue; - } - else - state = Att_Scanner_State_DefaultValue; - } - - if (contentString.lookingAtSpace(true)) - contentString.skipPastSpaces(); - prevNodeOffset = contentString.getCurrentOffset(); - return state; - } - - private String getPEName() { - prevNodeOffset = contentString.getCurrentOffset(); - contentString.skipToChar(';', true); - nodeOffset = contentString.getCurrentOffset(); - int len = nodeOffset - prevNodeOffset; - return contentString.getString(prevNodeOffset, len); - } - - private int whatIsTheNextAttributeScanningState(String attrContentString, int currentState) { - StringParser sp = new StringParser(attrContentString.trim()); - - - int nextState = currentState; - int nOffset = 0; - - /* - * System.out.println("WhatistheNext AttContentStringt : " + - * attrContentString); System.out.println("WhatistheNext - * AttContentStringL : " + attrContentString.length()); - * System.out.println("WhatistheNext currentstate : " + currentState); - */ - - while (true) { - // System.out.println("WhatistheNext inside whil nextstate : " + - // nextState); - if (nextState == Att_Scanner_State_Name) { // the current - // scanning state is - // Attr Name, is the - // next part Attr Type - // ? - if (isAttrName(sp)) { - nextState = Att_Scanner_State_Type; - } - } - else if (nextState == Att_Scanner_State_Type) { // the current - // scanning state - // is Attr Type, - // is the next - // part Default - // Attr Type ? - - if (isAttrType(sp)) { - nextState = Att_Scanner_State_DefaultType; - } - else - System.out.println("WhatistheNext Attr Part - is not an Attr Type"); //$NON-NLS-1$ - - } - - if (nextState == Att_Scanner_State_DefaultType) { - - int dType = isAttrDefaultType(sp); - // System.out.println("WhatistheNext inside dType : " + - // dType); - if (dType == 1) // #REQUIRED or #IMPLIED - { - nextState = Att_Scanner_State_Name; - } - else { - if (dType == 2) // #FIXED - { - // need to look at this again - nextState = Att_Scanner_State_DefaultType; - } - - if (scanDefaultAttValue(sp) != null) { - nextState = Att_Scanner_State_Name; - - } - } - } - - sp.skipPastSpaces(); - - if (nOffset == sp.getCurrentOffset()) - break; - - nOffset = sp.getCurrentOffset(); - - if (nOffset >= attrContentString.length() || nOffset == -1) - break; - - } // end while - - return nextState; - } - - - private boolean isAttrName(StringParser sp) { - // System.out.println("isAttrName - sp:" + sp.fData); - // System.out.println("isAttrName - currentOffset:" + - // sp.getCurrentOffset()); - boolean isAttrName = false; - int prev = sp.getCurrentOffset(); - sp.skipPastName(' '); - if ((sp.getCurrentOffset() - prev) > 0) - isAttrName = true; - return isAttrName; - - } - - private boolean isAttrType(StringParser sp) { - // System.out.println("isAttrType - sp:" + sp.fData); - // System.out.println("isAttrType - currentOffset:" + - // sp.getCurrentOffset()); - boolean isAttrType = false; - if (sp.skippedString(cdata_string)) { - isAttrType = true; - } - else if (sp.skippedString(id_string)) { - if (!sp.skippedString(ref_string)) { - isAttrType = true; // ID - } - else if (!sp.lookingAtChar('S', true)) { - isAttrType = true; // IDREFS - } - else { - isAttrType = true; // IDREF - } - } - else if (sp.skippedString(entit_string)) { - if (sp.lookingAtChar('Y', true)) { - isAttrType = true; // ENTITY - } - else if (sp.skippedString(ies_string)) { - isAttrType = true; // ENTITITES - } - } - else if (sp.skippedString(nmtoken_string)) { - if (sp.lookingAtChar('S', true)) { - isAttrType = true; // NMTOKENS - } - else { - isAttrType = true; // NMTOKEN - } - } - else if (sp.skippedString(notation_string)) { - if (!sp.lookingAtChar('(', true)) { - // System.out.println(" missing ( in notation "); - } - Vector enumList = scanEnumeration(sp, true); - if (enumList == null || enumList.size() == 0) - isAttrType = false; - else - isAttrType = true; - } - else if (sp.lookingAtChar('(', true)) { - // "ENUMERATION"; - Vector enumList = scanEnumeration(sp, false); - if (enumList == null || enumList.size() == 0) - isAttrType = false; - else - isAttrType = true; - } - - return isAttrType; - - } - - /* - * return 0 - not default type 1 - #REQUIRED or #IMPLIED 2 - #FIXED - */ - - private int isAttrDefaultType(StringParser sp) { - // System.out.println("isAttrDefaultType - sp:" + sp.fData); - int result = 0; - if (sp.skippedString(required_string)) { - result = 1; - } - else if (sp.skippedString(implied_string)) { - result = 1; - } - else if (sp.skippedString(fixed_string)) { - result = 2; - } - return result; - } - - // - // [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' - // [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' - // - // Called after scanning '(' - // - private Vector scanEnumeration(StringParser sp, boolean isNotationType) { - // System.out.println(" scanEnum ..."); - Vector enumList = null; - int len; - - if (sp.lookingAtSpace(true)) - sp.skipPastSpaces(); - - int prevNodeOffset = sp.getCurrentOffset(); - int nodeOffset; - - String nodeName; - - while (true) { - - if (isNotationType) - sp.skipPastNameAndPEReference(')'); - else - sp.skipPastNmtokenAndPEReference(')'); - - nodeOffset = sp.getCurrentOffset(); - - if (nodeOffset == -1) { - return enumList; - } - - len = nodeOffset - prevNodeOffset; - nodeName = sp.getString(prevNodeOffset, len); - - if (enumList == null) - enumList = new Vector(); - - enumList.addElement(nodeName); - - if (sp.lookingAtSpace(true)) - sp.skipPastSpaces(); - - if (!sp.lookingAtChar('|', true)) { - if (!sp.lookingAtChar(')', true)) { - System.out.println("scanning enum values - error missing ')'"); //$NON-NLS-1$ - break; - } - break; - } - - if (sp.lookingAtSpace(true)) - sp.skipPastSpaces(); - - prevNodeOffset = sp.getCurrentOffset(); - } - return enumList; - } - - // - // [10] AttValue ::= '"' ([^<&"] | Reference)* '"' - // | "'" ([^<&'] | Reference)* "'" - // - /** - * Scan the default value in an attribute declaration - * - * @param elementType - * handle to the element that owns the attribute - * @param attrName - * handle in the string pool for the attribute name - * @return handle in the string pool for the default attribute value - * @exception java.lang.Exception - */ - public String scanDefaultAttValue(StringParser sp) { - String value = null; - // System.out.println("scan default ATT Value... sp:" + sp.fData); - - sp.skipPastSpaces(); - - boolean single; - if (!(single = sp.lookingAtChar('\'', true)) && !sp.lookingAtChar('\"', true)) { - return value; - } - - char qchar = single ? '\'' : '\"'; - int sOffset = sp.getCurrentOffset(); - //BUG 203494 - Skip to the last occurrence of the qchar that way - // all characters between are obtained - sp.skipToLastOfChar(qchar, true); - int len = sp.getCurrentOffset() - sOffset - 1; - if (len == 0) - value = ""; //$NON-NLS-1$ - else - value = sp.getString(sOffset, len); - - return value; - } - - // - // [70] EntityDecl ::= GEDecl | PEDecl - // [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>' - // [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>' - // [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?) - // [74] PEDef ::= EntityValue | ExternalID - // [75] ExternalID ::= 'SYSTEM' S SystemLiteral - // | 'PUBLIC' S PubidLiteral S SystemLiteral - // [76] NDataDecl ::= S 'NDATA' S Name - // [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' - // | "'" ([^%&'] | PEReference | Reference)* "'" - // - // Called after scanning 'ENTITY' - // - public EntityDecl scanEntityDecl() { - prevNodeOffset = 1; - nodeOffset = 1; - int len; - boolean isPEDecl = false; - EntityDecl entityDecl = null; - - String name = null; - String ndata = null; - - if (contentString.lookingAtSpace(true)) { - contentString.skipPastSpaces(); - if (!contentString.lookingAtChar('%', true)) { - isPEDecl = false; // <!ENTITY x "x"> - } - else if (contentString.lookingAtSpace(true)) { - isPEDecl = true; // <!ENTITY % x "x"> - } - prevNodeOffset = contentString.getCurrentOffset(); - contentString.skipPastName(' '); - nodeOffset = contentString.getCurrentOffset(); - len = nodeOffset - prevNodeOffset; - if (len > 0) { - name = contentString.getString(prevNodeOffset, len); - prevNodeOffset = nodeOffset; - } - } - - if (name == null) - return null; - - contentString.skipPastSpaces(); - prevNodeOffset = contentString.getCurrentOffset(); - - boolean single; - if ((single = contentString.lookingAtChar('\'', true)) || contentString.lookingAtChar('\"', true)) { - String value = scanEntityValue(single); - entityDecl = new EntityDecl(name, ownerDTD, value, isPEDecl); - } - else { - // external entity - ExternalID xID = scanExternalID(); - if (xID != null) { - if (!isPEDecl) // general entity - { - boolean unparsed = false; - contentString.skipPastSpaces(); - unparsed = contentString.skippedString(ndata_string); - if (unparsed) { - contentString.skipPastSpaces(); - prevNodeOffset = contentString.getCurrentOffset(); - contentString.skipPastName(' '); - nodeOffset = contentString.getCurrentOffset(); - len = nodeOffset - prevNodeOffset; - ndata = contentString.getString(prevNodeOffset, len); - } - } - entityDecl = new EntityDecl(name, ownerDTD, xID, isPEDecl, ndata); - } - } - return entityDecl; - } - - - // - // [82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S? - // '>' - // [75] ExternalID ::= 'SYSTEM' S SystemLiteral - // | 'PUBLIC' S PubidLiteral S SystemLiteral - // [83] PublicID ::= 'PUBLIC' S PubidLiteral - // - // Called after scanning 'NOTATION' - // - public NotationDecl scanNotationDecl() { - prevNodeOffset = 1; - nodeOffset = 1; - int len; - NotationDecl notationDecl = null; - - String name = null; - - if (contentString.lookingAtSpace(true)) { - contentString.skipPastSpaces(); - prevNodeOffset = contentString.getCurrentOffset(); - contentString.skipPastName(' '); - nodeOffset = contentString.getCurrentOffset(); - len = nodeOffset - prevNodeOffset; - if (len > 0) { - name = contentString.getString(prevNodeOffset, len); - prevNodeOffset = nodeOffset; - } - } - - if (name == null) - return null; - - contentString.skipPastSpaces(); - prevNodeOffset = contentString.getCurrentOffset(); - - notationDecl = new NotationDecl(name, ownerDTD); - - ExternalID xID = scanExternalID(); - if (xID != null) { - if (xID.getSystemLiteral() != null) { - notationDecl.setSystemId(xID.getSystemLiteral()); - } - if (xID.getPubIdLiteral() != null) { - notationDecl.setPublicId(xID.getPubIdLiteral()); - } - } - - return notationDecl; - } - - - private String scanEntityValue(boolean single) { - char qchar = single ? '\'' : '\"'; - prevNodeOffset = contentString.getCurrentOffset(); - contentString.skipToChar(qchar, false); - int len = contentString.getCurrentOffset() - prevNodeOffset; - String value = contentString.getString(prevNodeOffset, len); - return value; - } - - // - // [75] ExternalID ::= 'SYSTEM' S SystemLiteral - // | 'PUBLIC' S PubidLiteral S SystemLiteral - private ExternalID scanExternalID() { - ExternalID xID = null; - char qchar = '\"'; - if (contentString.skippedString(system_string)) { - if (!contentString.lookingAtSpace(true)) { - return null; - } - contentString.skipPastSpaces(); - - if (contentString.lookingAtChar('\'', true)) - qchar = '\''; - else if (contentString.lookingAtChar('\"', true)) - qchar = '\"'; - - prevNodeOffset = contentString.getCurrentOffset(); - contentString.skipToChar(qchar, true); - int len = contentString.getCurrentOffset() - prevNodeOffset - 1; - String systemId = contentString.getString(prevNodeOffset, len); - // System.out.println("systemid..." + systemId); - xID = new ExternalID(systemId); - } - else if (contentString.skippedString(public_string)) { - if (!contentString.lookingAtSpace(true)) { - return null; - } - - contentString.skipPastSpaces(); - if (contentString.lookingAtChar('\'', true)) - qchar = '\''; - else if (contentString.lookingAtChar('\"', true)) - qchar = '\"'; - - // publicLiteral - prevNodeOffset = contentString.getCurrentOffset(); - contentString.skipToChar(qchar, true); - int len = contentString.getCurrentOffset() - prevNodeOffset - 1; - String publicId = contentString.getString(prevNodeOffset, len); - - // systemLiteral - contentString.skipPastSpaces(); - if (contentString.lookingAtChar('\'', true)) - qchar = '\''; - else if (contentString.lookingAtChar('\"', true)) - qchar = '\"'; - prevNodeOffset = contentString.getCurrentOffset(); - contentString.skipToChar(qchar, true); - len = contentString.getCurrentOffset() - prevNodeOffset - 1; - - if (len > 0) { - String systemId = contentString.getString(prevNodeOffset, len); - xID = new ExternalID(publicId, systemId); - } - else { - xID = new ExternalID(publicId, null); - } - } - return xID; - } - - // - // [83] PublicID ::= 'PUBLIC' S PubidLiteral - // - - // dmw 11/15 private method never read locally - // TODO: change to private if used, otherwise should be removed - String scanPublicID() { - String pID = null; - if (contentString.skippedString(public_string)) { - if (!contentString.lookingAtSpace(true)) { - return pID; - } - contentString.skipPastSpaces(); - prevNodeOffset = contentString.getCurrentOffset(); - - contentString.skipToChar(' ', true); - int len = contentString.getCurrentOffset() - prevNodeOffset; - pID = contentString.getString(prevNodeOffset, len); - } - - return pID; - } - - // - // Main - // - - /** Main program entry point. */ - public static void main(String argv[]) { - - // is there anything to do? - if (argv.length == 0) { - System.exit(1); - } - - // DTDScanner sc = new DTDScanner(argv[0]); - DTDScanner sc = new DTDScanner("hello.dtd", " gif SYSTEM \"GIF File\" "); //$NON-NLS-1$ //$NON-NLS-2$ - - NotationDecl n = sc.scanNotationDecl(); - System.out.println("Noation Name: " + n.getNodeName()); //$NON-NLS-1$ - System.out.println("SystemId: " + n.getSystemId()); //$NON-NLS-1$ - - - // Attributes - // Vector lists = sc.scanAttlistDecl(); - // sc.printAttList(lists); - - // System.out.println("CM: " + sc.scanContentModel()); - - } // main(String[]) - - /** - * Gets the errorString - * - * @return Returns a String - */ - public String getErrorString() { - return errorString; - } - - /** - * Sets the errorString - * - * @param errorString - * The errorString to set - */ - public void setErrorString(String errorString) { - this.errorString = errorString; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DeclNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DeclNode.java deleted file mode 100644 index bb2306ae8e..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DeclNode.java +++ /dev/null @@ -1,103 +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.saxparser; - -public class DeclNode { - static public final int INVALID = -1; - static public final int ELEMENT = 1; - static public final int ATTLIST = 2; - static public final int ENTITY = 3; - static public final int INTERNAL_ENTITY = 4; - static public final int EXTERNAL_ENTITY = 5; - static public final int INTERNAL_GENERAL_ENTITY = 6; - static public final int INTERNAL_PARAMETER_ENTITY = 7; - static public final int EXTERNAL_GENERAL_ENTITY = 8; - static public final int EXTERNAL_PARAMETER_ENTITY = 9; - static public final int PARAMETER_ENTITY_REFERENCE = 10; - static public final int NOTATION = 11; - static public final int COMMENT = 12; - - static public final int START_DTD = 21; - static public final int END_DTD = 22; - static public final int START_ENTITY_DTD = 23; - static public final int END_ENTITY_DTD = 24; - static public final int ERROR = 25; - - public int type = INVALID; - private String declName = null; - private String contentString = null; - private String errorMessage = null; - private String comment = null; - - // - // Constants - // - - /** Default constructor. */ - public DeclNode(int type) { - this(null, type, null); - } - - public DeclNode(String name, int type, String contentString) { - this.declName = name; - this.type = type; - this.contentString = contentString; - } - - public String getDeclName() { - return declName; - } - - public void setDeclName(String name) { - declName = name; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public String getErrorMessage() { - return errorMessage; - } - - public void setErrorMessage(String message) { - errorMessage = message; - } - - public String getContentString() { - return contentString; - } - - public void setContentString(String content) { - this.contentString = content; - } - - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - public String toString() - - { - return "Node Name: " + declName + " Type: " + type + " ContentString: " + contentString; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ElementDecl.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ElementDecl.java deleted file mode 100644 index 1e5c77a66d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ElementDecl.java +++ /dev/null @@ -1,33 +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.saxparser; - -public class ElementDecl extends BaseNode { - CMNode contentModelNode = null; - - public ElementDecl(String name, String ownerDTD) { - this(name, ownerDTD, null, null); - } - - public ElementDecl(String name, String ownerDTD, String comment, ErrorMessage errorMessage) { - super(name, ownerDTD, comment, errorMessage); - } - - public CMNode getContentModelNode() { - return contentModelNode; - } - - public void setContentModelNode(CMNode cmnode) { - contentModelNode = cmnode; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityDecl.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityDecl.java deleted file mode 100644 index 668877daed..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityDecl.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.saxparser; - -public class EntityDecl extends BaseNode { - boolean isParameter = false; - String expandedValue = null; // Always <var>null</var> for external - // Entities - String value = null; // Always <var>null</var> for external Entities - ExternalID externalID = null; // Always <var>null</var> for internal - // Entities - String ndata = null; // Always <var>null</var> for internal Entities - - boolean parsed = false; - DTDParser dtd = null; // Always null, except when it has been parsed. - - boolean entityReferenced = false; - - /** - * Constructor for internal Entities. - * - * @param name - * Name of this Entity. - * @param value - * The XML-encoded value that was directly assigned to the - * Entity. - * @param isParameter - * =true if a parameter Entity; otherwise =false. - */ - public EntityDecl(String name, String ownerDTD, String value, boolean isParameter) { - super(name, ownerDTD, null, null); - this.value = value; - this.isParameter = isParameter; - } - - /** - * Constructor for external Entities. - * - * @param name - * Name of the Entity. - * @param externalID - * The reference(s) to the external entity to retrieve. - * @param isParameter - * =true if a parameter Entity; otherwise =false. - * @param ndata - * The notation associated with the binary Entity, or <var>null</var> - * if the Entity is a text Entity. - * @see sax.ExternalID - */ - public EntityDecl(String name, String ownerDTD, ExternalID externalID, boolean isParameter, String ndata) { - super(name, ownerDTD, null, null); - this.externalID = externalID; - this.isParameter = isParameter; - this.ndata = ndata; - } - - /** - * Returns whether this Entity is a parameter Entity. - * - * @return =true if an internal parameter Entity; otherwise =false. - */ - public boolean isParameter() { - return this.isParameter; - } - - /** - * Returns the value of this Entity. - * - * @return The XML-encoded value that was directly assigned to the - * internal Entity; otherwise, <var>null</var>. - */ - public String getValue() { - return this.value; - } - - public boolean isEntityReferenced() { - return entityReferenced; - } - - public void setEntityReferenced(boolean reference) { - entityReferenced = reference; - } - - - /** - * Returns the system identifier of the Notation. A system identifier is a - * URI, which may be used to retrieve an external entity's content. - * <p> - * This method is defined by DOM. - * - * @return The system identifier, or <var>null</var> if the identifier is - * not defined. - * @see org.eclipcse.wst.dtd.parser.ExternalID#getSystemLiteral - */ - public String getSystemId() { - if (externalID == null) - return null; - else - return this.externalID.getSystemLiteral(); - } - - /** - * Sets the system identifier of the Notation. A system identifier is a - * URI, which may be used to retrieve an external entity's content. - * <p> - * This method is defined by DOM. - * - * @param systemIdentifier - * The system identifier. - * @see org.eclipcse.wst.dtd.parser.ExternalID - */ - public void setSystemId(String systemIdentifier) { - // System.out.println("setSYstemId - externalId: " + externalID); - this.externalID = new ExternalID(this.externalID.getPubIdLiteral(), systemIdentifier); - } - - /** - * Returns the public identifier of the Notation. This value is only valid - * if the identifier is defined as <var>public</var> (as opposed to - * <var>system</var>). Public identifiers may be used to try to generate - * an alternative URI in order to retrieve the an external entities - * content. If retrieval fails using the public identifier, an attempt - * must be made to retrieve content using the system identifier. - * <p> - * This method is defined by DOM. - * - * @return The public identifier, or <var>null</var> if the identifier is - * not defined. - * @see org.eclipcse.wst.dtd.parser.ExternalID - */ - public String getPublicId() { - if (externalID == null) - return null; - else - return this.externalID.getPubIdLiteral(); - } - - /** - * Sets the public identifier of the Notation. This value is only valid if - * the identifier is defined as <var>public</var> (as opposed to - * <var>system</var>). Public identifiers may be used to try to generate - * an alternative URI in order to retrieve the an external entities - * content. If retrieval fails using the public identifier, an attempt - * must be made to retrieve content using the system identifier. - * <p> - * This method is defined by DOM. - * - * @param publicIdentifier - * The public identifier. - * @see #getPublicId - * @see org.eclipcse.wst.dtd.parser.ExternalID - */ - public void setPublicId(String publicIdentifier) { - this.externalID = new ExternalID(publicIdentifier, this.externalID.getSystemLiteral()); - } - - /** - * Returns the external ID of this Entity. - * - * @return The reference(s) to the external entity to retrieve; otherwise, - * <var>null</var>. - * @see org.eclipcse.wst.dtd.parser.ExternalID - */ - public ExternalID getExternalID() { - return this.externalID; - } - - /** - * Returns whether this entity value is external. - * - * @return =true if entity is external; otherwise, =false. - * @see org.eclipcse.wst.dtd.parser.ExternalID - */ - public boolean isExternal() { - return this.externalID != null; - } - - /** - * Returns the notation associated with this Entity. - * - * @return The notation associated with the external binary Entity, - * otherwise, <var>null</var>. - */ - public String getNotation() { - return this.ndata; - } - - public void setNotation(String ndata) { - this.ndata = ndata; - } - - /** - * Returns the notation associated with this Entity. - * <p> - * This method is defined by DOM. - * - * @return The notation associated with the external binary Entity, - * otherwise, <var>null</var>. - */ - public String getNotationName() { - return this.ndata; - } - - /** - * <p> - * This method is defined by DOM. - * - * public void setNotationName(String arg) { this.ndata = arg; } - */ - - /** - * Returns whether there is a notation associated with this entity value. - * - * @return =true if the external binary entity contains a notation; - * otherwise, =false. - */ - public boolean isNotation() { - return this.ndata != null; - } - - public void setValue(String s) { - this.value = s; - } - - public void setParsed(boolean p) { - this.parsed = p; - } - - public boolean getParsed() { - return this.parsed; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityPool.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityPool.java deleted file mode 100644 index 76bd1fef21..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityPool.java +++ /dev/null @@ -1,72 +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.saxparser; - -import java.util.Enumeration; -import java.util.Hashtable; - -public class EntityPool { - private Hashtable m_entity = new Hashtable(); - private Hashtable m_para = new Hashtable(); // parameter references - - public EntityPool() { - } - - public boolean add(EntityDecl entity) { - String name = entity.getNodeName(); - if (entity.isParameter()) { - if (m_para.containsKey(name)) - return false; - m_para.put(name, entity); - } - else { - if (m_entity.containsKey(name)) - return false; - m_entity.put(name, entity); - } - return true; - } - - public EntityDecl refer(String name) { - return (EntityDecl) m_entity.get(name); - } - - public EntityDecl referPara(String name) { - return (EntityDecl) m_para.get(name); - } - - /** - * Return an <CODE>Enumeration</CODE> of <CODE>EntityDecl</CODE>. - * - * @see org.eclipcse.wst.dtd.parser.EntityDecl - */ - public Enumeration elements() { - return m_entity.elements(); - } - - /** - * Return an <CODE>Enumeration</CODE> of <CODE>EntityDecl</CODE> for - * parameter entities. - * - * @see org.eclipcse.wst.dtd.parser.EntityDecl - */ - public Enumeration parameterEntityElements() { - return m_para.elements(); - } - - /** - * For DTD#getEntities(); - */ - Hashtable getEntityHash() { - return this.m_entity; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ErrorMessage.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ErrorMessage.java deleted file mode 100644 index 60123400ca..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ErrorMessage.java +++ /dev/null @@ -1,114 +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.saxparser; - - - -public class ErrorMessage { - private int errorLine, errorColumn, severity; - private String errorString; - - - public ErrorMessage() { - } - - public void setErrorMessage(String error) { - errorString = error; - } - - public void setSeverity(int severity) { - this.severity = severity; - } - - public void setSeverity(String severity) { - if (severity == "warning") { //$NON-NLS-1$ - this.severity = 0; - } - else if (severity == "error") { //$NON-NLS-1$ - this.severity = 1; - } - else if (severity == "fatal") { //$NON-NLS-1$ - this.severity = 2; - } - } - - public void setErrorLine(int line) { - errorLine = line; - } - - public void setErrorColumn(int column) { - errorColumn = column; - } - - public String getErrorMessage() { - return errorString; - } - - public int getSeverity() { - return severity; - } - - public int getErrorLine() { - return errorLine; - } - - public int getErrorColumn() { - return errorColumn; - } - - private int startOffset = -1; - - public void setErrorStartOffset(int start) { - startOffset = start; - } - - public int getErrorStartOffset() { - return startOffset; - } - - private int endOffset = -1; - - public void setErrorEndOffset(int end) { - endOffset = end; - } - - public int getErrorEndOffset() { - return endOffset; - } - - - Object object; - - /** - * Get the value of the closest object to the error. - * - * @return value of object. - */ - public Object getObject() { - return object; - } - - /** - * Set the value of closest object to the error. - * - * @param v - * Value to assign to object. - */ - public void setObject(Object v) { - this.object = v; - } - - - public void addNewErrorMessageLine(String newLine) { - errorString += "\n" + newLine; //$NON-NLS-1$ - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ExternalID.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ExternalID.java deleted file mode 100644 index 1eb009d3a4..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ExternalID.java +++ /dev/null @@ -1,154 +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.saxparser; - -public class ExternalID { - private static final int T_SYSTEM = 0; - private static final int T_PUBLIC = 1; - - int type = T_PUBLIC; - String publicID = null; - String systemID = null; - - /** - * Constructor for system IDs. - * - * @param systemID - * URI, which may be used to retrieve an external entity's - * content. - */ - public ExternalID(String systemID) { - this.type = T_SYSTEM; - this.publicID = null; - this.systemID = systemID; - } - - /** - * Constructor for public and system IDs. - * - * @param publicID - * Identifier to be used to try to generate an alternative URI - * in order to retrieve the external entity's content, or - * <var>null</var> if a system identitier is to be - * constructed. - * @param systemID - * URI, which may be used to retrieve an external entity's - * content. - */ - public ExternalID(String publicID, String systemID) { - this.type = T_PUBLIC; - this.publicID = publicID; - this.systemID = systemID; - if (null == this.publicID) - this.type = T_SYSTEM; - } - - /** - * Returns if this external ID is a system ID (or public ID). - * - * @return System ID=true, Public ID=false. - * @see #isPublic - */ - public boolean isSystem() { - return this.type == T_SYSTEM; - } - - /** - * Returns if this external ID is a public ID (or system ID). - * - * @return Public ID=true, System ID=false. - * @see #isSystem - */ - public boolean isPublic() { - return this.type == T_PUBLIC; - } - - /** - * Returns the system identifier of this external ID. A system identifier - * is a URI, which may be used to retrieve an external entity's content. - * - * @return The system identifier, or <var>null</var> if the identifier is - * not defined. - * @see #getPubidLiteral - */ - public String getSystemLiteral() { - return this.systemID; - } - - /** - * Returns the public identifier of this external ID. This value is only - * valid if the identifier is defined as <var>public</var> (as opposed to - * <var>system</var>). Public identifiers may be used to try to generate - * an alternative URI in order to retrieve an external entity's content. - * If retrieval fails using the public identifier, an attempt must be made - * to retrieve content using the system identifier. - * - * @return The public identifier, or <var>null</var> if the identifier is - * not defined. - * @see #getSystemLiteral - */ - public String getPubIdLiteral() { - return this.publicID; - } - - /** - * Returns this external ID in the format it was declared: <CODE>SYSTEM - * "<VAR>systemID</VAR>"</CODE> or <CODE>PUBLIC "<VAR>publicID</VAR>" - * "<VAR>systemID</VAR>"</CODE>. - * - * @return XML string representing the content of the external ID (never - * <var>null</var>). - */ - public String toString() { - String ret; - if (isSystem()) { - ret = "SYSTEM \"" + getSystemLiteral() + "\""; //$NON-NLS-1$ //$NON-NLS-2$ - } - else if (null != getSystemLiteral()) { - ret = "PUBLIC \"" + getPubIdLiteral() + "\" \"" + getSystemLiteral() + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - else { - ret = "PUBLIC \"" + getPubIdLiteral() + "\""; // for NOTATION //$NON-NLS-1$ //$NON-NLS-2$ - } - return ret; - } - - /** - * - */ - public boolean equals(Object obj) { - if (obj == null) - return false; - if (!(obj instanceof ExternalID)) - return false; - ExternalID eid = (ExternalID) obj; - if (!((eid.publicID == null && this.publicID == null) || eid.publicID != null && eid.publicID.equals(this.publicID))) - return false; - if (!((eid.systemID == null && this.systemID == null) || eid.systemID != null && eid.systemID.equals(this.systemID))) - return false; - return true; - } - - - /** - * - */ - public int hashCode() { - int retval = 0; - if (publicID != null) - retval = publicID.hashCode(); - if (systemID != null) - retval += systemID.hashCode(); - return retval; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/NotationDecl.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/NotationDecl.java deleted file mode 100644 index d915801b48..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/NotationDecl.java +++ /dev/null @@ -1,77 +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.saxparser; - -/** - * Notations are how the Document Type Description (DTD) records hints about - * the format of an XML "unparsed entity" -- in other words, non-XML data - * bound to this document type, which some applications may wish to consult - * when manipulating the document. A Notation represents a name-value pair, - * with its nodeName being set to the declared name of the notation. - */ -public class NotationDecl extends BaseNode { - /** Public identifier. */ - protected String publicId = null; - - /** System identifier. */ - protected String systemId = null; - - // - // Constructors - // - - /** Factory constructor. */ - public NotationDecl(String name, String ownerDTD) { - super(name, ownerDTD); - } - - // - // Notation methods - // - - /** - * The Public Identifier for this Notation. If no public identifier was - * specified, this will be null. - */ - public String getPublicId() { - return publicId; - } // getPublicId():String - - /** - * The System Identifier for this Notation. If no system identifier was - * specified, this will be null. - */ - public String getSystemId() { - return systemId; - } // getSystemId():String - - // - // Public methods - // - - /** - * NON-DOM: The Public Identifier for this Notation. If no public - * identifier was specified, this will be null. - */ - public void setPublicId(String id) { - publicId = id; - } // setPublicId(String) - - /** - * NON-DOM: The System Identifier for this Notation. If no system - * identifier was specified, this will be null. - */ - public void setSystemId(String id) { - systemId = id; - } // setSystemId(String) - -} // class NotationImpl diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/StringParser.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/StringParser.java deleted file mode 100644 index 799b74beb8..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/StringParser.java +++ /dev/null @@ -1,485 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 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.saxparser; - -/** - * Reader for processing/parsing xml string - * - * @version - */ -public class StringParser { - String fData = null; - int fEndOffset; - int fMostRecentChar; - int fCurrentOffset; - boolean fCalledCharPropInit = false; - - public StringParser(String data) { - fData = data; - fCurrentOffset = 0; - fEndOffset = fData.length(); - fMostRecentChar = fEndOffset == 0 ? -1 : fData.charAt(0); - } - - public String getString(int offset, int length) { - if (length == 0) - return ""; //$NON-NLS-1$ - return fData.substring(offset, offset + length); - } - - public String getData() { - return fData; - } - - public String getRemainingString() { - return fData.substring(getCurrentOffset()); - } - - public int getCurrentOffset() { - return fCurrentOffset; - } - - // - // - public int loadNextChar() { - if (++fCurrentOffset >= fEndOffset) { - fMostRecentChar = -1; - } - else { - fMostRecentChar = fData.charAt(fCurrentOffset); - } - return fMostRecentChar; - } - - public int loadPreviousChar() { - if (--fCurrentOffset < 0) - fMostRecentChar = -1; - else - fMostRecentChar = fData.charAt(fCurrentOffset); - return fMostRecentChar; - } - - // - // - public boolean lookingAtChar(char chr, boolean skipPastChar) { - int ch = fMostRecentChar; - if (ch != chr) { - return false; - } - if (skipPastChar) { - if (++fCurrentOffset >= fEndOffset) { - fMostRecentChar = -1; - } - else { - fMostRecentChar = fData.charAt(fCurrentOffset); - } - } - return true; - } - - // - // - // - public boolean lookingAtValidChar(boolean skipPastChar) { - int ch = fMostRecentChar; - if (ch < 0xD800) { - if (ch < 0x20 && ch != 0x09 && ch != 0x0A && ch != 0x0D) { - return false; - } - if (skipPastChar) { - if (++fCurrentOffset >= fEndOffset) { - fMostRecentChar = -1; - } - else { - fMostRecentChar = fData.charAt(fCurrentOffset); - } - } - return true; - } - if (ch > 0xFFFD) { - return false; - } - if (ch < 0xDC00) { - if (fCurrentOffset + 1 >= fEndOffset) { - return false; - } - ch = fData.charAt(fCurrentOffset + 1); - if (ch < 0xDC00 || ch >= 0xE000) { - return false; - } - else if (!skipPastChar) { - return true; - } - else { - fCurrentOffset++; - } - } - else if (ch < 0xE000) { - return false; - } - if (skipPastChar) { - if (++fCurrentOffset >= fEndOffset) { - fMostRecentChar = -1; - } - else { - fMostRecentChar = fData.charAt(fCurrentOffset); - } - } - return true; - } - - // - // - // - public boolean lookingAtSpace(boolean skipPastChar) { - int ch = fMostRecentChar; - if (ch > 0x20) - return false; - if (ch == 0x20 || ch == 0x0A || ch == 0x0D || ch == 0x09) { - if (skipPastChar) { - loadNextChar(); - } - return true; - } - return false; - } - - // - // - // - public void skipToChar(char chr, boolean skipPastChar) { - // - // REVISIT - this will skip invalid characters without reporting them. - // - int ch = fMostRecentChar; - while (true) { - if (ch == chr) { - if (skipPastChar) { - loadNextChar(); - } - return; - } - if (ch == -1) { - return; - } - ch = loadNextChar(); - } - } - - /** - * skips to the last occurrence of the specified character. - * if <code>skipPastChar</code> is true, the parser is - * incremented past the last occurrence of the character. - * This method starts at the end of the character data, and - * moves backwards to find the last occurrence of the character - */ - public void skipToLastOfChar(char chr, boolean skipPastChar) { - int ch = -1; - - // Move the cursor to the end offset to scan backwards. - fCurrentOffset = fEndOffset; - - do { - ch = loadPreviousChar(); - - if(ch == -1) - return; - - if (ch == chr) { - if(skipPastChar) - loadNextChar(); - return; - } - - } while(true); - } - - // - // - // - public void skipPastSpaces() { - int ch = fMostRecentChar; - if (ch == -1) { - // changeReaders().skipPastSpaces(); - return; - } - while (true) { - if (ch > 0x20 || (ch != 0x20 && ch != 0x0A && ch != 0x09 && ch != 0x0D)) { - fMostRecentChar = ch; - return; - } - if (++fCurrentOffset >= fEndOffset) { - return; - } - ch = fData.charAt(fCurrentOffset); - } - } - - // - // - // - - public void skipPastNameAndPEReference(char fastcheck) { - int ch = fMostRecentChar; - - if (ch != '%') { - if (ch < 0x80) { - if (ch == -1 || XMLCharacterProperties.fgAsciiInitialNameChar[ch] == 0) - return; - } - else { - if (!fCalledCharPropInit) { - XMLCharacterProperties.initCharFlags(); - fCalledCharPropInit = true; - } - if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_InitialNameCharFlag) == 0) - return; - } - } - while (true) { - ch = loadNextChar(); - if (fastcheck == ch) - return; - if (ch == '%' || ch == ';') { - continue; - } - - if (ch < 0x80) { - if (ch == -1 || XMLCharacterProperties.fgAsciiNameChar[ch] == 0) - return; - } - else { - if (!fCalledCharPropInit) { - XMLCharacterProperties.initCharFlags(); - fCalledCharPropInit = true; - } - if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_NameCharFlag) == 0) - return; - } - } - } - - public void skipPastName(char fastcheck) { - int ch = fMostRecentChar; - // System.out.println("skippastName ch: " +ch); - - if (ch < 0x80) { - if (ch == -1 || XMLCharacterProperties.fgAsciiInitialNameChar[ch] == 0) - return; - } - else { - if (!fCalledCharPropInit) { - XMLCharacterProperties.initCharFlags(); - fCalledCharPropInit = true; - } - if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_InitialNameCharFlag) == 0) - return; - } - - while (true) { - ch = loadNextChar(); - if (fastcheck == ch) - return; - if (ch < 0x80) { - if (ch == -1 || XMLCharacterProperties.fgAsciiNameChar[ch] == 0) - return; - } - else { - if (!fCalledCharPropInit) { - XMLCharacterProperties.initCharFlags(); - fCalledCharPropInit = true; - } - if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_NameCharFlag) == 0) - return; - } - } - } - - // - // - // - - public void skipPastNmtoken(char fastcheck) { - int ch = fMostRecentChar; - while (true) { - if (fastcheck == ch) - return; - if (ch < 0x80) { - if (ch == -1 || XMLCharacterProperties.fgAsciiNameChar[ch] == 0) - return; - } - else { - if (!fCalledCharPropInit) { - XMLCharacterProperties.initCharFlags(); - fCalledCharPropInit = true; - } - if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_NameCharFlag) == 0) - return; - } - ch = loadNextChar(); - } - } - - public void skipPastNmtokenAndPEReference(char fastcheck) { - int ch = fMostRecentChar; - while (true) { - if (fastcheck == ch) - return; - if (ch == '%' || ch == ';') { - ch = loadNextChar(); - continue; - } - if (ch < 0x80) { - if (ch == -1 || XMLCharacterProperties.fgAsciiNameChar[ch] == 0) - return; - } - else { - if (!fCalledCharPropInit) { - XMLCharacterProperties.initCharFlags(); - fCalledCharPropInit = true; - } - if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_NameCharFlag) == 0) - return; - } - ch = loadNextChar(); - } - } - - // - // - // - public boolean skippedString(char[] s) { - int ch = fMostRecentChar; - if (ch != s[0]) { - return false; - } - if (fCurrentOffset + s.length > fEndOffset) - return false; - for (int i = 1; i < s.length; i++) { - if (fData.charAt(fCurrentOffset + i) != s[i]) - return false; - } - fCurrentOffset += (s.length - 1); - loadNextChar(); - return true; - } - - // - // - // - public int scanInvalidChar() throws Exception { - int ch = fMostRecentChar; - loadNextChar(); - return ch; - } - - // - // - // - /* - * public int scanCharRef(boolean hex) throws Exception { int ch = - * fMostRecentChar; if (ch == -1) // return - * changeReaders().scanCharRef(hex); return ch; int num = 0; if (hex) { if - * (ch > 'f' || XMLCharacterProperties.fgAsciiXDigitChar[ch] == 0) return - * XMLEntityHandler.CHARREF_RESULT_INVALID_CHAR; num = ch - (ch < 'A' ? - * '0' : (ch < 'a' ? 'A' : 'a') - 10); } else { if (ch < '0' || ch > '9') - * return XMLEntityHandler.CHARREF_RESULT_INVALID_CHAR; num = ch - '0'; } - * boolean toobig = false; while (true) { ch = loadNextChar(); if (ch == - * -1) return XMLEntityHandler.CHARREF_RESULT_SEMICOLON_REQUIRED; if (hex) { - * if (ch > 'f' || XMLCharacterProperties.fgAsciiXDigitChar[ch] == 0) - * break; } else { if (ch < '0' || ch > '9') break; } if (hex) { int dig = - * ch - (ch < 'A' ? '0' : (ch < 'a' ? 'A' : 'a') - 10); num = (num << 4) + - * dig; } else { int dig = ch - '0'; num = (num * 10) + dig; } if (num > - * 0x10FFFF) { toobig = true; num = 0; } } if (ch != ';') return - * XMLEntityHandler.CHARREF_RESULT_SEMICOLON_REQUIRED; loadNextChar(); if - * (toobig) return XMLEntityHandler.CHARREF_RESULT_OUT_OF_RANGE; return - * num; } - */ - // - // - // - /* - * public int scanStringLiteral() throws Exception { boolean single; if - * (!(single = lookingAtChar('\'', true)) && !lookingAtChar('\"', true)) { - * return XMLEntityHandler.STRINGLIT_RESULT_QUOTE_REQUIRED; } int offset = - * fCurrentOffset; char qchar = single ? '\'' : '\"'; while - * (!lookingAtChar(qchar, false)) { if (!lookingAtValidChar(true)) { - * return XMLEntityHandler.STRINGLIT_RESULT_INVALID_CHAR; } } // int - * stringIndex = addString(offset, fCurrentOffset - offset); int - * stringIndex = addString(offset, fCurrentOffset - offset); - * lookingAtChar(qchar, true); // move past qchar return stringIndex; } - */ - - // - // - public boolean scanAttValue(char qchar) { - boolean result = true; - while (true) { - if (lookingAtChar(qchar, false)) { - break; - } - if (lookingAtChar(' ', true)) { - continue; - } - if (!lookingAtValidChar(true)) { - result = false; - } - } - lookingAtChar(qchar, true); - return result; - } - - // - // [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' - // | "'" ([^%&'] | PEReference | Reference)* "'" - // - // The values in the following table are defined as: - // - // 0 - not special - // 1 - quote character - // 2 - reference - // 3 - peref - // 4 - invalid - // - public static final byte fgAsciiEntityValueChar[] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 4, 4, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 1, 0, 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, // '\"', - // '%', - // '&', - // '\'' - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - - /* - * public int scanEntityValue(int qchar, boolean createString) throws - * Exception { int offset = fCurrentOffset; int ch = fMostRecentChar; - * while (true) { if (ch == -1) { changeReaders(); // do not call next - * reader, our caller may need to change the parameters return - * XMLEntityHandler.ENTITYVALUE_RESULT_END_OF_INPUT; } if (ch < 0x80) { - * switch (fgAsciiEntityValueChar[ch]) { case 1: // quote char if (ch == - * qchar) { if (!createString) return - * XMLEntityHandler.ENTITYVALUE_RESULT_FINISHED; int length = - * fCurrentOffset - offset; int result = length == 0 ? - * StringPool.EMPTY_STRING : addString(offset, length); loadNextChar(); - * return result; } // the other quote character is not special // fall - * through case 0: // non-special char if (++fCurrentOffset >= fEndOffset) { - * if (oweTrailingSpace) { oweTrailingSpace = false; ch = fMostRecentChar = ' '; } - * else { ch = fMostRecentChar = -1; } } else { ch = fMostRecentChar = - * fData.charAt(fCurrentOffset); } continue; case 2: // reference return - * XMLEntityHandler.ENTITYVALUE_RESULT_REFERENCE; case 3: // peref return - * XMLEntityHandler.ENTITYVALUE_RESULT_PEREF; case 4: // invalid return - * XMLEntityHandler.ENTITYVALUE_RESULT_INVALID_CHAR; } } else if (ch < - * 0xD800) { ch = loadNextChar(); } else if (ch >= 0xE000 && (ch <= 0xFFFD || - * (ch >= 0x10000 && ch <= 0x10FFFF))) { // // REVISIT - needs more code - * to check surrogates. // ch = loadNextChar(); } else { return - * XMLEntityHandler.ENTITYVALUE_RESULT_INVALID_CHAR; } } } - */ - - -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/TString.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/TString.java deleted file mode 100644 index 4b12e8981d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/TString.java +++ /dev/null @@ -1,350 +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.saxparser; - -import com.ibm.icu.util.StringTokenizer; - -/** - * This class provides static methods for some of the very used IString - * operations - */ - -public class TString { - private static final String ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; //$NON-NLS-1$ - private static final String ALPHANUMERIC = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; //$NON-NLS-1$ - private static final String NUMERIC = "0123456789"; //$NON-NLS-1$ - - // change all occurrences of oldPat to newPat - public static String change(String in, String oldPat, String newPat) { - if (oldPat.length() == 0) - return in; - if (oldPat.length() == 1 && newPat.length() == 1) - return in.replace(oldPat.charAt(0), newPat.charAt(0)); - - int lastIndex = 0; - int newIndex = 0; - StringBuffer newString = new StringBuffer(); - for (;;) { - newIndex = in.indexOf(oldPat, lastIndex); - if (newIndex != -1) { - newString.append(in.substring(lastIndex, newIndex) + newPat); - lastIndex = newIndex + oldPat.length(); - } - else { - newString.append(in.substring(lastIndex)); - break; - } - } - return newString.toString(); - } - - // change the occurrences of oldPat to newPat starting at startPosition - // for number of numChanges - // Note: the 1st char in the string has position of 0 - - public static String change(String in, String oldPat, String newPat, int startPos, int numChanges) { - if (oldPat.length() == 0) - return in; - if (oldPat.length() == 1 && newPat.length() == 1) - return in.replace(oldPat.charAt(0), newPat.charAt(0)); - - int inLen = in.length(); - - if (startPos >= inLen) - return in; - - int lastIndex = startPos; - int newIndex = 0; - int countChanges = 0; - - - StringBuffer newString = new StringBuffer(); - - for (;;) { - newIndex = in.indexOf(oldPat, lastIndex); - if (newIndex != -1) { - newString.append(in.substring(lastIndex, newIndex) + newPat); - lastIndex = newIndex + oldPat.length(); - countChanges++; - } - else { - newString.append(in.substring(lastIndex)); - break; - } - - if (countChanges == numChanges) { - newString.append(in.substring(lastIndex)); - break; - } - } - - return newString.toString(); - } - - public static String word(String in, int i) { - StringTokenizer st = new StringTokenizer(in); - if (i <= 0 || i > st.countTokens()) - return ""; //$NON-NLS-1$ - else { - String ret = new String(); - while (st.hasMoreTokens()) { - ret = st.nextToken(); - if (--i == 0) - return ret; - } - } - return ""; //$NON-NLS-1$ - } - - public static String words(String in, int i) { - StringTokenizer st = new StringTokenizer(in); - if (i <= 0 || i > st.countTokens()) - return ""; //$NON-NLS-1$ - else { - while (st.hasMoreTokens()) { - if (--i == 0) - break; - st.nextToken(); - } - if (st.hasMoreTokens()) - return st.nextToken(""); //$NON-NLS-1$ - else - return ""; //$NON-NLS-1$ - } - } - - public static String appendSpaces(String in, int len) { - if (len < 1) - return in; - - StringBuffer sb = new StringBuffer(in); - for (int i = 0; i < len; i++) { - sb.append(" "); //$NON-NLS-1$ - } - return sb.toString(); - } - - public static int numWords(String in) { - StringTokenizer st = new StringTokenizer(in); - return st.countTokens(); - } - - // return the first index within srcString that is not in the validString - // example: - // srcString = "abcdefg" - // validString = "bcfg" - // return = 0 (i.e. char a is not in "bcfg") - 1st index = 0 - - public static int indexOfAnyBut(String srcString, String validString) { - int result = -1; - int srcLen = srcString.length(); - - // walk backward to find if a char within srcString is in validString - for (int i = 0; i < srcLen; i++) { - // not found, stop it - if (validString.indexOf(srcString.charAt(i)) == -1) { - result = i; - break; - } - - } - - return result; - } - - // return the last index within srcString that is not in the validString - // example: - // srcString = "abcdefg" - // validString = "bcfg" - // return = 4 (i.e. char e is not in "bcfg") - 1st index = 0 - - public static int lastIndexOfAnyBut(String srcString, String validString) { - int result = -1; - int srcLen = srcString.length(); - - // walk backward to find if a char within srcString is in validString - for (int i = srcLen - 1; i >= 0; i--) { - // not found, stop it - if (validString.indexOf(srcString.charAt(i)) == -1) { - result = i; - break; - } - - } - - return result; - } - - // return number of occurrences of searchChar within srcString - // example: - // srcString = "::f::f::g" - // seachrChar = ':' - // return = 6 - - public static int occurrenceOf(String srcString, char searchChar) { - int result = 0; - // walk backward to find if a char within srcString is in validString - if (srcString.length() > 0) { - - for (int i = 0; i < srcString.length(); i++) { - // found, increment the count - if (searchChar == srcString.charAt(i)) - result++; - } - } - - return result; - } - - // strip the leading pString in the srcString - // example: - // srcString = "::f::f::g" - // pString "::" - // return = "f::f::g" - - public static String stripLeading(String srcString, String pString) { - String result; - - if (srcString.startsWith(pString)) // leading patString found - result = srcString.substring(pString.length(), srcString.length()); - else - // not found - result = srcString; - - return result; - } - - // strip the trailing pString in the srcString - // example: - // srcString = "f::f::g::" - // pString "::" - // return = "f::f::g" - - public static String stripTrailing(String srcString, String pString) { - String result; - - if (srcString.endsWith(pString)) // leading patString found - result = srcString.substring(0, srcString.lastIndexOf(pString)); - else - // not found - result = srcString; - - return result; - } - - /** - * strip the trailing blanks in the src - */ - public static String stripTrailingBlanks(String src) { - - if (src != null) { - while (src.length() > 0) { - if (src.endsWith(" ")) //$NON-NLS-1$ - src = src.substring(0, src.length() - 1); - else - break; - } - } - - return src; - } - - - - // return a string that contains number of copies of srcString - // example: - // srcString = "abc" - // numberOfCopies = 2 - // return string = "abcabc" - - public static String copy(String srcString, int numberOfCopies) { - StringBuffer result = new StringBuffer(); - - if (numberOfCopies > 0) { - for (int i = 1; i <= numberOfCopies; i++) - result.append(srcString); - } - else - result = new StringBuffer(srcString); - - return result.toString(); - } - - // - // return true if all chars in srcString are in {a...z} or {A...Z} - - public static boolean isAlphabetic(String srcString) { - return (lastIndexOfAnyBut(srcString, ALPHABET) == -1); - } - - // - // return true if all chars in srcString are in {a...z,} or {A...Z} - // {0...9} - - public static boolean isAlphanumeric(String srcString) { - return (lastIndexOfAnyBut(srcString, ALPHANUMERIC) == -1); - } - - - // - // return true if all chars are in '0' - '9' - - public static boolean isDigits(String srcString) { - return (lastIndexOfAnyBut(srcString, NUMERIC) == -1); - } - - - public static boolean isEmptyOrNull(String string) { - return string == null || string.length() == 0; - } - - - // - // return the string after the matching token is removed - public static String match(String in, String token) throws Exception { - if (in == null) - return null; - - in = in.trim(); - if (in.startsWith(token)) - return in.substring(token.length(), in.length()); - else - throw new Exception("Expected: " + token + " but got:" + word(in, 1)); //$NON-NLS-1$ //$NON-NLS-2$ - } - - public static long getLong(String str) { - try { - return Long.parseLong(str); - } - catch (Exception m) { - return 0; - } - } - - // return true if the " " appears within srcString - // example: - // srcString = "a m" - // return = true - - public static boolean containsDoubleBlanks(String srcString) { - String bb = " "; //$NON-NLS-1$ - char b = bb.charAt(0); - - if (srcString.length() > 0) { - for (int i = 0; i < (srcString.length() - 1); i++) { - if ((b == srcString.charAt(i)) & (b == srcString.charAt(i + 1))) - return true; - } - } - return false; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/XMLCharacterProperties.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/XMLCharacterProperties.java deleted file mode 100644 index 1c38034081..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/XMLCharacterProperties.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.saxparser; - -/** - * A class representing properties of characters according to various W3C - * recommendations - * - * XMLCharacterProperties provides convenience methods for commonly used - * character tests. - * - * For performance reasons, the tables used by the convenience methods are - * also public, and are directly accessed by performance critical routines. - * - */ - -public final class XMLCharacterProperties { - /* - * [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+ - * - * Note: This is the same as the ascii portion of the NameChar definition. - */ - /** - * Check to see if a string is a valid version string according to [26] in - * the XML 1.0 Recommendation - * - * @param version - * string to check - * @return true if version is a valid version string - */ - public static boolean validVersionNum(String version) { - if (version.length() == 0) - return false; - for (int i = 0; i < version.length(); i++) { - char ch = version.charAt(i); - if (ch > 'z' || fgAsciiNameChar[ch] == 0) - return false; - } - return true; - } - - /* - * [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* - */ - /** - * Check to see if a string is a valid encoding name according to [81] in - * the XML 1.0 Recommendation - * - * @param encoding - * string to check - * @return true if encoding is a valid encoding name - */ - public static boolean validEncName(String encoding) { - if (encoding.length() == 0) - return false; - char ch = encoding.charAt(0); - if (ch > 'z' || fgAsciiAlphaChar[ch] == 0) - return false; - for (int i = 1; i < encoding.length(); i++) { - ch = encoding.charAt(i); - if (ch > 'z' || fgAsciiEncNameChar[ch] == 0) - return false; - } - return true; - } - - /* - * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | - * [-'()+,./:=?;!*#@$_%] - */ - /** - * Check to see if a string is a valid public identifier according to [13] - * in the XML 1.0 Recommendation - * - * @param publicId - * string to check - * @return true if publicId is a valid public identifier - */ - public static int validPublicId(String publicId) { - if (publicId.length() == 0) - return -1; - for (int i = 0; i < publicId.length(); i++) { - char ch = publicId.charAt(i); - if (ch > 'z' || fgAsciiPubidChar[ch] == 0) - return i; - } - return -1; - } - - /* - * [5] Name ::= (Letter | '_' | ':') (NameChar)* - */ - /** - * Check to see if a string is a valid Name according to [5] in the XML - * 1.0 Recommendation - * - * @param name - * string to check - * @return true if name is a valid Name - */ - public static boolean validName(String name) { - XMLCharacterProperties.initCharFlags(); - if (name.length() == 0) - return false; - char ch = name.charAt(0); - if (ch > 'z') { - if ((fgCharFlags[ch] & E_InitialNameCharFlag) == 0) - return false; - } - else if (fgAsciiInitialNameChar[ch] == 0) - return false; - for (int i = 1; i < name.length(); i++) { - ch = name.charAt(i); - if (ch > 'z') { - if ((fgCharFlags[ch] & E_NameCharFlag) == 0) - return false; - } - else if (fgAsciiNameChar[ch] == 0) - return false; - } - return true; - } - - /* - * from the namespace rec [5] NCName ::= (Letter | '_' | ':') - * (NameNCChar)* - */ - /** - * Check to see if a string is a valid NCName according to [5] from the - * XML Namespaces 1.0 Recommendation - * - * @param name - * string to check - * @return true if name is a valid NCName - */ - public static boolean validNCName(String name) { - XMLCharacterProperties.initCharFlags(); - if (name.length() == 0) - return false; - char ch = name.charAt(0); - if (ch > 'z') { - if ((fgCharFlags[ch] & E_InitialNameCharFlag) == 0) - return false; - } - else if (fgAsciiInitialNCNameChar[ch] == 0) - return false; - for (int i = 1; i < name.length(); i++) { - ch = name.charAt(i); - if (ch > 'z') { - if ((fgCharFlags[ch] & E_NameCharFlag) == 0) - return false; - } - else if (fgAsciiNCNameChar[ch] == 0) - return false; - } - return true; - } - - - /* - * [7] Nmtoken ::= (NameChar)+ - */ - /** - * Check to see if a string is a valid Nmtoken according to [7] in the XML - * 1.0 Recommendation - * - * @param nmtoken - * string to checj - * @return true if nmtoken is a valid Nmtoken - */ - public static boolean validNmtoken(String nmtoken) { - XMLCharacterProperties.initCharFlags(); - if (nmtoken.length() == 0) - return false; - for (int i = 0; i < nmtoken.length(); i++) { - char ch = nmtoken.charAt(i); - if (ch > 'z') { - if ((fgCharFlags[ch] & E_NameCharFlag) == 0) - return false; - } - else if (fgAsciiNameChar[ch] == 0) { - return false; - } - } - return true; - } - - /* - * Here are tables used to build character properties. - */ - public static final byte fgAsciiXDigitChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // '0' - // - - // '9' - 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 'A' - 'F' - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 'a' - // - - // 'f' - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - public static final byte fgAsciiAlphaChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - // - - // 'O' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, // 'P' - 'Z' - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z' - }; - public static final byte fgAsciiEncNameChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, // '-' - // is - // 0x2D - // and - // '.' - // is - // 0x2E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // '0' - '9' - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - 'O' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z' - // and '_' is - // 0x5F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z' - }; - public static final byte fgAsciiPubidChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // ' ', - // '!', - // '#', - // '$', - // '%', - // '\'', '(', ')', '*', '+', ',', '-', '.', '/' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, // '0' - '9', - // ':', ';', - // '=', '?' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // '@', 'A' - - // 'O' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z' - // and '_' is - // 0x5F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z' - }; - public static final byte fgAsciiInitialNameChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, // ':' - // is - // 0x3A - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - 'O' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z' - // and '_' is - // 0x5F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z' - }; - public static final byte fgAsciiNameChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, // '-' - // is - // 0x2D - // and - // '.' - // is - // 0x2E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, // '0' - '9' - // and ':' is - // 0x3A - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - 'O' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z' - // and '_' is - // 0x5F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z' - }; - public static final byte fgAsciiInitialNCNameChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ':' - // is - // 0x3A - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - 'O' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z' - // and '_' is - // 0x5F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z' - }; - public static final byte fgAsciiNCNameChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, // '-' - // is - // 0x2D - // and - // '.' - // is - // 0x2E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // '0' - '9' - // and ':' is - // 0x3A - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - 'O' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z' - // and '_' is - // 0x5F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o' - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z' - }; - public static final byte fgAsciiCharData[] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 4, 4, 4, 4, 4, // tab - // is - // 0x09 - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, // '&' - // is - // 0x26 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, // '<' is 0x3C - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, // ']' - // is - // 0x5D - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - public static final byte fgAsciiWSCharData[] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 4, 4, 5, 4, 4, // tab - // is - // 0x09, - // LF - // is - // 0x0A, - // CR - // is - // 0x0D - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ' ' - // is - // 0x20, - // '&' - // is - // 0x26 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, // '<' is 0x3C - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, // ']' - // is - // 0x5D - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - public static final byte E_CharDataFlag = 1 << 0; - public static final byte E_InitialNameCharFlag = 1 << 1; - public static final byte E_NameCharFlag = 1 << 2; - public static byte[] fgCharFlags = null; - - public static synchronized void initCharFlags() { - if (fgCharFlags == null) { - fgCharFlags = new byte[0x10000]; - setFlagForRange(fgCharDataRanges, E_CharDataFlag); - setFlagForRange(fgInitialNameCharRanges, (byte) (E_InitialNameCharFlag | E_NameCharFlag)); - setFlagForRange(fgNameCharRanges, E_NameCharFlag); - } - } - - private static void setFlagForRange(char[] ranges, byte flag) { - int i; - int ch; - for (i = 0; (ch = ranges[i]) != 0; i += 2) { - int endch = ranges[i + 1]; - while (ch <= endch) - fgCharFlags[ch++] |= flag; - } - for (i++; (ch = ranges[i]) != 0; i++) - fgCharFlags[ch] |= flag; - } - - /* - * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] // any Unicode character, - * excluding the | [#xE000-#xFFFD] | [#x10000-#x10FFFF] // surrogate - * blocks, FFFE, and FFFF. [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) - * - * We will use Char - ( [^<&] | ']' | #xA | #xD ) and handle the special - * cases inline. - */ - private static final char fgCharDataRanges[] = {0x0020, 0x0025, // '&' is - // 0x0026 - 0x0027, 0x003B, // '<' is 0x003C - 0x003D, 0x005C, // ']' is 0x005D - 0x005E, 0xD7FF, 0xE000, 0xFFFD, 0x0000, 0x0009, // tab - 0x0000}; - /* - * [5] Name ::= (Letter | '_' | ':') (NameChar)* [4] NameChar ::= Letter | - * Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [84] Letter - * ::= BaseChar | Ideographic [85] BaseChar ::= <see standard> [86] - * Ideographic ::= <see standard> [87] CombiningChar ::= <see standard> - * [88] Digit ::= <see standard> [89] Extender ::= <see standard> - */ - private static final char fgInitialNameCharRanges[] = { - // - // Ranges: - // - // BaseChar ranges - // - 0x0041, 0x005A, 0x0061, 0x007A, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x0131, 0x0134, 0x013E, 0x0141, 0x0148, 0x014A, 0x017E, 0x0180, 0x01C3, 0x01CD, 0x01F0, 0x01F4, 0x01F5, 0x01FA, 0x0217, 0x0250, 0x02A8, 0x02BB, 0x02C1, 0x0388, 0x038A, 0x038E, 0x03A1, 0x03A3, 0x03CE, 0x03D0, 0x03D6, 0x03E2, 0x03F3, 0x0401, 0x040C, 0x040E, 0x044F, 0x0451, 0x045C, 0x045E, 0x0481, 0x0490, 0x04C4, 0x04C7, 0x04C8, 0x04CB, 0x04CC, 0x04D0, 0x04EB, 0x04EE, 0x04F5, 0x04F8, 0x04F9, 0x0531, 0x0556, 0x0561, 0x0586, 0x05D0, 0x05EA, 0x05F0, 0x05F2, 0x0621, 0x063A, 0x0641, 0x064A, 0x0671, 0x06B7, 0x06BA, 0x06BE, 0x06C0, 0x06CE, 0x06D0, 0x06D3, 0x06E5, 0x06E6, 0x0905, 0x0939, 0x0958, 0x0961, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B6, 0x09B9, 0x09DC, 0x09DD, 0x09DF, 0x09E1, 0x09F0, 0x09F1, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A59, 0x0A5C, 0x0A72, 0x0A74, 0x0A85, 0x0A8B, 0x0A8F, 0x0A91, - 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B36, 0x0B39, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB5, 0x0BB7, 0x0BB9, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C33, 0x0C35, 0x0C39, 0x0C60, 0x0C61, 0x0C85, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CE0, 0x0CE1, 0x0D05, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D28, 0x0D2A, 0x0D39, 0x0D60, 0x0D61, 0x0E01, 0x0E2E, 0x0E32, 0x0E33, 0x0E40, 0x0E45, 0x0E81, 0x0E82, 0x0E87, 0x0E88, 0x0E94, 0x0E97, 0x0E99, 0x0E9F, 0x0EA1, 0x0EA3, 0x0EAA, 0x0EAB, 0x0EAD, 0x0EAE, 0x0EB2, 0x0EB3, 0x0EC0, 0x0EC4, 0x0F40, 0x0F47, 0x0F49, 0x0F69, 0x10A0, 0x10C5, 0x10D0, 0x10F6, 0x1102, 0x1103, 0x1105, 0x1107, 0x110B, 0x110C, 0x110E, 0x1112, 0x1154, 0x1155, 0x115F, 0x1161, 0x116D, 0x116E, - 0x1172, 0x1173, 0x11AE, 0x11AF, 0x11B7, 0x11B8, 0x11BC, 0x11C2, 0x1E00, 0x1E9B, 0x1EA0, 0x1EF9, 0x1F00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, 0x212A, 0x212B, 0x2180, 0x2182, 0x3041, 0x3094, 0x30A1, 0x30FA, 0x3105, 0x312C, 0xAC00, 0xD7A3, - // - // Ideographic ranges - // - 0x3021, 0x3029, 0x4E00, 0x9FA5, - // - // Ranges end marker - // - 0x0000, - // - // Single char values - // - 0x003A, // ':' - 0x005F, // '_' - // - // BaseChar singles - // - 0x0386, 0x038C, 0x03DA, 0x03DC, 0x03DE, 0x03E0, 0x0559, 0x06D5, 0x093D, 0x09B2, 0x0A5E, 0x0A8D, 0x0ABD, 0x0AE0, 0x0B3D, 0x0B9C, 0x0CDE, 0x0E30, 0x0E84, 0x0E8A, 0x0E8D, 0x0EA5, 0x0EA7, 0x0EB0, 0x0EBD, 0x1100, 0x1109, 0x113C, 0x113E, 0x1140, 0x114C, 0x114E, 0x1150, 0x1159, 0x1163, 0x1165, 0x1167, 0x1169, 0x1175, 0x119E, 0x11A8, 0x11AB, 0x11BA, 0x11EB, 0x11F0, 0x11F9, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2126, 0x212E, - // - // Ideographic singles - // - 0x3007, - // - // Singles end marker - // - 0x0000}; - private static final char fgNameCharRanges[] = { - // - // Ranges: - // - 0x002D, 0x002E, // '-' and '.' - // - // CombiningChar ranges - // - 0x0300, 0x0345, 0x0360, 0x0361, 0x0483, 0x0486, 0x0591, 0x05A1, 0x05A3, 0x05B9, 0x05BB, 0x05BD, 0x05C1, 0x05C2, 0x064B, 0x0652, 0x06D6, 0x06DC, 0x06DD, 0x06DF, 0x06E0, 0x06E4, 0x06E7, 0x06E8, 0x06EA, 0x06ED, 0x0901, 0x0903, 0x093E, 0x094C, 0x0951, 0x0954, 0x0962, 0x0963, 0x0981, 0x0983, 0x09C0, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CD, 0x09E2, 0x09E3, 0x0A40, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A70, 0x0A71, 0x0A81, 0x0A83, 0x0ABE, 0x0AC5, 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0B01, 0x0B03, 0x0B3E, 0x0B43, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, 0x0B56, 0x0B57, 0x0B82, 0x0B83, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0C01, 0x0C03, 0x0C3E, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C82, 0x0C83, 0x0CBE, 0x0CC4, 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0D02, 0x0D03, 0x0D3E, 0x0D43, 0x0D46, 0x0D48, 0x0D4A, 0x0D4D, 0x0E34, 0x0E3A, 0x0E47, 0x0E4E, 0x0EB4, 0x0EB9, 0x0EBB, 0x0EBC, 0x0EC8, 0x0ECD, 0x0F18, 0x0F19, 0x0F71, 0x0F84, 0x0F86, 0x0F8B, - 0x0F90, 0x0F95, 0x0F99, 0x0FAD, 0x0FB1, 0x0FB7, 0x20D0, 0x20DC, 0x302A, 0x302F, - // - // Digit ranges - // - 0x0030, 0x0039, 0x0660, 0x0669, 0x06F0, 0x06F9, 0x0966, 0x096F, 0x09E6, 0x09EF, 0x0A66, 0x0A6F, 0x0AE6, 0x0AEF, 0x0B66, 0x0B6F, 0x0BE7, 0x0BEF, 0x0C66, 0x0C6F, 0x0CE6, 0x0CEF, 0x0D66, 0x0D6F, 0x0E50, 0x0E59, 0x0ED0, 0x0ED9, 0x0F20, 0x0F29, - // - // Extender ranges - // - 0x3031, 0x3035, 0x309D, 0x309E, 0x30FC, 0x30FE, - // - // Ranges end marker - // - 0x0000, - // - // Single char values - // - // CombiningChar singles - // - 0x05BF, 0x05C4, 0x0670, 0x093C, 0x094D, 0x09BC, 0x09BE, 0x09BF, 0x09D7, 0x0A02, 0x0A3C, 0x0A3E, 0x0A3F, 0x0ABC, 0x0B3C, 0x0BD7, 0x0D57, 0x0E31, 0x0EB1, 0x0F35, 0x0F37, 0x0F39, 0x0F3E, 0x0F3F, 0x0F97, 0x0FB9, 0x20E1, 0x3099, 0x309A, - // - // Extender singles - // - 0x00B7, 0x02D0, 0x02D1, 0x0387, 0x0640, 0x0E46, 0x0EC6, 0x3005, - // - // Singles end marker - // - 0x0000}; -} diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationMessages.java b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationMessages.java deleted file mode 100644 index 8b7fafe715..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationMessages.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM - Initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.validation; - -import org.eclipse.osgi.util.NLS; - -/** - * Strings used by DTD Validation - * - * @plannedfor 1.0 - */ -public class DTDValidationMessages extends NLS { - public static String _ERROR_REF_ELEMENT_UNDEFINED; - - private static final String BUNDLE_NAME = "org.eclipse.wst.dtd.core.internal.validation.DTDValidationResources";//$NON-NLS-1$ - - static { - // load message values from bundle file - NLS.initializeMessages(BUNDLE_NAME, DTDValidationMessages.class); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationResources.properties b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationResources.properties deleted file mode 100644 index 131e64ccd4..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationResources.properties +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# Copyright (c) 2005, 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 -############################################################################### - -! -! Referenced Element Validation -! -_ERROR_REF_ELEMENT_UNDEFINED = The element {0} has not been declared.
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidator.java b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidator.java deleted file mode 100644 index c2ab0c1fe4..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidator.java +++ /dev/null @@ -1,449 +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.validation; - -import java.io.IOException; -import java.io.StringReader; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import com.ibm.icu.util.StringTokenizer; - -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.eclipse.osgi.util.NLS; -import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver; -import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin; -import org.eclipse.wst.xml.core.internal.validation.core.LazyURLInputStream; -import org.eclipse.wst.xml.core.internal.validation.core.ValidationInfo; -import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport; -import org.xml.sax.ContentHandler; -import org.xml.sax.EntityResolver; -import org.xml.sax.ErrorHandler; -import org.xml.sax.InputSource; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.XMLReader; -import org.xml.sax.ext.DeclHandler; -import org.xml.sax.ext.LexicalHandler; -import org.xml.sax.helpers.DefaultHandler; - -/** - * DTD validation. - */ -public class DTDValidator { - /** - * An entity resolver that wraps a URI resolver. - */ - class DTDEntityResolver implements EntityResolver { - private String fBaseLocation = null; - private URIResolver fURIResolver = null; - - /** - * Constructor. - * - * @param idresolver - * The idresolver this entity resolver wraps. - * @param baselocation - * The base location to resolve with. - */ - public DTDEntityResolver(URIResolver uriresolver, String baselocation) { - this.fURIResolver = uriresolver; - - // TODO cs: we never seem to set a URIResolver - // I create one here up front just incase - // - if (fURIResolver == null) - { - fURIResolver = URIResolverPlugin.createResolver(); - } - this.fBaseLocation = baselocation; - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, - * java.lang.String) - */ - public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { - String location = null; - - - if (fBaseLocation.equals(systemId)) { - location = systemId; - } - else { - location = fURIResolver.resolve(fBaseLocation, publicId, systemId); - } - InputSource is = null; - if (location != null && !location.equals("")) //$NON-NLS-1$ - { - // CS : while working on bug 113537 I noticed we're not using the LazyURLInputStream - // so fixed this to avoid leaking file handles - // - String physical = fURIResolver.resolvePhysicalLocation(fBaseLocation, publicId, location); - is = new InputSource(location); - is.setByteStream(new LazyURLInputStream(physical)); - } - return is; - } - } - - /** - * An error handler for DTD validation. - * - * @author Lawrence Mandel, IBM - */ - class DTDErrorHandler implements ErrorHandler { - - private final int ERROR = 0; - private final ValidationInfo fValidationInfo; - - private final int WARNING = 1; - - /** - * Constructor. - * - * @param valinfo - * The validation info object to use to register validation - * messages. - */ - public DTDErrorHandler(ValidationInfo valinfo) { - this.fValidationInfo = valinfo; - } - - /** - * Add a validation message with the given severity. - * - * @param exception - * The exception that contains the information about the - * message. - * @param severity - * The severity of the validation message. - */ - protected void addValidationMessage(SAXParseException exception, int severity) { - if (exception.getSystemId() != null) { - if (severity == WARNING) { - fValidationInfo.addWarning(exception.getLocalizedMessage(), exception.getLineNumber(), exception.getColumnNumber(), exception.getSystemId()); - } - else { - fValidationInfo.addError(exception.getLocalizedMessage(), exception.getLineNumber(), exception.getColumnNumber(), exception.getSystemId()); - } - } - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException) - */ - public void error(SAXParseException exception) throws SAXException { - addValidationMessage(exception, ERROR); - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException) - */ - public void fatalError(SAXParseException exception) throws SAXException { - addValidationMessage(exception, ERROR); - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException) - */ - public void warning(SAXParseException exception) throws SAXException { - addValidationMessage(exception, WARNING); - } - } - - class MultiHandler extends DefaultHandler implements org.xml.sax.DTDHandler, ContentHandler, LexicalHandler, DeclHandler { - private static final String ELEMENT_MODIFIERS = "*+?"; //$NON-NLS-1$ - - private static final String MODEL_DELIMITERS = ",()| "; //$NON-NLS-1$ - - private List fElemDecls = new ArrayList(); - - private Hashtable fElemRefs = new Hashtable(); - - private List fIgnoreElemModel = new ArrayList(); - - private List fIgnoreElemRefs = new ArrayList(); - - private Locator fLocator = null; - - public MultiHandler() { - fIgnoreElemRefs.add("#PCDATA"); //$NON-NLS-1$ - fIgnoreElemModel.add("ANY"); //$NON-NLS-1$ - fIgnoreElemModel.add("EMPTY"); //$NON-NLS-1$ - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.DeclHandler#attributeDecl(java.lang.String, - * java.lang.String, java.lang.String, java.lang.String, - * java.lang.String) - */ - public void attributeDecl(String eName, String aName, String type, String valueDefault, String value) throws SAXException { - // No method impl. - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int) - */ - public void comment(char[] arg0, int arg1, int arg2) throws SAXException { - // No method impl. - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.DeclHandler#elementDecl(java.lang.String, - * java.lang.String) - */ - public void elementDecl(String name, String model) throws SAXException { - // Add this element to the list of declared elements. - fElemDecls.add(name); - - // Return if the element model should be ignored. The model should - // be - // ignored in such cases as when it is equal to EMPTY or ANY. - if (fIgnoreElemModel.contains(model)) { - return; - } - // Add each referenced element to the list of referenced elements - int line = fLocator.getLineNumber(); - int column = fLocator.getColumnNumber(); - String uri = fLocator.getSystemId(); - - StringTokenizer strtok = new StringTokenizer(model, MODEL_DELIMITERS); - while (strtok.hasMoreTokens()) { - String token = strtok.nextToken(); - int tokenlength = token.length(); - if (ELEMENT_MODIFIERS.indexOf(token.charAt(tokenlength - 1)) != -1) { - token = token.substring(0, tokenlength - 1); - // If the token is now empty (it was only ?,* or +) then - // continue. - if (token.length() == 0) { - continue; - } - } - if (fIgnoreElemRefs.contains(token)) { - continue; - } - ElementRefLocation elemLoc = (ElementRefLocation) fElemRefs.get(token); - ElementRefLocation tokenLoc = new ElementRefLocation(line, column, uri, elemLoc); - fElemRefs.put(token, tokenLoc); - } - - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.LexicalHandler#endCDATA() - */ - public void endCDATA() throws SAXException { - // No method impl. - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.LexicalHandler#endDTD() - */ - public void endDTD() throws SAXException { - // No method impl. - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String) - */ - public void endEntity(String arg0) throws SAXException { - // No method impl. - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(java.lang.String, - * java.lang.String, java.lang.String) - */ - public void externalEntityDecl(String name, String publicId, String systemId) throws SAXException { - // No method impl. - } - - /** - * Get the list of element declarations. - * - * @return The list of element declarations. - */ - public List getElementDeclarations() { - return fElemDecls; - } - - /** - * Get the element references hashtable. - * - * @return The element references hashtable. - */ - public Hashtable getElementReferences() { - return fElemRefs; - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(java.lang.String, - * java.lang.String) - */ - public void internalEntityDecl(String name, String value) throws SAXException { - // No method impl. - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ContentHandler#setDocumentLocator(org.xml.sax.Locator) - */ - public void setDocumentLocator(Locator locator) { - super.setDocumentLocator(locator); - this.fLocator = locator; - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.LexicalHandler#startCDATA() - */ - public void startCDATA() throws SAXException { - // No method impl. - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.LexicalHandler#startDTD(java.lang.String, - * java.lang.String, java.lang.String) - */ - public void startDTD(String name, String publicId, String systemId) throws SAXException { - // No method impl. - } - - /* - * (non-Javadoc) - * - * @see org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String) - */ - public void startEntity(String name) throws SAXException { - // No method impl. - } - } - - - - private URIResolver fResolver = null; - - public DTDValidator() { - super(); - } - - /** - * Set the URI resolver to use with XSD validation. - * - * @param uriresolver - * The URI resolver to use. - */ - public void setURIResolver(URIResolver uriresolver) { - this.fResolver = uriresolver; - } - - /** - * Validate the DTD file located at the URI. - * - * @param uri - * The URI of the file to validate. - * @return A validation report for the validation. - */ - public ValidationReport validate(String uri) { - ValidationInfo valinfo = new ValidationInfo(uri); - try { - SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); - XMLReader reader = parser.getXMLReader(); - MultiHandler dtdHandler = new MultiHandler(); - reader.setProperty("http://xml.org/sax/properties/declaration-handler", dtdHandler); //$NON-NLS-1$ - reader.setProperty("http://xml.org/sax/properties/lexical-handler", dtdHandler); //$NON-NLS-1$ - reader.setContentHandler(dtdHandler); - reader.setDTDHandler(dtdHandler); - reader.setErrorHandler(new DTDErrorHandler(valinfo)); - reader.setEntityResolver(new DTDEntityResolver(fResolver, uri)); - String document = "<!DOCTYPE root SYSTEM \"" + uri + "\"><root/>"; //$NON-NLS-1$ //$NON-NLS-2$ - - reader.parse(new InputSource(new StringReader(document))); - - List elemDecls = dtdHandler.getElementDeclarations(); - Hashtable elemRefs = dtdHandler.getElementReferences(); - validateElementReferences(elemDecls, elemRefs, valinfo); - } - catch (ParserConfigurationException e) { - - } - catch (IOException e) { - - } - catch (SAXException e) { - - } - return valinfo; - } - - /** - * Validate the element references in the DTD. An element reference is - * <!ELEMENT elem (elementReference)> - * - * @param elemDecls - * A list of valid element declarations. - * @param elemRefs - * A hashtable containing element references as keys and - * locations in the document as values. - * @param valinfo - * The validation info object to store validation information. - */ - private void validateElementReferences(List elemDecls, Hashtable elemRefs, ValidationInfo valinfo) { - Enumeration keys = elemRefs.keys(); - while (keys.hasMoreElements()) { - String elemRef = (String) keys.nextElement(); - // If the element hasn't been declared create an error. - if (!elemDecls.contains(elemRef)) { - ElementRefLocation elemLoc = (ElementRefLocation) elemRefs.get(elemRef); - do { - valinfo.addError(NLS.bind(DTDValidationMessages._ERROR_REF_ELEMENT_UNDEFINED, "'" + elemRef + "'"), elemLoc.getLine(), elemLoc.getColumn(), elemLoc.getURI()); //$NON-NLS-1$ //$NON-NLS-2$ - elemLoc = elemLoc.getNext(); - } - while (elemLoc != null); - } - } - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/ElementRefLocation.java b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/ElementRefLocation.java deleted file mode 100644 index b1ff07ae2c..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/ElementRefLocation.java +++ /dev/null @@ -1,86 +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.validation; - -/** - * An element references location holds the location of an element reference. - * An element reference is declared in a DTD element declaration such as - * <!ELEMENT myelem (elementref)> An element reference may be part of a linked - * list and can contain a reference to the next element reference in the list. - * - * @author Lawrence Mandel, IBM - */ -class ElementRefLocation { - private int column = -1; - - private int line = -1; - - private ElementRefLocation next = null; - - private String uri; - - /** - * Constructor. - * - * @param line - * The line location of the element reference. - * @param column - * The column location of the element reference. - * @param uri - * The URI of the file containing the element reference. - * @param next - * The next element reference in the list. - */ - public ElementRefLocation(int line, int column, String uri, ElementRefLocation next) { - this.line = line; - this.column = column; - this.uri = uri; - this.next = next; - } - - /** - * Get the column location of the element reference. - * - * @return The column location of the element reference. - */ - public int getColumn() { - return column; - } - - /** - * Get the line location of the element reference. - * - * @return The line location of the element reference. - */ - public int getLine() { - return line; - } - - /** - * Get the next element reference in the linked list. - * - * @return The next element reference in the linked list. - */ - public ElementRefLocation getNext() { - return next; - } - - /** - * Get the URI of the file that contains the element reference. - * - * @return The URI of the file that contains the element reference. - */ - public String getURI() { - return uri; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/DTDValidator.java b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/DTDValidator.java deleted file mode 100644 index 9c44a6491a..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/DTDValidator.java +++ /dev/null @@ -1,50 +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.validation.eclipse; - -import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin; - -/** - * An DTD validator specific to Eclipse. This validator will wrap the internal - * DTD validator to provide automatic URI resolution support. - * Using this class is equivalent to using the internal DTD validator and registering - * the URI resolver from the URI resolution framework. - */ -public class DTDValidator extends - org.eclipse.wst.dtd.core.internal.validation.DTDValidator -{ - private static DTDValidator _instance = null; - - /** - * Constructor. Registers URI resolution framework with the DTD validator. - */ - protected DTDValidator() - { - super(); - setURIResolver(URIResolverPlugin.createResolver()); - } - - /** - * Get the one and only instance of the Eclipse specific DTD validator. - * - * @return - * The one and only instance of the Eclipse specific DTD validator. - */ - public static DTDValidator getInstance() - { - if (_instance == null) - { - _instance = new DTDValidator(); - } - return _instance; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/Validator.java b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/Validator.java deleted file mode 100644 index cb3940df9c..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/Validator.java +++ /dev/null @@ -1,38 +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.validation.eclipse; - -import java.io.InputStream; - -import org.eclipse.wst.xml.core.internal.validation.core.AbstractNestedValidator; -import org.eclipse.wst.xml.core.internal.validation.core.NestedValidatorContext; -import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport; - -/** - * DTD validator that is contributed to the validation framework. - */ -public class Validator extends AbstractNestedValidator -{ - - /* (non-Javadoc) - * @see org.eclipse.wst.xml.core.internal.validation.core.AbstractNestedValidator#validate(java.lang.String, java.io.InputStream, org.eclipse.wst.xml.core.internal.validation.core.NestedValidatorContext) - */ - public ValidationReport validate(String uri, InputStream inputstream, NestedValidatorContext context) - { - DTDValidator validator = DTDValidator.getInstance(); - - ValidationReport valreport = null; - valreport = validator.validate(uri); - - return valreport; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java deleted file mode 100644 index 9388699aad..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java +++ /dev/null @@ -1,375 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import java.util.Hashtable; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -// base class for an Element's contentmodel -public class Attribute extends DTDNode { - - public static final String CDATA = DTDCoreMessages._UI_CHARACTER_DATA_DESC; //$NON-NLS-1$ - public static final String ENTITIES = DTDCoreMessages._UI_ENTITY_NAMES_DESC; //$NON-NLS-1$ - public static final String ENTITY = DTDCoreMessages._UI_ENTITY_NAME_DESC; //$NON-NLS-1$ - public static final String ENUMERATED_NAME = DTDCoreMessages._UI_ENUM_NAME_TOKENS_DESC; //$NON-NLS-1$ - public static final String ENUMERATED_NOTATION = DTDCoreMessages._UI_ENUM_NOTATION_DESC; //$NON-NLS-1$ - public static final String FIXED = "#FIXED"; //$NON-NLS-1$ - public static final String ID = DTDCoreMessages._UI_IDENTIFIER_DESC; //$NON-NLS-1$ - public static final String IDREF = DTDCoreMessages._UI_ID_REFERENCE_DESC; //$NON-NLS-1$ - public static final String IDREFS = DTDCoreMessages._UI_ID_REFERENCES_DESC; //$NON-NLS-1$ - - public static final String IMPLIED = "#IMPLIED"; //$NON-NLS-1$ - public static final String NMTOKEN = DTDCoreMessages._UI_NAME_TOKEN_DESC; //$NON-NLS-1$ - public static final String NMTOKENS = DTDCoreMessages._UI_NAME_TOKENS_DESC; //$NON-NLS-1$ - public static final String REQUIRED = "#REQUIRED"; //$NON-NLS-1$ - - protected static Hashtable typeHash = new Hashtable(); - - public static final String[] types = {CDATA, ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS, ENUMERATED_NAME, ENUMERATED_NOTATION}; - - { - typeHash.put(DTDRegionTypes.CDATA_KEYWORD, CDATA); - typeHash.put(DTDRegionTypes.ID_KEYWORD, ID); - typeHash.put(DTDRegionTypes.IDREF_KEYWORD, IDREF); - typeHash.put(DTDRegionTypes.IDREFS_KEYWORD, IDREFS); - typeHash.put(DTDRegionTypes.ENTITY_KEYWORD, ENTITY); - typeHash.put(DTDRegionTypes.ENTITIES_KEYWORD, ENTITIES); - typeHash.put(DTDRegionTypes.NMTOKEN_KEYWORD, NMTOKEN); - typeHash.put(DTDRegionTypes.NMTOKENS_KEYWORD, NMTOKENS); - typeHash.put(DTDRegionTypes.NOTATION_KEYWORD, ENUMERATED_NOTATION); - // this one's a special case since there is no keyword for - // enumerated name tokens - typeHash.put("()", ENUMERATED_NAME); //$NON-NLS-1$ - - // now put the reverse in place. This gives us a 2 way lookup - // for when we want to retrieve the value and when we want to set it - typeHash.put(CDATA, "CDATA"); //$NON-NLS-1$ - typeHash.put(ID, "ID"); //$NON-NLS-1$ - typeHash.put(IDREF, "IDREF"); //$NON-NLS-1$ - typeHash.put(IDREFS, "IDREFS"); //$NON-NLS-1$ - typeHash.put(ENTITY, "ENTITY"); //$NON-NLS-1$ - typeHash.put(ENTITIES, "ENTITIES"); //$NON-NLS-1$ - typeHash.put(NMTOKEN, "NMTOKEN"); //$NON-NLS-1$ - typeHash.put(NMTOKENS, "NMTOKENS"); //$NON-NLS-1$ - typeHash.put(ENUMERATED_NAME, ""); //$NON-NLS-1$ - typeHash.put(ENUMERATED_NOTATION, "NOTATION"); //$NON-NLS-1$ - } - - private AttributeEnumList enumList = null; - - // public static final String IMPLIED = "IMPLIED"; - - public Attribute(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode); - } - - public String getDefaultKind() { - ITextRegion defaultKindRegion = getDefaultKindRegion(); - if (defaultKindRegion != null) { - return getStructuredDTDDocumentRegion().getText(defaultKindRegion); - } - - return ""; //$NON-NLS-1$ - } - - public ITextRegion getDefaultKindRegion() { - RegionIterator iter = iterator(); - while (iter.hasNext()) { - ITextRegion region = iter.next(); - if (region.getType() == DTDRegionTypes.IMPLIED_KEYWORD || region.getType() == DTDRegionTypes.REQUIRED_KEYWORD || region.getType() == DTDRegionTypes.FIXED_KEYWORD) { - return region; - } - } - return null; - } - - public String getDefaultValue() { - ITextRegion defaultValue = getNextQuotedLiteral(iterator()); - if (defaultValue != null) { - return getValueFromQuotedRegion(defaultValue); - } - return ""; //$NON-NLS-1$ - } - - public AttributeEnumList getEnumList() { - return enumList; - } - - public String getImagePath() { - return DTDResource.ATTRIBUTEICON; - } - - public ITextRegion getNameRegion() { - return getNextRegion(iterator(), DTDRegionTypes.ATTRIBUTE_NAME); - } - - public ITextRegion getNextQuotedLiteral(RegionIterator iter) { - while (iter.hasNext()) { - ITextRegion region = iter.next(); - if (region.getType().equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || region.getType().equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) { - return region; - } - } - return null; - } - - protected int getOffsetAfterType() { - ITextRegion typeRegion = getTypeRegion(); - - String type = getType(); - boolean isEnumeration = type.equals(ENUMERATED_NAME) || type.equals(ENUMERATED_NOTATION); - if (isEnumeration) { - // now check if maybe this is an enumeration - if (getEnumList() != null) { - return getEnumList().getEndOffset(); - } - } - if (typeRegion != null) { - return getStructuredDTDDocumentRegion().getEndOffset(typeRegion); - } - else { - ITextRegion nameRegion = getNameRegion(); - return getStructuredDTDDocumentRegion().getEndOffset(nameRegion); - // // create one - // typeRegion = - // findOrCreateTypeRegion((String)typeHash.get(CDATA)); - } - } - - public String getType() { - ITextRegion region = getTypeRegion(); - if (region != null) { - String type = (String) typeHash.get(region.getType()); - if (type == null) { - // just return the text of the type region since this may be - // an entity representing the type; - return getStructuredDTDDocumentRegion().getText(region); - } - return type; - } - else if (getEnumList() != null) { - // enumerated name tokens don't have a type keyword. just - // the existence of the left paren is enough - return (String) typeHash.get("()"); //$NON-NLS-1$ - } - - return ""; //$NON-NLS-1$ - } - - public ITextRegion getTypeRegion() { - RegionIterator iter = iterator(); - - while (iter.hasNext()) { - ITextRegion region = iter.next(); - if (region.getType() == DTDRegionTypes.CDATA_KEYWORD || region.getType() == DTDRegionTypes.ID_KEYWORD || region.getType() == DTDRegionTypes.IDREF_KEYWORD || region.getType() == DTDRegionTypes.IDREFS_KEYWORD || region.getType() == DTDRegionTypes.ENTITY_KEYWORD || region.getType() == DTDRegionTypes.ENTITIES_KEYWORD || region.getType() == DTDRegionTypes.NMTOKEN_KEYWORD || region.getType() == DTDRegionTypes.NMTOKENS_KEYWORD || region.getType() == DTDRegionTypes.NOTATION_KEYWORD || region.getType() == DTDRegionTypes.PARM_ENTITY_TYPE) { - return region; - } - } - return null; - } - - public String getValueFromQuotedRegion(ITextRegion region) { - String type = region.getType(); - if (type.equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || type.equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) { - String text = getStructuredDTDDocumentRegion().getText(region); - return text.substring(1, text.length() - 1); - } - return ""; //$NON-NLS-1$ - } - - public void resolveRegions() { - removeChildNodes(); - RegionIterator iter = iterator(); - - while (iter.hasNext()) { - ITextRegion currentRegion = iter.next(); - if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) { - enumList = new AttributeEnumList(getDTDFile(), getStructuredDTDDocumentRegion()); - } - if (enumList != null) { - enumList.addRegion(currentRegion); - if (currentRegion.getType() == DTDRegionTypes.RIGHT_PAREN) { - return; - } - } - } - - } - - public void setDefaultKind(Object requestor, String kind) { - - ITextRegion defaultKindRegion = getDefaultKindRegion(); - String oldDefaultKind = defaultKindRegion == null ? "" : getStructuredDTDDocumentRegion().getText(defaultKindRegion); //$NON-NLS-1$ - if (!kind.equals(oldDefaultKind)) { - String newText = kind; - int startOffset = 0; - int length = 0; - if (defaultKindRegion != null) { - startOffset = getStructuredDTDDocumentRegion().getStartOffset(defaultKindRegion); - length = getStructuredDTDDocumentRegion().getEndOffset(defaultKindRegion) - startOffset; - } - else { - startOffset = getOffsetAfterType(); - newText = " " + newText; //$NON-NLS-1$ - } - - ITextRegion defaultValue = getNextQuotedLiteral(iterator()); - - if (kind.equals(Attribute.FIXED) || kind.equals("")) { //$NON-NLS-1$ - if (defaultValue == null) { - // we are changing to fixed and wehave no quoted region. - // put in an empty value - newText += " \"\""; //$NON-NLS-1$ - } - } - else { - if (defaultValue != null) { - length = getStructuredDTDDocumentRegion().getEndOffset(defaultValue) - startOffset; - } - } - replaceText(requestor, startOffset, length, newText); - // do something if there is no "kind" region - } - } - - public void setDefaultKind(String kind) { - beginRecording(this, DTDCoreMessages._UI_LABEL_ATTR_DEFAULT_KIND); //$NON-NLS-1$ - setDefaultKind(this, kind); - endRecording(this); - } - - public void setDefaultValue(Object requestor, String value, boolean fixed) { - ITextRegion defaultValue = getNextQuotedLiteral(iterator()); - String quoteChar = value.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - int startOffset = 0; - int endOffset = 0; - String newText = ""; //$NON-NLS-1$ - - String oldValue = getDefaultValue(); - boolean oldKindIsFixed = getDefaultKind().equals(Attribute.FIXED); - if (oldValue.equals(value) && fixed == oldKindIsFixed) { - // nothing to do - return; - } - - if (defaultValue != null) { - startOffset = getStructuredDTDDocumentRegion().getStartOffset(defaultValue); - endOffset = getStructuredDTDDocumentRegion().getEndOffset(defaultValue); - } - - ITextRegion defaultKindRegion = getDefaultKindRegion(); - if (defaultKindRegion != null) { - startOffset = getStructuredDTDDocumentRegion().getStartOffset(defaultKindRegion); - endOffset = endOffset == 0 ? getStructuredDTDDocumentRegion().getEndOffset(defaultKindRegion) : endOffset; - } - else { - if (startOffset == 0) { - endOffset = startOffset = getOffsetAfterType(); - newText += " "; //$NON-NLS-1$ - } - ITextRegion typeRegion = getTypeRegion(); - if (typeRegion == null && getEnumList() == null) { - // tack on a default type - // newText += "CDATA "; - } - } - if (fixed) { - newText += "#FIXED "; //$NON-NLS-1$ - } - else { - if (getDefaultKind().equals("") && value.equals("")) { //$NON-NLS-1$ //$NON-NLS-2$ - // if not fixed and value is "" then reset the default kind to - // implied - newText += "#IMPLIED"; //$NON-NLS-1$ - } - } - - if (!getType().equals("") && !value.equals("")) { //$NON-NLS-1$ //$NON-NLS-2$ - newText += quoteChar + value + quoteChar; - } - replaceText(requestor, startOffset, endOffset - startOffset, newText); - } - - public void setDefaultValue(String value, boolean fixed) { - beginRecording(this, DTDCoreMessages._UI_LABEL_ATTR_DEFAULT_VAL); //$NON-NLS-1$ - setDefaultValue(this, value, fixed); - endRecording(this); - } - - public void setType(Object requestor, String type) { - String oldType = getType(); - if (!type.equals(oldType)) { - boolean wasEnumeration = oldType.equals(ENUMERATED_NAME) || oldType.equals(ENUMERATED_NOTATION); - boolean isEnumeration = type.equals(ENUMERATED_NAME) || type.equals(ENUMERATED_NOTATION); - String newText = ""; //$NON-NLS-1$ - int startOffset = 0; - int endOffset = 0; - - if (wasEnumeration && !isEnumeration) { - // get rid of the old enumlist - AttributeEnumList enumList = getEnumList(); - if (enumList != null) { - startOffset = enumList.getStartOffset(); - endOffset = enumList.getEndOffset(); - } - } - - ITextRegion region = getTypeRegion(); - if (region != null) { - startOffset = getStructuredDTDDocumentRegion().getStartOffset(region); - if (endOffset == 0) { - endOffset = getStructuredDTDDocumentRegion().getEndOffset(region); - } - } - else if (startOffset == 0) { - ITextRegion nameRegion = getNameRegion(); - newText += " "; //$NON-NLS-1$ - endOffset = startOffset = getStructuredDTDDocumentRegion().getEndOffset(nameRegion); - } - - String newTypeWord = (String) typeHash.get(type); - if (newTypeWord == null) { - // then this must be a parm entity being used in the type - // use the type text directly - newTypeWord = type; - } - - newText += newTypeWord; - - if (isEnumeration && !wasEnumeration) { - // put in a new numlist - boolean isSpaceNeeded = !type.equals(ENUMERATED_NAME); - newText += isSpaceNeeded ? " " : ""; //$NON-NLS-1$ //$NON-NLS-2$ - newText += "()"; //$NON-NLS-1$ - } - replaceText(requestor, startOffset, endOffset - startOffset, newText); - if (newTypeWord.equals("") && !type.equals(ENUMERATED_NAME)) { //$NON-NLS-1$ - // the set the defaultkind to "" - // setDefaultKind(requestor, ""); - setDefaultValue(requestor, "", false); //$NON-NLS-1$ - } - - } - } - - public void setType(String type) { - beginRecording(this, DTDCoreMessages._UI_LABEL_ATTR_TYPE); //$NON-NLS-1$ - setType(this, type); - endRecording(this); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java deleted file mode 100644 index 666efdf131..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -public class AttributeEnumList extends DTDNode { - - private ArrayList list = new ArrayList(); - - public AttributeEnumList(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode); - } - - public String getImagePath() { - // never exposed in tree - return null; - } - - // return the items that are in this enumerated list - public List getItems() { - list.clear(); - RegionIterator iter = iterator(); - while (iter.hasNext()) { - ITextRegion name = getNextRegion(iter, DTDRegionTypes.NAME); - if (name != null) { - list.add(getStructuredDTDDocumentRegion().getText(name)); - } - } - return list; - } - - public void setItems(Object requestor, String[] items) { - if (items != null) { - String text = "("; //$NON-NLS-1$ - for (int i = 0; i < items.length; i++) { - if (i > 0) { - text += " | " + items[i]; //$NON-NLS-1$ - } - else { - text += items[i]; - } - } - text += ")"; //$NON-NLS-1$ - replaceText(requestor, getStartOffset(), getNodeLength(), text); - } - } - - public void setItems(String[] items) { - beginRecording(this, DTDCoreMessages._UI_LABEL_ATTR_ENUM_ITEMS); //$NON-NLS-1$ - setItems(this, items); - endRecording(this); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java deleted file mode 100644 index c8c78b1929..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java +++ /dev/null @@ -1,117 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import java.util.ArrayList; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -public class AttributeList extends NamedTopLevelNode { - public AttributeList(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode, DTDRegionTypes.ATTLIST_TAG); - } - - public void addAttribute(String name) { - beginRecording(this, DTDCoreMessages._UI_LABEL_ATTR_LIST_ADD); //$NON-NLS-1$ - - DTDNode lastAttribute = (DTDNode) getLastChild(); - if (lastAttribute != null) { - replaceText(this, lastAttribute.getEndOffset(), 0, "\n\t" + name + " CDATA #IMPLIED"); //$NON-NLS-1$ //$NON-NLS-2$ - } - else { - ITextRegion nameRegion = getNameRegion(); - if (nameRegion != null) { - replaceText(this, getStructuredDTDDocumentRegion().getEndOffset(nameRegion), 0, "\n\t" + name + " CDATA #IMPLIED"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - } - - endRecording(this); - } - - public String getImagePath() { - return DTDResource.ATTRIBUTELISTICON; - } - - public void insertIntoModel(Object requestor, Attribute reference, Attribute node, boolean isAfter) { - int offset = 0; - String newText = ""; //$NON-NLS-1$ - String nodeText = node.getFullNodeText(); - if (!isAfter) { - offset = reference.getStartOffset(); - } - else { - // try and get next child - Attribute attr = (Attribute) reference.getNextSibling(); - if (attr != null) { - offset = attr.getStartOffset(); - } - else { - // just use the end offset - offset = reference.getWhitespaceEndOffset(); - } - } - newText += nodeText;// + (isLastChild ? "\n" : "\n\t"); - if (!node.hasTrailingWhitespace()) { - newText += "\n\t"; //$NON-NLS-1$ - } - replaceText(requestor, offset, 0, newText); - } - - public void resolveRegions() { - removeChildNodes(); - RegionIterator iter = iterator(); - - if (getNameRegion() != null) { - // we skip past the name token is our name - skipPastName(iter); - } - - ArrayList children = new ArrayList(); - Attribute attribute = null; - boolean trailingWhitespace = false; - while (iter.hasNext()) { - ITextRegion currentRegion = iter.next(); - if (currentRegion.getType().equals(DTDRegionTypes.ATTRIBUTE_NAME)) { - attribute = new Attribute(getDTDFile(), getStructuredDTDDocumentRegion()); - children.add(attribute); - appendChild(attribute); - trailingWhitespace = false; - } - if (attribute != null && currentRegion.getType() != DTDRegionTypes.END_TAG) { - if (!trailingWhitespace) { - attribute.addRegion(currentRegion); - } - else { - if (currentRegion.getType() == DTDRegionTypes.WHITESPACE) { - attribute.addWhitespaceRegion(currentRegion); - } - } - - // the following prevents extra whitespace from being picked - // up by the attribute - if (currentRegion.getType() == DTDRegionTypes.REQUIRED_KEYWORD || currentRegion.getType() == DTDRegionTypes.IMPLIED_KEYWORD || currentRegion.getType() == DTDRegionTypes.SINGLEQUOTED_LITERAL || currentRegion.getType() == DTDRegionTypes.DOUBLEQUOTED_LITERAL) { - trailingWhitespace = true; - } - } - } - int numKids = children.size(); - for (int i = 0; i < numKids; i++) { - ((Attribute) children.get(i)).resolveRegions(); - } // end of for () - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java deleted file mode 100644 index e74334dbb0..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -/* - * CMBasicNode combines all the different content types into one. The idea - * behind this is to allow arbitrary name changes to not require a tree - * update. - */ -public class CMBasicNode extends CMRepeatableNode { - - // static final int EMPTY = 0; - // static final int ANY = 1; - // static final int PCDATA = 2; - - public CMBasicNode(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode); - } - - public String getImagePath() { - final String name = getName(); - ITextRegion pcdata = getNextRegion(iterator(), DTDRegionTypes.CONTENT_PCDATA); - if (pcdata != null) { - return DTDResource.PCDATAICON; - } - - if (isRootElementContent()) { - if (name.equals(EMPTY)) { - return DTDResource.EMPTYICON; - } - else if (name.equals(ANY)) { - return DTDResource.ANYICON; - } - } - - // Otherwise this is just an element reference node. Just return - // what CMRepeatableNode would give us - return super.getImagePath(); - } - - public ITextRegion getNameRegion() { - RegionIterator iter = iterator(); - while (iter.hasNext()) { - ITextRegion region = iter.next(); - if (region.getType() == DTDRegionTypes.NAME || region.getType() == DTDRegionTypes.CONTENT_PCDATA) { - return region; - } - } - return null; - } - - // returns the occurrencetoken, or the token where the occurrence token - // should appear after - public ITextRegion getOccurrenceRegion() { - RegionIterator iter = iterator(); - skipPastName(iter); - if (iter.hasNext()) { - ITextRegion region = iter.next(); - if (region.getType() == DTDRegionTypes.OCCUR_TYPE) { - return region; - } - } - return getNameRegion(); - } - - public String getType() { - ITextRegion pcdata = getNextRegion(iterator(), DTDRegionTypes.CONTENT_PCDATA); - if (pcdata != null) { - return PCDATA; - } - - if (isRootElementContent()) { - final String name = getName(); - if (isRootElementContent()) { - if (name.equals(EMPTY)) { - return EMPTY; - } - else if (name.equals(ANY)) { - return ANY; - } - else { - // otherwise just return it's name as the type - return name; - } - - } - } - return ""; //$NON-NLS-1$ - } - - public boolean isEmptyAnyOrPCData() { - if (isPCData()) { - return true; - } - - - final String name = getName(); - if (isRootElementContent()) { - if (name.equals(EMPTY) || name.equals(ANY)) { - return true; - } - } - return false; - } - - public boolean isPCData() { - ITextRegion pcdata = getNextRegion(iterator(), DTDRegionTypes.CONTENT_PCDATA); - if (pcdata != null) { - return true; - } - return false; - } - - // public Node insertRegion(Region token) - // { - // if (!tokenStream.containsToken(token) && token.getType() == - // Token.OCCUR_TYPE) - // { - // // then add it so that our range contains it - // insertIntoTokenStream(token); - // } - // return this; - // } - - public boolean isReference() { - return !isEmptyAnyOrPCData(); - } - - public void setName(Object requestor, String name) { - // beginRecording(requestor, "Name Change"); - - super.setName(requestor, name); - if (!isReference()) { - // if it is no longer a reference node, remove the occurrence - // token - setOccurrence(requestor, CMRepeatableNode.ONCE); - } - - // endRecording(requestor); - } - - /* - * public static String getName(int type) { switch (type) { case EMPTY: - * return emptyString; case ANY: return anyString; case PCDATA: return - * pcdataString; default: break; } // end of switch () return ""; } - */ - -}// CMBasicNode diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java deleted file mode 100644 index a5401da794..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java +++ /dev/null @@ -1,428 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.dtd.core.internal.util.DTDUniqueNameHelper; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -public class CMGroupNode extends CMRepeatableNode { - - public static final char CHOICE = '|'; - public static final char SEQUENCE = ','; - - protected char connector = SEQUENCE; - - // protected ArrayList children = new ArrayList(); - - public CMGroupNode(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode); - } - - public void addChild() { - beginRecording(this, DTDCoreMessages._UI_LABEL_CM_GRP_NODE_ADD_CHILD); //$NON-NLS-1$ - DTDNode lastNode = (DTDNode) getLastChild(); - String elementName = DTDUniqueNameHelper.getUniqueName(getChildrenList(), "ChildNode"); //$NON-NLS-1$ - if (lastNode != null) { - replaceText(this, lastNode.getEndOffset(), 0, String.valueOf(getConnector()) + elementName); //$NON-NLS-1$ - } - else { - replaceText(this, getStartOffset() + 1, 0, elementName); //$NON-NLS-1$ - } - - endRecording(this); - } - - public void addGroup() { - beginRecording(this, DTDCoreMessages._UI_LABEL_CM_GRP_NODE_ADD_GRP); //$NON-NLS-1$ - DTDNode lastNode = (DTDNode) getLastChild(); - if (lastNode != null) { - replaceText(this, lastNode.getEndOffset(), 0, String.valueOf(getConnector()) + " ()"); //$NON-NLS-1$ - } - else { - replaceText(this, getStartOffset() + 1, 0, "()"); //$NON-NLS-1$ - } - - endRecording(this); - } - - public void delete(Object requestor, DTDNode child) { - Object[] children = getChildren(); - - if (children.length == 1 && getFirstChild() == child) { - replaceText(requestor, child.getStartOffset(), child.getNodeLength(), null); - return; - } - - for (int i = 0; i < children.length - 1; i++) { - DTDNode childA = (DTDNode) children[i]; - DTDNode childB = (DTDNode) children[i + 1]; - - boolean childADeleted = childA == child; - boolean childBDeleted = childB == child; - if (childADeleted || childBDeleted) { - // we found the child - int startOffset = childADeleted ? childA.getStartOffset() : childA.getEndOffset(); - int endOffset = childADeleted ? childB.getStartOffset() : childB.getEndOffset(); - replaceText(requestor, startOffset, endOffset - startOffset, ""); //$NON-NLS-1$ - removeChild(child); - break; - } - } - } - - /** - * Get the value of connector. - * - * @return value of connector. - */ - public char getConnector() { - Object[] children = getChildren(); - for (int i = 0; i < children.length - 1; i++) { - DTDNode childA = (DTDNode) children[i]; - DTDNode childB = (DTDNode) children[i + 1]; - - // create a stream between the two siblings and walk it - // note that this stream includes the last region of the first - // sibling and the first region of the next sibling. - // both these should be ignored - RegionIterator iter = new RegionIterator(getStructuredDTDDocumentRegion(), childA.getEndOffset(), childB.getStartOffset()); - // stream.setFirstRegion(childA.getLastRegion()); - // stream.setLastRegion(childB.getFirstRegion()); - // Iterator iter = stream.iterator(); - // skip the first region which is the last region of childA - // do we need this now ? - // iter.next(); - ITextRegion currentRegion = null; - while (iter.hasNext() && currentRegion != childB.getStartRegion()) { - currentRegion = iter.next(); - if (currentRegion.getType() == DTDRegionTypes.CONNECTOR) { - connector = getStructuredDTDDocumentRegion().getText(currentRegion).charAt(0); - return connector; - } - } - } - return connector; - } - - public String getImagePath() { - switch (getConnector()) { - case SEQUENCE : - return DTDResource.ONESEQUENCEICON; - /* - * switch (getOccurrence()) { case ONCE : return - * resourcePlugin.getImage(DTDResource.ONESEQUENCEICON); case - * OPTIONAL : return - * resourcePlugin.getImage(DTDResource.OPTIONALSEQUENCEICON); case - * ONE_OR_MORE : return - * resourcePlugin.getImage(DTDResource.ONEORMORESEQUENCEICON); - * case ZERO_OR_MORE : return - * resourcePlugin.getImage(DTDResource.ZEROORMORESEQUENCEICON); } - */ - case CHOICE : - return DTDResource.ONECHOICEICON; - /* - * switch (getOccurrence()) { case ONCE : return - * resourcePlugin.getImage(DTDResource.ONECHOICEICON); case OPTIONAL : - * return resourcePlugin.getImage(DTDResource.OPTIONALCHOICEICON); - * case ONE_OR_MORE : return - * resourcePlugin.getImage(DTDResource.ONEORMORECHOICEICON); case - * ZERO_OR_MORE : return - * resourcePlugin.getImage(DTDResource.ZEROORMORECHOICEICON); } - */ - } - return null; - } - - public String getName() { - return ""; //$NON-NLS-1$ - } - - // returns the occurrenceregion, or the last region where the occurrence - // region should appear after - public ITextRegion getOccurrenceRegion() { - int nesting = 0; - - // we skip past the first left paren we see since that is the - // beginning of our own node - RegionIterator iter = iterator(); - // we assume the first region is the '(' - iter.next(); - ITextRegion currentRegion = null; - while (iter.hasNext() && nesting >= 0) { - currentRegion = iter.next(); - if (currentRegion.getType() == DTDRegionTypes.LEFT_PAREN) { - nesting++; - } - if (currentRegion.getType() == DTDRegionTypes.RIGHT_PAREN) { - nesting--; - } - } - if (nesting < 0) { - // This means we have passed over the right paren that marks the - // end of our grouping. - // Look for an occurrence region - while (iter.hasNext()) { - currentRegion = iter.next(); - if (currentRegion.getType() == DTDRegionTypes.OCCUR_TYPE) { - return currentRegion; - } - } - } - // if we're here, this means that there is no occur region. return the - // last region - return iter.previous(); - } - - public String getType() { - if (isRootElementContent()) { - if (getFirstChild() != null) { - CMNode node = (CMNode) getFirstChild(); - if (node.getType().equals(PCDATA)) { - return MIXED; - } - else { - return CHILDREN; - } - } - } - return ""; //$NON-NLS-1$ - } - - public void insertChildNode(Object requestor, String nodeText, int position) { - Object[] children = getChildren(); - - int startOffset = 0; - String newText = ""; //$NON-NLS-1$ - if (position < children.length) { - DTDNode reference = (DTDNode) children[position]; - startOffset = reference.getStartOffset(); - newText = nodeText + " " + String.valueOf(getConnector()) + " "; //$NON-NLS-1$ //$NON-NLS-2$ - } - else if (position == children.length) { - // add to end - DTDNode reference = (DTDNode) children[position - 1]; - startOffset = reference.getEndOffset(); - newText = " " + String.valueOf(getConnector()) + " " + nodeText; //$NON-NLS-1$ //$NON-NLS-2$ - } - replaceText(requestor, startOffset, 0, newText); - } - - public void insertChildNode(String nodeText, int position) { - beginRecording(this, DTDCoreMessages._UI_LABEL_CM_GRP_NODE_INSERT_ELEMENT); //$NON-NLS-1$ - insertChildNode(this, nodeText, position); - endRecording(this); - } - - public void insertIntoModel(Object requestor, CMNode reference, CMNode node, boolean isAfter) { - String nodeText = node.getNodeText(); - List children = getChildrenList(); - - int index = children.indexOf(reference); - if (index == -1) { - // no reference node, add it to the end?? - index = children.size(); - } - else { - // got an index. if we want to add after, increase by 1 - index = isAfter ? index + 1 : index; - } - insertChildNode(requestor, nodeText, index); - } - - public void resolveRegions() { - int nesting = 0; - // children.clear(); - removeChildNodes(); - DTDNode currentGroupNode = null; - CMBasicNode currentReferenceNode = null; - RegionIterator iter = iterator(); - // we assume the first region is the '(' - iter.next(); - while (iter.hasNext() && nesting >= 0) { - ITextRegion currentRegion = iter.next(); - if (nesting == 0) { - if (currentRegion.getType().equals(DTDRegionTypes.CONTENT_PCDATA)) { - currentGroupNode = currentReferenceNode = null; - DTDNode pcData = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion()); - pcData.addRegion(currentRegion); - appendChild(pcData); - // children.add(pcData); - } - else if (currentRegion.getType().equals(DTDRegionTypes.NAME)) { - // we have hit a new reference node. Make sure we reset - // the groupnode var so it doesn't collect more regions - currentGroupNode = null; - currentReferenceNode = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion()); - currentReferenceNode.addRegion(currentRegion); - appendChild(currentReferenceNode); - // children.add(currentReferenceNode); - } - else if (currentRegion.getType().equals(DTDRegionTypes.OCCUR_TYPE)) { - // we could potentially flag an error here if we hit an - // occurrence type and currentRefNode and currentGroupNode - // are null - if (currentReferenceNode != null) { - // currentReferenceNode.setOccurrence(currentRegion.getText().toCharArray()[0]); - currentReferenceNode.addRegion(currentRegion); - currentReferenceNode = null; - } - } - else if (currentRegion.getType().equals(DTDRegionTypes.CONNECTOR)) { - // note that if connector is already set and it is - // different from the current connector region, then we - // have an error! - // setConnector(currentRegion.getText().toCharArray()[0]); - } - else if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) { - if (currentGroupNode == null) { - // we have hit a new group. Make sure we reset the - // referencenode var so it doesn't collect any more - // regions - currentReferenceNode = null; - currentGroupNode = new CMGroupNode(getDTDFile(), getStructuredDTDDocumentRegion()); - appendChild(currentGroupNode); - // children.add(currentGroupNode); - } - } - } - - if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) { - nesting++; - } - if (currentRegion.getType().equals(DTDRegionTypes.RIGHT_PAREN)) { - nesting--; - if (nesting == 0 && currentGroupNode != null) { - currentGroupNode.addRegion(currentRegion); - // peek at next region to see if it is an occur region. if - // so, add it to the groupnode - if (iter.hasNext()) { - ITextRegion nextRegion = iter.next(); - if (nextRegion.getType().equals(DTDRegionTypes.OCCUR_TYPE)) { - currentGroupNode.addRegion(nextRegion); - } - else { - // Otherwise, push it back as the next item to be - // retrieved by a future next() call - iter.previous(); - } - } - currentGroupNode = null; - } - } - if (currentGroupNode != null) { - currentGroupNode.addRegion(currentRegion); - } - } - - if (nesting < 0) { - // This means we have passed over the right paren that marks the - // end of our grouping. - // Look for an occurrence region - while (iter.hasNext()) { - ITextRegion currentRegion = iter.next(); - if (currentRegion.getType().equals(DTDRegionTypes.OCCUR_TYPE)) { - // setOccurrence(currentRegion.getText().toCharArray()[0]); - } - } // end of while () - } - - // for (org.w3c.dom.Node child = getFirstChild(); child != null; child - // = child.getNextSibling()) - // { - // System.out.println("child found = " + child); - // } - - Object[] children = getChildren(); - // System.out.println("children legnth = " + children.length); - - for (int i = 0; i < children.length; i++) { - DTDNode currentNode = (DTDNode) children[i]; - currentNode.resolveRegions(); - } // end of while () - - } - - /** - * Set the value of connector. - * - * @param v - * Value to assign to connector. - */ - public void setConnector(char v) { - if (connector != v) { - connector = v; - // walk through our kids and see if there is a connector between - // each sibling. if not, create one and set the connector. if - // there is - // then just change the text of the connector - Object[] children = getChildren(); - if (children.length <= 1) { - // there won't be any connector existing between the children - // just notify a change in the node and return; - getDTDFile().notifyNodeChanged(this); - return; - } - beginRecording(this, DTDCoreMessages._UI_LABEL_CM_GRP_NODE_CONNECTOR); //$NON-NLS-1$ - for (int i = 0; i < children.length - 1; i++) { - DTDNode childA = (DTDNode) children[i]; - DTDNode childB = (DTDNode) children[i + 1]; - - // create a stream between the two siblings and walk it - // note that this stream includes the last region of the first - // sibling and the first region of the next sibling. - // both these should be ignored - RegionIterator iter = new RegionIterator(getStructuredDTDDocumentRegion(), childA.getEndOffset(), childB.getStartOffset()); - // skip the first region which is the last region of childA - - // do we still need this - // iter.next(); - ITextRegion currentRegion = null; - boolean foundConnector = false; - while (iter.hasNext() && currentRegion != childB.getStartRegion()) { - currentRegion = iter.next(); - if (currentRegion.getType() == DTDRegionTypes.CONNECTOR) { - foundConnector = true; - // Region oldRegion = currentRegion.createCopy(); - // found a connector! on to the next sibling pair - // currentRegion.updateText(String.valueOf(v)); - replaceText(this, getStructuredDTDDocumentRegion().getStartOffset(currentRegion), 1, String.valueOf(connector)); - // changeStructuredDocument(oldRegion, currentRegion); - break; - } - } - - if (!foundConnector) { - // if we're here, that means we need to insert a new - // connector region after childA - replaceText(this, childA.getEndOffset(), 0, String.valueOf(connector)); - // DTDRegion connectorRegion = new - // DTDRegion(DTDRegionTypes.CONNECTOR, - // childA.getEndOffset(), 1); - // insertIntoStructuredDocument(connectorRegion); - } - } - endRecording(this); - } - } - - // public Object[] getChildren() - // { - // return children.toArray(); - // } -}// CMGroupNode diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMNode.java deleted file mode 100644 index 4c63747f72..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMNode.java +++ /dev/null @@ -1,135 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; - -// base class for an Element's contentmodel -public abstract class CMNode extends DTDNode { - public static final String ANY = DTDCoreMessages._UI_LABEL_CM_NODE_ANY; //$NON-NLS-1$ - public static final String CHILDREN = DTDCoreMessages._UI_LABEL_CM_NODE_CHILD_CONTENT; //$NON-NLS-1$ - - public static final String EMPTY = DTDCoreMessages._UI_LABEL_CM_NODE_EMPTY; //$NON-NLS-1$ - public static final String MIXED = DTDCoreMessages._UI_LABEL_CM_NODE_MIX_CONTENT; //$NON-NLS-1$ - public static final String PCDATA = DTDCoreMessages._UI_LABEL_CM_NODE_PCDATA; //$NON-NLS-1$ - - - boolean rootElementContent; - - public CMNode(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode); - } - - // this is only valid to ask if the content is a root element content - abstract public String getType(); - - /** - * Get the value of rootElementContent. This tells us whether this element - * content's parent is a direct decendent of the containing element - * - * @return value of rootElementContent. - */ - public boolean isRootElementContent() { - return rootElementContent; - } - - // if this is a root element, change the content to children - // ie . (child1) - public void setChildrenContent(String newChild) { - if (isRootElementContent()) { - if (!newChild.equals("")) { //$NON-NLS-1$ - beginRecording(this, DTDCoreMessages._UI_LABEL_CM_NODE_SET_CHILD_CONTENT); //$NON-NLS-1$ - replaceText(this, getStartOffset(), getNodeLength(), "(" + newChild + ")"); //$NON-NLS-1$ //$NON-NLS-2$ - endRecording(this); - return; - } - - if (!getType().equals(CHILDREN)) { - beginRecording(this, DTDCoreMessages._UI_LABEL_CM_NODE_SET_CHILD_CONTENT); //$NON-NLS-1$ - if (this instanceof CMBasicNode) { - replaceText(this, getStartOffset(), getNodeLength(), "(newChild)"); //$NON-NLS-1$ - } - else { - // now must convert from mixed content to this one. must - // preserve the remaining children - CMGroupNode group = (CMGroupNode) this; - CMNode firstChild = (CMNode) group.getFirstChild(); - if (firstChild.getType().equals(PCDATA)) { - group.delete(firstChild); - } - } - - endRecording(this); - } - } - } - - public void setContent(String content) { - if (isRootElementContent()) { - beginRecording(this, DTDCoreMessages._UI_LABEL_CM_NODE_SET + " " + content + " " + DTDCoreMessages._UI_LABEL_CM_NODE_CONTENT); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - replaceText(this, getStartOffset(), getNodeLength(), content); - endRecording(this); - } - } - - // if this is a root element, change the content to mixed - // ie . (#PCDATA, child1) - public void setMixedContent() { - if (isRootElementContent()) { - if (!getType().equals(MIXED)) { - beginRecording(this, DTDCoreMessages._UI_LABEL_CM_NODE_SET_MIX_CONTENT); //$NON-NLS-1$ - if (this instanceof CMBasicNode) { - replaceText(this, getStartOffset(), getNodeLength(), "(#PCDATA | newChild)*"); //$NON-NLS-1$ - } - else { - // now must convert from children content to this one. - // must - // preserve the children - CMGroupNode group = (CMGroupNode) this; - group.setConnector(CMGroupNode.CHOICE); - group.setOccurrence(CMRepeatableNode.ZERO_OR_MORE); - CMNode firstChild = (CMNode) group.getFirstChild(); - if (!firstChild.getType().equals(PCDATA)) { - group.insertChildNode("#PCDATA", 0); //$NON-NLS-1$ - } - } - endRecording(this); - } - } - } - - /** - * Set the value of rootElementContent. - * - * @param v - * Value to assign to rootElementContent. - */ - public void setRootElementContent(boolean v) { - this.rootElementContent = v; - } - - // public void delete() - // { - // if (isRootElementContent()) - // { - // // then the superclasses delete will be fine - // super.delete(); - // return; - // } - - // CMGroupNode parent = (CMGroupNode) getParentNode(); - // parent.removeChildNode(this); - // } - - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java deleted file mode 100644 index df41c637ec..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -public abstract class CMRepeatableNode extends CMNode { - - public static final char ONCE = '1'; - public static final char ONE_OR_MORE = '+'; - public static final char OPTIONAL = '?'; - public static final char ZERO_OR_MORE = '*'; - - - public CMRepeatableNode(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode); - } - - public String getImagePath() { - return DTDResource.ELEMENTREFICON; - } - - public char getOccurrence() { - ITextRegion occurRegion = getOccurrenceRegion(); - if (occurRegion != null && occurRegion.getType() == DTDRegionTypes.OCCUR_TYPE) { - return getStructuredDTDDocumentRegion().getText(occurRegion).charAt(0); - } - return CMRepeatableNode.ONCE; - } - - // returns the occurrenceregion, or the last region where the occurrence - // region should appear after - abstract public ITextRegion getOccurrenceRegion(); - - public void setOccurrence(char occurrence) { - beginRecording(this, DTDCoreMessages._UI_LABEL_CM_REP_NODE_CHG_OCCUR); //$NON-NLS-1$ - setOccurrence(this, occurrence); - endRecording(this); - } - - public void setOccurrence(Object requestor, char occurrence) { - if (getOccurrence() != occurrence) { - ITextRegion region = getOccurrenceRegion(); - if (region != null) { - if (region.getType().equals(DTDRegionTypes.OCCUR_TYPE)) { - if (occurrence == CMRepeatableNode.ONCE) { - // we need to remove the occur region from the flat - // model; - getDTDFile().getStructuredDocument().replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(region), 1, ""); //$NON-NLS-1$ - } - else { - // Region oldOccur = region.createCopy(); - getDTDFile().getStructuredDocument().replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(region), 1, String.valueOf(occurrence)); - // changeStructuredDocument(oldOccur, region); - } - } - else if (occurrence != CMRepeatableNode.ONCE) { - // System.out.println(getString()); - // we need to create an occurrenceRegion - replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(region), 0, String.valueOf(occurrence)); - } - } - } - } - -}// CMRepeatableNode diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java deleted file mode 100644 index d132b32bdd..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -public class Comment extends NamedTopLevelNode { - - public class StartEndPair { - public int startOffset, endOffset; - } - - public Comment(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode, DTDRegionTypes.COMMENT_START); - } - - public String getImagePath() { - return DTDResource.COMMENTICON; - } - - public String getName() { - String text = getText(); - if (text.length() <= 30) { - return text; - } - else { - return text.substring(0, 29) + "..."; //$NON-NLS-1$ - } - } - - private void getStartAndEndOffsetForText(StartEndPair pair) { - RegionIterator iter = iterator(); - ITextRegion commentStartTag = getStartTag(iter); - ITextRegion endCommentTag = getNextRegion(iter, DTDRegionTypes.COMMENT_END); - pair.endOffset = getStructuredDTDDocumentRegion().getEndOffset(); - if (commentStartTag != null) { - pair.startOffset = getStructuredDTDDocumentRegion().getEndOffset(commentStartTag); - } - if (endCommentTag != null) { - pair.endOffset = getStructuredDTDDocumentRegion().getStartOffset(endCommentTag); - } - } - - public String getText() { - String text = getStructuredDTDDocumentRegion().getText(); - int flatNodeStart = getStructuredDTDDocumentRegion().getStartOffset(); - StartEndPair pair = new StartEndPair(); - getStartAndEndOffsetForText(pair); - return text.substring(pair.startOffset - flatNodeStart, pair.endOffset - flatNodeStart); - } - - public void setText(String newText) { - beginRecording(this, DTDCoreMessages._UI_LABEL_COMMENT_CHG); //$NON-NLS-1$ - StartEndPair pair = new StartEndPair(); - getStartAndEndOffsetForText(pair); - replaceText(this, pair.startOffset, pair.endOffset - pair.startOffset, newText); - endRecording(this); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCoreMessages.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCoreMessages.java deleted file mode 100644 index eb95c85a3b..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCoreMessages.java +++ /dev/null @@ -1,91 +0,0 @@ -/********************************************************************** - * Copyright (c) 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 - Initial API and implementation - **********************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.osgi.util.NLS; - -/** - * Strings used by DTD Core - * - * @plannedfor 1.0 - */ -public class DTDCoreMessages extends NLS { - private static final String BUNDLE_NAME = "org.eclipse.wst.dtd.core.internal.DTDCorePluginResources";//$NON-NLS-1$ - - public static String _UI_NONE_DESC; - public static String _UI_CHARACTER_DATA_DESC; - public static String _UI_IDENTIFIER_DESC; - public static String _UI_ID_REFERENCE_DESC; - public static String _UI_ID_REFERENCES_DESC; - public static String _UI_ENTITY_NAME_DESC; - public static String _UI_ENTITY_NAMES_DESC; - public static String _UI_NAME_TOKEN_DESC; - public static String _UI_NAME_TOKENS_DESC; - public static String _UI_ENUM_NAME_TOKENS_DESC; - public static String _UI_ENUM_NOTATION_DESC; - public static String _UI_LABEL_ATTR_DEFAULT_VAL; - public static String _UI_LABEL_ATTR_DEFAULT_KIND; - public static String _UI_LABEL_ATTR_TYPE; - public static String _UI_LABEL_ATTR_ENUM_ITEMS; - public static String _UI_LABEL_ATTR_LIST_ADD; - public static String _UI_LABEL_CM_GRP_NODE_CONNECTOR; - public static String _UI_LABEL_CM_GRP_NODE_INSERT_ELEMENT; - public static String _UI_LABEL_CM_GRP_NODE_ADD_GRP; - public static String _UI_LABEL_CM_GRP_NODE_ADD_CHILD; - public static String _UI_LABEL_CM_NODE_MIX_CONTENT; - public static String _UI_LABEL_CM_NODE_CHILD_CONTENT; - public static String _UI_LABEL_CM_NODE_SET_MIX_CONTENT; - public static String _UI_LABEL_CM_NODE_SET_CHILD_CONTENT; - public static String _UI_LABEL_CM_NODE_SET; - public static String _UI_LABEL_CM_NODE_CONTENT; - public static String _UI_LABEL_CM_NODE_PCDATA; - public static String _UI_LABEL_CM_NODE_ANY; - public static String _UI_LABEL_CM_NODE_EMPTY; - public static String _UI_LABEL_CM_REP_NODE_CHG_OCCUR; - public static String _UI_LABEL_COMMENT_CHG; - public static String _UI_LABEL_DTD_FILE_ADD_ELEMENT; - public static String _UI_LABEL_DTD_FILE_ADD_ENTITY; - public static String _UI_LABEL_DTD_FILE_ADD_COMMENT; - public static String _UI_LABEL_DTD_FILE_ADD_PARM_ENTITY_REF; - public static String _UI_LABEL_DTD_FILE_ADD_NOTATION; - public static String _UI_LABEL_DTD_FILE_ADD_ATTR_LIST; - public static String _UI_LABEL_DTD_FILE_DELETE; - public static String _UI_LABEL_DTD_NODE_NAME_CHG; - public static String _UI_LABEL_DTD_NODE_DELETE; - public static String _UI_LABEL_ELEMENT_ADD_ATTR; - public static String _UI_LABEL_ELEMENT_ADD_GRP; - public static String _UI_LABEL_ELEMENT_ADD_CHILD; - public static String _UI_LABEL_ENTITY_SET_PARM_ENTITY; - public static String _UI_LABEL_ENTITY_SET_GENERAL_ENTITY; - public static String _UI_LABEL_ENTITY_SET_EXT_ENTITY; - public static String _UI_LABEL_ENTITY_SET_INT_ENTITY; - public static String _UI_LABEL_ENTITY_VALUE_CHG; - public static String _UI_LABEL_ENTITY_NDATA_CHANGE; - public static String _UI_LABEL_EXT_NODE_PUBLIC_ID_CHG; - public static String _UI_LABEL_EXT_NODE_SYSTEM_ID_CHG; - public static String _UI_LABEL_NODE_LIST_ELEMENTS; - public static String _UI_LABEL_NODE_LIST_ENTITIES; - public static String _UI_LABEL_NODE_LIST_NOTATIONS; - public static String _UI_LABEL_NODE_LIST_COMMENTS; - public static String _UI_LABEL_NODE_LIST_OTHER; - public static String _UI_LABEL_NODE_LIST_ATTRIBUTES; - public static String _UI_LABEL_PARM_ENTITY_REF_CHG_ENTITY_REF; - public static String _UI_LABEL_PARM_ENTITY_REF_COMMENT_CHG; - public static String _UI_LABEL_TOP_LEVEL_NODE_DELETE; - public static String _ERROR_INCL_FILE_LOAD_FAILURE; - public static String _ERROR_UNDECLARED_ELEMENT_1; - public static String _UI_ERRORPART_UNDECLARED_ELEMENT_2; - public static String _EXC_OPERATION_NOT_SUPPORTED; - - static { - // load message values from bundle file - NLS.initializeMessages(BUNDLE_NAME, DTDCoreMessages.class); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java deleted file mode 100644 index 13d705268d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.core.runtime.Plugin; - -public class DTDCorePlugin extends Plugin { - private static DTDCorePlugin instance; - - public synchronized static DTDCorePlugin getInstance() { - return instance; - } - - public static DTDCorePlugin getPlugin() { - return instance; - } - - public DTDCorePlugin() { - super(); - instance = this; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePluginResources.properties b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePluginResources.properties deleted file mode 100644 index de49c425d4..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePluginResources.properties +++ /dev/null @@ -1,123 +0,0 @@ -############################################################################### -# Copyright (c) 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 -############################################################################### -! Strings for DTDBasicTypeImpl type descriptions -_UI_NONE_DESC=None - -!! NOTE TO TRANSLATOR: Do not translate following text in parentheses on following 10 lines i.e.(CDATA) -_UI_CHARACTER_DATA_DESC=Character Data (CDATA) -_UI_IDENTIFIER_DESC=Identifier (ID) -_UI_ID_REFERENCE_DESC=ID Reference (IDREF) -_UI_ID_REFERENCES_DESC=ID References (IDREFS) -_UI_ENTITY_NAME_DESC=Entity Name (ENTITY) -_UI_ENTITY_NAMES_DESC=Entity Names (ENTITIES) -_UI_NAME_TOKEN_DESC=Name Token (NMTOKEN) -_UI_NAME_TOKENS_DESC=Name Tokens (NMTOKENS) -_UI_ENUM_NAME_TOKENS_DESC=Enumerated Name Tokens -_UI_ENUM_NOTATION_DESC=Enumerated NOTATION - -! Strings from sed/model - -! Attribute.java -_UI_LABEL_ATTR_DEFAULT_VAL=Attribute Default Change Value -_UI_LABEL_ATTR_DEFAULT_KIND=Change Attribute Default Value -_UI_LABEL_ATTR_TYPE=Change Attribute Type - -! AttributeEnumList -_UI_LABEL_ATTR_ENUM_ITEMS=Change Attribute Enumeration Value - -! AttributeList -_UI_LABEL_ATTR_LIST_ADD=Add Attribute - -! CMGroupNode -_UI_LABEL_CM_GRP_NODE_CONNECTOR=Change Connector -_UI_LABEL_CM_GRP_NODE_INSERT_ELEMENT=Insert Element -_UI_LABEL_CM_GRP_NODE_ADD_GRP=Add Group -_UI_LABEL_CM_GRP_NODE_ADD_CHILD=Add Child Element - -! CMNode -_UI_LABEL_CM_NODE_MIX_CONTENT=Mixed Content -_UI_LABEL_CM_NODE_CHILD_CONTENT=Children Content -_UI_LABEL_CM_NODE_SET_MIX_CONTENT=Set Mixed Content -_UI_LABEL_CM_NODE_SET_CHILD_CONTENT=Set Children Content - -!! NOTE TO TRANSLATOR - USAGE: "Set <variable content> Content" -_UI_LABEL_CM_NODE_SET=Set -_UI_LABEL_CM_NODE_CONTENT=Content - -!! NOTE TO TRANSLATOR - DO NOT TRANSLATE FOLLOWING 3 LINES -_UI_LABEL_CM_NODE_PCDATA=(#PCDATA) -_UI_LABEL_CM_NODE_ANY=ANY -_UI_LABEL_CM_NODE_EMPTY=EMPTY - -! CMRepeatableNode -_UI_LABEL_CM_REP_NODE_CHG_OCCUR=Change Occurrence - -! Comment -_UI_LABEL_COMMENT_CHG=Comment Change - -! DTDFile -_UI_LABEL_DTD_FILE_ADD_ELEMENT=Add Element -_UI_LABEL_DTD_FILE_ADD_ENTITY=Add Entity -_UI_LABEL_DTD_FILE_ADD_COMMENT=Add Comment -_UI_LABEL_DTD_FILE_ADD_PARM_ENTITY_REF=Add Parameter Entity Reference -_UI_LABEL_DTD_FILE_ADD_NOTATION=Add Notation -_UI_LABEL_DTD_FILE_ADD_ATTR_LIST=Add Attribute List -_UI_LABEL_DTD_FILE_DELETE=Delete - -! DTDNode -_UI_LABEL_DTD_NODE_NAME_CHG=Name Change -_UI_LABEL_DTD_NODE_DELETE=Delete - -! Element -_UI_LABEL_ELEMENT_ADD_ATTR=Add Attribute -_UI_LABEL_ELEMENT_ADD_GRP=Add Group -_UI_LABEL_ELEMENT_ADD_CHILD=Add Child Element - -! Entity -_UI_LABEL_ENTITY_SET_PARM_ENTITY=Set Parameter Entity -_UI_LABEL_ENTITY_SET_GENERAL_ENTITY=Set General Entity -_UI_LABEL_ENTITY_SET_EXT_ENTITY=Set External Entity -_UI_LABEL_ENTITY_SET_INT_ENTITY=Set Internal Entity -_UI_LABEL_ENTITY_VALUE_CHG=Entity Value Change - -!! NOTE TO TRANSLATOR - USAGE: "NDATA Change" -_UI_LABEL_ENTITY_NDATA_CHANGE=Change - -! ExternalNode -_UI_LABEL_EXT_NODE_PUBLIC_ID_CHG=Public ID Change -_UI_LABEL_EXT_NODE_SYSTEM_ID_CHG=System ID Change - -! NodeList -_UI_LABEL_NODE_LIST_ELEMENTS=Elements -_UI_LABEL_NODE_LIST_ENTITIES=Entities -_UI_LABEL_NODE_LIST_NOTATIONS=Notations -_UI_LABEL_NODE_LIST_COMMENTS=Comments -_UI_LABEL_NODE_LIST_OTHER=Other -_UI_LABEL_NODE_LIST_ATTRIBUTES=Attributes - -! ParameterEntityReference -_UI_LABEL_PARM_ENTITY_REF_CHG_ENTITY_REF=Change Entity Reference -_UI_LABEL_PARM_ENTITY_REF_COMMENT_CHG=Comment Change - -! TopLevelNode -_UI_LABEL_TOP_LEVEL_NODE_DELETE=Delete - -_ERROR_INCL_FILE_LOAD_FAILURE = Failed to load included file - -! usage: _ERROR_UNDECLARED_ELEMENT_1 + <elementName> + _PARTERROR_UNDECLARED_ELEMENT_2 -_ERROR_UNDECLARED_ELEMENT_1 = Reference to undeclared element ' -_UI_ERRORPART_UNDECLARED_ELEMENT_2 =' in content model. - -! usage: _ERROR_DUP_ID_ATTRIBUTE_1 + <attributeName> + _PARTERROR_DUP_ID_ATTRIBUTE_2 - -! usage:_ERROR_INVALID_DEFAULT_ATTR_VALUE_1 + <typeString> + _PARTERROR_INVALID_DEFAULT_ATTR_VALUE_2 + <attributeName> - -_EXC_OPERATION_NOT_SUPPORTED = Operation not supported diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java deleted file mode 100644 index 3ee60a6ee5..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java +++ /dev/null @@ -1,687 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * Hajime Katayama - bug 245216 - correction to get the best node when the ending - * and starting offsets are equal, and they both - * contain the offset range. - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl; -import org.eclipse.wst.dtd.core.internal.event.IDTDFileListener; -import org.eclipse.wst.dtd.core.internal.event.NodesEvent; -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.util.DTDExternalReferenceRemover; -import org.eclipse.wst.dtd.core.internal.util.DTDModelUpdater; -import org.eclipse.wst.dtd.core.internal.util.DTDNotationReferenceRemover; -import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion; -import org.eclipse.wst.sse.core.internal.provisional.events.NewDocumentEvent; -import org.eclipse.wst.sse.core.internal.provisional.events.RegionChangedEvent; -import org.eclipse.wst.sse.core.internal.provisional.events.RegionsReplacedEvent; -import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentRegionsReplacedEvent; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList; - -public class DTDFile implements IndexedRegion { - private NodeList attlistList = new NodeList(this, DTDRegionTypes.ATTLIST_TAG); - private NodeList commentList = new NodeList(this, DTDRegionTypes.COMMENT_START); - - boolean creatingNewModel = false; - private DTDModelImpl fDTDModel; - - private NodeList elementList = new NodeList(this, DTDRegionTypes.ELEMENT_TAG); - private NodeList entityList = new NodeList(this, DTDRegionTypes.ENTITY_TAG); - - private List folderList = null; - - private boolean isMovingNode = false; - - private List modelListeners = new ArrayList(); - - private List nodeList = new ArrayList(); - private NodeList notationList = new NodeList(this, DTDRegionTypes.NOTATION_TAG); - private NodeList unrecognizedList = new NodeList(this, DTDRegionTypes.UNKNOWN_CONTENT); - - public DTDFile(DTDModelImpl dtdModel) { - this.fDTDModel = dtdModel; - } - - public void addDTDFileListener(IDTDFileListener listener) { - modelListeners.add(listener); - } - - protected void addNode(DTDNode node) { - addNode(nodeList.size(), node); - } - - protected void addNode(int index, DTDNode node) { - nodeList.add(index, node); - /* - * if (index < nodeList.size()) { insertBefore(node, (DTDNode) - * nodeList.get(index)); } else { appendChild(node); } - */ - } - - public DTDNode buildNode(IStructuredDocumentRegion flatNode) { - // ITextRegionList regions = flatNode.getRegions(); - DTDNode node = null; - if (isElement(flatNode)) { - // then this is an element - node = new Element(this, flatNode); - } - else if (isEntity(flatNode)) { - node = new Entity(this, flatNode); - } - else if (isNotation(flatNode)) { - node = new Notation(this, flatNode); - } - else if (isAttributeList(flatNode)) { - node = new AttributeList(this, flatNode); - } - else if (isComment(flatNode)) { - node = new Comment(this, flatNode); - } - else if (isParameterEntityReference(flatNode)) { - node = new ParameterEntityReference(this, flatNode); - } - else if (!flatNode.getText().trim().equals("")) { //$NON-NLS-1$ - node = new Unrecognized(this, flatNode); - } - if (node != null) { - insertNode(node); - node.resolveRegions(); - } - return node; - } - - public void buildNodes(IStructuredDocumentRegionList list) { - NodesEvent addedDTDNodes = new NodesEvent(); - - TopLevelNode previousNode = null; - for (int i = 0; i < list.getLength(); i++) { - IStructuredDocumentRegion flatNode = list.item(i); - TopLevelNode node = (TopLevelNode) buildNode(flatNode); - // if we don't create a node, then we assume that the flat - // node was whitespace. Tack it on to a previous toplevel - // node - if (node != null) { - previousNode = node; - addedDTDNodes.add(node); - } - else { - if (previousNode != null) { - previousNode.addWhitespaceStructuredDocumentRegion(flatNode); - } - } - } - - if (addedDTDNodes.getNodes().size() > 0)// && - // creatingNewModel == false) - { - // now tell people about the additions - notifyNodesAdded(addedDTDNodes); - } - } - - // Implements IndexedRegion - - public boolean contains(int testPosition) { - return getStartOffset() <= testPosition && testPosition <= getEndOffset(); - } - - public void createAttributeList(DTDNode node, String name, boolean isAfter) { - getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_ATTR_LIST); //$NON-NLS-1$ - String newStream = "<!ATTLIST " + name + ">\n"; //$NON-NLS-1$ //$NON-NLS-2$ - int offset = getInsertOffset(node, isAfter); - getStructuredDocument().replaceText(this, offset, 0, newStream); - getDTDModel().endRecording(this); - } - - public void createComment(DTDNode node, String name, boolean isAfter) { - getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_COMMENT); //$NON-NLS-1$ - String newStream = "<!-- " + name + " -->\n"; //$NON-NLS-1$ //$NON-NLS-2$ - int offset = getInsertOffset(node, isAfter); - getStructuredDocument().replaceText(this, offset, 0, newStream); - getDTDModel().endRecording(this); - } - - public void createElement(DTDNode node, String name, boolean isAfter) { - getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_ELEMENT); //$NON-NLS-1$ - String newStream = "<!ELEMENT " + name + " EMPTY>\n"; //$NON-NLS-1$ //$NON-NLS-2$ - int offset = getInsertOffset(node, isAfter); - getStructuredDocument().replaceText(this, offset, 0, newStream); - getDTDModel().endRecording(this); - } - - public void createEntity(DTDNode node, String name, boolean isAfter) { - getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_ENTITY); //$NON-NLS-1$ - String newStream = "<!ENTITY " + name + " \"\">\n"; //$NON-NLS-1$//$NON-NLS-2$ - int offset = getInsertOffset(node, isAfter); - getStructuredDocument().replaceText(this, offset, 0, newStream); - getDTDModel().endRecording(this); - } - - public void createNotation(DTDNode node, String name, boolean isAfter) { - getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_NOTATION); //$NON-NLS-1$ - String newStream = "<!NOTATION " + name + " SYSTEM \"\">\n"; //$NON-NLS-1$ //$NON-NLS-2$ - int offset = getInsertOffset(node, isAfter); - getStructuredDocument().replaceText(this, offset, 0, newStream); - getDTDModel().endRecording(this); - } - - public void createParameterEntityReference(DTDNode node, String name, boolean isAfter) { - getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_PARM_ENTITY_REF); //$NON-NLS-1$ - String newStream = name + "\n"; //$NON-NLS-1$ - int offset = getInsertOffset(node, isAfter); - getStructuredDocument().replaceText(this, offset, 0, newStream); - getDTDModel().endRecording(this); - } - - public void deleteNode(DTDNode node) { - getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_DELETE); //$NON-NLS-1$ - deleteNode(this, node); - getDTDModel().endRecording(this); - } - - public void deleteNode(Object requestor, DTDNode node) { - DTDNode parent = (DTDNode) node.getParentNode(); - if (parent != null) { - parent.delete(requestor, node); - } - else { - if (!isMovingNode) { - DTDModelUpdater updater = new DTDModelUpdater(); - updater.objectAboutToBeDeleted(requestor, node); - if (node instanceof ParameterEntityReference) { - Entity referencedEntity = ((ParameterEntityReference) node).getEntityObject(); - if (referencedEntity != null) { - // remove references to all elements and parm entities - // contained in our current model - DTDExternalReferenceRemover remover = new DTDExternalReferenceRemover(); - remover.externalReferenceAboutToChange(requestor, referencedEntity); - } - } - else if (node instanceof Notation) { - Notation notation = ((Notation) node); - DTDNotationReferenceRemover remover = new DTDNotationReferenceRemover(); - remover.notationAboutToBeDeleted(requestor, notation); - } - } - - // no parent? then delete up until the start of the next node - // if it is a top level node - int startOffset = node.getStartOffset(); - int endOffset = node.getWhitespaceEndOffset(); - if (node instanceof TopLevelNode) { - endOffset = getInsertOffset(node, true); - } - getStructuredDocument().replaceText(requestor, startOffset, endOffset - startOffset, ""); //$NON-NLS-1$ - } - } - - public NodeList getComments() { - return commentList; - } - - public DTDModelImpl getDTDModel() { - return fDTDModel; - } - - public NodeList getElementsAndParameterEntityReferences() { - return elementList; - } - - public int getEndOffset() { - int result = -1; - IStructuredDocumentRegion region = getStructuredDocument().getLastStructuredDocumentRegion(); - if (region != null) { - result = region.getEndOffset(); - } - return result; - } - - public int getLength() { - int result = -1; - int start = getStartOffset(); - if (start >= 0) { - int end = getEndOffset(); - if (end >= 0) { - result = end - start; - if (result < -1) { - result = -1; - } - } - } - return result; - } - - public NodeList getEntities() { - return entityList; - } - - - - public int getInsertOffset(DTDNode node, boolean isAfter) { - int offset = 0; - if (node != null) { - if (isAfter) { - // then get the next node and use it's start offset - int index = getNodes().indexOf(getNode(node.getStructuredDTDDocumentRegion())); - - DTDNode afterNode = null; - if (index + 1 < getNodes().size()) { - afterNode = (DTDNode) getNodes().get(index + 1); - } - if (afterNode != null) { - offset = afterNode.getStructuredDTDDocumentRegion().getStartOffset(); - } - else { - // add to end - if (getStructuredDocument().getLastStructuredDocumentRegion() != null) { - offset = getStructuredDocument().getLastStructuredDocumentRegion().getEndOffset(); - } - } - } - else { - offset = node.getStructuredDTDDocumentRegion().getStartOffset(); - } - } - else { - // add to end - if (getStructuredDocument().getLastStructuredDocumentRegion() != null) { - offset = getStructuredDocument().getLastStructuredDocumentRegion().getEndOffset(); - } - } - return offset; - } - - public String getName() { - org.eclipse.core.runtime.Path path = new org.eclipse.core.runtime.Path(getDTDModel().getId().toString()); - return path.lastSegment(); - } - - public DTDNode getNode(IStructuredDocumentRegion flatNode) { - for (int i = 0; i < nodeList.size(); i++) { - DTDNode node = (DTDNode) nodeList.get(i); - if (node.getStructuredDTDDocumentRegion() == flatNode) { - return node; - } - } - return null; - } - - public IndexedRegion getNodeAt(int offset) { - DTDNode node = getTopLevelNodeAt(offset); - if (node != null) { - return node.getDeepestNode(offset); - } - return null; - } - - public IndexedRegion getNodeAt(int startOffset, int endOffset) { - DTDNode node = getTopLevelNodeAt(startOffset); - if (node != null) { - return node.getDeepestNode(startOffset, endOffset); - } - return null; - } - - public List getNodeLists() { - if (folderList == null) { - folderList = new ArrayList(); - folderList.add(notationList); - folderList.add(entityList); - folderList.add(elementList); - folderList.add(attlistList); - folderList.add(commentList); - folderList.add(unrecognizedList); - } - return folderList; - } - - public List getNodes() { - return nodeList; - } - - public NodeList getNotations() { - return notationList; - } - - public int getStartOffset() { - int result = -1; - IStructuredDocumentRegion region = getStructuredDocument().getFirstStructuredDocumentRegion(); - if (region != null) { - result = region.getStartOffset(); - } - return result; - } - - public IStructuredDocument getStructuredDocument() { - return fDTDModel.getStructuredDocument(); - } - - public DTDNode getTopLevelNodeAt(int offset) { - DTDNode bestNode = null; - for (int i = 0; i < nodeList.size(); i++) { - DTDNode node = (DTDNode) nodeList.get(i); - if (node.contains(offset)) { - if(bestNode == null) { - bestNode = node; - } else { - if(node.getStartOffset() > bestNode.getStartOffset()) { - bestNode = node; - } - } - } - } - return bestNode; - } - - public NodeList getUnrecognized() { - return unrecognizedList; - } - - public void insertIntoModel(Object requestor, DTDNode reference, DTDNode node, boolean isAfter) { - String nodeText = ""; //$NON-NLS-1$ - if (node instanceof TopLevelNode) { - nodeText = ((TopLevelNode) node).getFullText(); - } - else { - nodeText = node.getNodeText(); - } - int offset = getInsertOffset(reference, isAfter); - getStructuredDocument().replaceText(requestor, offset, 0, nodeText); - } - - - public void insertNode(DTDNode node) { - int startOffset = node.getStartOffset(); - int insertIndex = -1; - // System.out.println("startoffset = " + startOffset); - for (int i = 0; i < getNodes().size(); i++) { - DTDNode currentNode = (DTDNode) getNodes().get(i); - // System.out.println("currentNode endOffset = " - // +currentNode.getEndOffset()); - - if (currentNode.getEndOffset() > startOffset) { - // System.out.println("endoffset " + - // currentNode.getEndOffset() + " > " + startOffset); - insertIndex = i; - break; - } - } - if (insertIndex == -1) { - insertIndex = getNodes().size(); - } - - - // System.out.println("insert index = " + insertIndex); - - addNode(insertIndex, node); - } - - // it is assumed that flatnode contains at least 3 regions - public boolean isAttributeList(IStructuredDocumentRegion flatNode) { - if (flatNode.getRegions().size() >= 3) { - ITextRegion second = flatNode.getRegions().get(1); - ITextRegion third = flatNode.getRegions().get(2); - if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.ATTLIST_TAG)) { - return true; - } - } - return false; - } - - // it is assumed that flatnode contains at least 3 regions - public boolean isComment(IStructuredDocumentRegion flatNode) { - if (flatNode.getRegions().size() >= 2) { - ITextRegion region = flatNode.getRegions().get(1); - if (region.getType().equals(DTDRegionTypes.COMMENT_START)) { - return true; - } - } - return false; - } - - // it is assumed that flatnode contains at least 3 regions - public boolean isElement(IStructuredDocumentRegion flatNode) { - if (flatNode.getRegions().size() >= 3) { - ITextRegion second = flatNode.getRegions().get(1); - ITextRegion third = flatNode.getRegions().get(2); - if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.ELEMENT_TAG)) { - return true; - } - } - return false; - } - - // it is assumed that flatnode contains at least 3 regions - public boolean isEntity(IStructuredDocumentRegion flatNode) { - if (flatNode.getRegions().size() >= 3) { - ITextRegion second = flatNode.getRegions().get(1); - ITextRegion third = flatNode.getRegions().get(2); - if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.ENTITY_TAG)) { - return true; - } - } - return false; - } - - // it is assumed that flatnode contains at least 3 regions - public boolean isNotation(IStructuredDocumentRegion flatNode) { - if (flatNode.getRegions().size() >= 3) { - ITextRegion second = flatNode.getRegions().get(1); - ITextRegion third = flatNode.getRegions().get(2); - if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.NOTATION_TAG)) { - return true; - } - } - return false; - } - - // it is assumed that flatnode contains at least 3 regions - public boolean isParameterEntityReference(IStructuredDocumentRegion flatNode) { - if (flatNode.getRegions().size() == 1) { - ITextRegion region = flatNode.getRegions().get(0); - if (region.getType().equals(DTDRegionTypes.ENTITY_PARM)) { - return true; - } - } - return false; - } - - boolean isSameTopLevelType(DTDNode affectedNode) { - IStructuredDocumentRegion flatNode = affectedNode.getStructuredDTDDocumentRegion(); - // return true if the flatnode still matches what the affectedNode - // is representing - if (affectedNode instanceof Element && isElement(flatNode)) { - return true; - } - if (affectedNode instanceof Entity && isEntity(flatNode)) { - return true; - } - if (affectedNode instanceof Comment && isComment(flatNode)) { - return true; - } - if (affectedNode instanceof AttributeList && isAttributeList(flatNode)) { - return true; - } - if (affectedNode instanceof Notation && isNotation(flatNode)) { - return true; - } - if (affectedNode instanceof Unrecognized && isUnrecognized(flatNode)) { - return true; - } - return false; - } - - public boolean isUnrecognized(IStructuredDocumentRegion flatNode) { - return !isElement(flatNode) && !isEntity(flatNode) && !isNotation(flatNode) && !isParameterEntityReference(flatNode) && !isAttributeList(flatNode) && !isComment(flatNode); - } - - public void moveNode(Object requestor, DTDNode referenceNode, DTDNode nodeToMove, boolean isAfter) { - isMovingNode = true; - - deleteNode(requestor, nodeToMove); - insertIntoModel(requestor, referenceNode, nodeToMove, isAfter); - isMovingNode = false; - } - - public void newModel(NewDocumentEvent event) { - creatingNewModel = true; - nodeList.clear(); - NodesEvent removeEvent = new NodesEvent(); - removeEvent.getNodes().addAll(nodeList); - notifyNodesRemoved(removeEvent); - /* removeChildNodes(); */ - - if (event.getStructuredDocument() != null && event.getStructuredDocument().getRegionList() != null) { - buildNodes(event.getStructuredDocument().getRegionList()); - } - creatingNewModel = false; - } - - public void nodesReplaced(StructuredDocumentRegionsReplacedEvent event) { - IStructuredDocumentRegionList oldNodes = event.getOldStructuredDocumentRegions(); - NodesEvent removedDTDNodes = new NodesEvent(); - for (int i = 0; i < oldNodes.getLength(); i++) { - IStructuredDocumentRegion flatNode = oldNodes.item(i); - - for (Iterator iter = getNodes().iterator(); iter.hasNext();) { - DTDNode node = (DTDNode) iter.next(); - if (node.getStructuredDTDDocumentRegion() == flatNode) { - removedDTDNodes.add(node); - } - } - } - - buildNodes(event.getNewStructuredDocumentRegions()); - - if (removedDTDNodes.getNodes().size() > 0) { - notifyNodesRemoved(removedDTDNodes); - removeNodes(removedDTDNodes.getNodes()); - } - } - - public void notifyNodeChanged(DTDNode node) { - Iterator iter = modelListeners.iterator(); - while (iter.hasNext()) { - IDTDFileListener listener = (IDTDFileListener) iter.next(); - listener.nodeChanged(node); - } - } - - public void notifyNodesAdded(NodesEvent addedNodes) { - Iterator iter = modelListeners.iterator(); - while (iter.hasNext()) { - IDTDFileListener listener = (IDTDFileListener) iter.next(); - listener.nodesAdded(addedNodes); - } - } - - protected void notifyNodesRemoved(NodesEvent event) { - Iterator iter = modelListeners.iterator(); - while (iter.hasNext()) { - IDTDFileListener listener = (IDTDFileListener) iter.next(); - listener.nodesRemoved(event); - } - } - - public void rebuildNodes(List nodes) { - // remove the old nodes - removeNodes(nodes); - - // now rebuild them - NodesEvent addedDTDNodes = new NodesEvent(); - Iterator dtdNodes = nodes.iterator(); - while (dtdNodes.hasNext()) { - DTDNode dtdNode = (DTDNode) dtdNodes.next(); - // System.out.println("rebuilding " + - // dtdNode.getStructuredDocumentRegion().getText()); - - DTDNode node = buildNode(dtdNode.getStructuredDTDDocumentRegion()); - if (node != null) { - addedDTDNodes.add(node); - } - } - if (addedDTDNodes.getNodes().size() > 0) { - // now tell people about the additions - notifyNodesAdded(addedDTDNodes); - } - } - - public void regionChanged(RegionChangedEvent event) { - ITextRegion changedRegion = event.getRegion(); - IStructuredDocumentRegion flatNode = event.getStructuredDocumentRegion(); - DTDNode affectedNode = (DTDNode) getNodeAt(flatNode.getStartOffset(changedRegion), flatNode.getEndOffset(changedRegion)); - if (affectedNode != null) { - // no need to resolve regions as it is just a change - // affectedNode.resolveRegions(); - notifyNodeChanged(affectedNode); - } - } - - public void regionsReplaced(RegionsReplacedEvent event) { - List nodesToRebuild = new ArrayList(); - IStructuredDocumentRegion flatNode = event.getStructuredDocumentRegion(); - DTDNode affectedNode = getNode(flatNode); - - if (!isSameTopLevelType(affectedNode)) { - // Bug 111100 - Fire off a node removal event - // to remove the node from the tree viewer - NodesEvent removedDTDNodes = new NodesEvent(); - removedDTDNodes.add(affectedNode); - notifyNodesRemoved(removedDTDNodes); - nodesToRebuild.add(affectedNode); - rebuildNodes(nodesToRebuild); - } - else { - affectedNode.resolveRegions(); - notifyNodeChanged(affectedNode); - // now try and determine which ones were added - NodesEvent addedDTDNodes = new NodesEvent(); - ITextRegionList newRegions = event.getNewRegions(); - int size = newRegions.size(); - for (int i = 0; i < size; i++) { - ITextRegion region = newRegions.get(i); - DTDNode deepestNode = affectedNode.getDeepestNode(flatNode.getStartOffset(region), flatNode.getEndOffset(region)); - // Bug 111100 - We do not need to fire a node added event - // for the affectedNode because that is already handled by - // the node changed event above - if (deepestNode != affectedNode && !addedDTDNodes.getNodes().contains(deepestNode)) { - addedDTDNodes.add(deepestNode); - } - } - if (addedDTDNodes.getNodes().size() > 0) { - notifyNodesAdded(addedDTDNodes); - } - } - } - - public void removeDTDFileListener(IDTDFileListener listener) { - modelListeners.remove(listener); - } - - protected void removeNodes(List nodes) { - getNodes().removeAll(nodes); - /* - * for (int i = 0; i < nodes.size(); i++) { - * removeChild((DTDNode)nodes.get(i)); } // end of for () - */ - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java deleted file mode 100644 index 0bc28389b8..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java +++ /dev/null @@ -1,329 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl; -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.model.FactoryRegistry; -import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.eclipse.wst.sse.core.internal.text.TextRegionListImpl; -import org.eclipse.wst.xml.core.internal.document.NodeContainer; -import org.w3c.dom.Node; - - -public abstract class DTDNode extends NodeContainer implements IndexedRegion { - - // these are characteroffsets - protected DTDFile dtdFile; - - // flat node that contains this node - protected IStructuredDocumentRegion flatNode; - - protected TextRegionListImpl regions = new TextRegionListImpl(); - - protected TextRegionListImpl whitespace = new TextRegionListImpl(); - - public DTDNode(DTDFile dtdFile, IStructuredDocumentRegion flatNode) { - this.dtdFile = dtdFile; - this.flatNode = flatNode; - } - - public void addRegion(ITextRegion region) { - /* - * if (startRegion == null) { startRegion = region; } endRegion = - * region; - */ - regions.add(region); - } - - public void addWhitespaceRegion(ITextRegion region) { - whitespace.add(region); - } - - public void beginRecording(Object requestor, String label) { - getDTDFile().getDTDModel().beginRecording(requestor, label); - } - - public Node cloneNode(boolean deepest) { - return null; - } - - public boolean contains(int testPosition) { - return containsRange(testPosition, testPosition); - } - - public boolean containsRange(int start, int end) { - return getStartOffset() <= start && end <= getEndOffset(); - } - - public void delete(DTDNode child) { - beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_NODE_DELETE); //$NON-NLS-1$ - delete(this, child); - endRecording(this); - } - - public void delete(Object requestor, DTDNode child) { - replaceText(requestor, child.getStartOffset(), child.getFullNodeLength(), ""); //$NON-NLS-1$ - } - - public void endRecording(Object requestor) { - getDTDFile().getDTDModel().endRecording(requestor); - } - - public Object[] getChildren() { - return getChildrenList().toArray(); - } - - public List getChildrenList() { - Node child = getFirstChild(); - if (child != null) { - List children = new ArrayList(); - for (; child != null; child = child.getNextSibling()) { - children.add(child); - } - return children; - } - else { - return Collections.EMPTY_LIST; - } - } - - public DTDNode getDeepestNode(int offset) { - if (contains(offset)) { - // now see if a child contains this offset - Object[] children = getChildren(); - for (int i = 0; i < children.length; i++) { - DTDNode child = (DTDNode) children[i]; - DTDNode deepest = child.getDeepestNode(offset); - if (deepest != null) { - return deepest; - } - } // end of for () - return this; - } - return null; - } - - public DTDNode getDeepestNode(int start, int end) { - if (containsRange(start, end)) { - // now see if a child contains this offset - Object[] children = getChildren(); - for (int i = 0; i < children.length; i++) { - DTDNode child = (DTDNode) children[i]; - DTDNode deepest = child.getDeepestNode(start, end); - if (deepest != null) { - return deepest; - } - } // end of for () - return this; - } - return null; - } - - public DTDFile getDTDFile() { - return dtdFile; - } - - public int getEndOffset() { - return getStructuredDTDDocumentRegion().getEndOffset(getEndRegion()); - } - - public ITextRegion getEndRegion() { - return regions.get(regions.size() - 1);// endRegion; - } - - /** - */ - public FactoryRegistry getFactoryRegistry() { - DTDModelImpl model = dtdFile.getDTDModel(); - if (model != null) { - FactoryRegistry reg = model.getFactoryRegistry(); - if (reg != null) - return reg; - } - return null; - } - - public int getFullNodeLength() { - return getWhitespaceEndOffset() - getStartOffset(); - } - - public String getFullNodeText() { - String text = getNodeText(); - if (whitespace.size() > 0) { - RegionIterator iter = new RegionIterator(whitespace); - while (iter.hasNext()) { - ITextRegion region = iter.next(); - text += getStructuredDTDDocumentRegion().getText(region); - } - } - return text; - } - - abstract public String getImagePath(); - - public String getName() { - ITextRegion region = getNameRegion(); - if (region != null) { - return getStructuredDTDDocumentRegion().getText(region); - } - return ""; //$NON-NLS-1$ - } - - public ITextRegion getNameRegion() { - RegionIterator iter = iterator(); - while (iter.hasNext()) { - ITextRegion region = iter.next(); - if (region.getType() == DTDRegionTypes.NAME) { - return region; - } - } - return null; - } - - // return the first token containing the specified token type - public ITextRegion getNextRegion(RegionIterator iter, String type) { - while (iter.hasNext()) { - ITextRegion region = iter.next(); - if (region.getType().equals(type)) { - return region; - } - } - return null; - } - - public int getNodeLength() { - return getEndOffset() - getStartOffset(); - } - - public String getNodeName() { - return getName(); - } - - public String getNodeText() { - StringBuffer sb = new StringBuffer(); - - RegionIterator iter = iterator(); - while (iter.hasNext()) { - ITextRegion region = iter.next(); - sb.append(getStructuredDTDDocumentRegion().getText(region)); - } - return sb.toString(); - } - - public short getNodeType() { - return -1; - } - - public int getStartOffset() { - return getStructuredDTDDocumentRegion().getStartOffset(getStartRegion()); - } - - // private Region startRegion,endRegion; - public ITextRegion getStartRegion() { - return regions.get(0); - // return startRegion; - } - - /** - * Get the value of flatNode. - * - * @return value of flatNode. - * - * ISSUE:named changed not to be confused with default access protected - * super class method, but should re-think if this is correct technique. - * Perhaps getFirstRegion? - */ - public IStructuredDocumentRegion getStructuredDTDDocumentRegion() { - return flatNode; - } - - // return end offset including whitespace - // or just the end offset if there is no whitespace - public int getWhitespaceEndOffset() { - if (whitespace.size() > 0) { - ITextRegion region = whitespace.get(whitespace.size() - 1); - return getStructuredDTDDocumentRegion().getEndOffset(region); - } - - return getEndOffset(); - } - - public boolean hasTrailingWhitespace() { - return whitespace.size() > 0; - } - - public RegionIterator iterator() { - // System.out.println("create region iter " + this.getClass() + " with - // start , end = " + getStartOffset() + ", " +getEndOffset()); - return new RegionIterator(regions); - } - - public void replaceText(Object requestor, int start, int length, String newText) { - getDTDFile().getStructuredDocument().replaceText(requestor, start, length, newText); - } - - public void resolveRegions() { - } - - public void setName(Object requestor, String name) { - if (!getName().equals(name)) { - ITextRegion nameRegion = getNameRegion(); - if (nameRegion != null) { - // nameToken.updateText(name); - getDTDFile().getDTDModel().getReferenceUpdater().nameAboutToChange(requestor, this, name); - replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(nameRegion), nameRegion.getLength(), name); - } - } - } - - public void setName(String name) { - beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_NODE_NAME_CHG); //$NON-NLS-1$ - setName(this, name); - endRecording(this); - } - - /** - * Set the value of flatNode. - * - * @param v - * Value to assign to flatNode. ISSUE:named changed not to be - * confused with default access protected super class method, - * but should re-think if this is correct technique - */ - void setStructuredDTDDocumentRegion(IStructuredDocumentRegion v) { - this.flatNode = v; - } - - // skips past next name token in the iterator - protected void skipPastName(RegionIterator iter) { - while (iter.hasNext()) { - ITextRegion currentRegion = iter.next(); - if (currentRegion.getType() == DTDRegionTypes.NAME) { - break; - } - } - } - - public boolean supports(java.lang.String feature, java.lang.String version) { - return false; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDResource.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDResource.java deleted file mode 100644 index 9c6db9ba53..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDResource.java +++ /dev/null @@ -1,56 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - - -public interface DTDResource { - // Enumeration Constants - public static final String ANYICON = "icons/full/obj16/any.gif"; //$NON-NLS-1$ - public static final String ATTRIBUTEICON = "icons/full/obj16/attribute.gif"; //$NON-NLS-1$ - public static final String ATTRIBUTELISTICON = "icons/full/obj16/attribute_list.gif"; //$NON-NLS-1$ - public static final String COMMENTICON = "icons/full/obj16/comment.gif"; //$NON-NLS-1$ - - public static final String DTDFILEICON = "icons/full/obj16/DTDFile.gif"; //$NON-NLS-1$ - public static final String ELEMENTICON = "icons/full/obj16/element.gif"; //$NON-NLS-1$ - public static final String ELEMENTREFICON = "icons/full/obj16/element_ref.gif"; //$NON-NLS-1$ - public static final String EMPTYICON = "icons/full/obj16/emptycontent.gif"; //$NON-NLS-1$ - public static final String ENTITYICON = "icons/full/obj16/entity.gif"; //$NON-NLS-1$ - public static final String ENTITYREFERENCEICON = "icons/full/obj16/entity_reference.gif"; //$NON-NLS-1$ - public static final String FLDR_ATTLIST = "icons/full/obj16/folder_attlist_obj.gif"; //$NON-NLS-1$ - public static final String FLDR_COMM = "icons/full/obj16/folder_comments_obj.gif"; //$NON-NLS-1$ - - public static final String FLDR_EL = "icons/full/obj16/fldr_el.gif"; //$NON-NLS-1$ - public static final String FLDR_ENT = "icons/full/obj16/fldr_ent.gif"; //$NON-NLS-1$ - public static final String FLDR_NOT = "icons/full/obj16/fldr_not.gif"; //$NON-NLS-1$ - public static final String FLDR_UNREC = "icons/full/obj16/fldr_unrec.gif"; //$NON-NLS-1$ - - public static final String NEWHTMLFORM = "icons/full/obj16/genhtmform_wiz.gif"; //$NON-NLS-1$ - public static final String NOTATIONICON = "icons/full/obj16/notation.gif"; //$NON-NLS-1$ - - public static final String ONECHOICEICON = "icons/full/obj16/onechoice.gif"; //$NON-NLS-1$ - - public static final String ONEICON = "icons/full/obj16/one.gif"; //$NON-NLS-1$ - public static final String ONEORMORECHOICEICON = "icons/full/obj16/oneormorechoice.gif"; //$NON-NLS-1$ - public static final String ONEORMOREICON = "icons/full/obj16/oneormore.gif"; //$NON-NLS-1$ - public static final String ONEORMORESEQUENCEICON = "icons/full/obj16/oneormoresequence.gif"; //$NON-NLS-1$ - - public static final String ONESEQUENCEICON = "icons/full/obj16/onesequence.gif"; //$NON-NLS-1$ - public static final String OPTIONALCHOICEICON = "icons/full/obj16/optionalchoice.gif"; //$NON-NLS-1$ - public static final String OPTIONALICON = "icons/full/obj16/optional.gif"; //$NON-NLS-1$ - public static final String OPTIONALSEQUENCEICON = "icons/full/obj16/optionalsequence.gif"; //$NON-NLS-1$ - public static final String PCDATAICON = "icons/full/obj16/txtext.gif"; //$NON-NLS-1$ - public static final String UNRECOGNIZEDICON = "icons/full/obj16/unrecognized_content.gif"; //$NON-NLS-1$ - public static final String ZEROORMORECHOICEICON = "icons/full/obj16/zeroormorechoice.gif"; //$NON-NLS-1$ - public static final String ZEROORMOREICON = "icons/full/obj16/zeroormore.gif"; //$NON-NLS-1$ - public static final String ZEROORMORESEQUENCEICON = "icons/full/obj16/zeroormoresequence.gif"; //$NON-NLS-1$ -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java deleted file mode 100644 index eca244feb7..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java +++ /dev/null @@ -1,204 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.w3c.dom.Node; - - -public class Element extends NamedTopLevelNode { - - List attListList = new ArrayList(); - - List attributes = new ArrayList(); - - protected CMNode fContentModel; - - public Element(DTDFile dtdFile, IStructuredDocumentRegion flatNode) { - super(dtdFile, flatNode, DTDRegionTypes.ELEMENT_TAG); - } - - public void addAttribute(String name) { - beginRecording(this, DTDCoreMessages._UI_LABEL_ELEMENT_ADD_ATTR); //$NON-NLS-1$ - List attLists = getAttributeLists(); - if (attLists.size() == 0) { - getDTDFile().createAttributeList(this, getName(), true); - attLists = getAttributeLists(); - } - if (attLists.size() > 0) { - AttributeList attList = (AttributeList) attLists.get(attLists.size() - 1); - attList.addAttribute(name); - } - endRecording(this); - } - - public void addChild() { - beginRecording(this, DTDCoreMessages._UI_LABEL_ELEMENT_ADD_CHILD); //$NON-NLS-1$ - addContent(this, " EMPTY"); //$NON-NLS-1$ - endRecording(this); - } - - protected void addContent(Object requestor, String content) { - ITextRegion whitespace = getWhitespaceAfterName(); - int startOffset = 0; - int length = 0; - if (whitespace != null) { - startOffset = getStructuredDTDDocumentRegion().getStartOffset(whitespace); - length = whitespace.getLength() >= 2 ? 1 : 0; - } - else { - ITextRegion nameRegion = getNameRegion(); - if (nameRegion != null) { - startOffset = getStructuredDTDDocumentRegion().getEndOffset(nameRegion); - } - else { - ITextRegion elementTag = getNextRegion(iterator(), DTDRegionTypes.ELEMENT_TAG); - startOffset = getStructuredDTDDocumentRegion().getEndOffset(elementTag); - } - } - replaceText(requestor, startOffset, length, content); - } - - public void addGroup() { - beginRecording(this, DTDCoreMessages._UI_LABEL_ELEMENT_ADD_GRP); //$NON-NLS-1$ - addContent(this, " ()"); //$NON-NLS-1$ - endRecording(this); - } - - public Node cloneNode(boolean deep) { - return new Element(dtdFile, flatNode); - } - - public List getAttributeLists() { - attListList.clear(); - String elementName = getName(); - Iterator iter = dtdFile.getNodes().iterator(); - while (iter.hasNext()) { - DTDNode node = (DTDNode) iter.next(); - if (node instanceof AttributeList && node.getName().equals(elementName)) { - attListList.add(node); - } - } - return attListList; - } - - - - public CMNode getContentModel() { - // Object[] children = getChildren() - return (CMNode) getFirstChild();// contentModel; - } - - public List getElementAttributes() { - attributes.clear(); - Iterator attLists = getAttributeLists().iterator(); - while (attLists.hasNext()) { - AttributeList attList = (AttributeList) attLists.next(); - - Object[] children = attList.getChildren(); - for (int i = 0; i < children.length; i++) { - attributes.add(children[i]); - } - } - return attributes; - } - - public String getImagePath() { - return DTDResource.ELEMENTICON; - } - - public short getNodeType() { - return Node.ELEMENT_NODE; - } - - public void replaceContentModel(Object requestor, CMNode node) { - replaceContentModel(requestor, node.getNodeText()); - } - - public void replaceContentModel(Object requestor, String nodeText) { - int offset = 0; - int length = 0; - CMNode contentModel = getContentModel(); - if (contentModel != null) { - offset = contentModel.getStartOffset(); - length = contentModel.getWhitespaceEndOffset() - offset; - replaceText(requestor, offset, length, nodeText); - } - else { - addContent(requestor, nodeText); - } - } - - public void resolveRegions() { - // System.out.println("element node stream = " + - // tokenStream.getString()); - fContentModel = null; - removeChildNodes(); - RegionIterator iter = iterator(); - - if (getNameRegion() != null) { - // we skip past the name token is our name - skipPastName(iter); - } - - while (iter.hasNext()) { - ITextRegion currentRegion = iter.next(); - - if (fContentModel == null) { - if (currentRegion.getType().equals(DTDRegionTypes.NAME)) { - fContentModel = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion()); - } - else if (currentRegion.getType().equals(DTDRegionTypes.CONTENT_PCDATA)) { - fContentModel = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion()); - } - else if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) { - fContentModel = new CMGroupNode(getDTDFile(), getStructuredDTDDocumentRegion()); - } - } - - if (fContentModel != null) { - if (!currentRegion.getType().equals(DTDRegionTypes.END_TAG)) { - // content model gets all regions except for the '>' - fContentModel.addRegion(currentRegion); - } - else { - // if it is equal to the end tag, then don't add anymore - // regions - // for the content model - break; - } - - } - - } - if (fContentModel != null) { - appendChild(fContentModel); - // this is the root element content so set it true - fContentModel.setRootElementContent(true); - // now tell the content model to resolve it's regions - fContentModel.resolveRegions(); - - } - } - - public void setContentModel(CMNode contentModel) { - this.fContentModel = contentModel; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java deleted file mode 100644 index dae8da47c5..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java +++ /dev/null @@ -1,332 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -// external node contains code to help set and get public ids -public class Entity extends ExternalNode { - - private static String setExternalEntity = DTDCoreMessages._UI_LABEL_ENTITY_SET_EXT_ENTITY; //$NON-NLS-1$ - private static String setGeneralEntity = DTDCoreMessages._UI_LABEL_ENTITY_SET_GENERAL_ENTITY; //$NON-NLS-1$ - private static String setInternalEntity = DTDCoreMessages._UI_LABEL_ENTITY_SET_INT_ENTITY; //$NON-NLS-1$ - - private static String setParameterEntity = DTDCoreMessages._UI_LABEL_ENTITY_SET_PARM_ENTITY; //$NON-NLS-1$ - - public Entity(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode, DTDRegionTypes.ENTITY_TAG); - } - - public String getImagePath() { - return DTDResource.ENTITYICON; - } - - - /** - * Get the value of notationName. - * - * @return value of notationName. - */ - public String getNotationName() { - ITextRegion ndataRegion = getNextRegion(iterator(), DTDRegionTypes.NDATA_VALUE); - if (ndataRegion != null) { - return getStructuredDTDDocumentRegion().getText(ndataRegion); - } - return ""; //$NON-NLS-1$ - } - - public ITextRegion getPercentRegion() { - return getNextRegion(iterator(), DTDRegionTypes.PERCENT); - } - - /** - * Get the value of value. - * - * @return value of value. - */ - public String getValue() { - if (!isExternalEntity()) { - ITextRegion valueRegion = getNextQuotedLiteral(iterator()); - if (valueRegion != null) { - return getValueFromQuotedRegion(valueRegion); - } - } - return ""; //$NON-NLS-1$ - } - - /** - * Get the value of externalEntity. - * - * @return value of externalEntity. - */ - public boolean isExternalEntity() { - return getPublicKeywordRegion(iterator()) != null || getSystemKeywordRegion(iterator()) != null; - } - - /** - * Get the value of isParameterEntity. - * - * @return value of isParameterEntity. - */ - public boolean isParameterEntity() { - return getPercentRegion() != null; - } - - private void removeNData(Object requestor) { - ITextRegion ndataRegion = null; - - // see if we have an NDATA keyword - ndataRegion = getNextRegion(iterator(), DTDRegionTypes.NDATA_KEYWORD); - int startOffset = 0, endOffset = 0; - if (ndataRegion != null) { - startOffset = getStructuredDTDDocumentRegion().getStartOffset(ndataRegion); - endOffset = getStructuredDTDDocumentRegion().getEndOffset(ndataRegion); - } - ITextRegion value = getNextRegion(iterator(), DTDRegionTypes.NDATA_VALUE); - if (value != null) { - if (startOffset == 0) { - startOffset = getStructuredDTDDocumentRegion().getStartOffset(value); - } - endOffset = getStructuredDTDDocumentRegion().getEndOffset(value); - } - replaceText(requestor, startOffset, endOffset - startOffset, ""); //$NON-NLS-1$ - } - - /** - * Set the value of externalEntity. - * - * @param v - * Value to assign to externalEntity. - */ - public void setExternalEntity(boolean isExternalEntity) { - if (isExternalEntity() != isExternalEntity) { - // externalEntity = v; - beginRecording(this, isExternalEntity ? setExternalEntity : setInternalEntity); - if (isExternalEntity) { - // we need to get rid of the value literal - ITextRegion quote = getNextRegion(iterator(), DTDRegionTypes.SINGLEQUOTED_LITERAL); - if (quote == null) { - quote = getNextRegion(iterator(), DTDRegionTypes.DOUBLEQUOTED_LITERAL); - } - if (quote != null) { - replaceText(this, getStructuredDTDDocumentRegion().getStartOffset(quote), quote.getLength(), ""); //$NON-NLS-1$ - } - setSystemID(""); //$NON-NLS-1$ - } - else { - // we need to get rid of text between end of name region and - // the last double quoted literal - RegionIterator iter = iterator(); - ITextRegion keyword = getSystemKeywordRegion(iter); - int startOffset = 0; - int length = 0; - if (keyword == null) { - // reset the iterator - iter = iterator(); - keyword = getPublicKeywordRegion(iter); - } - if (keyword != null) { - startOffset = getStructuredDTDDocumentRegion().getStartOffset(keyword); - // start with a length just equal to the keyword for now - length = keyword.getLength(); - } - else { - // reset the iterator since we didn't find the keyword - iter = iterator(); - // just go from after the name - startOffset = getStructuredDTDDocumentRegion().getEndOffset(getNameRegion()); - } - - // now that we have the start, look for the end - ITextRegion lastRegion = null; - - if (lastRegion == null) { - // then look for last quoted literal - while (iter.hasNext()) { - ITextRegion literal = getNextQuotedLiteral(iter); - if (literal != null) { - lastRegion = literal; - } - } - } - - if (lastRegion != null) { - length = getStructuredDTDDocumentRegion().getEndOffset(lastRegion) - startOffset; - } - replaceText(this, startOffset, length, "\"\""); //$NON-NLS-1$ - removeNData(this); - } - endRecording(this); - } - } - - public void setNotationName(Object requestor, String newNotation) { - if (!getNotationName().equals(newNotation)) { - if (!newNotation.equals("")) { //$NON-NLS-1$ - // - ITextRegion ndataRegion = getNextRegion(iterator(), DTDRegionTypes.NDATA_VALUE); - if (ndataRegion != null) { - replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(ndataRegion), ndataRegion.getLength(), newNotation); - } - else { - // time to create one - int startOffset = 0; - String string = ""; //$NON-NLS-1$ - RegionIterator iter = iterator(); - ITextRegion ndataKeyword = getNextRegion(iter, DTDRegionTypes.NDATA_KEYWORD); - if (ndataKeyword == null) { - // we'll need to create one after the last quoted - // literal - // Reset iterator - string += " NDATA "; //$NON-NLS-1$ - iter = iterator(); - ITextRegion lastQuotedLiteral = null; - while (iter.hasNext()) { - ITextRegion literal = getNextQuotedLiteral(iter); - if (literal != null) { - lastQuotedLiteral = literal; - } - } - if (lastQuotedLiteral != null) { - startOffset = getStructuredDTDDocumentRegion().getEndOffset(lastQuotedLiteral); - } - else { - // created after the system or public keyword - ITextRegion keyword = getPublicKeywordRegion(iterator()); - if (keyword == null) { - keyword = getSystemKeywordRegion(iterator()); - } - // we shouldn't be null here since we check if we - // were external already - startOffset = getStructuredDTDDocumentRegion().getEndOffset(keyword); - } - - } - else { - startOffset = getStructuredDTDDocumentRegion().getEndOffset(ndataKeyword); - } - replaceText(requestor, startOffset, 0, string + newNotation); - } - } - else { - // need to remove the ndata stuff - removeNData(requestor); - } - } - } - - /** - * Set the value of notationName. - * - * @param newNotation - * Value to assign to notationName. - */ - public void setNotationName(String newNotation) { - beginRecording(this, "NDATA " + DTDCoreMessages._UI_LABEL_ENTITY_NDATA_CHANGE); //$NON-NLS-1$ //$NON-NLS-2$ - setNotationName(this, newNotation); - endRecording(this); - } - - /** - * Set the value of isParameterEntity. - * - * @param v - * Value to assign to isParameterEntity. - */ - public void setParameterEntity(boolean v) { - if (isParameterEntity() != v) { - beginRecording(this, v ? setParameterEntity : setGeneralEntity); - if (v) { - RegionIterator iter = iterator(); - ITextRegion startTag = getNextRegion(iter, DTDRegionTypes.ENTITY_TAG); - int startOffset = 0, length = 0; - - if (iter.hasNext()) { - ITextRegion region = iter.next(); - startOffset = getStructuredDTDDocumentRegion().getStartOffset(region); - if (region.getType() == DTDRegionTypes.WHITESPACE && region.getLength() > 1) { - length = 1; - } - } - else { - startOffset = getStructuredDTDDocumentRegion().getEndOffset(startTag); - } - replaceText(this, startOffset, length, " %"); //$NON-NLS-1$ - // now get rid of any NData since it is only allowed if the - // entity is a general entity and not a parameter entity - removeNData(this); - } - else { - // get rid of percent region - ITextRegion percentRegion = getPercentRegion(); - replaceText(this, getStructuredDTDDocumentRegion().getStartOffset(percentRegion), percentRegion.getLength(), ""); //$NON-NLS-1$ - } - - endRecording(this); - } - } - - /** - * Set the value of value. - * - * @param v - * Value to assign to value. - */ - public void setValue(Object requestor, String v) { - if (!isExternalEntity()) { - if (!getValue().equals(v)) { - // then it makes sense to change the value - ITextRegion valueRegion = getNextQuotedLiteral(iterator()); - String quoteChar = v.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - if (valueRegion != null) { - replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(valueRegion), valueRegion.getLength(), quoteChar + v + quoteChar); - } - else { - int startOffset = 0; - RegionIterator iter = iterator(); - ITextRegion region = getNextRegion(iter, DTDRegionTypes.NAME); - if (region == null) { - // create it after the percent if there is one - region = getPercentRegion(); - } - if (region == null) { - // if still null, then create it after the element tag - region = getStartTag(iterator()); - } - - if (region != null) { - startOffset = getStructuredDTDDocumentRegion().getEndOffset(region); - replaceText(requestor, startOffset, 0, quoteChar + v + quoteChar); - } - } - } - } - } - - /** - * Set the value of value. - * - * @param v - * Value to assign to value. - */ - public void setValue(String v) { - beginRecording(this, DTDCoreMessages._UI_LABEL_ENTITY_VALUE_CHG); //$NON-NLS-1$ - setValue(this, v); - endRecording(this); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ExternalNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ExternalNode.java deleted file mode 100644 index 4e3cea7b42..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ExternalNode.java +++ /dev/null @@ -1,250 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -// base class for nodes that can contain external content -public abstract class ExternalNode extends NamedTopLevelNode { - - String publicID; - - String systemID; - - public ExternalNode(DTDFile file, IStructuredDocumentRegion flatNode, String tagType) { - super(file, flatNode, tagType); - } - - public ITextRegion getNextQuotedLiteral(RegionIterator iter) { - while (iter.hasNext()) { - ITextRegion region = iter.next(); - if (region.getType().equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || region.getType().equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) { - return region; - } - } - return null; - } - - /** - * Get the value of publicID. - * - * @return value of publicID. - */ - public String getPublicID() { - ITextRegion publicValue = getPublicValueRegion(); - if (publicValue != null) { - return getValueFromQuotedRegion(publicValue); - } - return ""; //$NON-NLS-1$ - } - - public ITextRegion getPublicKeywordRegion(RegionIterator iter) { - return getNextRegion(iter, DTDRegionTypes.PUBLIC_KEYWORD); - } - - public ITextRegion getPublicValueRegion() { - RegionIterator iter = iterator(); - - ITextRegion publicKeyword = getPublicKeywordRegion(iter); - - if (publicKeyword != null && iter.hasNext()) { - ITextRegion quotedLiteral = getNextQuotedLiteral(iter); - if (quotedLiteral != null) { - return quotedLiteral; - } - } - return null; - } - - /** - * Get the value of systemID. - * - * @return value of systemID. - */ - public String getSystemID() { - ITextRegion systemValue = getSystemValueRegion(); - if (systemValue != null) { - return getValueFromQuotedRegion(systemValue); - } - return ""; //$NON-NLS-1$ - } - - public ITextRegion getSystemKeywordRegion(RegionIterator iter) { - return getNextRegion(iter, DTDRegionTypes.SYSTEM_KEYWORD); - } - - public ITextRegion getSystemValueRegion() { - RegionIterator iter = iterator(); - - ITextRegion systemKeyword = getSystemKeywordRegion(iter); - if (systemKeyword != null && iter.hasNext()) { - ITextRegion quotedLiteral = getNextQuotedLiteral(iter); - if (quotedLiteral != null) { - return quotedLiteral; - } - } - else { - // try and see if there is a second quoted literal after a public - // keyword - iter = iterator(); - ITextRegion publicKeyword = getPublicKeywordRegion(iter); - - if (publicKeyword != null && iter.hasNext()) { - ITextRegion quotedLiteral = getNextQuotedLiteral(iter); - if (quotedLiteral != null && iter.hasNext()) { - // now get the second quoted literal - quotedLiteral = getNextQuotedLiteral(iter); - if (quotedLiteral != null) { - // got it! - return quotedLiteral; - } - } - } - } - return null; - } - - public String getValueFromQuotedRegion(ITextRegion region) { - String type = region.getType(); - if (type.equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || type.equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) { - String text = getStructuredDTDDocumentRegion().getText(region); - return text.substring(1, text.length() - 1); - } - return ""; //$NON-NLS-1$ - } - - /** - * Set the value of publicID. - * - * @param v - * Value to assign to publicID. - */ - public void setPublicID(Object requestor, String v) { - if (!v.equals(publicID)) { - publicID = v; - ITextRegion publicValue = getPublicValueRegion(); - ITextRegion publicKeyword = getPublicKeywordRegion(iterator()); - ITextRegion systemKeyword = getSystemKeywordRegion(iterator()); - ITextRegion systemValue = getSystemValueRegion(); - - if (v.equals("")) { //$NON-NLS-1$ - if (publicKeyword != null) { - // time to get rid of the public keyword and value - // and replace it with the system one - int startOffset = getStructuredDTDDocumentRegion().getStartOffset(publicKeyword); - String newString = "SYSTEM"; //$NON-NLS-1$ - if (systemValue == null) { - newString += " \"\""; //$NON-NLS-1$ - } - replaceText(requestor, startOffset, getStructuredDTDDocumentRegion().getEndOffset(publicValue) - startOffset, newString); - } - } - else { - // here were setting a non empty value - String quoteChar = v.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - if (publicValue != null) { - replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(publicValue), publicValue.getLength(), quoteChar + publicID + quoteChar); - } - else { - // time to create stuff - if (publicKeyword != null) { - // then just put our new value after the keyword - replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(publicKeyword), 0, " " + quoteChar + v + quoteChar); //$NON-NLS-1$ - } - else { - // we need the public keyword as well - if (systemKeyword != null) { - replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(systemKeyword), systemKeyword.getLength(), "PUBLIC " + quoteChar + v + quoteChar); //$NON-NLS-1$ - } - else { - ITextRegion nameRegion = getNameRegion(); - replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(nameRegion), 0, " PUBLIC " + quoteChar + v + quoteChar); //$NON-NLS-1$ - } - } - } - } - } - } - - - /** - * Set the value of publicID. - * - * @param v - * Value to assign to publicID. - */ - public void setPublicID(String v) { - beginRecording(this, DTDCoreMessages._UI_LABEL_EXT_NODE_PUBLIC_ID_CHG); //$NON-NLS-1$ - setPublicID(this, v); - endRecording(this); - } - - /** - * Set the value of systemID. - * - * @param v - * Value to assign to systemID. - */ - public void setSystemID(Object requestor, String v) { - if (!v.equals(systemID) || (getPublicKeywordRegion(iterator()) == null && getSystemKeywordRegion(iterator()) == null)) { - systemID = v; - String quoteChar = v.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - ITextRegion systemValue = getSystemValueRegion(); - if (systemValue != null) { - replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(systemValue), systemValue.getLength(), quoteChar + systemID + quoteChar); - } - else { - ITextRegion systemKeyword = getSystemKeywordRegion(iterator()); - - // time to create stuff - if (systemKeyword != null) { - // then just put our new value after the keyword - replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(systemKeyword), 0, " " + quoteChar + v + quoteChar); //$NON-NLS-1$ - } - else { - // see if we have a public keyword - ITextRegion publicKeyword = getPublicKeywordRegion(iterator()); - if (publicKeyword == null) { - ITextRegion nameRegion = getNameRegion(); - - replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(nameRegion), 0, " SYSTEM " + quoteChar + v + quoteChar); //$NON-NLS-1$ - } - else { - // put it after the public value region - ITextRegion publicValueRegion = getPublicValueRegion(); - replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(publicValueRegion), 0, " " + quoteChar + v + quoteChar); //$NON-NLS-1$ - } - - } - } - - } - } - - - /** - * Set the value of systemID. - * - * @param v - * Value to assign to systemID. - */ - public void setSystemID(String v) { - beginRecording(this, DTDCoreMessages._UI_LABEL_EXT_NODE_SYSTEM_ID_CHG); //$NON-NLS-1$ - setSystemID(this, v); - endRecording(this); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java deleted file mode 100644 index 158f48523e..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java +++ /dev/null @@ -1,143 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import com.ibm.icu.util.StringTokenizer; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.osgi.framework.Bundle; - -/** - * Small convenience class to log messages to plugin's log file and also, if - * desired, the console. This class should only be used by classes in this - * plugin. Other plugins should make their own copy, with appropriate ID. - */ -public class Logger { - private static final String PLUGIN_ID = "org.eclipse.wst.dtd.core"; //$NON-NLS-1$ - - public static final int ERROR = IStatus.ERROR; // 4 - public static final int ERROR_DEBUG = 200 + ERROR; - public static final int INFO = IStatus.INFO; // 1 - public static final int INFO_DEBUG = 200 + INFO; - - public static final int OK = IStatus.OK; // 0 - - public static final int OK_DEBUG = 200 + OK; - - private static final String TRACEFILTER_LOCATION = "/debug/tracefilter"; //$NON-NLS-1$ - public static final int WARNING = IStatus.WARNING; // 2 - public static final int WARNING_DEBUG = 200 + WARNING; - - /** - * Adds message to log. - * - * @param level - * severity level of the message (OK, INFO, WARNING, ERROR, - * OK_DEBUG, INFO_DEBUG, WARNING_DEBUG, ERROR_DEBUG) - * @param message - * text to add to the log - * @param exception - * exception thrown - */ - protected static void _log(int level, String message, Throwable exception) { - if (level == OK_DEBUG || level == INFO_DEBUG || level == WARNING_DEBUG || level == ERROR_DEBUG) { - if (!isDebugging()) - return; - } - - int severity = IStatus.OK; - switch (level) { - case INFO_DEBUG : - case INFO : - severity = IStatus.INFO; - break; - case WARNING_DEBUG : - case WARNING : - severity = IStatus.WARNING; - break; - case ERROR_DEBUG : - case ERROR : - severity = IStatus.ERROR; - } - Status statusObj = new Status(severity, PLUGIN_ID, severity, message, exception); - Bundle bundle = Platform.getBundle(PLUGIN_ID); - if (bundle != null) - Platform.getLog(bundle).log(statusObj); - } - - /** - * Prints message to log if category matches /debug/tracefilter option. - * - * @param message - * text to print - * @param category - * category of the message, to be compared with - * /debug/tracefilter - */ - protected static void _trace(String category, String message, Throwable exception) { - if (!isDebugging()) - return; - - String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION); - if (traceFilter != null) { - StringTokenizer tokenizer = new StringTokenizer(traceFilter, ","); //$NON-NLS-1$ - while (tokenizer.hasMoreTokens()) { - String cat = tokenizer.nextToken().trim(); - if (category.equals(cat)) { - Status statusObj = new Status(IStatus.OK, PLUGIN_ID, IStatus.OK, message, exception); - Bundle bundle = Platform.getBundle(PLUGIN_ID); - if (bundle != null) - Platform.getLog(bundle).log(statusObj); - return; - } - } - } - } - - /** - * @return true if the platform is debugging - */ - public static boolean isDebugging() { - return Platform.inDebugMode(); - } - - public static void log(int level, String message) { - _log(level, message, null); - } - - public static void log(int level, String message, Throwable exception) { - _log(level, message, exception); - } - - public static void logException(String message, Throwable exception) { - _log(ERROR, message, exception); - } - - public static void logException(Throwable exception) { - _log(ERROR, exception.getMessage(), exception); - } - - public static void trace(String category, String message) { - _trace(category, message, null); - } - - public static void traceException(String category, String message, Throwable exception) { - _trace(category, message, exception); - } - - public static void traceException(String category, Throwable exception) { - _trace(category, exception.getMessage(), exception); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NamedTopLevelNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NamedTopLevelNode.java deleted file mode 100644 index 9f7f51f9f6..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NamedTopLevelNode.java +++ /dev/null @@ -1,135 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -// interface for nodes that can exist at the top level in a dtdfile -// eg. entity, notation, element, comment, attlist, or unrecognized stuff (ie -// <junk dkfjdl> -public abstract class NamedTopLevelNode extends TopLevelNode { - - private String tagStartType; - - public NamedTopLevelNode(DTDFile dtdFile, IStructuredDocumentRegion flatNode, String type) { - super(dtdFile, flatNode); - tagStartType = type; - } - - public ITextRegion getNameRegion() { - // name region is located after the whitespace (which is after - // the elementtag - RegionIterator iter = iterator(); - getNextRegion(iter, tagStartType); - - if (!iter.hasNext()) { - return null; - } - - ITextRegion region = iter.next(); - if (!region.getType().equals(DTDRegionTypes.WHITESPACE)) { - return null; - } - - if (!iter.hasNext()) { - return null; - } - - region = iter.next(); - if (region.getType().equals(DTDRegionTypes.NAME)) { - return region; - } - - // we normally stop here, but for entities, we have to see if we are - // at a '%'. if so, we skip that and find the name after the - // whitespace again - if (tagStartType == DTDRegionTypes.ENTITY_TAG && region.getType().equals(DTDRegionTypes.PERCENT) && iter.hasNext()) { - region = iter.next(); - - if (!region.getType().equals(DTDRegionTypes.WHITESPACE)) { - return null; - } - - if (!iter.hasNext()) { - return null; - } - - region = iter.next(); - if (region.getType().equals(DTDRegionTypes.NAME)) { - return region; - } - } - - return null; - } - - public ITextRegion getStartTag(RegionIterator iter) { - return getNextRegion(iter, tagStartType); - } - - public ITextRegion getWhitespaceAfterName() { - ITextRegion nameRegion = getNameRegion(); - RegionIterator iter = iterator(); - // skip past the element tag region - getNextRegion(iter, tagStartType); - boolean foundName = false; - while (iter.hasNext()) { - ITextRegion region = iter.next(); - if (!foundName && nameRegion != null && region == nameRegion) { - foundName = true; - } - - if (region.getType().equals(DTDRegionTypes.WHITESPACE)) { - // there is no name region or we have already passed it - if (nameRegion == null || foundName) { - return region; - } - } - } - return null; - } - - public void setName(Object requestor, String name) { - ITextRegion nameRegion = getNameRegion(); - if (nameRegion != null) { - super.setName(requestor, name); - } - else { - RegionIterator iter = iterator(); - ITextRegion elementTagRegion = getNextRegion(iter, tagStartType); - int replaceLength = 0; - if (iter.hasNext()) { - ITextRegion region = iter.next(); - if (region.getType().equals(DTDRegionTypes.WHITESPACE)) { - if (region.getLength() >= 2) { - // there are 2 spaces between 'ELEMENT' and the - // content - // Change replace length to 1 so that the new name and - // the content are separated by a single space - replaceLength = 1; - } - } - } - - // beginRecording(requestor, "Name Change"); - String newText = " " + name; //$NON-NLS-1$ - replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(elementTagRegion), replaceLength, newText); - // endRecording(requestor); - } - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java deleted file mode 100644 index b0026d79e6..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java +++ /dev/null @@ -1,108 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import java.util.ArrayList; -import java.util.Iterator; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; - - -public class NodeList { - protected DTDFile dtdFile; - - ArrayList listNodes = new ArrayList(); - - protected String listType; - - public NodeList(DTDFile dtdFile, String tokenType) { - listType = tokenType; - this.dtdFile = dtdFile; - } - - public String getImagePath() { - if (listType == DTDRegionTypes.ELEMENT_TAG) { - return DTDResource.FLDR_EL; - } - else if (listType == DTDRegionTypes.ENTITY_TAG) { - return DTDResource.FLDR_ENT; - } - else if (listType == DTDRegionTypes.NOTATION_TAG) { - return DTDResource.FLDR_NOT; - } - else if (listType == DTDRegionTypes.COMMENT_START) { - return DTDResource.FLDR_COMM; - } - else if (listType == DTDRegionTypes.ATTLIST_TAG) { - return DTDResource.FLDR_ATTLIST; - } - else if (listType == DTDRegionTypes.UNKNOWN_CONTENT) { - return DTDResource.FLDR_UNREC; - } - else - return null; - } - - public String getListType() { - return listType; - } - - public String getName() { - if (listType == DTDRegionTypes.ELEMENT_TAG) { - return DTDCoreMessages._UI_LABEL_NODE_LIST_ELEMENTS; //$NON-NLS-1$ - } - else if (listType == DTDRegionTypes.ENTITY_TAG) { - return DTDCoreMessages._UI_LABEL_NODE_LIST_ENTITIES; //$NON-NLS-1$ - } - else if (listType == DTDRegionTypes.NOTATION_TAG) { - return DTDCoreMessages._UI_LABEL_NODE_LIST_NOTATIONS; //$NON-NLS-1$ - } - else if (listType == DTDRegionTypes.COMMENT_START) { - return DTDCoreMessages._UI_LABEL_NODE_LIST_COMMENTS; //$NON-NLS-1$ - } - else if (listType == DTDRegionTypes.ATTLIST_TAG) { - return DTDCoreMessages._UI_LABEL_NODE_LIST_ATTRIBUTES; //$NON-NLS-1$ - } - else if (listType == DTDRegionTypes.UNKNOWN_CONTENT) { - return DTDCoreMessages._UI_LABEL_NODE_LIST_OTHER; //$NON-NLS-1$ - } - return ""; //$NON-NLS-1$ - } - - public ArrayList getNodes() { - listNodes.clear(); - Iterator iter = dtdFile.getNodes().iterator(); - while (iter.hasNext()) { - DTDNode node = (DTDNode) iter.next(); - if (listType == DTDRegionTypes.ELEMENT_TAG && (node instanceof Element || node instanceof ParameterEntityReference)) { - listNodes.add(node); - } - else if (listType == DTDRegionTypes.ATTLIST_TAG && node instanceof AttributeList) { - listNodes.add(node); - } - else if (listType == DTDRegionTypes.ENTITY_TAG && node instanceof Entity) { - listNodes.add(node); - } - else if (listType == DTDRegionTypes.NOTATION_TAG && node instanceof Notation) { - listNodes.add(node); - } - else if (listType == DTDRegionTypes.COMMENT_START && node instanceof Comment) { - listNodes.add(node); - } - else if (listType == DTDRegionTypes.UNKNOWN_CONTENT && node instanceof Unrecognized) { - listNodes.add(node); - } - } - return listNodes; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java deleted file mode 100644 index 0410b7c645..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; - - -public class Notation extends ExternalNode { - - public Notation(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode, DTDRegionTypes.NOTATION_TAG); - } - - public String getImagePath() { - return DTDResource.NOTATIONICON; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java deleted file mode 100644 index 73bbbdcb06..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java +++ /dev/null @@ -1,111 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -public class ParameterEntityReference extends NamedTopLevelNode { - - - - public class StartEndPair { - public int startOffset, endOffset; - } - - private Entity cachedEntity = null; - - public ParameterEntityReference(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode, DTDRegionTypes.COMMENT_START); - } - - public Entity getEntityObject() { - if (cachedEntity != null && !cachedEntity.getName().equals(getReferencedEntity())) { - // if we have a cached entity, but the name doesnt match, - // null it now, so we perform a lookup - cachedEntity = null; - } - - if (cachedEntity == null) { - List nodes = getDTDFile().getNodes(); - for (int i = 0; i < nodes.size(); i++) { - DTDNode node = (DTDNode) nodes.get(i); - if (node instanceof Entity) { - Entity entity = (Entity) node; - if (entity.isParameterEntity() && entity.getName().equals(getReferencedEntity())) { - cachedEntity = entity; - } - } - } - } - return cachedEntity; - } - - public String getImagePath() { - return DTDResource.ENTITYREFERENCEICON; - } - - public String getName() { - return getStructuredDTDDocumentRegion().getText(); - } - - public String getReferencedEntity() { - String text = getName(); - return getName().substring(1, text.length() - 1); - } - - private void getStartAndEndOffsetForText(StartEndPair pair) { - RegionIterator iter = iterator(); - ITextRegion commentStartTag = getStartTag(iter); - ITextRegion endCommentTag = getNextRegion(iter, DTDRegionTypes.COMMENT_END); - pair.endOffset = getStructuredDTDDocumentRegion().getEndOffset(); - if (commentStartTag != null) { - pair.startOffset = getStructuredDTDDocumentRegion().getEndOffset(commentStartTag); - } - if (endCommentTag != null) { - pair.endOffset = getStructuredDTDDocumentRegion().getEndOffset(endCommentTag); - } - } - - public String getText() { - String text = getStructuredDTDDocumentRegion().getText(); - int flatNodeStart = getStructuredDTDDocumentRegion().getStartOffset(); - StartEndPair pair = new StartEndPair(); - getStartAndEndOffsetForText(pair); - return text.substring(pair.startOffset - flatNodeStart, pair.endOffset - flatNodeStart); - } - - public void setReferencedEntity(Object requestor, String name) { - replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(), getStructuredDTDDocumentRegion().getLength(), "%" + name + ";"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - public void setReferencedEntity(String name) { - beginRecording(this, DTDCoreMessages._UI_LABEL_PARM_ENTITY_REF_CHG_ENTITY_REF); //$NON-NLS-1$ - setReferencedEntity(this, name); - endRecording(this); - } - - public void setText(String newText) { - beginRecording(this, DTDCoreMessages._UI_LABEL_PARM_ENTITY_REF_COMMENT_CHG); //$NON-NLS-1$ - StartEndPair pair = new StartEndPair(); - getStartAndEndOffsetForText(pair); - replaceText(this, pair.startOffset, pair.endOffset - pair.startOffset, newText); - endRecording(this); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/TopLevelNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/TopLevelNode.java deleted file mode 100644 index 88c27c6f02..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/TopLevelNode.java +++ /dev/null @@ -1,84 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import java.util.ArrayList; -import java.util.Iterator; - -import org.eclipse.wst.dtd.core.internal.text.RegionIterator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -// interface for nodes that can exist at the top level in a dtdfile -// eg. entity, notation, element, comment, attlist, or unrecognized stuff (ie -// <junk dkfjdl> -public abstract class TopLevelNode extends DTDNode { - - private ArrayList flatNodes = new ArrayList(); - - public TopLevelNode(DTDFile dtdFile, IStructuredDocumentRegion flatNode) { - super(dtdFile, flatNode); - flatNodes.add(flatNode); - } - - public void addWhitespaceStructuredDocumentRegion(IStructuredDocumentRegion node) { - flatNodes.add(node); - } - - // specialize this so we delete the objects flat node range - // AND any whitespace - public void delete() { - beginRecording(getDTDFile(), DTDCoreMessages._UI_LABEL_TOP_LEVEL_NODE_DELETE); //$NON-NLS-1$ - IStructuredDocumentRegion first = (IStructuredDocumentRegion) flatNodes.get(0); - IStructuredDocumentRegion last = (IStructuredDocumentRegion) flatNodes.get(flatNodes.size() - 1); - int startOffset = first.getStartOffset(); - int endOffset = last.getEndOffset(); - - replaceText(getDTDFile(), startOffset, endOffset - startOffset, ""); //$NON-NLS-1$ - endRecording(getDTDFile()); - } - - public ITextRegion getEndRegion() { - int size = flatNode.getRegions().size(); - if (size > 0) { - return flatNode.getRegions().get(size - 1); - } - return null; - } - - // includes what gettext gives us plus any whitespace - // trailing it - public String getFullText() { - StringBuffer sb = new StringBuffer(); - Iterator iter = flatNodes.iterator(); - while (iter.hasNext()) { - IStructuredDocumentRegion fNode = (IStructuredDocumentRegion) iter.next(); - sb.append(fNode.getText()); - } - return sb.toString(); - } - - public ITextRegion getStartRegion() { - if (flatNode.getRegions().size() > 0) { - return flatNode.getRegions().get(0); - } - return null; - } - - public RegionIterator iterator() { - // System.out.println("create region iter " + this.getClass() + " with - // start , end = " + getStartOffset() + ", " +getEndOffset()); - return new RegionIterator(flatNode, getStartOffset(), getEndOffset()); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java deleted file mode 100644 index a7e8f3a7e2..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; - - -public class Unrecognized extends TopLevelNode { - - public Unrecognized(DTDFile file, IStructuredDocumentRegion flatNode) { - super(file, flatNode); - } - - public String getImagePath() { - return DTDResource.UNRECOGNIZEDICON; - } - - public String getName() { - String text = getStructuredDTDDocumentRegion().getText(); - if (text.length() <= 30) { - return text; - } - else { - return text.substring(0, 29) + "..."; //$NON-NLS-1$ - } - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/content/ContentDescriberForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/content/ContentDescriberForDTD.java deleted file mode 100644 index 44f110d19b..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/content/ContentDescriberForDTD.java +++ /dev/null @@ -1,206 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.content; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; - -import org.eclipse.core.runtime.QualifiedName; -import org.eclipse.core.runtime.content.IContentDescriber; -import org.eclipse.core.runtime.content.IContentDescription; -import org.eclipse.core.runtime.content.ITextContentDescriber; -import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento; -import org.eclipse.wst.sse.core.internal.encoding.IContentDescriptionExtended; -import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector; -import org.eclipse.wst.xml.core.internal.contenttype.XMLResourceEncodingDetector; - - - -public final class ContentDescriberForDTD implements ITextContentDescriber { - final private static QualifiedName[] SUPPORTED_OPTIONS = {IContentDescription.CHARSET, IContentDescription.BYTE_ORDER_MARK, IContentDescriptionExtended.DETECTED_CHARSET, IContentDescriptionExtended.UNSUPPORTED_CHARSET, IContentDescriptionExtended.APPROPRIATE_DEFAULT}; - public int describe(InputStream contents, IContentDescription description) throws IOException { - int result = IContentDescriber.INDETERMINATE; - - if (description == null) { - result = computeValidity(contents); - } - else { - calculateSupportedOptions(contents, description); - result = computeValidity(contents); - } - return result; - } - - public int describe(Reader contents, IContentDescription description) throws IOException { - int result = IContentDescriber.INDETERMINATE; - - if (description == null) { - result = computeValidity(contents); - } - else { - calculateSupportedOptions(contents, description); - result = computeValidity(contents); - } - return result; - } - - public QualifiedName[] getSupportedOptions() { - - return SUPPORTED_OPTIONS; - } - - private void calculateSupportedOptions(InputStream contents, IContentDescription description) throws IOException { - if (isRelevent(description)) { - IResourceCharsetDetector detector = getDetector(); - detector.set(contents); - handleCalculations(description, detector); - } - } - - /** - * @param contents - * @param description - * @throws IOException - */ - private void calculateSupportedOptions(Reader contents, IContentDescription description) throws IOException { - if (isRelevent(description)) { - IResourceCharsetDetector detector = getDetector(); - detector.set(contents); - handleCalculations(description, detector); - } - } - - private int computeValidity(InputStream inputStream) { - // currently no specific check for validilty - // based on contents. - return IContentDescriber.INDETERMINATE; - } - - private int computeValidity(Reader reader) { - // currently no specific check for validilty - // based on contents. - return IContentDescriber.INDETERMINATE; - } - - // same rules as for XML - private IResourceCharsetDetector getDetector() { - return new XMLResourceEncodingDetector(); - } - - /** - * @param description - * @param detector - * @throws IOException - */ - private void handleCalculations(IContentDescription description, IResourceCharsetDetector detector) throws IOException { - // note: if we're asked for one, we set them all. I need to be sure if - // called - // mulitiple times (one for each, say) that we don't waste time - // processing same - // content again. - EncodingMemento encodingMemento = ((XMLResourceEncodingDetector) detector).getEncodingMemento(); - // TODO: I need to verify to see if this BOM work is always done - // by text type. - Object detectedByteOrderMark = encodingMemento.getUnicodeBOM(); - if (detectedByteOrderMark != null) { - Object existingByteOrderMark = description.getProperty(IContentDescription.BYTE_ORDER_MARK); - // not sure why would ever be different, so if is different, may - // need to "push" up into base. - if (!detectedByteOrderMark.equals(existingByteOrderMark)) - description.setProperty(IContentDescription.BYTE_ORDER_MARK, detectedByteOrderMark); - } - - - if (!encodingMemento.isValid()) { - // note: after setting here, its the mere presence of - // IContentDescriptionExtended.UNSUPPORTED_CHARSET - // in the resource's description that can be used to determine if - // invalid - // in those cases, the "detected" property contains an - // "appropriate default" to use. - description.setProperty(IContentDescriptionExtended.UNSUPPORTED_CHARSET, encodingMemento.getInvalidEncoding()); - description.setProperty(IContentDescriptionExtended.APPROPRIATE_DEFAULT, encodingMemento.getAppropriateDefault()); - } - - Object detectedCharset = encodingMemento.getDetectedCharsetName(); - Object javaCharset = encodingMemento.getJavaCharsetName(); - - // we always include detected, if its different than java - handleDetectedSpecialCase(description, detectedCharset, javaCharset); - - if (javaCharset != null) { - Object existingCharset = description.getProperty(IContentDescription.CHARSET); - if (javaCharset.equals(existingCharset)) { - handleDetectedSpecialCase(description, detectedCharset, javaCharset); - } - else { - // we may need to add what we found, but only need to add - // if different from default.the - Object defaultCharset = getDetector().getSpecDefaultEncoding(); - if (defaultCharset != null) { - if (!defaultCharset.equals(javaCharset)) { - description.setProperty(IContentDescription.CHARSET, javaCharset); - } - } - else { - // assuming if there is no spec default, we always need to - // add, I'm assuming - description.setProperty(IContentDescription.CHARSET, javaCharset); - } - } - } - - } - - private void handleDetectedSpecialCase(IContentDescription description, Object detectedCharset, Object javaCharset) { - // since equal, we don't need to add, but if our detected version is - // different than - // javaCharset, then we should add it. This will happen, for example, - // if there's - // differences in case, or differences due to override properties - if (detectedCharset != null) { - // if (!detectedCharset.equals(javaCharset)) { - // description.setProperty(IContentDescriptionExtended.DETECTED_CHARSET, - // detectedCharset); - // } - - // Once we detected a charset, we should set the property even - // though it's the same as javaCharset - // because there are clients that rely on this property to - // determine if the charset is actually detected in file or not. - description.setProperty(IContentDescriptionExtended.DETECTED_CHARSET, detectedCharset); - } - } - - /** - * @param description - * @return - */ - private boolean isRelevent(IContentDescription description) { - boolean result = false; - if (description == null) - result = false; - else if (description.isRequested(IContentDescription.BYTE_ORDER_MARK)) - result = true; - else if (description.isRequested(IContentDescription.CHARSET)) - result = true; - else if (description.isRequested(IContentDescriptionExtended.APPROPRIATE_DEFAULT)) - result = true; - else if (description.isRequested(IContentDescriptionExtended.DETECTED_CHARSET)) - result = true; - else if (description.isRequested(IContentDescriptionExtended.UNSUPPORTED_CHARSET)) - result = true; - return result; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java deleted file mode 100644 index 727329abfd..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java +++ /dev/null @@ -1,273 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.document; - -import java.io.File; -import java.util.Iterator; -import java.util.Vector; - -import org.eclipse.wst.dtd.core.internal.DTDFile; -import org.eclipse.wst.dtd.core.internal.DTDNode; -import org.eclipse.wst.dtd.core.internal.Entity; -import org.eclipse.wst.dtd.core.internal.NodeList; -import org.eclipse.wst.dtd.core.internal.event.IDTDFileListener; -import org.eclipse.wst.dtd.core.internal.event.NodesEvent; -import org.eclipse.wst.dtd.core.internal.provisional.document.DTDModel; -import org.eclipse.wst.dtd.core.internal.util.DTDReferenceUpdater; -import org.eclipse.wst.dtd.core.internal.util.LabelValuePair; -import org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel; -import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion; -import org.eclipse.wst.sse.core.internal.provisional.events.IStructuredDocumentListener; -import org.eclipse.wst.sse.core.internal.provisional.events.NewDocumentEvent; -import org.eclipse.wst.sse.core.internal.provisional.events.NoChangeEvent; -import org.eclipse.wst.sse.core.internal.provisional.events.RegionChangedEvent; -import org.eclipse.wst.sse.core.internal.provisional.events.RegionsReplacedEvent; -import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent; -import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentRegionsReplacedEvent; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; - - -public final class DTDModelImpl extends AbstractStructuredModel implements IStructuredDocumentListener, DTDModel { - - public static boolean deleteFile(String fileName) { - boolean result = false; - - // create the temp File object - File file = new File(fileName); - if (file.exists()) - result = file.delete(); - return result; - } - - private DTDFile document; - - // private List errorMessages = new ArrayList(); - - // entity reference names found in the conditional IGNORE sections - private Vector ignoredEntityRefs; - - private boolean refreshRequired = false; - - protected DTDReferenceUpdater refUpdater = new DTDReferenceUpdater(); - - public DTDModelImpl() { - super(); - document = new DTDFile(this); - document.addDTDFileListener(new IDTDFileListener() { - - public void nodeChanged(DTDNode node) { - if (node instanceof Entity) { - Entity entity = (Entity) node; - if (entity.isParameterEntity() && entity.isExternalEntity()) { - // just say they have changed for now - setReferencedModelsChanged(); - } - } - } - - public void nodesAdded(NodesEvent event) { - checkIfExternalReferencesChanged(event); - } - - public void nodesRemoved(NodesEvent event) { - checkIfExternalReferencesChanged(event); - } - }); - } - - public void beginRecording(Object requester, String label) { - super.beginRecording(requester, label); - // clear reference updater cache - getReferenceUpdater().clearCache(); - } - - void checkIfExternalReferencesChanged(NodesEvent event) { - Iterator iter = event.getNodes().iterator(); - while (iter.hasNext()) { - DTDNode node = (DTDNode) iter.next(); - if (node instanceof Entity) { - Entity entity = (Entity) node; - if (entity.isParameterEntity() && entity.isExternalEntity()) { - // just say they have changed for now - setReferencedModelsChanged(); - } - } - } - } - - // - // The following function helps determine the list of things that - // can be used in a parameter entity reference content - // Optional parameter is to allow the currently used DTDEntity to - // be included in the combobox. - // - public LabelValuePair[] createParmEntityContentItems(Entity entity) { - NodeList entities = getDTDFile().getEntities(); - - Vector items = new Vector(); - - if (entity != null) { - String name = "%" + entity.getName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$ - items.addElement(new LabelValuePair(name, name)); - } - - for (Iterator i = entities.getNodes().iterator(); i.hasNext();) { - Entity entityAt = (Entity) i.next(); - if (entityAt.isParameterEntity() && entityAt.isExternalEntity()) { - String name = "%" + entityAt.getName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$ - items.addElement(new LabelValuePair(name, name)); - } - } - LabelValuePair[] comboArray = new LabelValuePair[items.size()]; - items.copyInto(comboArray); - return comboArray; - } - - public void endRecording(Object requester) { - super.endRecording(requester); - // clear reference updater cache - getReferenceUpdater().clearCache(); - } - - - public DTDFile getDTDFile() { - return document; - } - - // Returns entity reference names that are in - // the conditional IGNORE sections. - public Vector getIgnoredEntityRefs() { - if (ignoredEntityRefs == null) - ignoredEntityRefs = new Vector(); - return ignoredEntityRefs; - } - - public IndexedRegion getIndexedRegion(int offset) { - if (this.document == null) - return null; - // System.out.println("getNode at " + offset + " returning = " + - // this.document.getNodeAt(offset)); - - return this.document.getNodeAt(offset); - } - - public DTDReferenceUpdater getReferenceUpdater() { - return refUpdater; - } - - public boolean isReferencedModelsChanged() { - return refreshRequired; - } - - public boolean isRefreshRequired() { - return refreshRequired; - } - - public void newModel(NewDocumentEvent flatModelEvent) { - document.newModel(flatModelEvent); - // System.out.println("\nnewmodel"); - outputStructuredDocument(flatModelEvent); - } - - public void noChange(NoChangeEvent flatModelEvent) { - // System.out.println("\nnochange"); - outputStructuredDocument(flatModelEvent); - - } - - public void nodesReplaced(StructuredDocumentRegionsReplacedEvent flatModelEvent) { - // System.out.println("\nnodesreplaced"); - document.nodesReplaced(flatModelEvent); - outputStructuredDocument(flatModelEvent); - - } - - public void outputStructuredDocument(StructuredDocumentEvent flatModelEvent) { - // System.out.println("structuredDocument source = '" + - // flatModelEvent.getStructuredDocument().getText() + "'"); - // System.out.println("new String = '" + - // flatModelEvent.getOriginalChanges() +"'"); - // System.out.println("deleted String = '" + - // flatModelEvent.getDeletedText() +"'"); - // Enumeration e = - // flatModelEvent.getStructuredDocument().getNodes().elements(); - // int i = 0; - // for (; e.hasMoreElements(); i++) - // { - // BasicStructuredDocumentRegion node = - // (BasicStructuredDocumentRegion) e.nextElement(); - // outputStructuredDocumentRegion(node); - // System.out.println(" " + i +". " + node.hashCode() + " '" - // +node.getText() + "'"); - // } - } - - public void outputStructuredDocumentRegion(IStructuredDocumentRegion flatNode) { - // int size = flatNode.getNumberOfRegions(); - // for (int i = 0; i < size; i++) - // { - // Region region = (Region) flatNode.getRegions().get(i); - // System.out.println(i + ". " + region.getType()); - - // } // end of for () - - } - - public void regionChanged(RegionChangedEvent flatModelEvent) { - // System.out.println("\nregion changed"); - document.regionChanged(flatModelEvent); - // System.out.println("= " + - // flatModelEvent.getStructuredDocumentRegion().getText()); - // System.out.println("region changed " + - // flatModelEvent.getRegion().hashCode() + " = " + - // flatModelEvent.getRegion()); - - outputStructuredDocument(flatModelEvent); - } - - public void regionsReplaced(RegionsReplacedEvent flatModelEvent) { - // System.out.println("\nregion replaced"); - document.regionsReplaced(flatModelEvent); - outputStructuredDocument(flatModelEvent); - } - - public void setReferencedModelsChanged() { - refreshRequired = true; - } - - public void setRefreshRequired(boolean value) { - refreshRequired = value; - } - - - /** - * @param newStructuredDocument - * org.eclipse.wst.sse.core.text.IStructuredDocument - */ - public void setStructuredDocument(IStructuredDocument newStructuredDocument) { - IStructuredDocument oldStructuredDocument = super.getStructuredDocument(); - if (newStructuredDocument == oldStructuredDocument) - return; // noting to do - - if (oldStructuredDocument != null) - oldStructuredDocument.removeDocumentChangingListener(this); - super.setStructuredDocument(newStructuredDocument); - if (newStructuredDocument != null) { - if (newStructuredDocument.getLength() > 0) { - newModel(new NewDocumentEvent(newStructuredDocument, this)); - } - newStructuredDocument.addDocumentChangingListener(this); - } - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/AbstractResourceEncodingDetector.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/AbstractResourceEncodingDetector.java deleted file mode 100644 index fc34977838..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/AbstractResourceEncodingDetector.java +++ /dev/null @@ -1,261 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.encoding; - -import java.io.BufferedInputStream; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; -import java.nio.charset.Charset; -import java.nio.charset.IllegalCharsetNameException; -import java.nio.charset.UnsupportedCharsetException; - -import org.eclipse.core.resources.IStorage; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.wst.sse.core.internal.encoding.CodedIO; -import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento; -import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector; - - -public abstract class AbstractResourceEncodingDetector implements IResourceCharsetDetector { - - protected EncodingMemento fEncodingMemento; - - protected boolean fHeaderParsed; - - protected Reader fReader; - - /** - * - */ - public AbstractResourceEncodingDetector() { - super(); - } - - /** - * Note: once this instance is created, trace info still needs to be - * appended by caller, depending on the context its created. - */ - private void createEncodingMemento(String detectedCharsetName) { - fEncodingMemento = new EncodingMemento(); - fEncodingMemento.setJavaCharsetName(getAppropriateJavaCharset(detectedCharsetName)); - fEncodingMemento.setDetectedCharsetName(detectedCharsetName); - // TODO: if detectedCharset and spec default is - // null, need to use "work - // bench based" defaults. - fEncodingMemento.setAppropriateDefault(getSpecDefaultEncoding()); - } - - /** - * convience method all subclasses can use (but not override) - * - * @param detectedCharsetName - * @param reason - */ - final protected void createEncodingMemento(String detectedCharsetName, String reason) { - createEncodingMemento(detectedCharsetName); - } - - /** - * convience method all subclasses can use (but not override) - */ - final protected void ensureInputSet() { - if (fReader == null) { - throw new IllegalStateException("input must be set before use"); //$NON-NLS-1$ - } - } - - /** - * This method can return null, if invalid charset name (in which case - * "appropriateDefault" should be used, if a name is really need for some - * "save anyway" cases). - * - * @param detectedCharsetName - * @return - */ - private String getAppropriateJavaCharset(String detectedCharsetName) { - String result = null; - // 1. Check explicit mapping overrides from - // property file -- its here we pick up "rules" for cases - // that are not even in Java - result = CodedIO.checkMappingOverrides(detectedCharsetName); - // 2. Use the "canonical" name from JRE mappings - // Note: see Charset JavaDoc, the name you get one - // with can be alias, - // the name you get back is "standard" name. - Charset javaCharset = null; - try { - javaCharset = Charset.forName(detectedCharsetName); - } - catch (UnsupportedCharsetException e) { - // only set invalid, if result is same as detected -- they won't - // be equal if - // overridden - if (result != null && result.equals(detectedCharsetName)) { - fEncodingMemento.setInvalidEncoding(detectedCharsetName); - } - } - catch (IllegalCharsetNameException e) { - // only set invalid, if result is same as detected -- they won't - // be equal if - // overridden - if (result != null && result.equals(detectedCharsetName)) { - fEncodingMemento.setInvalidEncoding(detectedCharsetName); - } - } - // give priority to java cononical name, if present - if (javaCharset != null) { - result = javaCharset.name(); - // but still allow overrides - result = CodedIO.checkMappingOverrides(result); - } - return result; - } - - public String getEncoding() throws IOException { - return getEncodingMemento().getDetectedCharsetName(); - } - - // to ensure consist overall rules used, we'll mark as - // final, - // and require subclasses to provide certain pieces of - // the - // implementation - public EncodingMemento getEncodingMemento() throws IOException { - ensureInputSet(); - if (!fHeaderParsed) { - parseInput(); - // we keep track of if header's already been - // parse, so can make - // multiple 'get' calls, without causing - // reparsing. - fHeaderParsed = true; - // Note: there is a "hidden assumption" here - // that an empty - // string in content should be treated same as - // not present. - } - if (fEncodingMemento == null) { - handleSpecDefault(); - } - if (fEncodingMemento == null) { - // safty net - fEncodingMemento = new NullMemento(); - } - return fEncodingMemento; - } - - /** - * This is to return a default encoding -- as specified by an industry - * content type spec -- when not present in the stream, for example, XML - * specifies UTF-8, JSP specifies ISO-8859-1. This method should return - * null if there is no such "spec default". - */ - abstract public String getSpecDefaultEncoding(); - - public EncodingMemento getSpecDefaultEncodingMemento() { - resetAll(); - EncodingMemento result = null; - String enc = getSpecDefaultEncoding(); - if (enc != null) { - createEncodingMemento(enc, EncodingMemento.DEFAULTS_ASSUMED_FOR_EMPTY_INPUT); - fEncodingMemento.setAppropriateDefault(enc); - result = fEncodingMemento; - } - return result; - } - - private void handleSpecDefault() { - String encodingName; - encodingName = getSpecDefaultEncoding(); - if (encodingName != null) { - // createEncodingMemento(encodingName, - // EncodingMemento.USED_CONTENT_TYPE_DEFAULT); - fEncodingMemento = new EncodingMemento(); - fEncodingMemento.setJavaCharsetName(encodingName); - fEncodingMemento.setAppropriateDefault(encodingName); - } - } - - /** - * Every subclass must provide a way to parse the input. This method has - * several critical responsibilities: - * <li>set the fEncodingMemento field appropriately, according to the - * results of the parse of fReader.</li> - * <li>set fHarderParsed to true, to avoid wasted re-parsing.</li> - */ - abstract protected void parseInput() throws IOException; - - /** - * - */ - private void resetAll() { - fReader = null; - fHeaderParsed = false; - fEncodingMemento = null; - } - - /** - * - */ - public void set(InputStream inputStream) { - resetAll(); - fReader = new ByteReader(inputStream); - try { - fReader.mark(CodedIO.MAX_MARK_SIZE); - } - catch (IOException e) { - // impossible, since we know ByteReader - // supports marking - throw new Error(e); - } - } - - /** - * - */ - public void set(IStorage iStorage) throws CoreException { - resetAll(); - InputStream inputStream = iStorage.getContents(); - InputStream resettableStream = new BufferedInputStream(inputStream, CodedIO.MAX_BUF_SIZE); - resettableStream.mark(CodedIO.MAX_MARK_SIZE); - set(resettableStream); - // TODO we'll need to "remember" IFile, or - // get its (or its project's) settings, in case - // those are needed to handle cases when the - // encoding is not in the file stream. - } - - /** - * Note: this is not part of interface to help avoid confusion ... it - * expected this Reader is a well formed character reader ... that is, its - * all ready been determined to not be a unicode marked input stream. And, - * its assumed to be in the correct position, at position zero, ready to - * read first character. - */ - public void set(Reader reader) { - resetAll(); - fReader = reader; - if (!fReader.markSupported()) { - fReader = new BufferedReader(fReader); - } - try { - fReader.mark(CodedIO.MAX_MARK_SIZE); - } - catch (IOException e) { - // impossble, since we just checked if markable - throw new Error(e); - } - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/ByteReader.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/ByteReader.java deleted file mode 100644 index 55c9bdf7a5..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/ByteReader.java +++ /dev/null @@ -1,109 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.encoding; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; - -import org.eclipse.wst.sse.core.internal.encoding.CodedIO; - -/** - * This is an "adapter" class, simply to get in input stream to act like a - * reader. We could not use InputStreamReader directly because its internal - * buffers are not controllable, and it sometimes pulls too much out of input - * stream (even when it wasn't needed for our purposes). - * - * The use of this class is highly specialized and by not means meant to be - * general purpose. Its use is restricted to those cases where the input - * stream can be regarded as ascii just long enough to determine what the real - * encoding should be. - */ - -public class ByteReader extends Reader { - - - public static final int DEFAULT_BUFFER_SIZE = CodedIO.MAX_BUF_SIZE; - - protected byte[] fBuffer; - - protected InputStream fInputStream; - - protected ByteReader() { - super(); - } - - public ByteReader(InputStream inputStream) { - this(inputStream, DEFAULT_BUFFER_SIZE); - if (!inputStream.markSupported()) { - throw new IllegalArgumentException("ByteReader is required to have a resettable stream"); //$NON-NLS-1$ - } - } - - public ByteReader(InputStream inputStream, int size) { - this.fInputStream = inputStream; - if (!inputStream.markSupported()) { - throw new IllegalArgumentException("ByteReader is required to have a resettable stream"); //$NON-NLS-1$ - } - this.fBuffer = new byte[size]; - - } - - public void close() throws IOException { - this.fInputStream.close(); - } - - public void mark(int readAheadLimit) { - this.fInputStream.mark(readAheadLimit); - } - - public boolean markSupported() { - return true; - } - - public int read() throws IOException { - int b0 = this.fInputStream.read(); - return (b0 & 0x00FF); - } - - public int read(char ch[], int offset, int length) throws IOException { - if (length > this.fBuffer.length) { - length = this.fBuffer.length; - } - - int count = this.fInputStream.read(this.fBuffer, 0, length); - - for (int i = 0; i < count; i++) { - int b0 = this.fBuffer[i]; - // the 0x00FF is to "lose" the negative bits filled in the byte to - // int conversion - // (and which would be there if cast directly from byte to char). - char c0 = (char) (b0 & 0x00FF); - ch[offset + i] = c0; - } - return count; - } - - public boolean ready() throws IOException { - return this.fInputStream.available() > 0; - } - - public void reset() throws IOException { - this.fInputStream.reset(); - } - - public long skip(long n) throws IOException { - return this.fInputStream.skip(n); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentCharsetDetector.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentCharsetDetector.java deleted file mode 100644 index 552b5a36b1..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentCharsetDetector.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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -/* - * Created on 28-Aug-03 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.wst.dtd.core.internal.encoding; - -import java.io.IOException; - -import org.eclipse.jface.text.IDocument; -import org.eclipse.wst.sse.core.internal.document.DocumentReader; -import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector; -import org.eclipse.wst.xml.core.internal.contenttype.XMLResourceEncodingDetector; -import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentCharsetDetector; - - -/** - * @author kboo - * - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -public final class DTDDocumentCharsetDetector extends AbstractResourceEncodingDetector implements IDocumentCharsetDetector { - - public String getSpecDefaultEncoding() { - // by default, UTF-8 as per XML spec - final String enc = "UTF-8"; //$NON-NLS-1$ - return enc; - } - - /** - * - */ - - protected void parseInput() throws IOException { - IDocumentCharsetDetector documentEncodingDetector = new XMLDocumentCharsetDetector(); - documentEncodingDetector.set(fReader); - fEncodingMemento = ((XMLResourceEncodingDetector)documentEncodingDetector).getEncodingMemento(); - - } - - public void set(IDocument document) { - set(new DocumentReader(document, 0)); - - - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentLoader.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentLoader.java deleted file mode 100644 index 668f08b847..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentLoader.java +++ /dev/null @@ -1,74 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.encoding; - -import org.eclipse.core.resources.IFile; -import org.eclipse.jface.text.IDocumentPartitioner; -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionParser; -import org.eclipse.wst.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD; -import org.eclipse.wst.dtd.core.internal.text.DTDStructuredDocumentReParser; -import org.eclipse.wst.dtd.core.internal.text.StructuredTextPartitionerForDTD; -import org.eclipse.wst.sse.core.internal.document.AbstractDocumentLoader; -import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector; -import org.eclipse.wst.sse.core.internal.document.StructuredDocumentFactory; -import org.eclipse.wst.sse.core.internal.encoding.ContentTypeEncodingPreferences; -import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser; -import org.eclipse.wst.sse.core.internal.provisional.document.IEncodedDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument; - - -public final class DTDDocumentLoader extends AbstractDocumentLoader { - - public DTDDocumentLoader() { - super(); - } - - public IDocumentPartitioner getDefaultDocumentPartitioner() { - return new StructuredTextPartitionerForDTD(); - } - - public IDocumentCharsetDetector getDocumentEncodingDetector() { - if (fDocumentEncodingDetector == null) { - fDocumentEncodingDetector = new DTDDocumentCharsetDetector(); - } - return fDocumentEncodingDetector; - } - - public RegionParser getParser() { - return new DTDRegionParser(); - } - - protected String getPreferredNewLineDelimiter(IFile file) { - String delimiter = ContentTypeEncodingPreferences.getPreferredNewLineDelimiter(ContentTypeIdForDTD.ContentTypeID_DTD); - if (delimiter == null) - delimiter = super.getPreferredNewLineDelimiter(file); - return delimiter; - } - - protected String getSpecDefaultEncoding() { - String enc = "UTF-8"; //$NON-NLS-1$ - return enc; - } - - protected IEncodedDocument newEncodedDocument() { - IStructuredDocument document = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser()); - DTDStructuredDocumentReParser reParser = new DTDStructuredDocumentReParser(); - reParser.setStructuredDocument(document); - if (document instanceof BasicStructuredDocument) { - ((BasicStructuredDocument) document).setReParser(reParser); - } - return document; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/NullMemento.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/NullMemento.java deleted file mode 100644 index 80603772b6..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/NullMemento.java +++ /dev/null @@ -1,36 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.encoding; - -import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento; -import org.eclipse.wst.sse.core.internal.encoding.NonContentBasedEncodingRules; - - - -/** - * This class can be used in place of an EncodingMemento (its super class), - * when there is not in fact ANY encoding information. For example, when a - * structuredDocument is created directly from a String - */ -public class NullMemento extends EncodingMemento { - /** - * - */ - public NullMemento() { - super(); - String defaultCharset = NonContentBasedEncodingRules.useDefaultNameRules(null); - setJavaCharsetName(defaultCharset); - setAppropriateDefault(defaultCharset); - setDetectedCharsetName(null); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/IDTDFileListener.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/IDTDFileListener.java deleted file mode 100644 index 2490968d23..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/IDTDFileListener.java +++ /dev/null @@ -1,24 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.event; - -import org.eclipse.wst.dtd.core.internal.DTDNode; - -public interface IDTDFileListener { - - public void nodeChanged(DTDNode node); - - public void nodesAdded(NodesEvent event); - - public void nodesRemoved(NodesEvent event); -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/NodesEvent.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/NodesEvent.java deleted file mode 100644 index 23972c0f2f..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/NodesEvent.java +++ /dev/null @@ -1,32 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.event; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.DTDNode; - - -public final class NodesEvent { - private ArrayList changedNodes = new ArrayList(); - - public void add(DTDNode changedNode) { - changedNodes.add(changedNode); - } - - public List getNodes() { - return changedNodes; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/DTDModelLoader.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/DTDModelLoader.java deleted file mode 100644 index 5b51acb744..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/DTDModelLoader.java +++ /dev/null @@ -1,47 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.modelhandler; - -import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl; -import org.eclipse.wst.dtd.core.internal.encoding.DTDDocumentLoader; -import org.eclipse.wst.sse.core.internal.document.IDocumentLoader; -import org.eclipse.wst.sse.core.internal.model.AbstractModelLoader; -import org.eclipse.wst.sse.core.internal.provisional.IModelLoader; -import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; - - - -public final class DTDModelLoader extends AbstractModelLoader { - public DTDModelLoader() { - super(); - } - - public IDocumentLoader getDocumentLoader() { - if (documentLoaderInstance == null) { - documentLoaderInstance = new DTDDocumentLoader(); - } - return documentLoaderInstance; - } - - public IModelLoader newInstance() { - return new DTDModelLoader(); - } - - public IStructuredModel newModel() { - IStructuredModel model = new DTDModelImpl(); - // now done in create - // model.setStructuredDocument(createNewStructuredDocument()); - // model.setFactoryRegistry(defaultFactoryRegistry()); - return model; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/ModelHandlerForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/ModelHandlerForDTD.java deleted file mode 100644 index e90e10c996..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/ModelHandlerForDTD.java +++ /dev/null @@ -1,46 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.modelhandler; - -import org.eclipse.wst.dtd.core.internal.encoding.DTDDocumentCharsetDetector; -import org.eclipse.wst.dtd.core.internal.encoding.DTDDocumentLoader; -import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector; -import org.eclipse.wst.sse.core.internal.document.IDocumentLoader; -import org.eclipse.wst.sse.core.internal.ltk.modelhandler.AbstractModelHandler; -import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler; -import org.eclipse.wst.sse.core.internal.provisional.IModelLoader; - - -public final class ModelHandlerForDTD extends AbstractModelHandler implements IModelHandler { - private static String AssociatedContentTypeId = "org.eclipse.wst.dtd.core.dtdsource"; //$NON-NLS-1$ - private static String ModelHandlerID = "org.eclipse.wst.dtd.core.internal.modelhandler"; //$NON-NLS-1$ - - public ModelHandlerForDTD() { - super(); - setId(ModelHandlerID); - setAssociatedContentTypeId(AssociatedContentTypeId); - } - - public IDocumentLoader getDocumentLoader() { - return new DTDDocumentLoader(); - } - - public IDocumentCharsetDetector getEncodingDetector() { - return new DTDDocumentCharsetDetector(); - } - - public IModelLoader getModelLoader() { - return new DTDModelLoader(); - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionFactory.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionFactory.java deleted file mode 100644 index 3c9cb8a697..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionFactory.java +++ /dev/null @@ -1,28 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.parser; - -import org.eclipse.wst.sse.core.internal.parser.ContextRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - -public class DTDRegionFactory { - public static ITextRegion createRegion(String tokenKind, int start, int length) { - ITextRegion region = null; - if (tokenKind != null) { - // ISSUE: DTD regions don't distinguish text from white space - region = new ContextRegion(tokenKind, start, length, length); - } - return region; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionParser.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionParser.java deleted file mode 100644 index 9be6f189f3..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionParser.java +++ /dev/null @@ -1,271 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.parser; - -import java.io.Reader; -import java.io.StringReader; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.ListIterator; -import java.util.Vector; - -import org.eclipse.wst.dtd.core.internal.text.DTDStructuredDocumentRegionFactory; -import org.eclipse.wst.dtd.core.internal.tokenizer.DTDTokenizer; -import org.eclipse.wst.dtd.core.internal.tokenizer.Token; -import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; - - -public class DTDRegionParser implements RegionParser { - private Vector cachedRegions = null; - private DTDTokenizer tokenizer = null; - private IStructuredDocumentRegion cachedNode = null; // top of node - // chain - - public RegionParser newInstance() { - return new DTDRegionParser(); - } - - private IStructuredDocumentRegion addNewNodes(IStructuredDocumentRegion lastNode, Vector regions) { - IStructuredDocumentRegion leadingSpaceNode = null; - IStructuredDocumentRegion contentNode = null; - IStructuredDocumentRegion trailingSpaceNode = null; - LinkedList nodeSeeds = new LinkedList(); - int nRegions = regions.size(); - int leadingSpaceEnd = -1; - int trailingSpaceBegin = nRegions; - - // find leading space - nodeSeeds.clear(); - for (int i = 0; i < nRegions; i++) { - ITextRegion region = (ITextRegion) regions.get(i); - String type = region.getType(); - if (isBlankRegion(type)) { - leadingSpaceEnd = i; - nodeSeeds.addLast(region); - } - else { - break; - } - } - if (!nodeSeeds.isEmpty()) { - leadingSpaceNode = createNode(nodeSeeds); - if (lastNode != null) { - lastNode.setNext(leadingSpaceNode); - leadingSpaceNode.setPrevious(lastNode); - } - lastNode = leadingSpaceNode; - } - - // find trailing space - if (leadingSpaceEnd < nRegions - 1) { - nodeSeeds.clear(); - for (int i = nRegions - 1; 0 <= i; i--) { - ITextRegion region = (ITextRegion) regions.get(i); - String type = ((ITextRegion) regions.get(i)).getType(); - if (isBlankRegion(type)) { - trailingSpaceBegin = i; - nodeSeeds.addFirst(region); - } - else { - break; - } - } - if (!nodeSeeds.isEmpty()) { - trailingSpaceNode = createNode(nodeSeeds); - } - - nodeSeeds.clear(); - for (int i = leadingSpaceEnd + 1; i < trailingSpaceBegin; i++) { - nodeSeeds.addLast(regions.get(i)); - } - if (!nodeSeeds.isEmpty()) { - contentNode = createNode(nodeSeeds); - if (lastNode != null) { - lastNode.setNext(contentNode); - contentNode.setPrevious(lastNode); - } - lastNode = contentNode; - } - if (trailingSpaceNode != null) { - lastNode.setNext(trailingSpaceNode); - trailingSpaceNode.setPrevious(lastNode); - lastNode = trailingSpaceNode; - } - } - - return lastNode; - } - - private IStructuredDocumentRegion createNode(LinkedList regions) { - if (regions.size() == 0) { - return null; - } - - IStructuredDocumentRegion node = DTDStructuredDocumentRegionFactory.createStructuredDocumentRegion(DTDStructuredDocumentRegionFactory.DTD_GENERIC); - int start = ((ITextRegion) regions.getFirst()).getStart(); - int length = ((ITextRegion) regions.getLast()).getEnd() - start; - node.setStart(start); - node.setLength(length); - for (ListIterator i = regions.listIterator(0); i.hasNext();) { - ITextRegion region = (ITextRegion) i.next(); - node.addRegion(region); - region.adjustStart(-start); - } - node.setEnded(true); - - return node; - } - - private IStructuredDocumentRegion createNodeChain(List regions) { - IStructuredDocumentRegion headNode = null; - IStructuredDocumentRegion lastNode = null; - Vector nodeSeeds = new Vector(); - - for (Iterator e = regions.iterator(); e.hasNext();) { - ITextRegion region = (ITextRegion) e.next(); - String type = region.getType(); - // If the following regions appear, - // a previous node is closed in front of it. - if (!nodeSeeds.isEmpty() && isBeginningRegion(type)) { - lastNode = addNewNodes(lastNode, nodeSeeds); - nodeSeeds.clear(); - } - nodeSeeds.addElement(region); - - // The following regions close the current node. - if (!nodeSeeds.isEmpty() && isEndingRegion(type)) { - lastNode = addNewNodes(lastNode, nodeSeeds); - nodeSeeds.clear(); - } - - if (headNode == null && lastNode != null) { - headNode = findFirstNode(lastNode); - } - } - - // close current node forcibly. - if (!nodeSeeds.isEmpty()) { - lastNode = addNewNodes(lastNode, nodeSeeds); - if (headNode == null && lastNode != null) { - headNode = findFirstNode(lastNode); - } - } - return headNode; - } - - private IStructuredDocumentRegion findFirstNode(IStructuredDocumentRegion node) { - IStructuredDocumentRegion firstNode = node; - IStructuredDocumentRegion prevNode = null; - while ((prevNode = firstNode.getPrevious()) != null) { - firstNode = prevNode; - } - return firstNode; - } - - public IStructuredDocumentRegion getDocumentRegions() { - if (cachedNode != null) { - return cachedNode; - } - - List regions = getRegions(); - IStructuredDocumentRegion headNode = createNodeChain(regions); - cachedNode = headNode; - - return headNode; - } - - public List getRegions() { - if (cachedRegions != null) { - return cachedRegions; - } - - Vector regions = new Vector(); - Token currentToken = null; - do { - try { - currentToken = (Token) tokenizer.yylex(); - if (currentToken != null) { - ITextRegion region = DTDRegionFactory.createRegion(currentToken.getType(), currentToken.getStartOffset(), currentToken.getLength()); - regions.add(region); - } - } - catch (java.io.FileNotFoundException e) { - System.out.println("File not found"); //$NON-NLS-1$ - } - catch (java.io.IOException e) { - System.out.println("Error opening file"); //$NON-NLS-1$ - } - } - while (currentToken != null); - - cachedRegions = regions; - return regions; - } - - public void reset(Reader reader) { - if (tokenizer == null) { - try { - tokenizer = new DTDTokenizer(reader); - } - catch (ArrayIndexOutOfBoundsException e) { - System.out.println("Usage : java DTDTokenizer <inputfile>"); //$NON-NLS-1$ - } - } - else { - try { - tokenizer.yyreset(reader); - } - catch (java.io.IOException e) { - System.out.println("Error opening file"); //$NON-NLS-1$ - } - } - - cachedNode = null; - cachedRegions = null; - } - - /** - * An additional offset for use with any position-dependant parsing rules - */ - public void reset(Reader reader, int offset) { - reset(reader); - } - - public void reset(String input) { - reset(new StringReader(input)); - } - - public void reset(String input, int offset) { - reset(input); - } - - // never used - DTDTokenizer getTokenizer() { - return tokenizer; - } - - private boolean isBeginningRegion(String type) { - return (type == DTDRegionTypes.START_TAG) || (type == DTDRegionTypes.ENTITY_PARM); - } - - private boolean isBlankRegion(String type) { - return (type == DTDRegionTypes.WHITESPACE); - } - - private boolean isEndingRegion(String type) { - return (type == DTDRegionTypes.END_TAG) || (type == DTDRegionTypes.ENTITY_PARM) || (type == DTDRegionTypes.COMMENT_END); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionTypes.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionTypes.java deleted file mode 100644 index 114b661d03..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionTypes.java +++ /dev/null @@ -1,76 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.parser; - -public interface DTDRegionTypes { - public static final String regionPrefix = "org.eclipse.wst.dtd.core.internal.util.parser.DTDRegionTypes."; //$NON-NLS-1$ - - public static final String NAME = regionPrefix + "NAME"; //$NON-NLS-1$ - public static final String START_TAG = regionPrefix + "START_TAG"; //$NON-NLS-1$ - public static final String END_TAG = regionPrefix + "END_TAG"; //$NON-NLS-1$ - public static final String LEFT_PAREN = regionPrefix + "LEFT_PAREN"; //$NON-NLS-1$ - public static final String RIGHT_PAREN = regionPrefix + "RIGHT_PAREN"; //$NON-NLS-1$ - public static final String WHITESPACE = regionPrefix + "WHITESPACE"; //$NON-NLS-1$ - public static final String CONNECTOR = regionPrefix + "CONNECTOR"; //$NON-NLS-1$ - - public static final String OCCUR_TYPE = regionPrefix + "OCCUR_TYPE"; //$NON-NLS-1$ - public static final String EXCLAMATION = regionPrefix + "EXCLAMATION"; //$NON-NLS-1$ - public static final String PERCENT = regionPrefix + "PERCENT"; //$NON-NLS-1$ - public static final String SEMICOLON = regionPrefix + "SEMICOLON"; //$NON-NLS-1$ - public static final String COMMENT_START = regionPrefix + "COMMENT"; //$NON-NLS-1$ - public static final String COMMENT_CONTENT = regionPrefix + "COMMENT_CONTENT"; //$NON-NLS-1$ - public static final String COMMENT_END = regionPrefix + "COMMENT_END"; //$NON-NLS-1$ - - public static final String NOTATION_TAG = regionPrefix + "NOTATION_TAG"; //$NON-NLS-1$ - public static final String NOTATION_CONTENT = regionPrefix + "NOTATION_CONTENT"; //$NON-NLS-1$ - - public static final String ENTITY_TAG = regionPrefix + "ENTITY_TAG"; //$NON-NLS-1$ - public static final String ENTITY_PARM = regionPrefix + "ENTITY_PARM"; //$NON-NLS-1$ - public static final String ENTITY_CONTENT = regionPrefix + "ENTITY_CONTENT"; //$NON-NLS-1$ - public static final String NDATA_VALUE = regionPrefix + "NDATA_VALUE"; //$NON-NLS-1$ - - public static final String ELEMENT_TAG = regionPrefix + "ELEMENT_TAG"; //$NON-NLS-1$ - public static final String ELEMENT_CONTENT = regionPrefix + "ELEMENT_CONTENT"; //$NON-NLS-1$ - public static final String CONTENT_EMPTY = regionPrefix + "CONTENT_EMPTY"; //$NON-NLS-1$ - public static final String CONTENT_ANY = regionPrefix + "CONTENT_ANY"; //$NON-NLS-1$ - public static final String CONTENT_PCDATA = regionPrefix + "CONTENT_PCDATA"; //$NON-NLS-1$ - - public static final String ATTLIST_TAG = regionPrefix + "ATTLIST_TAG"; //$NON-NLS-1$ - - public static final String SYSTEM_KEYWORD = regionPrefix + "SYSTEM_KEYWORD"; //$NON-NLS-1$ - public static final String PUBLIC_KEYWORD = regionPrefix + "PUBLIC_KEYWORD"; //$NON-NLS-1$ - public static final String NDATA_KEYWORD = regionPrefix + "NDATA_KEYWORD"; //$NON-NLS-1$ - public static final String SINGLEQUOTED_LITERAL = regionPrefix + "SINGLEQUOTED_LITERAL"; //$NON-NLS-1$ - public static final String DOUBLEQUOTED_LITERAL = regionPrefix + "DOUBLEQUOTED_LITERAL"; //$NON-NLS-1$ - public static final String UNKNOWN_CONTENT = regionPrefix + "UNKNOWN_CONTENT"; //$NON-NLS-1$ - - public static final String ATTRIBUTE_NAME = regionPrefix + "ATTRIBUTE_NAME"; //$NON-NLS-1$ - - // attribute type keywords - public static final String CDATA_KEYWORD = regionPrefix + "CDATA_KEYWORD"; //$NON-NLS-1$ - public static final String ID_KEYWORD = regionPrefix + "ID_KEYWORD"; //$NON-NLS-1$ - public static final String IDREF_KEYWORD = regionPrefix + "IDREF_KEYWORD"; //$NON-NLS-1$ - public static final String IDREFS_KEYWORD = regionPrefix + "IDREFS_KEYWORD"; //$NON-NLS-1$ - public static final String ENTITY_KEYWORD = regionPrefix + "ENTITY_KEYWORD"; //$NON-NLS-1$ - public static final String ENTITIES_KEYWORD = regionPrefix + "ENTITIES_KEYWORD"; //$NON-NLS-1$ - public static final String NMTOKEN_KEYWORD = regionPrefix + "NMTOKEN_KEYWORD"; //$NON-NLS-1$ - public static final String NMTOKENS_KEYWORD = regionPrefix + "NMTOKENS_KEYWORD"; //$NON-NLS-1$ - public static final String NOTATION_KEYWORD = regionPrefix + "NOTATION_KEYWORD"; //$NON-NLS-1$ - public static final String ENUM_CHOICE = regionPrefix + "ENUM_CHOICE"; //$NON-NLS-1$ - public static final String PARM_ENTITY_TYPE = regionPrefix + "PARM_ENTITY_TYPE"; //$NON-NLS-1$ - - // attribute defaults keywords - public static final String REQUIRED_KEYWORD = regionPrefix + "REQUIRED_KEYWORD"; //$NON-NLS-1$ - public static final String IMPLIED_KEYWORD = regionPrefix + "IMPLIED_KEYWORD"; //$NON-NLS-1$ - public static final String FIXED_KEYWORD = regionPrefix + "FIXED_KEYWORD"; //$NON-NLS-1$ -}// DTDRegionTypes diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceInitializer.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceInitializer.java deleted file mode 100644 index c3fb65ad01..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceInitializer.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.preferences; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.core.runtime.preferences.DefaultScope; -import org.eclipse.core.runtime.preferences.IEclipsePreferences; -import org.eclipse.wst.dtd.core.internal.DTDCorePlugin; - -/** - * Sets default values for DTD Core preferences - */ -public class DTDCorePreferenceInitializer extends AbstractPreferenceInitializer { - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() - */ - public void initializeDefaultPreferences() { - IEclipsePreferences node = new DefaultScope().getNode(DTDCorePlugin.getInstance().getBundle().getSymbolicName()); - - // this could be made smarter by actually looking up the content - // type's valid extensions - node.put(DTDCorePreferenceNames.DEFAULT_EXTENSION, "dtd"); //$NON-NLS-1$ - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceNames.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceNames.java deleted file mode 100644 index d348e0fb0d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceNames.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.preferences; - -/** - * Common preference keys used by DTD core - * - * @plannedfor 1.0 - */ -public class DTDCorePreferenceNames { - private DTDCorePreferenceNames() { - // empty private constructor so users cannot instantiate class - } - - /** - * The default extension to use when none is specified in the New File - * Wizard. - * <p> - * Value is of type <code>String</code>. - * </p> - */ - public static final String DEFAULT_EXTENSION = "defaultExtension"; //$NON-NLS-1$ -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/contenttype/ContentTypeIdForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/contenttype/ContentTypeIdForDTD.java deleted file mode 100644 index 23758eb6e1..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/contenttype/ContentTypeIdForDTD.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 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.provisional.contenttype; - -/** - * <p> - * This class, with its one field, is a convenience to provide compile-time - * safety when referring to the DTD contentType ID. - * </p> - * - * <p> - * This class is not meant to be instantiated or subclassed. - * </p> - */ - -public final class ContentTypeIdForDTD { - /** - * The value of the ContentTypeID_DTD id field will match what is - * specified in org.eclipse.wst.dtd.core/plugin.xml for the DTD content - * type. - * - * This value is intentionally set through a default protected method so - * that it will not be inlined. - */ - public final static String ContentTypeID_DTD = getConstantString(); - - private ContentTypeIdForDTD() { - super(); - } - - /** - * @return the DTD Content Type Identifier ID as a String - */ - static String getConstantString() { - return "org.eclipse.wst.dtd.core.dtdsource"; //$NON-NLS-1$ - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/document/DTDModel.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/document/DTDModel.java deleted file mode 100644 index f5c701f214..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/document/DTDModel.java +++ /dev/null @@ -1,27 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.provisional.document; - -import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; - -/** - * <p> - * An interface implemented by the SSE-based DTD model. - * </p> - * - * <p> - * This interface is not intended to be implemented by clients. - * </p> - */ -public interface DTDModel extends IStructuredModel{ -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/text/IDTDPartitionTypes.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/text/IDTDPartitionTypes.java deleted file mode 100644 index ac35f739d2..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/text/IDTDPartitionTypes.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 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.provisional.text; - -/** - * This interface is not intended to be implemented. - * It defines the partition types DTD. - * Clients should reference the partition type Strings defined here directly. - * - * @deprecated use org.eclipse.wst.dtd.core.text.IDTDPartitions - */ -public interface IDTDPartitionTypes { - - String DTD_DEFAULT = "org.eclipse.wst.dtd.DEFAULT"; //$NON-NLS-1$ -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tasks/DTDFileTaskScanner.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tasks/DTDFileTaskScanner.java deleted file mode 100644 index 837e27e321..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tasks/DTDFileTaskScanner.java +++ /dev/null @@ -1,28 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.tasks; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.eclipse.wst.sse.core.internal.tasks.StructuredFileTaskScanner; - -public class DTDFileTaskScanner extends StructuredFileTaskScanner { - public DTDFileTaskScanner() { - super(); - } - - protected boolean isCommentRegion(IStructuredDocumentRegion region, ITextRegion textRegion) { - return textRegion.getType().equals(DTDRegionTypes.COMMENT_CONTENT); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java deleted file mode 100644 index 87e1a188ba..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java +++ /dev/null @@ -1,41 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.text; - -import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredTextReParser; -import org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser; - - -public class DTDStructuredDocumentReParser extends StructuredDocumentReParser { - - public StructuredDocumentEvent checkForCrossStructuredDocumentRegionBoundryCases() { - IStructuredDocumentRegion startNode = fStructuredDocument.getRegionAtCharacterOffset(fStart); - IStructuredDocumentRegion endNode = fStructuredDocument.getRegionAtCharacterOffset(fStart + fLengthToReplace - 1); - return reparse(startNode.getStart(), endNode.getEnd()); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser#newInstance() - */ - public IStructuredTextReParser newInstance() { - return new DTDStructuredDocumentReParser(); - } - - protected StructuredDocumentEvent reparse(IStructuredDocumentRegion dirtyStart, IStructuredDocumentRegion dirtyEnd) { - return super.reparse(dirtyStart, dirtyEnd); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java deleted file mode 100644 index e3d2c2e321..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java +++ /dev/null @@ -1,33 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.text; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion; - - -public class DTDStructuredDocumentRegionFactory { - public static final int DTD_GENERIC = 5; - - public static IStructuredDocumentRegion createStructuredDocumentRegion(int type) { - IStructuredDocumentRegion instance = null; - switch (type) { - case DTD_GENERIC : - instance = new BasicStructuredDocumentRegion(); - break; - default : - break; - } - return instance; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java deleted file mode 100644 index a191b2e966..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java +++ /dev/null @@ -1,84 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.text; - -import java.util.NoSuchElementException; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList; - - -public class RegionIterator { - - private int currentIndex; - - // private IStructuredDocumentRegion flatNode; - private ITextRegionList regions; - // private int startOffset, endOffset; - private ITextRegion startRegion, endRegion; - - public RegionIterator(IStructuredDocumentRegion node) { - this(node, node.getStart(), node.getEnd()); - } - - public RegionIterator(IStructuredDocumentRegion node, int startOffset, int endOffset) { - regions = node.getRegions(); - startRegion = node.getRegionAtCharacterOffset(startOffset); - endRegion = node.getRegionAtCharacterOffset(endOffset - 1); - - for (int i = 0; i < regions.size(); i++) { - ITextRegion region = regions.get(i); - if (startRegion == region) { - currentIndex = i; - break; - } - } - } - - public RegionIterator(ITextRegionList regions) { - this.regions = regions; - startRegion = regions.get(0); - endRegion = regions.get(regions.size() - 1); - currentIndex = 0; - // this(node, node.getStart(), node.getEnd()); - } - - public boolean hasNext() { - if (currentIndex < regions.size()) { - return currentIndex <= regions.indexOf(endRegion); - } - return false; - } - - public boolean hasPrevious() { - if (currentIndex >= 0) { - return currentIndex >= regions.indexOf(startRegion); - } - return false; - } - - public ITextRegion next() { - if (hasNext()) { - return regions.get(currentIndex++); - } - throw new NoSuchElementException(); - } - - public ITextRegion previous() { - if (hasPrevious()) { - return regions.get(--currentIndex); - } - throw new NoSuchElementException(); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/StructuredTextPartitionerForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/StructuredTextPartitionerForDTD.java deleted file mode 100644 index 142bd4f67d..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/StructuredTextPartitionerForDTD.java +++ /dev/null @@ -1,50 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.text; - -import org.eclipse.jface.text.IDocumentPartitioner; -import org.eclipse.wst.dtd.core.text.IDTDPartitions; -import org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner; -import org.eclipse.wst.sse.core.text.IStructuredPartitions; - -public class StructuredTextPartitionerForDTD extends StructuredTextPartitioner { - - public StructuredTextPartitionerForDTD() { - super(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#getDefault() - */ - public String getDefaultPartitionType() { - return IDTDPartitions.DTD_DEFAULT; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#initLegalContentTypes() - */ - protected void initLegalContentTypes() { - fSupportedTypes = new String[]{IDTDPartitions.DTD_DEFAULT, IStructuredPartitions.UNKNOWN_PARTITION}; - } - - /* (non-Javadoc) - * @see org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner#newInstance() - */ - public IDocumentPartitioner newInstance() { - return new StructuredTextPartitionerForDTD(); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/DTDTokenizer.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/DTDTokenizer.java deleted file mode 100644 index 7ecc2d52ec..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/DTDTokenizer.java +++ /dev/null @@ -1,1090 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -/* The following code was generated by JFlex 1.3.5 on 3/14/05 9:37 PM */ -/*nlsXXX*/ -package org.eclipse.wst.dtd.core.internal.tokenizer; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; - -/** - * Generate with "dtdskeleton". - * - * It removes some unused fields and avoids some compiler warnings - */ - - -/** - * This class is a scanner generated by - * <a href="http://www.jflex.de/">JFlex</a> 1.3.5 - * on 3/14/05 9:37 PM from the specification file - * <tt>file:/D:/eclipse.wtp/workspace/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtd.flex</tt> - */ -public class DTDTokenizer { - - /** This character denotes the end of file */ - final public static int YYEOF = -1; - - /** initial size of the lookahead buffer */ - final private static int YY_BUFFERSIZE = 16384; - - /** lexical states */ - final public static int ATTRIBUTE_ENUMERATION = 13; - final public static int NOTATION_NAME = 6; - final public static int ELEMENT_CHILD = 1; - final public static int ENTITY_CONTENT = 4; - final public static int COMMENT_CONTENT = 8; - final public static int ATTLIST_NAME = 9; - final public static int EXTERNALID_CONTENT = 7; - final public static int ELEMENT_CONTENT = 1; - final public static int ELEMENT_MIXED = 1; - final public static int ELEMENT_MIXED_OR_CHILD = 1; - final public static int ATTRIBUTE_CONTENT = 11; - final public static int ENTITY_NAME = 3; - final public static int ATTRIBUTE_DEFAULT = 12; - final public static int ELEMENT_NAME = 2; - final public static int YYINITIAL = 0; - final public static int NDATA_CONTENT = 5; - final public static int ATTLIST_CONTENT = 10; - final public static int NODE = 1; - - /** - * Translates characters to character classes - */ - final private static String yycmap_packed = - "\10\0\1\0\1\5\1\3\1\0\1\0\1\2\22\0\1\5\1\6"+ - "\1\1\1\37\1\0\1\23\1\0\1\46\1\42\1\43\1\4\1\7"+ - "\1\45\1\12\1\0\1\0\12\0\1\0\1\10\1\11\1\0\1\13"+ - "\1\4\1\0\1\25\1\31\1\32\1\33\1\14\1\35\2\0\1\21"+ - "\1\0\1\36\1\15\1\16\1\17\1\24\1\27\1\40\1\34\1\26"+ - "\1\20\1\30\2\0\1\41\1\22\1\0\1\0\1\0\2\0\1\0"+ - "\1\0\32\0\1\0\1\44\uff83\0"; - - /** - * Translates characters to character classes - */ - final private static char [] yycmap = yy_unpack_cmap(yycmap_packed); - - /** - * Translates a state to a row index in the transition table - */ - final private static int yy_rowMap [] = { - 0, 39, 78, 117, 156, 195, 234, 273, 312, 351, - 390, 429, 468, 507, 546, 585, 624, 39, 39, 39, - 663, 702, 741, 780, 819, 39, 39, 858, 897, 39, - 39, 936, 936, 975, 1014, 1053, 1092, 1131, 1170, 1209, - 1248, 1287, 1326, 1365, 1404, 1443, 39, 1482, 1521, 1560, - 1599, 1638, 39, 1677, 1716, 1755, 1794, 1833, 1872, 39, - 39, 1911, 1950, 1989, 2028, 2067, 2106, 39, 39, 39, - 2145, 2184, 2223, 2262, 2301, 2340, 2379, 897, 2418, 975, - 2457, 2496, 2535, 2574, 975, 2613, 2652, 2691, 2730, 1560, - 2769, 2808, 2847, 2886, 2925, 2964, 3003, 3042, 3081, 3120, - 1950, 3159, 3198, 3237, 3276, 3315, 1950, 39, 3354, 3393, - 3432, 39, 3471, 3510, 3549, 39, 3588, 3627, 39, 3666, - 3705, 3744, 39, 39, 3783, 3822, 3861, 3900, 3939, 3978, - 4017, 4056, 39, 4095, 4134, 4173, 39, 4212, 4251, 4290, - 4329, 4368, 4407, 4446, 4485, 4524, 4563, 4602, 4641, 4680, - 4719, 4758, 4797, 4836, 4875, 4914, 4953, 4992, 5031, 5070, - 5109, 5148, 5187, 5226, 5265, 5304, 5343, 975, 5382, 5421, - 5460, 5499, 5538, 5577, 1560, 5616, 5655, 5694, 5733, 5772, - 5811, 5850, 546, 5889, 5928, 5967, 6006, 975, 975, 975, - 6045, 1560, 6084, 6123, 1560, 6162, 6201, 6240, 1950, 546, - 6279, 546, 819, 6318, 6357, 6396, 6435, 6474, 6513, 546, - 6552, 1560, 1560, 1560, 1950, 6591, 39, 1950 - }; - - /** - * The packed transition table of the DFA (part 0) - */ - final private static String yy_packed0 = - "\2\17\2\20\1\17\1\20\1\21\1\17\1\22\1\23"+ - "\1\17\1\24\1\25\2\17\1\26\3\17\1\27\1\17"+ - "\1\30\21\17\47\0\2\31\2\20\1\32\1\20\1\0"+ - "\1\32\1\31\1\33\1\31\1\33\23\31\1\34\2\31"+ - "\1\35\1\36\2\37\1\31\2\40\2\20\1\0\1\20"+ - "\3\40\1\33\1\40\1\33\7\40\1\41\16\40\4\0"+ - "\1\40\1\42\1\43\2\20\1\42\1\20\3\42\1\33"+ - "\1\42\1\33\12\42\1\44\1\45\16\42\1\46\2\47"+ - "\2\20\1\47\1\20\3\47\1\33\1\47\1\33\33\47"+ - "\2\50\2\20\1\0\1\20\2\0\1\50\1\33\1\50"+ - "\1\33\26\50\4\0\1\50\1\42\1\43\2\20\1\42"+ - "\1\20\3\42\1\33\1\42\1\33\3\42\1\51\6\42"+ - "\1\52\1\53\16\42\1\46\2\54\2\55\1\54\1\55"+ - "\4\54\1\56\1\57\33\54\2\60\2\20\1\42\1\20"+ - "\2\42\1\60\1\33\1\60\1\33\26\60\4\42\1\60"+ - "\2\61\2\20\1\42\1\20\2\42\1\61\1\33\1\61"+ - "\1\33\26\61\4\42\1\61\1\62\1\63\1\64\1\65"+ - "\1\62\1\66\3\62\1\33\1\62\1\33\1\67\2\62"+ - "\1\70\1\62\1\71\10\62\1\72\4\62\1\73\2\62"+ - "\1\74\2\75\1\62\1\76\1\77\1\100\2\20\1\77"+ - "\1\20\3\77\1\33\1\77\1\33\23\77\1\101\6\77"+ - "\1\102\2\103\2\20\1\103\1\20\3\103\1\33\1\103"+ - "\1\33\26\103\1\104\1\105\1\106\2\103\2\17\2\0"+ - "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0"+ - "\23\17\2\0\2\20\1\0\1\20\53\0\1\107\34\0"+ - "\2\17\2\0\1\17\2\0\1\17\2\0\1\17\1\0"+ - "\1\17\1\110\1\17\1\111\3\17\1\0\25\17\2\0"+ - "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0"+ - "\1\112\22\17\2\113\2\0\1\113\2\0\1\113\2\0"+ - "\1\113\1\0\7\113\1\0\23\113\2\17\2\0\1\17"+ - "\2\0\1\17\2\0\1\17\1\0\4\17\1\114\2\17"+ - "\1\0\23\17\2\31\6\0\1\31\1\0\1\31\1\0"+ - "\26\31\4\0\3\31\6\0\1\31\1\0\1\31\1\0"+ - "\13\31\1\115\12\31\4\0\1\31\2\0\2\116\1\0"+ - "\1\116\31\0\1\117\7\0\2\40\4\0\3\40\1\0"+ - "\1\40\1\0\26\40\4\0\1\40\2\42\2\0\1\42"+ - "\1\0\3\42\1\0\1\42\1\0\33\42\1\43\1\120"+ - "\2\121\1\43\1\121\3\43\1\121\1\43\1\121\33\43"+ - "\2\42\2\0\1\42\1\0\3\42\1\0\1\42\1\0"+ - "\6\42\1\122\26\42\2\0\1\42\1\0\3\42\1\0"+ - "\1\42\1\0\14\42\1\123\16\42\2\46\2\124\1\46"+ - "\1\124\3\46\1\124\1\46\1\124\32\46\1\125\2\47"+ - "\2\0\1\47\1\0\3\47\1\0\1\47\1\0\33\47"+ - "\2\50\6\0\1\50\1\0\1\50\1\0\26\50\4\0"+ - "\1\50\2\42\2\0\1\42\1\0\3\42\1\0\1\42"+ - "\1\0\17\42\1\126\15\42\2\0\1\42\1\0\3\42"+ - "\1\0\1\42\1\0\6\42\1\127\26\42\2\0\1\42"+ - "\1\0\3\42\1\0\1\42\1\0\14\42\1\130\16\42"+ - "\12\54\2\0\35\54\2\55\1\54\1\55\4\54\2\0"+ - "\33\54\12\0\1\131\34\0\2\60\2\0\1\42\1\0"+ - "\2\42\1\60\1\0\1\60\1\0\26\60\4\42\1\60"+ - "\2\61\2\0\1\42\1\0\2\42\1\61\1\0\1\61"+ - "\1\0\26\61\4\42\1\61\2\62\2\0\1\62\1\0"+ - "\3\62\1\0\1\62\1\0\26\62\3\0\2\62\1\63"+ - "\1\132\2\133\1\63\1\133\3\63\1\133\1\63\1\133"+ - "\26\63\3\133\2\63\3\0\1\65\50\0\1\66\41\0"+ - "\2\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0"+ - "\3\62\1\134\22\62\3\0\4\62\2\0\1\62\1\0"+ - "\3\62\1\0\1\62\1\0\2\62\1\135\5\62\1\136"+ - "\15\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0"+ - "\1\62\1\0\17\62\1\137\6\62\3\0\4\62\2\0"+ - "\1\62\1\0\3\62\1\0\1\62\1\0\17\62\1\140"+ - "\6\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0"+ - "\1\62\1\0\5\62\1\141\12\62\1\142\1\143\4\62"+ - "\3\0\2\62\2\76\2\144\1\76\1\144\3\76\1\144"+ - "\1\76\1\144\26\76\3\144\1\76\1\132\2\77\2\0"+ - "\1\77\1\0\3\77\1\0\1\77\1\0\33\77\1\100"+ - "\1\145\2\146\1\100\1\146\3\100\1\146\1\100\1\146"+ - "\33\100\2\77\2\0\1\77\1\0\3\77\1\0\1\77"+ - "\1\0\5\77\1\147\12\77\1\150\1\151\11\77\2\102"+ - "\2\152\1\102\1\152\3\102\1\152\1\102\1\152\32\102"+ - "\1\153\2\103\2\0\1\103\1\0\3\103\1\0\1\103"+ - "\1\0\26\103\3\0\2\103\12\0\1\154\34\0\2\17"+ - "\2\0\1\17\2\0\1\17\2\0\1\17\1\0\1\155"+ - "\6\17\1\0\25\17\2\0\1\17\2\0\1\17\2\0"+ - "\1\17\1\0\4\17\1\156\2\17\1\0\25\17\2\0"+ - "\1\17\2\0\1\17\2\0\1\17\1\0\4\17\1\157"+ - "\2\17\1\0\23\17\2\113\2\0\1\113\2\0\1\113"+ - "\1\160\1\0\1\113\1\0\7\113\1\0\23\113\2\17"+ - "\2\0\1\17\2\0\1\17\2\0\1\17\1\0\4\17"+ - "\1\161\2\17\1\0\23\17\2\31\6\0\1\31\1\0"+ - "\1\31\1\0\16\31\1\162\7\31\4\0\1\31\27\0"+ - "\1\163\17\0\1\121\1\164\45\121\2\42\2\0\1\42"+ - "\1\0\3\42\1\0\1\42\1\0\12\42\1\165\22\42"+ - "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\15\42"+ - "\1\166\15\42\46\124\1\167\2\42\2\0\1\42\1\0"+ - "\3\42\1\0\1\42\1\0\11\42\1\170\23\42\2\0"+ - "\1\42\1\0\3\42\1\0\1\42\1\0\12\42\1\171"+ - "\22\42\2\0\1\42\1\0\3\42\1\0\1\42\1\0"+ - "\15\42\1\172\15\42\13\0\1\173\33\0\1\133\1\174"+ - "\45\133\2\62\2\0\1\62\1\0\3\62\1\0\1\62"+ - "\1\0\4\62\1\175\21\62\3\0\4\62\2\0\1\62"+ - "\1\0\3\62\1\0\1\62\1\0\4\62\1\176\21\62"+ - "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+ - "\1\0\4\62\1\177\21\62\3\0\4\62\2\0\1\62"+ - "\1\0\3\62\1\0\1\62\1\0\20\62\1\200\5\62"+ - "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+ - "\1\0\11\62\1\201\14\62\3\0\4\62\2\0\1\62"+ - "\1\0\3\62\1\0\1\62\1\0\2\62\1\202\23\62"+ - "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+ - "\1\0\1\203\25\62\3\0\4\62\2\0\1\62\1\0"+ - "\3\62\1\0\1\62\1\0\5\62\1\204\20\62\3\0"+ - "\2\62\46\144\1\174\1\146\1\205\45\146\2\77\2\0"+ - "\1\77\1\0\3\77\1\0\1\77\1\0\2\77\1\206"+ - "\32\77\2\0\1\77\1\0\3\77\1\0\1\77\1\0"+ - "\1\207\34\77\2\0\1\77\1\0\3\77\1\0\1\77"+ - "\1\0\5\77\1\210\25\77\46\152\1\211\2\17\2\0"+ - "\1\17\2\0\1\17\2\0\1\17\1\0\2\17\1\212"+ - "\4\17\1\0\25\17\2\0\1\17\2\0\1\17\2\0"+ - "\1\17\1\0\5\17\1\213\1\17\1\0\25\17\2\0"+ - "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0"+ - "\1\17\1\214\23\17\2\0\1\17\2\0\1\17\2\0"+ - "\1\17\1\0\1\17\1\215\5\17\1\0\23\17\2\31"+ - "\6\0\1\31\1\0\1\31\1\0\17\31\1\216\6\31"+ - "\4\0\1\31\32\0\1\217\14\0\2\42\2\0\1\42"+ - "\1\0\3\42\1\0\1\42\1\0\4\42\1\220\30\42"+ - "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\1\42"+ - "\1\221\33\42\2\0\1\42\1\0\3\42\1\0\1\42"+ - "\1\0\4\42\1\222\30\42\2\0\1\42\1\0\3\42"+ - "\1\0\1\42\1\0\4\42\1\223\30\42\2\0\1\42"+ - "\1\0\3\42\1\0\1\42\1\0\1\42\1\224\31\42"+ - "\2\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0"+ - "\5\62\1\225\20\62\3\0\4\62\2\0\1\62\1\0"+ - "\3\62\1\0\1\62\1\0\10\62\1\226\15\62\3\0"+ - "\4\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0"+ - "\11\62\1\227\14\62\3\0\4\62\2\0\1\62\1\0"+ - "\3\62\1\0\1\62\1\0\1\230\25\62\3\0\4\62"+ - "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\4\62"+ - "\1\231\21\62\3\0\4\62\2\0\1\62\1\0\3\62"+ - "\1\0\1\62\1\0\13\62\1\232\12\62\3\0\4\62"+ - "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\24\62"+ - "\1\233\1\62\3\0\4\62\2\0\1\62\1\0\3\62"+ - "\1\0\1\62\1\0\25\62\1\234\3\0\2\62\2\77"+ - "\2\0\1\77\1\0\3\77\1\0\1\77\1\0\13\77"+ - "\1\235\21\77\2\0\1\77\1\0\3\77\1\0\1\77"+ - "\1\0\24\77\1\236\10\77\2\0\1\77\1\0\3\77"+ - "\1\0\1\77\1\0\25\77\1\237\5\77\2\17\2\0"+ - "\1\17\2\0\1\17\2\0\1\17\1\0\1\240\6\17"+ - "\1\0\25\17\2\0\1\17\2\0\1\17\2\0\1\17"+ - "\1\0\4\17\1\241\2\17\1\0\25\17\2\0\1\17"+ - "\2\0\1\17\2\0\1\17\1\0\4\17\1\242\2\17"+ - "\1\0\25\17\2\0\1\17\2\0\1\17\2\0\1\17"+ - "\1\0\5\17\1\243\1\17\1\0\23\17\2\31\6\0"+ - "\1\31\1\0\1\31\1\0\11\31\1\244\14\31\4\0"+ - "\1\31\33\0\1\245\13\0\2\42\2\0\1\42\1\0"+ - "\3\42\1\0\1\42\1\0\1\246\34\42\2\0\1\42"+ - "\1\0\3\42\1\0\1\42\1\0\5\42\1\247\27\42"+ - "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\11\42"+ - "\1\250\23\42\2\0\1\42\1\0\3\42\1\0\1\42"+ - "\1\0\1\251\34\42\2\0\1\42\1\0\3\42\1\0"+ - "\1\42\1\0\5\42\1\252\25\42\2\62\2\0\1\62"+ - "\1\0\3\62\1\0\1\62\1\0\4\62\1\253\21\62"+ - "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+ - "\1\0\22\62\1\254\3\62\3\0\4\62\2\0\1\62"+ - "\1\0\3\62\1\0\1\62\1\0\4\62\1\255\21\62"+ - "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+ - "\1\0\21\62\1\256\4\62\3\0\4\62\2\0\1\62"+ - "\1\0\3\62\1\0\1\62\1\0\11\62\1\257\14\62"+ - "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+ - "\1\0\1\62\1\260\24\62\3\0\4\62\2\0\1\62"+ - "\1\0\3\62\1\0\1\62\1\0\14\62\1\261\11\62"+ - "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+ - "\1\0\1\262\25\62\3\0\2\62\2\77\2\0\1\77"+ - "\1\0\3\77\1\0\1\77\1\0\1\77\1\263\33\77"+ - "\2\0\1\77\1\0\3\77\1\0\1\77\1\0\14\77"+ - "\1\264\20\77\2\0\1\77\1\0\3\77\1\0\1\77"+ - "\1\0\1\265\32\77\2\17\2\0\1\17\2\0\1\17"+ - "\2\0\1\17\1\0\3\17\1\266\3\17\1\0\25\17"+ - "\2\0\1\17\2\0\1\17\2\0\1\17\1\0\6\17"+ - "\1\267\1\0\25\17\2\0\1\17\2\0\1\17\2\0"+ - "\1\17\1\0\5\17\1\270\1\17\1\0\25\17\2\0"+ - "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0"+ - "\2\17\1\271\20\17\2\31\6\0\1\31\1\0\1\31"+ - "\1\0\4\31\1\272\21\31\4\0\1\31\25\0\1\273"+ - "\21\0\2\42\2\0\1\42\1\0\3\42\1\0\1\42"+ - "\1\0\2\42\1\274\32\42\2\0\1\42\1\0\3\42"+ - "\1\0\1\42\1\0\16\42\1\274\16\42\2\0\1\42"+ - "\1\0\3\42\1\0\1\42\1\0\2\42\1\275\32\42"+ - "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\16\42"+ - "\1\276\14\42\2\62\2\0\1\62\1\0\3\62\1\0"+ - "\1\62\1\0\5\62\1\277\1\300\17\62\3\0\4\62"+ - "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\1\301"+ - "\25\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0"+ - "\1\62\1\0\5\62\1\302\20\62\3\0\4\62\2\0"+ - "\1\62\1\0\3\62\1\0\1\62\1\0\12\62\1\303"+ - "\13\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0"+ - "\1\62\1\0\5\62\1\234\20\62\3\0\4\62\2\0"+ - "\1\62\1\0\3\62\1\0\1\62\1\0\5\62\1\304"+ - "\20\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0"+ - "\1\62\1\0\17\62\1\132\6\62\3\0\2\62\2\77"+ - "\2\0\1\77\1\0\3\77\1\0\1\77\1\0\5\77"+ - "\1\305\27\77\2\0\1\77\1\0\3\77\1\0\1\77"+ - "\1\0\5\77\1\306\27\77\2\0\1\77\1\0\3\77"+ - "\1\0\1\77\1\0\17\77\1\307\13\77\2\17\2\0"+ - "\1\17\2\0\1\17\2\0\1\17\1\0\4\17\1\310"+ - "\2\17\1\0\25\17\2\0\1\17\2\0\1\17\2\0"+ - "\1\17\1\0\7\17\1\0\1\311\24\17\2\0\1\17"+ - "\2\0\1\17\2\0\1\17\1\0\4\17\1\312\2\17"+ - "\1\0\23\17\2\31\6\0\1\31\1\0\1\31\1\0"+ - "\11\31\1\313\14\31\4\0\1\31\20\0\1\314\26\0"+ - "\2\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0"+ - "\1\315\25\62\3\0\4\62\2\0\1\62\1\0\3\62"+ - "\1\0\1\62\1\0\3\62\1\316\22\62\3\0\4\62"+ - "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\10\62"+ - "\1\317\15\62\3\0\4\62\2\0\1\62\1\0\3\62"+ - "\1\0\1\62\1\0\20\62\1\234\5\62\3\0\2\62"+ - "\2\77\2\0\1\77\1\0\3\77\1\0\1\77\1\0"+ - "\1\320\34\77\2\0\1\77\1\0\3\77\1\0\1\77"+ - "\1\0\20\77\1\321\12\77\2\17\2\0\1\17\2\0"+ - "\1\17\2\0\1\17\1\0\3\17\1\322\3\17\1\0"+ - "\23\17\25\0\1\323\21\0\2\62\2\0\1\62\1\0"+ - "\3\62\1\0\1\62\1\0\12\62\1\324\13\62\3\0"+ - "\4\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0"+ - "\12\62\1\325\13\62\3\0\4\62\2\0\1\62\1\0"+ - "\3\62\1\0\1\62\1\0\3\62\1\326\22\62\3\0"+ - "\2\62\2\77\2\0\1\77\1\0\3\77\1\0\1\77"+ - "\1\0\17\77\1\327\15\77\2\0\1\77\1\0\3\77"+ - "\1\0\1\77\1\0\1\330\32\77\2\0\2\323\1\0"+ - "\1\323\35\0\1\331\3\0\2\77\2\0\1\77\1\0"+ - "\3\77\1\0\1\77\1\0\17\77\1\332\13\77"; - - /** - * The transition table of the DFA - */ - final private static int yytrans [] = yy_unpack(); - - - /* error codes */ - final private static int YY_UNKNOWN_ERROR = 0; - final static int YY_ILLEGAL_STATE = 1; - final private static int YY_NO_MATCH = 2; - final private static int YY_PUSHBACK_2BIG = 3; - - /* error messages for the codes above */ - final private static String YY_ERROR_MSG[] = { - "Unkown internal scanner error", - "Internal error: unknown state", - "Error: could not match input", - "Error: pushback value was too large" - }; - - /** - * YY_ATTRIBUTE[aState] contains the attributes of state <code>aState</code> - */ - private final static byte YY_ATTRIBUTE[] = { - 0, 8, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 9, 9, 9, 1, 1, 1, 1, 1, 9, 9, 1, 1, 9, 9, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, - 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 9, 1, 1, 1, - 1, 1, 1, 9, 9, 9, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, - 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 9, 1, 1, 1, 9, - 1, 1, 0, 9, 1, 1, 9, 1, 1, 1, 9, 9, 1, 1, 1, 1, - 1, 1, 1, 1, 9, 1, 1, 1, 9, 1, 1, 1, 1, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 1, 1, 1, 9, 1 - }; - - /** the input device */ - private java.io.Reader yy_reader; - - /** the current state of the DFA */ - private int yy_state; - - /** the current lexical state */ - private int yy_lexical_state = YYINITIAL; - - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ - private char yy_buffer[] = new char[YY_BUFFERSIZE]; - - /** the textposition at the last accepting state */ - private int yy_markedPos; - - /** the textposition at the last state to be included in yytext */ - //private int yy_pushbackPos; - - /** the current text position in the buffer */ - private int yy_currentPos; - - /** startRead marks the beginning of the yytext() string in the buffer */ - private int yy_startRead; - - /** endRead marks the last character in the buffer, that has been read - from input */ - private int yy_endRead; - - /** number of newlines encountered up to the start of the matched text */ - private int yyline; - - /** the number of characters up to the start of the matched text */ - private int yychar; - - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - int yycolumn; - - /** yy_atEOF == true <=> the scanner is at the EOF */ - private boolean yy_atEOF; - - /* user code: */ - int node_count = 0; - String currentString; - - private Token createToken(String type) { - return new Token(type, yytext(), yyline, yychar + startOffset, yylength()); - } - - private int startOffset = 0; - public void setStartOffset(int offset) { - this.startOffset = offset; - } - - public void setLine(int line) { - this.yyline = line; - } - - - /** - * Creates a new scanner - * There is also a java.io.InputStream version of this constructor. - * - * @param in the java.io.Reader to read input from. - */ - public DTDTokenizer(java.io.Reader in) { - this.yy_reader = in; - } - - /** - * Creates a new scanner. - * There is also java.io.Reader version of this constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public DTDTokenizer(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } - - /** - * Unpacks the split, compressed DFA transition table. - * - * @return the unpacked transition table - */ - private static int [] yy_unpack() { - int [] trans = new int[6630]; - int offset = 0; - offset = yy_unpack(yy_packed0, offset, trans); - return trans; - } - - /** - * Unpacks the compressed DFA transition table. - * - * @param packed the packed transition table - * @return the index of the last entry - */ - private static int yy_unpack(String packed, int offset, int [] trans) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do trans[j++] = value; while (--count > 0); - } - return j; - } - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char [] yy_unpack_cmap(String packed) { - char [] map = new char[0x10000]; - int i = 0; /* index in packed string */ - int j = 0; /* index in unpacked array */ - while (i < 130) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do map[j++] = value; while (--count > 0); - } - return map; - } - - - /** - * Refills the input buffer. - * - * @return <code>false</code>, iff there was new input. - * - * @exception java.io.IOException if any I/O-Error occurs - */ - private boolean yy_refill() throws java.io.IOException { - - /* first: make room (if you can) */ - if (yy_startRead > 0) { - System.arraycopy(yy_buffer, yy_startRead, - yy_buffer, 0, - yy_endRead-yy_startRead); - - /* translate stored positions */ - yy_endRead-= yy_startRead; - yy_currentPos-= yy_startRead; - yy_markedPos-= yy_startRead; - //yy_pushbackPos-= yy_startRead; - yy_startRead = 0; - } - - /* is the buffer big enough? */ - if (yy_currentPos >= yy_buffer.length) { - /* if not: blow it up */ - char newBuffer[] = new char[yy_currentPos*2]; - System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length); - yy_buffer = newBuffer; - } - - /* finally: fill the buffer with new input */ - int numRead = yy_reader.read(yy_buffer, yy_endRead, - yy_buffer.length-yy_endRead); - - if (numRead < 0) { - return true; - } - else { - yy_endRead+= numRead; - return false; - } - } - - - /** - * Closes the input stream. - */ - final public void yyclose() throws java.io.IOException { - yy_atEOF = true; /* indicate end of file */ - yy_endRead = yy_startRead; /* invalidate buffer */ - - if (yy_reader != null) - yy_reader.close(); - } - - - /** - * Closes the current stream, and resets the - * scanner to read from a new input stream. - * - * All internal variables are reset, the old input stream - * <b>cannot</b> be reused (internal buffer is discarded and lost). - * Lexical state is set to <tt>YY_INITIAL</tt>. - * - * @param reader the new input stream - */ - final public void yyreset(java.io.Reader reader) throws java.io.IOException { - yyclose(); - yy_reader = reader; - yy_atEOF = false; - yy_endRead = yy_startRead = 0; - yy_currentPos = yy_markedPos = 0;//yy_pushbackPos = 0; - yyline = yychar = yycolumn = 0; - yy_lexical_state = YYINITIAL; - } - - - /** - * Returns the current lexical state. - */ - final public int yystate() { - return yy_lexical_state; - } - - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - final public void yybegin(int newState) { - yy_lexical_state = newState; - } - - - /** - * Returns the text matched by the current regular expression. - */ - final public String yytext() { - return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead ); - } - - - /** - * Returns the character at position <tt>pos</tt> from the - * matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. - * - * @return the character at position pos - */ - final public char yycharat(int pos) { - return yy_buffer[yy_startRead+pos]; - } - - - /** - * Returns the length of the matched text region. - */ - final public int yylength() { - return yy_markedPos-yy_startRead; - } - - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void yy_ScanError(int errorCode) { - String message; - try { - message = YY_ERROR_MSG[errorCode]; - } - catch (ArrayIndexOutOfBoundsException e) { - message = YY_ERROR_MSG[YY_UNKNOWN_ERROR]; - } - - throw new Error(message); - } - - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! - */ - private void yypushback(int number) { - if ( number > yylength() ) - yy_ScanError(YY_PUSHBACK_2BIG); - - yy_markedPos -= number; - } - - - /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - */ - public Yytoken yylex() throws java.io.IOException { - int yy_input; - int yy_action; - - // cached fields: - int yy_currentPos_l; - int yy_markedPos_l; - int yy_endRead_l = yy_endRead; - char [] yy_buffer_l = yy_buffer; - char [] yycmap_l = yycmap; - - int [] yytrans_l = yytrans; - int [] yy_rowMap_l = yy_rowMap; - byte [] yy_attr_l = YY_ATTRIBUTE; - - while (true) { - yy_markedPos_l = yy_markedPos; - - yychar+= yy_markedPos_l-yy_startRead; - - yy_action = -1; - - yy_currentPos_l = yy_currentPos = - yy_startRead = yy_markedPos_l; - - yy_state = yy_lexical_state; - - - yy_forAction: { - while (true) { - - if (yy_currentPos_l < yy_endRead_l) - yy_input = yy_buffer_l[yy_currentPos_l++]; - else if (yy_atEOF) { - yy_input = YYEOF; - break yy_forAction; - } - else { - // store back cached positions - yy_currentPos = yy_currentPos_l; - yy_markedPos = yy_markedPos_l; - boolean eof = yy_refill(); - // get translated positions and possibly new buffer - yy_currentPos_l = yy_currentPos; - yy_markedPos_l = yy_markedPos; - yy_buffer_l = yy_buffer; - yy_endRead_l = yy_endRead; - if (eof) { - yy_input = YYEOF; - break yy_forAction; - } - else { - yy_input = yy_buffer_l[yy_currentPos_l++]; - } - } - int yy_next = yytrans_l[ yy_rowMap_l[yy_state] + yycmap_l[yy_input] ]; - if (yy_next == -1) break yy_forAction; - yy_state = yy_next; - - int yy_attributes = yy_attr_l[yy_state]; - if ( (yy_attributes & 1) == 1 ) { - yy_action = yy_state; - yy_markedPos_l = yy_currentPos_l; - if ( (yy_attributes & 8) == 8 ) break yy_forAction; - } - - } - } - - // store back cached position - yy_markedPos = yy_markedPos_l; - - switch (yy_action) { - - case 26: - { yypushback(yylength()); yybegin(YYINITIAL); } - case 219: break; - case 89: - case 123: - { yypushback(yylength()); yybegin(ATTRIBUTE_DEFAULT); } - case 220: break; - case 12: - case 62: - case 63: - case 64: - case 65: - case 102: - case 103: - case 104: - case 133: - case 134: - case 135: - case 156: - case 157: - case 158: - case 178: - case 179: - case 180: - case 196: - case 197: - case 207: - case 208: - case 215: - { yypushback(yylength()); yybegin(ATTLIST_CONTENT); } - case 221: break; - case 51: - case 52: - { yypushback(yylength()); yybegin(ATTLIST_CONTENT); } - case 222: break; - case 205: - { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.NMTOKEN_KEYWORD); } - case 223: break; - case 194: - { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.IDREFS_KEYWORD); } - case 224: break; - case 191: - { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ENTITY_KEYWORD); } - case 225: break; - case 107: - { yybegin(COMMENT_CONTENT); return createToken(DTDRegionTypes.COMMENT_START); } - case 226: break; - case 48: - { yybegin(ATTRIBUTE_CONTENT); return createToken(DTDRegionTypes.ATTRIBUTE_NAME); } - case 227: break; - case 39: - { yybegin(EXTERNALID_CONTENT); return createToken(DTDRegionTypes.NAME); } - case 228: break; - case 106: - case 136: - { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); } - case 229: break; - case 100: - case 132: - { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); } - case 230: break; - case 202: - case 216: - { return createToken(DTDRegionTypes.CONTENT_PCDATA); } - case 231: break; - case 189: - { return createToken(DTDRegionTypes.PUBLIC_KEYWORD); } - case 232: break; - case 188: - { return createToken(DTDRegionTypes.SYSTEM_KEYWORD); } - case 233: break; - case 14: - case 20: - case 21: - case 23: - case 71: - case 72: - case 73: - case 75: - case 108: - case 109: - case 110: - case 112: - case 137: - case 138: - case 139: - case 140: - case 159: - case 160: - case 161: - case 162: - case 181: - case 183: - case 184: - case 200: - { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - case 234: break; - case 4: - case 33: - case 34: - case 35: - case 36: - case 37: - case 81: - case 82: - case 116: - case 117: - case 143: - case 144: - case 165: - case 166: - { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - case 235: break; - case 7: - case 40: - case 41: - case 42: - case 85: - case 86: - case 87: - case 119: - case 120: - case 121: - case 145: - case 146: - case 147: - case 168: - case 169: - { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - case 236: break; - case 9: - { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - case 237: break; - case 10: - { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - case 238: break; - case 43: - case 45: - case 46: - { return createToken(DTDRegionTypes.COMMENT_CONTENT); } - case 239: break; - case 60: - { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - case 240: break; - case 198: - { return createToken(DTDRegionTypes.FIXED_KEYWORD); } - case 241: break; - case 214: - { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.IMPLIED_KEYWORD); } - case 242: break; - case 212: - { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.NMTOKENS_KEYWORD); } - case 243: break; - case 211: - { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ENTITIES_KEYWORD); } - case 244: break; - case 209: - { yybegin(NOTATION_NAME); return createToken(DTDRegionTypes.NOTATION_TAG); } - case 245: break; - case 201: - { yybegin(ATTLIST_NAME); return createToken(DTDRegionTypes.ATTLIST_TAG); } - case 246: break; - case 199: - { yybegin(ELEMENT_NAME); return createToken(DTDRegionTypes.ELEMENT_TAG); } - case 247: break; - case 182: - { yybegin(ENTITY_NAME); return createToken(DTDRegionTypes.ENTITY_TAG); } - case 248: break; - case 167: - { yybegin(NDATA_CONTENT); return createToken(DTDRegionTypes.NDATA_KEYWORD); } - case 249: break; - case 111: - { return createToken(DTDRegionTypes.ENTITY_PARM); } - case 250: break; - case 94: - { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ID_KEYWORD); } - case 251: break; - case 25: - { return createToken(DTDRegionTypes.OCCUR_TYPE); } - case 252: break; - case 16: - { return createToken(DTDRegionTypes.EXCLAMATION); } - case 253: break; - case 15: - { return createToken(DTDRegionTypes.WHITESPACE); } - case 254: break; - case 11: - case 49: - case 50: - case 54: - case 55: - case 56: - case 57: - case 58: - case 61: - case 91: - case 92: - case 93: - case 95: - case 96: - case 97: - case 98: - case 124: - case 125: - case 126: - case 127: - case 128: - case 129: - case 130: - case 131: - case 148: - case 149: - case 150: - case 151: - case 152: - case 153: - case 154: - case 155: - case 170: - case 171: - case 172: - case 175: - case 176: - case 177: - case 190: - case 192: - case 193: - case 195: - case 204: - case 206: - { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.PARM_ENTITY_TYPE); } - case 255: break; - case 28: - { return createToken(DTDRegionTypes.LEFT_PAREN); } - case 256: break; - case 29: - { return createToken(DTDRegionTypes.RIGHT_PAREN); } - case 257: break; - case 44: - { return createToken(DTDRegionTypes.WHITESPACE); } - case 258: break; - case 53: - { return createToken(DTDRegionTypes.WHITESPACE); } - case 259: break; - case 59: - { yypushback(yylength()); yybegin(ATTRIBUTE_ENUMERATION); } - case 260: break; - case 67: - { return createToken(DTDRegionTypes.LEFT_PAREN); } - case 261: break; - case 68: - { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.RIGHT_PAREN); } - case 262: break; - case 69: - { return createToken(DTDRegionTypes.ENUM_CHOICE); } - case 263: break; - case 31: - { yybegin(ENTITY_CONTENT); return createToken(DTDRegionTypes.NAME); } - case 264: break; - case 47: - { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.NAME); } - case 265: break; - case 187: - { yypushback(yylength()); yybegin(EXTERNALID_CONTENT); } - case 266: break; - case 213: - { yybegin(ATTRIBUTE_ENUMERATION); return createToken(DTDRegionTypes.NOTATION_KEYWORD); } - case 267: break; - case 174: - { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.CDATA_KEYWORD); } - case 268: break; - case 173: - { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.IDREF_KEYWORD); } - case 269: break; - case 217: - { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.REQUIRED_KEYWORD); } - case 270: break; - case 122: - { yybegin(YYINITIAL); return createToken(DTDRegionTypes.COMMENT_END); } - case 271: break; - case 84: - case 118: - { return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); } - case 272: break; - case 79: - case 115: - { return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); } - case 273: break; - case 24: - case 27: - case 76: - case 113: - case 141: - case 163: - case 185: - { return createToken(DTDRegionTypes.NAME); } - case 274: break; - case 5: - case 38: - { yybegin(YYINITIAL); return createToken(DTDRegionTypes.NDATA_VALUE); } - case 275: break; - case 13: - case 66: - { return createToken(DTDRegionTypes.NAME); } - case 276: break; - case 18: - { return createToken(DTDRegionTypes.START_TAG); } - case 277: break; - case 17: - { return createToken(DTDRegionTypes.SEMICOLON); } - case 278: break; - case 30: - { return createToken(DTDRegionTypes.CONNECTOR); } - case 279: break; - case 22: - { return createToken(DTDRegionTypes.PERCENT); } - case 280: break; - case 19: - { return createToken(DTDRegionTypes.END_TAG); } - case 281: break; - case 32: - { return createToken(DTDRegionTypes.PERCENT); } - case 282: break; - default: - if (yy_input == YYEOF && yy_startRead == yy_currentPos) { - yy_atEOF = true; - return null; - } - else { - yy_ScanError(YY_NO_MATCH); - } - } - } - } - - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Token.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Token.java deleted file mode 100644 index c1afe7e624..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Token.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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.tokenizer; - -public class Token extends Yytoken { - public static final int COMMENT_START = 9; - public static final int CONNECTOR = 6; - public static final int CONTENT_ANY = 43; - public static final int CONTENT_EMPTY = 42; - public static final int CONTENT_PCDATA = 44; - public static final int ELEMENT_CONTENT = 41; - - public static final int ELEMENT_TAG = 40; - public static final int END_TAG = 2; - public static final int ENTITY_CONTENT = 32; - public static final int ENTITY_PARM = 31; - - public static final int ENTITY_TAG = 30; - public static final int EXCLAMATION = 8; - public static final int LEFT_PAREN = 3; - public static final int NAME = 0; - public static final int NOTATION_CONTENT = 21; - - - public static final int NOTATION_TAG = 20; - - // public static final int CONNECT_CHOICE = 5; - // public static final int CONNECT_SEQUENCE = 6; - // public static final int OCCUR_OPTIONAL = 7; - // public static final int OCCUR_ONE_OR_MORE = 8; - // public static final int OCCUR_ZERO_OR_MORE = 9; - public static final int OCCUR_TYPE = 7; - public static final int RIGHT_PAREN = 4; - public static final int START_TAG = 1; - public static final int WHITESPACE = 5; - - - public Token(String type) { - super(type); - } - - public Token(String type, String text, int line, int charBegin, int length) { - super(type, text, line, charBegin, length); - } - - public Token createCopy() { - Token copy = new Token(getType(), getText(), getStartLine(), getStartOffset(), getLength()); - return copy; - } - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Yytoken.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Yytoken.java deleted file mode 100644 index ab47990af6..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Yytoken.java +++ /dev/null @@ -1,89 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.tokenizer; - -class Yytoken { - public int m_charBegin; - public int m_length; - public int m_line; - public String m_text; - public String m_type; - - Yytoken(String type) { - m_type = type; - } - - Yytoken(String type, String text, int line, int charBegin, int length) { - m_type = type; - m_text = new String(text); - m_line = line; - m_charBegin = charBegin; - m_length = length; - } - - public void delete(int start, int length) { - int stringStart = start - m_charBegin; - String oldString = m_text; - m_text = oldString.substring(0, stringStart); - m_text += oldString.substring(stringStart + length); - - m_length = m_text.length(); - System.out.println("new string = " + m_text); //$NON-NLS-1$ - - } - - public boolean equals(Yytoken other) { - return m_type == other.getType() && m_text.equals(other.getText()) && m_line == other.getStartLine() && m_charBegin == other.getStartOffset() && m_length == other.getLength(); - } - - public int getEndOffset() { - return m_charBegin + m_length; - } - - public int getLength() { - return m_length; - } - - public int getStartLine() { - return m_line; - } - - public int getStartOffset() { - return m_charBegin; - } - - public String getText() { - return m_text; - } - - public String getType() { - return m_type; - } - - public void setStartOffset(int startOffset) { - m_charBegin = startOffset; - } - - public String toString() { - return "Text : " + m_text + "\ntype : " + m_type + "\nline : " + m_line + "\ncBeg. : " + m_charBegin + "\ncEnd. : " + getEndOffset() + "\ncLength. : " + m_length; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ - } - - public void updateOffset(int delta) { - m_charBegin += delta; - } - - public void updateText(String newText) { - m_text = newText; - m_length = newText.length(); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtd.flex b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtd.flex deleted file mode 100644 index e3a14aa15f..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtd.flex +++ /dev/null @@ -1,327 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ - -package org.eclipse.wst.dtd.core.internal.tokenizer; - -import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes; - -/** - * Generate with "dtdskeleton". - * - * It removes some unused fields and avoids some compiler warnings - */ - -%% - -%{ - int node_count = 0; - String currentString; - - private Token createToken(String type) { - return new Token(type, yytext(), yyline, yychar + startOffset, yylength()); - } - - private int startOffset = 0; - public void setStartOffset(int offset) { - this.startOffset = offset; - } - - public void setLine(int line) { - this.yyline = line; - } -%} - -%class DTDTokenizer -%public -%unicode -%char - -%state NODE -%state ELEMENT_NAME -%state ELEMENT_CONTENT -%state ELEMENT_MIXED_OR_CHILD -%state ELEMENT_MIXED -%state ELEMENT_CHILD -%state ENTITY_NAME -%state ENTITY_CONTENT -%state NDATA_CONTENT - -%state NOTATION_NAME -%state EXTERNALID_CONTENT - -%state COMMENT_CONTENT -%state ATTLIST_NAME -%state ATTLIST_CONTENT -%state ATTRIBUTE_CONTENT -%state ATTRIBUTE_DEFAULT -%state ATTRIBUTE_ENUMERATION - - -ALPHA=[A-Za-z] -DIGIT=[0-9] -NONNEWLINE_WHITE_SPACE_CHAR=[\ \t\b\012] -STRING_TEXT=(\\\"|[^\n\r\"]|\\{WHITE_SPACE_CHAR}+\\)* -COMMENT_TEXT=([^*/\n]|[^*\n]"/"[^*\n]|[^/\n]"*"[^/\n]|"*"[^/\n]|"/"[^*\n])* -Ident = {ALPHA}({ALPHA}|{DIGIT}|_)* -InputCharacter = [^\r\n] - -LineTerminator = \r|\n|\r\n - -/* 3 - White Space */ -S = (\x20 | \x09 | \x0D | \x0A)+ -NonLineTerminatorWhitespace = (\x20 | \x09)+ - -WhiteSpace = {LineTerminator} | [ \t\f] - -/* 84 */ -/*Letter = {BaseChar} | {Ideographic} - -/* 85 */ -BaseChar = [\u0041-\u005A] | [\u0061-\u007A] | [\u00C0-\u00D6] | [\u00D8-\u00F6] | [\u00F8-\u00FF] | [\u0100-\u0131] | [\u0134-\u013E] | [\u0141-\u0148] | [\u014A-\u017E] | [\u0180-\u01C3] | [\u01CD-\u01F0] | [\u01F4-\u01F5] | [\u01FA-\u0217] | [\u0250-\u02A8] | [\u02BB-\u02C1] | \u0386 | [\u0388-\u038A] | \u038C | [\u038E-\u03A1] | [\u03A3-\u03CE] | [\u03D0-\u03D6] | \u03DA | \u03DC | \u03DE | \u03E0 | [\u03E2-\u03F3] | [\u0401-\u040C] | [\u040E-\u044F] | [\u0451-\u045C] | [\u045E-\u0481] | [\u0490-\u04C4] | [\u04C7-\u04C8] | [\u04CB-\u04CC] | [\u04D0-\u04EB] | [\u04EE-\u04F5] | [\u04F8-\u04F9] | [\u0531-\u0556] | \u0559 | [\u0561-\u0586] | [\u05D0-\u05EA] | [\u05F0-\u05F2] | [\u0621-\u063A] | [\u0641-\u064A] | [\u0671-\u06B7] | [\u06BA-\u06BE] | [\u06C0-\u06CE] | [\u06D0-\u06D3] | \u06D5 | [\u06E5-\u06E6] | [\u0905-\u0939] | \u093D | [\u0958-\u0961] | [\u0985-\u098C] | [\u098F-\u0990] | [\u0993-\u09A8] | [\u09AA-\u09B0] | \u09B2 | [\u09B6-\u09B9] | [\u09DC-\u09DD] | [\u09DF-\u09E1] | [\u09F0-\u09F1] | [\u0A05-\u0A0A] | [\u0A0F-\u0A10] | [\u0A13-\u0A28] | [\u0A2A-\u0A30] | [\u0A32-\u0A33] | [\u0A35-\u0A36] | [\u0A38-\u0A39] | [\u0A59-\u0A5C] | \u0A5E | [\u0A72-\u0A74] | [\u0A85-\u0A8B] | \u0A8D | [\u0A8F-\u0A91] | [\u0A93-\u0AA8] | [\u0AAA-\u0AB0] | [\u0AB2-\u0AB3] | [\u0AB5-\u0AB9] | \u0ABD | \u0AE0 | [\u0B05-\u0B0C] | [\u0B0F-\u0B10] | [\u0B13-\u0B28] | [\u0B2A-\u0B30] | [\u0B32-\u0B33] | [\u0B36-\u0B39] | \u0B3D | [\u0B5C-\u0B5D] | [\u0B5F-\u0B61] | [\u0B85-\u0B8A] | [\u0B8E-\u0B90] | [\u0B92-\u0B95] | [\u0B99-\u0B9A] | \u0B9C | [\u0B9E-\u0B9F] | [\u0BA3-\u0BA4] | [\u0BA8-\u0BAA] | [\u0BAE-\u0BB5] | [\u0BB7-\u0BB9] | [\u0C05-\u0C0C] | [\u0C0E-\u0C10] | [\u0C12-\u0C28] | [\u0C2A-\u0C33] | [\u0C35-\u0C39] | [\u0C60-\u0C61] | [\u0C85-\u0C8C] | [\u0C8E-\u0C90] | [\u0C92-\u0CA8] | [\u0CAA-\u0CB3] | [\u0CB5-\u0CB9] | \u0CDE | [\u0CE0-\u0CE1] | [\u0D05-\u0D0C] | [\u0D0E-\u0D10] | [\u0D12-\u0D28] | [\u0D2A-\u0D39] | [\u0D60-\u0D61] | [\u0E01-\u0E2E] | \u0E30 | [\u0E32-\u0E33] | [\u0E40-\u0E45] | [\u0E81-\u0E82] | \u0E84 | [\u0E87-\u0E88] | \u0E8A | \u0E8D | [\u0E94-\u0E97] | [\u0E99-\u0E9F] | [\u0EA1-\u0EA3] | \u0EA5 | \u0EA7 | [\u0EAA-\u0EAB] | [\u0EAD-\u0EAE] | \u0EB0 | [\u0EB2-\u0EB3] | \u0EBD | [\u0EC0-\u0EC4] | [\u0F40-\u0F47] | [\u0F49-\u0F69] | [\u10A0-\u10C5] | [\u10D0-\u10F6] | \u1100 | [\u1102-\u1103] | [\u1105-\u1107] | \u1109 | [\u110B-\u110C] | [\u110E-\u1112] | \u113C | \u113E | \u1140 | \u114C | \u114E | \u1150 | [\u1154-\u1155] | \u1159 | [\u115F-\u1161] | \u1163 | \u1165 | \u1167 | \u1169 | [\u116D-\u116E] | [\u1172-\u1173] | \u1175 | \u119E | \u11A8 | \u11AB | [\u11AE-\u11AF] | [\u11B7-\u11B8] | \u11BA | [\u11BC-\u11C2] | \u11EB | \u11F0 | \u11F9 | [\u1E00-\u1E9B] | [\u1EA0-\u1EF9] | [\u1F00-\u1F15] | [\u1F18-\u1F1D] | [\u1F20-\u1F45] | [\u1F48-\u1F4D] | [\u1F50-\u1F57] | \u1F59 | \u1F5B | \u1F5D | [\u1F5F-\u1F7D] | [\u1F80-\u1FB4] | [\u1FB6-\u1FBC] | \u1FBE | [\u1FC2-\u1FC4] | [\u1FC6-\u1FCC] | [\u1FD0-\u1FD3] | [\u1FD6-\u1FDB] | [\u1FE0-\u1FEC] | [\u1FF2-\u1FF4] | [\u1FF6-\u1FFC] | \u2126 | [\u212A-\u212B] | \u212E | [\u2180-\u2182] | [\u3041-\u3094] | [\u30A1-\u30FA] | [\u3105-\u312C] | [\uAC00-\uD7A3] - -/* 86 */ -Ideographic = [\u4E00-\u9FA5] | \u3007 | [\u3021-\u3029] - -/* 4 */ /* is '.' to be escaped?? */ -NameChar = {Letter} | {Digit} | . | - | _ | : | {CombiningChar} | {Extender} - -/* 5 */ -Name = ({Letter} | _ | :) {NameChar}* - -/* 87 */ -CombiningChar = [\u0300-\u0345] | [\u0360-\u0361] | [\u0483-\u0486] | [\u0591-\u05A1] | [\u05A3-\u05B9] | [\u05BB-\u05BD] | \u05BF | [\u05C1-\u05C2] | \u05C4 | [\u064B-\u0652] | \u0670 | [\u06D6-\u06DC] | [\u06DD-\u06DF] | [\u06E0-\u06E4] | [\u06E7-\u06E8] | [\u06EA-\u06ED] | [\u0901-\u0903] | \u093C | [\u093E-\u094C] | \u094D | [\u0951-\u0954] | [\u0962-\u0963] | [\u0981-\u0983] | \u09BC | \u09BE | \u09BF | [\u09C0-\u09C4] | [\u09C7-\u09C8] | [\u09CB-\u09CD] | \u09D7 | [\u09E2-\u09E3] | \u0A02 | \u0A3C | \u0A3E | \u0A3F | [\u0A40-\u0A42] | [\u0A47-\u0A48] | [\u0A4B-\u0A4D] | [\u0A70-\u0A71] | [\u0A81-\u0A83] | \u0ABC | [\u0ABE-\u0AC5] | [\u0AC7-\u0AC9] | [\u0ACB-\u0ACD] | [\u0B01-\u0B03] | \u0B3C | [\u0B3E-\u0B43] | [\u0B47-\u0B48] | [\u0B4B-\u0B4D] | [\u0B56-\u0B57] | [\u0B82-\u0B83] | [\u0BBE-\u0BC2] | [\u0BC6-\u0BC8] | [\u0BCA-\u0BCD] | \u0BD7 | [\u0C01-\u0C03] | [\u0C3E-\u0C44] | [\u0C46-\u0C48] | [\u0C4A-\u0C4D] | [\u0C55-\u0C56] | [\u0C82-\u0C83] | [\u0CBE-\u0CC4] | [\u0CC6-\u0CC8] | [\u0CCA-\u0CCD] | [\u0CD5-\u0CD6] | [\u0D02-\u0D03] | [\u0D3E-\u0D43] | [\u0D46-\u0D48] | [\u0D4A-\u0D4D] | \u0D57 | \u0E31 | [\u0E34-\u0E3A] | [\u0E47-\u0E4E] | \u0EB1 | [\u0EB4-\u0EB9] | [\u0EBB-\u0EBC] | [\u0EC8-\u0ECD] | [\u0F18-\u0F19] | \u0F35 | \u0F37 | \u0F39 | \u0F3E | \u0F3F | [\u0F71-\u0F84] | [\u0F86-\u0F8B] | [\u0F90-\u0F95] | \u0F97 | [\u0F99-\u0FAD] | [\u0FB1-\u0FB7] | \u0FB9 | [\u20D0-\u20DC] | \u20E1 | [\u302A-\u302F] | \u3099 | \u309A - -/* 88 */ -Digit = [\u0030-\u0039] | [\u0660-\u0669] | [\u06F0-\u06F9] | [\u0966-\u096F] | [\u09E6-\u09EF] | [\u0A66-\u0A6F] | [\u0AE6-\u0AEF] | [\u0B66-\u0B6F] | [\u0BE7-\u0BEF] | [\u0C66-\u0C6F] | [\u0CE6-\u0CEF] | [\u0D66-\u0D6F] | [\u0E50-\u0E59] | [\u0ED0-\u0ED9] | [\u0F20-\u0F29] - -/* 89 */ -Extender = \u00B7 | \u02D0 | \u02D1 | \u0387 | \u0640 | \u0E46 | \u0EC6 | \u3005 | [\u3031-\u3035] | [\u309D-\u309E] | [\u30FC-\u30FE] -*/ - -Letter = [a-zA-Z] -NameChar = {Letter} | [0-9] -//Name = ({Letter} | _ | :) {NameChar}* -//Name = [^\x20\x09\x0D\x0A]+ -Name = [^\x20\x09\x0D\x0A\|,\!\?\+\*\(\)<>]+ -ElementRefName = [^\x20\x09\x0D\x0A\|,\?\+\*\(\)<>]+ -EntityName = [^\x20\x09\x0D\x0A\|,\?\*\(\)<>]+ -ParmEntityName = [^\x20\x09\x0D\x0A\!%;<>]+ - -CommentStart = \!-- -CommentContent = [^->]+ -CommentEnd = --> -ElementStart = ELEMENT -ElementContent = [^<>]* - -EntityStart = ENTITY -Entity_Parm = %{S} -EntityContent = {S}[^<>]* - -NotationStart = NOTATION -NotationContent = {S}[^<>]* -AttList = ATTLIST -ExternalParmEntityRef = %{ParmEntityName}; -EndTag = > -StartTag = < -System = SYSTEM -Public = PUBLIC -NData = NDATA - -// these are attribute type keywords -// we reuse NOTATION from NotationStart -// we reuse ENTITY from EntityStart -CData = CDATA -ID = ID -IDRef = IDREF -IDRefs = IDREFS -Entities = ENTITIES -NMToken = NMTOKEN -NMTokens = NMTOKENS - -// these are attribute defaults keywords -Required = #REQUIRED -Implied = #IMPLIED -Fixed = #FIXED - - -Empty = EMPTY -Any = ANY -PcData = #PCDATA -LeftParen = \( -RightParen = \) - -Percent = % -Semicolon = ; -Plus = \+ -Choice = \| -Sequence = , -Connector = {Choice}|{Sequence} -OccurOptional = \? -OccurOneOrMore = \+ -OccurZeroOrMore = \* -OccurType = {OccurOptional}|{OccurOneOrMore}|{OccurZeroOrMore} -Exclamation = \! -SingleQuotedLiteral = '[^']*' -DoubleQuotedLiteral = \"[^\"]*\" -NonTagContent = [^\x20\x09\x0D\x0A<>]* -NonEnumContent = [^\x20\x09\x0D\x0A<>\(\)\|]* - -%% - -<YYINITIAL> { - {StartTag} { return createToken(DTDRegionTypes.START_TAG); } - {EndTag} { return createToken(DTDRegionTypes.END_TAG); } - {Exclamation} { return createToken(DTDRegionTypes.EXCLAMATION); } - {Percent} { return createToken(DTDRegionTypes.PERCENT); } - {Semicolon} { return createToken(DTDRegionTypes.SEMICOLON); } - - {ElementStart} { yybegin(ELEMENT_NAME); return createToken(DTDRegionTypes.ELEMENT_TAG); } - {CommentStart} { yybegin(COMMENT_CONTENT); return createToken(DTDRegionTypes.COMMENT_START); } - {EntityStart} { yybegin(ENTITY_NAME); return createToken(DTDRegionTypes.ENTITY_TAG); } - {NotationStart} { yybegin(NOTATION_NAME); return createToken(DTDRegionTypes.NOTATION_TAG); } - {AttList} { yybegin(ATTLIST_NAME); return createToken(DTDRegionTypes.ATTLIST_TAG); } - - {ExternalParmEntityRef} { return createToken(DTDRegionTypes.ENTITY_PARM); } -// just a parmentityname by itself is no good. we use this -// to capture garbage content at the top level - {ParmEntityName} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - - {S} { return createToken(DTDRegionTypes.WHITESPACE); } -} - -<ELEMENT_NAME> { - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {PcData}|\({S}*{PcData}{S}*\) { return createToken(DTDRegionTypes.CONTENT_PCDATA); } - {Name} { return createToken(DTDRegionTypes.NAME); } - - {LeftParen} { return createToken(DTDRegionTypes.LEFT_PAREN); } - {Connector} { return createToken(DTDRegionTypes.CONNECTOR); } - {OccurType} { return createToken(DTDRegionTypes.OCCUR_TYPE); } - {RightParen} { return createToken(DTDRegionTypes.RIGHT_PAREN); } - - {StartTag} { yypushback(yylength()); yybegin(YYINITIAL); } - {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - -// ******** <!ATTLIST...> -<ATTLIST_NAME> { - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {Name} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.NAME); } - {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - -<ATTLIST_CONTENT> { - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {Name} { yybegin(ATTRIBUTE_CONTENT); return createToken(DTDRegionTypes.ATTRIBUTE_NAME); } - {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - -<ATTRIBUTE_CONTENT> { - {LineTerminator} { yypushback(yylength()); yybegin(ATTLIST_CONTENT); } - {NonLineTerminatorWhitespace} - { return createToken(DTDRegionTypes.WHITESPACE); } - {CData} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.CDATA_KEYWORD); } - - {ID} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ID_KEYWORD); } - {IDRef} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.IDREF_KEYWORD); } - {IDRefs} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.IDREFS_KEYWORD); } - {EntityStart} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ENTITY_KEYWORD); } - {Entities} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ENTITIES_KEYWORD); } - {NMToken} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.NMTOKEN_KEYWORD); } - {NMTokens} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.NMTOKENS_KEYWORD); } - {NotationStart} { yybegin(ATTRIBUTE_ENUMERATION); return createToken(DTDRegionTypes.NOTATION_KEYWORD); } - - {Required} | {Implied} | {Fixed} | {SingleQuotedLiteral} | { DoubleQuotedLiteral} - { yypushback(yylength()); yybegin(ATTRIBUTE_DEFAULT); } - - {LeftParen} { yypushback(yylength()); yybegin(ATTRIBUTE_ENUMERATION); } - {NonEnumContent} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.PARM_ENTITY_TYPE); } - {NonEnumContent}|{RightParen}|{Choice} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - -<ATTRIBUTE_DEFAULT> { - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {Required} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.REQUIRED_KEYWORD); } - {Implied} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.IMPLIED_KEYWORD); } - {Fixed} { return createToken(DTDRegionTypes.FIXED_KEYWORD); } - {SingleQuotedLiteral} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); } - {DoubleQuotedLiteral} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); } - {NonTagContent} { yypushback(yylength()); yybegin(ATTLIST_CONTENT); } //return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - -<ATTRIBUTE_ENUMERATION> { - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {LeftParen} { return createToken(DTDRegionTypes.LEFT_PAREN); } - {Choice} { return createToken(DTDRegionTypes.ENUM_CHOICE); } - {RightParen} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.RIGHT_PAREN); } - {NonEnumContent} { return createToken(DTDRegionTypes.NAME); } - {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - - -// ******** <!ENTITY...> -<ENTITY_NAME> { - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {Percent} { return createToken(DTDRegionTypes.PERCENT); } - {EntityName} { yybegin(ENTITY_CONTENT); return createToken(DTDRegionTypes.NAME); } - {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - -<ENTITY_CONTENT> { -// {EntityContent} { yybegin(YYINITIAL); return createToken(DTDRegionTypes.ENTITY_CONTENT); } - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {System} | {Public} { yypushback(yylength()); yybegin(EXTERNALID_CONTENT); } - {SingleQuotedLiteral} { return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); } - {DoubleQuotedLiteral} { return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); } - {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - - -// ******** <!NOTATION...> -<NOTATION_NAME> { - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {Name} { yybegin(EXTERNALID_CONTENT); return createToken(DTDRegionTypes.NAME); } - {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - -<EXTERNALID_CONTENT> { - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {System} { return createToken(DTDRegionTypes.SYSTEM_KEYWORD); } - {Public} { return createToken(DTDRegionTypes.PUBLIC_KEYWORD); } - {SingleQuotedLiteral} { return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); } - {DoubleQuotedLiteral} { return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); } - {NData} { yybegin(NDATA_CONTENT); return createToken(DTDRegionTypes.NDATA_KEYWORD); } - {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); } - {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - -<NDATA_CONTENT> { - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {NonTagContent} { yybegin(YYINITIAL); return createToken(DTDRegionTypes.NDATA_VALUE); } - {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); } -} - - -// ******** <!-- ...> -<COMMENT_CONTENT> { - {CommentEnd} { yybegin(YYINITIAL); return createToken(DTDRegionTypes.COMMENT_END); } - {S} { return createToken(DTDRegionTypes.WHITESPACE); } - {CommentContent} | "-" | ">" { return createToken(DTDRegionTypes.COMMENT_CONTENT); } -} - - diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtdskeleton b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtdskeleton deleted file mode 100644 index f686e8b4b7..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtdskeleton +++ /dev/null @@ -1,317 +0,0 @@ - - /** This character denotes the end of file */ - final public static int YYEOF = -1; - - /** initial size of the lookahead buffer */ ---- final private static int YY_BUFFERSIZE = ...; - - /** lexical states */ ---- lexical states, charmap - - /* error codes */ - final private static int YY_UNKNOWN_ERROR = 0; - final static int YY_ILLEGAL_STATE = 1; - final private static int YY_NO_MATCH = 2; - final private static int YY_PUSHBACK_2BIG = 3; - - /* error messages for the codes above */ - final private static String YY_ERROR_MSG[] = { - "Unkown internal scanner error", - "Internal error: unknown state", - "Error: could not match input", - "Error: pushback value was too large" - }; - ---- isFinal list - /** the input device */ - private java.io.Reader yy_reader; - - /** the current state of the DFA */ - private int yy_state; - - /** the current lexical state */ - private int yy_lexical_state = YYINITIAL; - - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ - private char yy_buffer[] = new char[YY_BUFFERSIZE]; - - /** the textposition at the last accepting state */ - private int yy_markedPos; - - /** the textposition at the last state to be included in yytext */ - //private int yy_pushbackPos; - - /** the current text position in the buffer */ - private int yy_currentPos; - - /** startRead marks the beginning of the yytext() string in the buffer */ - private int yy_startRead; - - /** endRead marks the last character in the buffer, that has been read - from input */ - private int yy_endRead; - - /** number of newlines encountered up to the start of the matched text */ - private int yyline; - - /** the number of characters up to the start of the matched text */ - private int yychar; - - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - int yycolumn; - - /** yy_atEOF == true <=> the scanner is at the EOF */ - private boolean yy_atEOF; - ---- user class code - - /** - * Creates a new scanner - * There is also a java.io.InputStream version of this constructor. - * - * @param in the java.io.Reader to read input from. - */ ---- constructor declaration - - - /** - * Refills the input buffer. - * - * @return <code>false</code>, iff there was new input. - * - * @exception java.io.IOException if any I/O-Error occurs - */ - private boolean yy_refill() throws java.io.IOException { - - /* first: make room (if you can) */ - if (yy_startRead > 0) { - System.arraycopy(yy_buffer, yy_startRead, - yy_buffer, 0, - yy_endRead-yy_startRead); - - /* translate stored positions */ - yy_endRead-= yy_startRead; - yy_currentPos-= yy_startRead; - yy_markedPos-= yy_startRead; - yy_pushbackPos-= yy_startRead; - yy_startRead = 0; - } - - /* is the buffer big enough? */ - if (yy_currentPos >= yy_buffer.length) { - /* if not: blow it up */ - char newBuffer[] = new char[yy_currentPos*2]; - System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length); - yy_buffer = newBuffer; - } - - /* finally: fill the buffer with new input */ - int numRead = yy_reader.read(yy_buffer, yy_endRead, - yy_buffer.length-yy_endRead); - - if (numRead < 0) { - return true; - } - else { - yy_endRead+= numRead; - return false; - } - } - - - /** - * Closes the input stream. - */ - final public void yyclose() throws java.io.IOException { - yy_atEOF = true; /* indicate end of file */ - yy_endRead = yy_startRead; /* invalidate buffer */ - - if (yy_reader != null) - yy_reader.close(); - } - - - /** - * Closes the current stream, and resets the - * scanner to read from a new input stream. - * - * All internal variables are reset, the old input stream - * <b>cannot</b> be reused (internal buffer is discarded and lost). - * Lexical state is set to <tt>YY_INITIAL</tt>. - * - * @param reader the new input stream - */ - final public void yyreset(java.io.Reader reader) throws java.io.IOException { - yyclose(); - yy_reader = reader; - yy_atEOF = false; - yy_endRead = yy_startRead = 0; - yy_currentPos = yy_markedPos = yy_pushbackPos = 0; - yyline = yychar = yycolumn = 0; - yy_lexical_state = YYINITIAL; - } - - - /** - * Returns the current lexical state. - */ - final public int yystate() { - return yy_lexical_state; - } - - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - final public void yybegin(int newState) { - yy_lexical_state = newState; - } - - - /** - * Returns the text matched by the current regular expression. - */ - final public String yytext() { - return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead ); - } - - - /** - * Returns the character at position <tt>pos</tt> from the - * matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. - * - * @return the character at position pos - */ - final public char yycharat(int pos) { - return yy_buffer[yy_startRead+pos]; - } - - - /** - * Returns the length of the matched text region. - */ - final public int yylength() { - return yy_markedPos-yy_startRead; - } - - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. - * - * @param errorCode the code of the errormessage to display - */ ---- yy_ScanError declaration - String message; - try { - message = YY_ERROR_MSG[errorCode]; - } - catch (ArrayIndexOutOfBoundsException e) { - message = YY_ERROR_MSG[YY_UNKNOWN_ERROR]; - } - ---- throws clause - } - - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! - */ ---- yypushback decl (contains yy_ScanError exception) - if ( number > yylength() ) - yy_ScanError(YY_PUSHBACK_2BIG); - - yy_markedPos -= number; - } - - ---- yy_doEof - /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - */ ---- yylex declaration - int yy_input; - int yy_action; - - // cached fields: - int yy_currentPos_l; - int yy_markedPos_l; - int yy_endRead_l = yy_endRead; - char [] yy_buffer_l = yy_buffer; - char [] yycmap_l = yycmap; - ---- local declarations - - while (true) { - yy_markedPos_l = yy_markedPos; - ---- start admin (line, char, col count) - yy_action = -1; - - yy_currentPos_l = yy_currentPos = - yy_startRead = yy_markedPos_l; - ---- start admin (lexstate etc) - - yy_forAction: { - while (true) { - ---- next input, line, col, char count, next transition, isFinal action - yy_action = yy_state; - yy_markedPos_l = yy_currentPos_l; ---- line count update - } - - } - } - - // store back cached position - yy_markedPos = yy_markedPos_l; ---- char count update - - switch (yy_action) { - ---- actions - default: - if (yy_input == YYEOF && yy_startRead == yy_currentPos) { - yy_atEOF = true; ---- eofvalue - } - else { ---- no match - } - } - } - } - ---- main - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDBatchNodeDelete.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDBatchNodeDelete.java deleted file mode 100644 index 1a514efdbf..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDBatchNodeDelete.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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.util; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.DTDFile; -import org.eclipse.wst.dtd.core.internal.DTDNode; - - -public class DTDBatchNodeDelete { - protected DTDFile dtdFile; - - protected List nodes = new ArrayList(); - - public DTDBatchNodeDelete(DTDFile dtdFile) { - this.dtdFile = dtdFile; - } - - public void addNode(DTDNode node) { - // first check if the node is contained by anyone - for (int i = 0; i < nodes.size(); i++) { - DTDNode currentNode = (DTDNode) nodes.get(i); - - if (currentNode.containsRange(node.getStartOffset(), node.getEndOffset())) { - // then no need to add the node to the list to be deleted - return; - } - - if (node.getStartOffset() < currentNode.getStartOffset() && node.getEndOffset() <= currentNode.getStartOffset()) { - nodes.add(i, node); - return; - } - } - // if we get here, then add it to the end - nodes.add(node); - } - - public void deleteNodes(Object requestor) { - for (int i = nodes.size() - 1; i >= 0; i--) { - DTDNode node = (DTDNode) nodes.get(i); - dtdFile.deleteNode(requestor, node); - } - nodes.clear(); - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDExternalReferenceRemover.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDExternalReferenceRemover.java deleted file mode 100644 index be853bbbb9..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDExternalReferenceRemover.java +++ /dev/null @@ -1,134 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.util; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.Attribute; -import org.eclipse.wst.dtd.core.internal.AttributeList; -import org.eclipse.wst.dtd.core.internal.CMBasicNode; -import org.eclipse.wst.dtd.core.internal.DTDFile; -import org.eclipse.wst.dtd.core.internal.DTDNode; -import org.eclipse.wst.dtd.core.internal.Element; -import org.eclipse.wst.dtd.core.internal.Entity; - - -/* - * This class is responsible for updating the model when items are deleted or - * so that items referenced by it are cleaned up note that top level nodes are - * queued up for deletion so that iteration over the list of nodes from the - * dtdfile is not messed up. Note that when an external parmeter entity - * changes, the client of the model (e.g. editor) must be a DTDFileListener - * implementing the listener's interface to keep the model's referential - * integrity (See DTDModelImpl for example). - */ - -public class DTDExternalReferenceRemover extends DTDVisitor { - - protected DTDBatchNodeDelete batchDelete; - protected List externalElementsAndParmEntities = new ArrayList(); - - protected boolean isParmEntity = false; - - protected boolean isUpdating = false; - protected DTDNode nodeToDelete; - protected String oldRefName = ""; //$NON-NLS-1$ - protected Object requestor; - - public DTDExternalReferenceRemover() { - - } - - public synchronized void externalReferenceAboutToChange(Object requestor, Entity entity) { - if (isUpdating) { - return; - } - if (!entity.isParameterEntity() || !entity.isExternalEntity()) { - // if it is not an external parameter entity, ignore as well - return; - } - - isUpdating = true; - this.requestor = requestor; - - DTDFile dtdFile = entity.getDTDFile(); - if (batchDelete == null) { - batchDelete = new DTDBatchNodeDelete(dtdFile); - } - - // See the comment at the head of this file regarding - // external parameter entities. - // externalElementsAndParmEntities = - // dtdFile.getDTDModel().getExternalModels().getElementContentNames(entity.getPublicID(), - // dtdFile.getDTDModel().resolveID(entity.getPublicID(), - // entity.getSystemID())); - - visit(dtdFile); - - batchDelete.deleteNodes(requestor); - - isUpdating = false; - } - - public boolean isMatchingName(String name) { - return externalElementsAndParmEntities.contains(name); - } - - public void visitAttribute(Attribute attr) { - super.visitAttribute(attr); - String attrName = attr.getName(); - String attrType = attr.getType(); - - if (isParameterEntityRef(attrName)) { - if (isMatchingName(attrName)) { - attr.setName(requestor, "TempName"); //$NON-NLS-1$ - } - } - if (isParameterEntityRef(attrType)) { - if (isMatchingName(attrType)) { - attr.setType(requestor, Attribute.CDATA); - } - } - } - - public void visitAttributeList(AttributeList attList) { - super.visitAttributeList(attList); - String attListName = attList.getName(); - if (isParameterEntityRef(attListName)) { - if (isMatchingName(attListName)) { - attList.setName(requestor, "TempName"); //$NON-NLS-1$ - } - } - } - - public void visitElement(Element element) { - String elementName = element.getName(); - if (isParameterEntityRef(elementName)) { - if (isMatchingName(elementName)) { - element.setName(requestor, "TempName"); //$NON-NLS-1$ - } - } - super.visitElement(element); - } - - public void visitReference(CMBasicNode node) { - super.visitReference(node); - String refName = node.getName(); - if (isMatchingName(refName)) { - batchDelete.addNode(node); - } - } - - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDModelUpdater.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDModelUpdater.java deleted file mode 100644 index 4b9cdfac7f..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDModelUpdater.java +++ /dev/null @@ -1,135 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.util; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.Attribute; -import org.eclipse.wst.dtd.core.internal.AttributeList; -import org.eclipse.wst.dtd.core.internal.CMBasicNode; -import org.eclipse.wst.dtd.core.internal.DTDFile; -import org.eclipse.wst.dtd.core.internal.DTDNode; -import org.eclipse.wst.dtd.core.internal.Element; -import org.eclipse.wst.dtd.core.internal.Entity; -import org.eclipse.wst.dtd.core.internal.ParameterEntityReference; - - -// this class is responsible for updating the model when items -// are deleted or a external parm entity changes so that -// items referenced by it are cleaned up -// note that top level nodes are queued up for deletion so that -// iteration over the list of nodes from the dtdfile is not messed up -public class DTDModelUpdater extends DTDVisitor { - - protected boolean isParmEntity = false; - - protected boolean isUpdating = false; - - protected List nodesToDelete = new ArrayList(); - protected DTDNode nodeToDelete; - protected String oldRefName = ""; //$NON-NLS-1$ - protected Object requestor; - - public DTDModelUpdater() { - - } - - public synchronized void objectAboutToBeDeleted(Object requestor, DTDNode node) { - if (isUpdating) { - return; - } - if (!(node instanceof Entity || node instanceof Element)) { - // just ignore if it is not one of these - return; - } - if (node instanceof Entity && !((Entity) node).isParameterEntity()) { - // if it is not a parameter entity, ignore as well - return; - } - - - isUpdating = true; - this.requestor = requestor; - this.nodeToDelete = node; - oldRefName = node.getName(); - isParmEntity = false; - nodesToDelete.clear(); - - if (node instanceof Entity) { - isParmEntity = true; - oldRefName = "%" + oldRefName + ";"; //$NON-NLS-1$ //$NON-NLS-2$ - } - - DTDFile dtdFile = node.getDTDFile(); - visit(dtdFile); - - for (int i = 0; i < nodesToDelete.size(); i++) { - dtdFile.deleteNode(requestor, (DTDNode) nodesToDelete.get(i)); - } - - isUpdating = false; - } - - public void visitAttribute(Attribute attr) { - super.visitAttribute(attr); - if (isParmEntity) { - if (attr.getName().equals(oldRefName)) { - attr.setName(requestor, "TempName"); //$NON-NLS-1$ - } - if (attr.getType().equals(oldRefName)) { - attr.setType(requestor, Attribute.CDATA); - } - } - // check the attr name and the attr type to see if it - // needs updating - } - - public void visitAttributeList(AttributeList attList) { - super.visitAttributeList(attList); - if (attList.getName().equals(oldRefName)) { - if (isParmEntity) { - attList.setName(requestor, "TempName"); //$NON-NLS-1$ - } - else { - // save up for later deletion - nodesToDelete.add(attList); - } - } - } - - public void visitElement(Element element) { - if (isParmEntity) { - if (element.getName().equals(oldRefName)) { - element.setName(requestor, "TempName"); //$NON-NLS-1$ - } - } - super.visitElement(element); - } - - public void visitExternalParameterEntityReference(ParameterEntityReference parmEntityRef) { - super.visitExternalParameterEntityReference(parmEntityRef); - if (isParmEntity && parmEntityRef.getName().equals(oldRefName)) { - nodesToDelete.add(parmEntityRef); - } - } - - public void visitReference(CMBasicNode node) { - super.visitReference(node); - - if (node.getName().equals(oldRefName)) { - DTDNode parent = (DTDNode) node.getParentNode(); - parent.delete(requestor, node); - } - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDNotationReferenceRemover.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDNotationReferenceRemover.java deleted file mode 100644 index 10b9e4445f..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDNotationReferenceRemover.java +++ /dev/null @@ -1,93 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.util; - -import java.util.Iterator; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.Attribute; -import org.eclipse.wst.dtd.core.internal.AttributeEnumList; -import org.eclipse.wst.dtd.core.internal.AttributeList; -import org.eclipse.wst.dtd.core.internal.DTDFile; -import org.eclipse.wst.dtd.core.internal.DTDNode; -import org.eclipse.wst.dtd.core.internal.Entity; -import org.eclipse.wst.dtd.core.internal.Notation; - - -public class DTDNotationReferenceRemover { - protected Notation notation; - protected String notationName; - - protected Object requestor; - - public DTDNotationReferenceRemover() { - - } - - public void notationAboutToBeDeleted(Object requestor, Notation notation) { - this.requestor = requestor; - this.notation = notation; - notationName = notation.getName(); - - visit(notation.getDTDFile()); - } - - public void visit(DTDFile file) { - List nodes = file.getNodes(); - for (int i = 0; i < nodes.size(); i++) { - DTDNode currentNode = (DTDNode) nodes.get(i); - if (currentNode instanceof Entity) { - visitEntity((Entity) currentNode); - } - else if (currentNode instanceof AttributeList) { - visitAttributeList((AttributeList) currentNode); - } - } - } - - public void visitAttribute(Attribute attr) { - if (attr.getType().equals(Attribute.ENUMERATED_NOTATION)) { - AttributeEnumList enumList = attr.getEnumList(); - List notationNames = enumList.getItems(); - Iterator iter = notationNames.iterator(); - boolean updateRequired = false; - while (iter.hasNext()) { - String notation = (String) iter.next(); - if (notation.equals(notationName)) { - updateRequired = true; - iter.remove(); - } - } - if (updateRequired) { - String[] newItems = new String[notationNames.size()]; - notationNames.toArray(newItems); - enumList.setItems(requestor, newItems); - } - } - } - - public void visitAttributeList(AttributeList attList) { - Attribute attr = (Attribute) attList.getFirstChild(); - while (attr != null) { - visitAttribute(attr); - attr = (Attribute) attr.getNextSibling(); - } - } - - public void visitEntity(Entity entity) { - if (entity.getNotationName().equals(notationName)) { - entity.setNotationName(requestor, ""); //$NON-NLS-1$ - } - } - -}// DTDNotationRemover diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDReferenceUpdater.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDReferenceUpdater.java deleted file mode 100644 index fa9297f1e2..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDReferenceUpdater.java +++ /dev/null @@ -1,196 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.util; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.Attribute; -import org.eclipse.wst.dtd.core.internal.AttributeEnumList; -import org.eclipse.wst.dtd.core.internal.AttributeList; -import org.eclipse.wst.dtd.core.internal.CMBasicNode; -import org.eclipse.wst.dtd.core.internal.DTDFile; -import org.eclipse.wst.dtd.core.internal.DTDNode; -import org.eclipse.wst.dtd.core.internal.Element; -import org.eclipse.wst.dtd.core.internal.Entity; -import org.eclipse.wst.dtd.core.internal.Notation; -import org.eclipse.wst.dtd.core.internal.ParameterEntityReference; - - -// this class is responsible for updating any dtd node in -// response to a change in the node that they reference -public class DTDReferenceUpdater extends DTDVisitor { - protected boolean isNotation = false; - - protected boolean isParmEntity = false; - - protected boolean isUpdating = false; - protected String newName = ""; //$NON-NLS-1$ - protected String oldRefName = "", newRefName = ""; //$NON-NLS-1$ //$NON-NLS-2$ - protected DTDNode referencedNode = null; - - // the references List is a cache of the DTDNodes that are changed - // as a result of a call to nameAboutToChange(). The idea is that - // if a subsequent call comes in that changes the name of the same - // object for which this cache exists for, then we optimize the - // path by just walking the cache - private List references = new ArrayList(); - protected Object requestor; - - public DTDReferenceUpdater() { - - } - - public void clearCache() { - referencedNode = null; - references.clear(); - } - - public synchronized void nameAboutToChange(Object requestor, DTDNode referencedNode, String newName) { - if (isUpdating) { - return; - } - if (!(referencedNode instanceof Entity || referencedNode instanceof Element || referencedNode instanceof Notation)) { - // just ignore if it is not one of these - return; - } - if (referencedNode instanceof Entity && !((Entity) referencedNode).isParameterEntity()) { - // if it is not a parameter entity, ignore as well - return; - } - - isUpdating = true; - this.requestor = requestor; - oldRefName = referencedNode.getName(); - this.newName = newRefName = newName; - isParmEntity = false; - isNotation = referencedNode instanceof Notation; - - if (referencedNode instanceof Entity) { - isParmEntity = true; - oldRefName = "%" + oldRefName + ";"; //$NON-NLS-1$ //$NON-NLS-2$ - newRefName = "%" + newRefName + ";"; //$NON-NLS-1$ //$NON-NLS-2$ - } - - if (this.referencedNode != null) { - // check if the previous referenced node that was changed - // is the same as the one that is coming in. if so, just - // change the previous regions - if (this.referencedNode == referencedNode) { - quickUpdate(); - isUpdating = false; - return; - } - } - - // clear the cache if we get here - this.referencedNode = referencedNode; - references.clear(); - DTDFile dtdFile = referencedNode.getDTDFile(); - visit(dtdFile); - isUpdating = false; - } - - protected void quickUpdate() { - for (int i = 0; i < references.size(); i++) { - DTDNode node = (DTDNode) references.get(i); - if (node instanceof Element) { - visitElement((Element) node); - } - else if (node instanceof AttributeList) { - visitAttributeList((AttributeList) node); - } - else if (node instanceof Attribute) { - visitAttribute((Attribute) node); - } - else if (node instanceof CMBasicNode) { - visitReference((CMBasicNode) node); - } - else if (node instanceof ParameterEntityReference) { - visitExternalParameterEntityReference((ParameterEntityReference) node); - } - } - } - - public void visitAttribute(Attribute attr) { - super.visitAttribute(attr); - if (isParmEntity) { - // check the attr name and the attr type to see if it - // needs updating - if (attr.getName().equals(oldRefName)) { - attr.setName(requestor, newRefName); - references.add(attr); - } - if (attr.getType().equals(oldRefName)) { - attr.setType(requestor, newRefName); - references.add(attr); - } - } - else if (isNotation && attr.getType().equals(Attribute.ENUMERATED_NOTATION)) { - AttributeEnumList enumList = attr.getEnumList(); - List items = enumList.getItems(); - boolean updateNeeded = false; - for (int i = 0; i < items.size(); i++) { - String notationName = (String) items.get(i); - if (notationName.equals(oldRefName)) { - updateNeeded = true; - items.set(i, newName); - } - } - if (updateNeeded) { - String[] newItems = new String[items.size()]; - - enumList.setItems((String[]) items.toArray(newItems)); - } - } - - } - - public void visitAttributeList(AttributeList attList) { - if (!isNotation && attList.getName().equals(oldRefName)) { - attList.setName(requestor, newRefName); - references.add(attList); - } - super.visitAttributeList(attList); - } - - public void visitElement(Element element) { - if (isParmEntity) { - if (element.getName().equals(oldRefName)) { - element.setName(requestor, newRefName); - references.add(element); - } - } - super.visitElement(element); - } - - public void visitExternalParameterEntityReference(ParameterEntityReference parmEntityRef) { - super.visitExternalParameterEntityReference(parmEntityRef); - if (parmEntityRef.getName().equals(oldRefName)) { - parmEntityRef.setReferencedEntity(requestor, newName); - references.add(parmEntityRef); - } - } - - public void visitReference(CMBasicNode node) { - super.visitReference(node); - if (isParameterEntityRef(oldRefName) && !isParmEntity) { - return; - } - - if (node.getName().equals(oldRefName)) { - node.setName(requestor, newRefName); - references.add(node); - } - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDUniqueNameHelper.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDUniqueNameHelper.java deleted file mode 100644 index e94215daf5..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDUniqueNameHelper.java +++ /dev/null @@ -1,95 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.util; - -import java.util.Iterator; -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.Attribute; -import org.eclipse.wst.dtd.core.internal.CMBasicNode; -import org.eclipse.wst.dtd.core.internal.DTDFile; -import org.eclipse.wst.dtd.core.internal.Element; -import org.eclipse.wst.dtd.core.internal.Entity; -import org.eclipse.wst.dtd.core.internal.Notation; - - -public class DTDUniqueNameHelper { - - static public String getName(Object obj) { - if (obj instanceof Element) { - return ((Element) obj).getName(); - } - else if (obj instanceof Entity) { - return ((Entity) obj).getName(); - } - else if (obj instanceof Notation) { - return ((Notation) obj).getName(); - } - else if (obj instanceof Attribute) { - return ((Attribute) obj).getName(); - } - else if (obj instanceof CMBasicNode) // Model Group Content - { - return ((CMBasicNode) obj).getName(); - } - return ""; //$NON-NLS-1$ - } - - static public String getUniqueAttributeName(Element element) { - List attrs = element.getElementAttributes(); - return getUniqueName(attrs, "NewAttribute"); //$NON-NLS-1$ - } - - static public String getUniqueElementName(DTDFile dtdFile) { - List elements = dtdFile.getElementsAndParameterEntityReferences().getNodes(); - return getUniqueName(elements, "NewElement"); //$NON-NLS-1$ - } - - static public String getUniqueEntityName(DTDFile dtdFile) { - List entities = dtdFile.getEntities().getNodes(); - return getUniqueName(entities, "NewEntity"); //$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 getUniqueNotationName(DTDFile dtdFile) { - List notations = dtdFile.getNotations().getNodes(); - return getUniqueName(notations, "NewNotation"); //$NON-NLS-1$ - } - - public DTDUniqueNameHelper() { - } - -} // DTDUniqueNameHelper diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDVisitor.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDVisitor.java deleted file mode 100644 index 8b7b7c34d6..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDVisitor.java +++ /dev/null @@ -1,108 +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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.util; - -import java.util.List; - -import org.eclipse.wst.dtd.core.internal.Attribute; -import org.eclipse.wst.dtd.core.internal.AttributeList; -import org.eclipse.wst.dtd.core.internal.CMBasicNode; -import org.eclipse.wst.dtd.core.internal.CMGroupNode; -import org.eclipse.wst.dtd.core.internal.CMNode; -import org.eclipse.wst.dtd.core.internal.DTDFile; -import org.eclipse.wst.dtd.core.internal.DTDNode; -import org.eclipse.wst.dtd.core.internal.Element; -import org.eclipse.wst.dtd.core.internal.ParameterEntityReference; - - -public class DTDVisitor { - - public DTDVisitor() { - - } - - // utility method - public boolean isParameterEntityRef(String reference) { - if (reference.length() > 0) { - return reference.charAt(0) == '%' && reference.charAt(reference.length() - 1) == ';'; - } - return false; - } - - public void visit(DTDFile file) { - List nodes = file.getNodes(); - for (int i = 0; i < nodes.size(); i++) { - DTDNode currentNode = (DTDNode) nodes.get(i); - if (currentNode instanceof Element) { - visitElement((Element) currentNode); - } - else if (currentNode instanceof AttributeList) { - visitAttributeList((AttributeList) currentNode); - } - else if (currentNode instanceof ParameterEntityReference) { - visitExternalParameterEntityReference((ParameterEntityReference) currentNode); - } - } - } - - public void visitAttribute(Attribute attr) { - } - - public void visitAttributeList(AttributeList attList) { - // note that we don't visit attributes here because we - // want the element to visit them with it's consolidated list - // that it creates by gathering all attribute lists together - } - - public void visitAttributes(List attributes) { - int size = attributes.size(); - for (int i = 0; i < size; i++) { - Attribute attr = (Attribute) attributes.get(i); - visitAttribute(attr); - } - } - - public void visitContentNode(CMNode content) { - if (content instanceof CMBasicNode) { - CMBasicNode basicNode = (CMBasicNode) content; - if (basicNode.isReference()) { - visitReference(basicNode); - } - } - else if (content instanceof CMGroupNode) { - visitGroupNode((CMGroupNode) content); - } - } - - public void visitElement(Element element) { - CMNode content = element.getContentModel(); - visitContentNode(content); - visitAttributes(element.getElementAttributes()); - } - - public void visitExternalParameterEntityReference(ParameterEntityReference parmEntityRef) { - } - - public void visitGroupNode(CMGroupNode group) { - List children = group.getChildrenList(); - int size = children.size(); - for (int i = 0; i < size; i++) { - visitContentNode((CMNode) children.get(i)); - } - } - - public void visitReference(CMBasicNode node) { - } - - -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java deleted file mode 100644 index d347afae17..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2011 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 - * Jens Lukowski/Innoopract - initial renaming/restructuring - * - *******************************************************************************/ -package org.eclipse.wst.dtd.core.internal.util; - -import org.eclipse.core.runtime.Assert; - -public class LabelValuePair { - - public String fLabel; - public Object fValue; - - /** - * Creates a new name/value item - */ - public LabelValuePair(String label, Object value) { - Assert.isTrue(label != null); - fLabel = label; - fValue = value; - } -} diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/text/IDTDPartitions.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/text/IDTDPartitions.java deleted file mode 100644 index 85b629ebe9..0000000000 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/text/IDTDPartitions.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 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.text; - -/** - * This interface is not intended to be implemented. - * It defines the partition types DTD. - * Clients should reference the partition type Strings defined here directly. - * - * @since 1.1 - */ -public interface IDTDPartitions { - - String DTD_DEFAULT = "org.eclipse.wst.dtd.DEFAULT"; //$NON-NLS-1$ -} |