This commit was manufactured by cvs2svn to create tag
'javaco_0_4_0_I200808120849'.
diff --git a/plugins/org.eclipse.actf.mediator/.classpath b/plugins/org.eclipse.actf.mediator/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.mediator/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.mediator/.cvsignore b/plugins/org.eclipse.actf.mediator/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.actf.mediator/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.actf.mediator/.project b/plugins/org.eclipse.actf.mediator/.project
deleted file mode 100644
index 985e1cd..0000000
--- a/plugins/org.eclipse.actf.mediator/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.mediator</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.mediator/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.mediator/META-INF/MANIFEST.MF
deleted file mode 100644
index b0efe03..0000000
--- a/plugins/org.eclipse.actf.mediator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: ACTF Mediator Plug-in
-Bundle-SymbolicName: org.eclipse.actf.mediator
-Bundle-Version: 0.0.1.qualifier
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.ui.views,
- org.eclipse.actf.core;visibility:=reexport,
- org.eclipse.actf.model.ui;visibility:=reexport,
- org.eclipse.actf.ui
-Export-Package: org.eclipse.actf.mediator
diff --git a/plugins/org.eclipse.actf.mediator/about.html b/plugins/org.eclipse.actf.mediator/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.mediator/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.mediator/build.properties b/plugins/org.eclipse.actf.mediator/build.properties
deleted file mode 100644
index 17daa5b..0000000
--- a/plugins/org.eclipse.actf.mediator/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html
diff --git a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IACTFReport.java b/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IACTFReport.java
deleted file mode 100644
index f6999cf..0000000
--- a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IACTFReport.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.mediator;
-
-public interface IACTFReport {
-
-}
diff --git a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IACTFReportGenerator.java b/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IACTFReportGenerator.java
deleted file mode 100644
index 22978d5..0000000
--- a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IACTFReportGenerator.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.mediator;
-
-import org.eclipse.ui.IViewPart;
-
-public interface IACTFReportGenerator extends IViewPart, IMediatorEventListener{
-
-}
diff --git a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IACTFReportViewer.java b/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IACTFReportViewer.java
deleted file mode 100644
index ce20fad..0000000
--- a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IACTFReportViewer.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.mediator;
-
-import org.eclipse.ui.IViewPart;
-
-public interface IACTFReportViewer extends IViewPart, IMediatorEventListener{
-
-}
diff --git a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IMediatorEventListener.java b/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IMediatorEventListener.java
deleted file mode 100644
index 110088a..0000000
--- a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/IMediatorEventListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.mediator;
-
-import java.util.EventListener;
-
-/**
- * This listener interface may be implemented in order to receive
- * a {@link MediatorEvent} notification when a {@link Mediator}
- * detects a status change in ACTF components.
- *
- * @see Mediator#addMediatorEventListener(IMediatorEventListener)
- * @see Mediator#removeMediatorEventListener(IMediatorEventListener)
- *
- * @since 3.0
- */
-public interface IMediatorEventListener extends EventListener{
-
- public abstract void reportChanged(MediatorEvent event);
-
- public abstract void reportGeneratorChanged(MediatorEvent event);
-
- public abstract void modelserviceChanged(MediatorEvent event);
-
- public abstract void modelserviceInputChanged(MediatorEvent event);
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/Mediator.java b/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/Mediator.java
deleted file mode 100644
index bb9a6ec..0000000
--- a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/Mediator.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.mediator;
-
-import java.util.HashMap;
-import java.util.Vector;
-
-import org.eclipse.actf.model.ui.IModelServiceHolder;
-import org.eclipse.actf.ui.util.AbstractPartListener;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartReference;
-import org.eclipse.ui.PlatformUI;
-
-public class Mediator {
-
- private static Mediator instance = new Mediator();
-
- private IACTFReportGenerator curRepoter;
-
- private IModelServiceHolder currentModelServiceHolder;
-
- // TODO model/vizview combination to store the result
- private HashMap<IACTFReportGenerator, IACTFReport> reportMap = new HashMap<IACTFReportGenerator, IACTFReport>();
-
- private Vector<IMediatorEventListener> mediatorEventLisnterV = new Vector<IMediatorEventListener>();
-
- public static Mediator getInstance() {
- return instance;
- }
-
- private Mediator() {
- init();
- }
-
- public void setEvaluationResult(IACTFReportGenerator view,
- IACTFReport report) {
- reportMap.put(view, report);
- reportChanged(new MediatorEvent(this, currentModelServiceHolder, view,
- report));
- }
-
- public IACTFReport getEvaluationResult(IACTFReportGenerator reporter) {
- return getEvaluationResult(null, reporter);
- }
-
- private IACTFReport getEvaluationResult(IModelServiceHolder holder,
- IACTFReportGenerator reporter) {
- if (reportMap.containsKey(reporter)) {
- return ((IACTFReport) reportMap.get(reporter));
- }
- return null;
- // return (new EvaluationResultImpl());
- }
-
- private void init() {
- IWorkbenchPage activePage = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
-
- IViewReference[] views = activePage.getViewReferences();
- IViewPart tmpViewPart;
- for (int i = 0; i < views.length; i++) {
- if ((tmpViewPart = views[i].getView(false)) != null) {
- if (tmpViewPart instanceof IMediatorEventListener) {
- mediatorEventLisnterV
- .add((IMediatorEventListener) tmpViewPart);
- }
- }
- }
-
- activePage.addPartListener(new AbstractPartListener() {
-
- public void partActivated(IWorkbenchPartReference partRef) {
- IWorkbenchPart part = partRef.getPart(false);
- if (part instanceof IACTFReportGenerator && part != curRepoter) {
- curRepoter = (IACTFReportGenerator) part;
- reporterViewChanged(new MediatorEvent(Mediator.this,
- currentModelServiceHolder, curRepoter,
- getEvaluationResult(curRepoter)));
- }
- if (part instanceof IModelServiceHolder
- && part != currentModelServiceHolder) {
- currentModelServiceHolder = (IModelServiceHolder) part;
- modelserviceChanged(new MediatorEvent(Mediator.this,
- currentModelServiceHolder, curRepoter,
- getEvaluationResult(curRepoter)));
- }
- }
-
- @Override
- public void partClosed(IWorkbenchPartReference partRef) {
- IWorkbenchPart part = partRef.getPart(false);
- if (part instanceof IMediatorEventListener) {
- mediatorEventLisnterV.remove((IMediatorEventListener) part);
- }
- }
-
- @Override
- public void partOpened(IWorkbenchPartReference partRef) {
- IWorkbenchPart part = partRef.getPart(false);
- if (part instanceof IACTFReportViewer) {
- IACTFReportViewer viewer = (IACTFReportViewer) part;
- if (currentModelServiceHolder != null) {
- viewer.reportChanged(new MediatorEvent(Mediator.this,
- currentModelServiceHolder, curRepoter,
- getEvaluationResult(curRepoter)));
- }
- mediatorEventLisnterV.add(viewer);
- } else if (part instanceof IACTFReportGenerator) {
- mediatorEventLisnterV.add((IACTFReportGenerator) part);
- }
- }
-
- // TODO Call InputChanged when the target URL of the Editor changes
- @Override
- public void partInputChanged(IWorkbenchPartReference partRef) {
- IWorkbenchPart part = partRef.getPart(false);
- if (part instanceof IModelServiceHolder) {
- currentModelServiceHolder = (IModelServiceHolder) part;
- modelserviceInputChanged(new MediatorEvent(Mediator.this,
- currentModelServiceHolder, curRepoter,
- getEvaluationResult(curRepoter)));
- }
- }
-
- });
-
- }
-
- public boolean addMediatorEventListener(IMediatorEventListener listener) {
- return mediatorEventLisnterV.add(listener);
- }
-
- public boolean removeMediatorEventListener(IMediatorEventListener listener) {
- return mediatorEventLisnterV.remove(listener);
- }
-
- private void modelserviceChanged(MediatorEvent event) {
- for (IMediatorEventListener i : mediatorEventLisnterV) {
- i.modelserviceChanged(event);
- }
- }
-
- private void modelserviceInputChanged(MediatorEvent event) {
- for (IMediatorEventListener i : mediatorEventLisnterV) {
- i.modelserviceInputChanged(event);
- }
- }
-
- private void reportChanged(MediatorEvent event) {
- for (IMediatorEventListener i : mediatorEventLisnterV) {
- i.reportChanged(event);
- }
- }
-
- private void reporterViewChanged(MediatorEvent event) {
- for (IMediatorEventListener i : mediatorEventLisnterV) {
- i.reportGeneratorChanged(event);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/MediatorEvent.java b/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/MediatorEvent.java
deleted file mode 100644
index 9df7b9f..0000000
--- a/plugins/org.eclipse.actf.mediator/src/org/eclipse/actf/mediator/MediatorEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.mediator;
-
-import java.util.EventObject;
-
-import org.eclipse.actf.model.ui.IModelServiceHolder;
-
-/**
- * A <code>MediatorEvent</code> is sent by a {@link Mediator} to
- * {@link IMediatorEventListener}'s when the <code>Mediator</code>
- * detects a status change in ACTF components. This notification typically
- * occurs when the user activates an ACTF Model Service (usually Editor that
- * implements <code>IModelService</code>) or an ACTF Reporter Views
- * (implements <code>IACTFReporterView</code> that generates an ACTF Report).
- * This event is also notified when the report
- * (implements <code>IACTFReport</code>) was changed.
- *
- */
-public class MediatorEvent extends EventObject {
-
- private static final long serialVersionUID = -6308860434213716554L;
-
- private IModelServiceHolder modelServiceHolder;
- private IACTFReportGenerator view;
- private IACTFReport report;
-
- MediatorEvent(Mediator source, IModelServiceHolder modelServiceHolder, IACTFReportGenerator view, IACTFReport report) {
- super(source);
- this.modelServiceHolder = modelServiceHolder;
- this.view = view;
- this.report = report;
- }
-
- /**
- * Returns the ModelServiceHolder that is related to this event.
- *
- * @return the <code>IModelServiceHolder</code> related to this event
- */
- public IModelServiceHolder getModelServiceHolder() {
- return modelServiceHolder;
- }
-
- /**
- * Returns the ACTFReporterView that is related to this event.
- *
- * @return the <code>IACTFReporterView</code> related to this event
- */
- public IACTFReportGenerator getView() {
- return view;
- }
-
- /**
- * Returns the ACTFReport that is related to this event.
- *
- * @return the <code>IACTFReport</code> related to this event
- */
- public IACTFReport getReport() {
- return report;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/.classpath b/plugins/org.eclipse.actf.model.dom.dombycom.flash/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/.project b/plugins/org.eclipse.actf.model.dom.dombycom.flash/.project
deleted file mode 100644
index 5424f41..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.model.dom.dombycom.flash</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.model.dom.dombycom.flash/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.model.dom.dombycom.flash/META-INF/MANIFEST.MF
deleted file mode 100644
index 4de7fa0..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: ACTF DomByCom Flash Fragment (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.model.dom.dombycom.flash;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Vendor: Eclipse.org
-Fragment-Host: org.eclipse.actf.model.dom.dombycom;bundle-version="0.0.1"
-Require-Bundle: org.eclipse.actf.model.flash,
- org.eclipse.actf.util.win32
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/about.html b/plugins/org.eclipse.actf.model.dom.dombycom.flash/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/build.properties b/plugins/org.eclipse.actf.model.dom.dombycom.flash/build.properties
deleted file mode 100644
index f9681e7..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- fragment.xml
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/fragment.xml b/plugins/org.eclipse.actf.model.dom.dombycom.flash/fragment.xml
deleted file mode 100644
index 8cc0191..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/fragment.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<fragment>
- <extension
- point="org.eclipse.actf.model.dom.dombycom.elementFactory">
- <objectElementFactory
- implementations="org.eclipse.actf.model.dom.dombycom.impl.flash.FlashElementFactory">
- </objectElementFactory>
- </extension>
-
-</fragment>
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashElementFactory.java b/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashElementFactory.java
deleted file mode 100644
index ec03bc6..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashElementFactory.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Daisuke SATO - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.flash;
-
-import org.eclipse.actf.model.dom.dombycom.IObjectElementFactory;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-public class FlashElementFactory implements IObjectElementFactory {
-
- public FlashElementFactory() {
- }
-
- public NodeImpl createTopNode(NodeImpl base, IDispatch inode) {
- return FlashTopNodeImpl.newFlashNode(base, inode);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashMSAANodeImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashMSAANodeImpl.java
deleted file mode 100644
index 68cdd32..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashMSAANodeImpl.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.flash;
-
-import java.util.ArrayList;
-
-import org.eclipse.actf.model.dom.dombycom.IFlashMSAANode;
-import org.eclipse.actf.model.dom.dombycom.INodeEx;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.html.ElementImpl;
-import org.eclipse.actf.model.flash.util.FlashMSAAUtil;
-import org.eclipse.actf.util.vocab.AbstractTerms;
-import org.eclipse.actf.util.win32.FlashMSAAObject;
-import org.eclipse.actf.util.win32.FlashMSAAObjectFactory;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.actf.util.win32.comclutch.IUnknown;
-import org.eclipse.actf.util.win32.msaa.MSAA;
-import org.eclipse.swt.graphics.Rectangle;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-
-public class FlashMSAANodeImpl extends ElementImpl implements IFlashMSAANode {
- public String getID() {
- return aObject.getAccKeyboardShortcut();
- }
-
- @Override
- public int hashCode() {
- String id = this.getID();
- if (id == null)
- return super.hashCode();
- return id.hashCode();
- }
-
- @Override
- public boolean equals(Object o) {
- if (!(o instanceof IFlashMSAANode))
- return super.equals(o);
- IFlashMSAANode msaa = (IFlashMSAANode) o;
- String id1 = this.getID();
- String id2 = msaa.getID();
- if (id1 == null || id2 == null)
- return super.equals(o);
- return id1.equals(id2);
- }
-
- FlashMSAAObject aObject;
-
- private final boolean isTop;
-
- private final FlashMSAANodeImpl topNode;
-
- protected ElementImpl base;
-
- private NodeImpl parent;
-
- private int number;
-
- private FlashMSAANodeImpl(ElementImpl impl, IDispatch inode, FlashMSAAObject aObject) {
- super(impl, inode);
- this.base = impl;
- this.parent = null;
- this.aObject = searchFlash(aObject);
- this.topNode = this;
- this.isTop = true;
- }
-
- private FlashMSAAObject searchFlash(FlashMSAAObject top) {
- try {
- return searchFlash(top, 100);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
- }
-
- private FlashMSAAObject searchFlash(FlashMSAAObject top, int n) {
- if (top == null)
- return null;
- FlashMSAAObject[] children = top.getChildren();
- //System.out.println(children.length);
- for (int i = 0; i < children.length; i++) {
- if (children[i] == null)
- continue;
- if (FlashMSAAUtil.isFlash(children[i])) {
- IDispatch htmlElem = FlashMSAAUtil.getHtmlElementFromObject(children[i]);
-
- if (htmlElem != null) {
- String targetUniqueID = (String) Helper.get(htmlElem, "uniqueID");
- String myUniqueID = (String) base.getUniqueID();
- if (myUniqueID.equals(targetUniqueID)) {
- return children[i];
- }
- }
- }
- }
- for (int i = 0; i < children.length; i++) {
- if (n > 0) {
- FlashMSAAObject iacc = searchFlash(children[i], n - 1);
- if(iacc != null)
- return iacc;
- }
- }
- return null;
- }
-
- private FlashMSAANodeImpl(ElementImpl msaaBase, NodeImpl parent, FlashMSAANodeImpl topNode, FlashMSAAObject aObject) {
- super(msaaBase, null);
- this.base = msaaBase;
- this.aObject = aObject;
- this.parent = parent;
- this.topNode = topNode;
- this.isTop = false;
- }
-
- public static FlashMSAANodeImpl newMSAANode(ElementImpl impl, IDispatch inode) {
- FlashMSAAObject iacc = FlashMSAAObjectFactory.getFlashMSAAObjectFromElement(inode);
-
- if (iacc != null) {
- FlashMSAANodeImpl ret = new FlashMSAANodeImpl(impl, inode, iacc);
- if (ret.aObject == null)
- return null;
- return ret;
- }
-
- return null;
- }
-
-
- public static long getHWNDFromObject(IUnknown unknown) {
- FlashMSAAObject iacc = FlashMSAAObjectFactory.getFlashMSAAObjectFromElement(unknown);
-
- if (iacc == null)
- return 0;
-
- return iacc.getWindow();
- }
-
-
- @Override
- public Node getParentNode() {
- if (parent == null)
- return super.getParentNode();
- return parent;
- }
-
- public static class NodeListImpl implements NodeList {
- ArrayList<Node> list;
-
- FlashMSAANodeImpl parent;
-
- private boolean showOffscreen = true;
-
- private NodeListImpl(FlashMSAAObject[] aObjects, FlashMSAANodeImpl parent, boolean isTop, int total) {
- this.parent = parent;
- list = new ArrayList<Node>();
- for (int i = 0; i < aObjects.length; i++) {
- if (aObjects[i] != null) {
- int accState = aObjects[i].getAccState();
- FlashMSAANodeImpl node = null;
- if (0 == (accState & MSAA.STATE_INVISIBLE)) {
- node = new FlashMSAANodeImpl(parent.base, parent, parent.topNode, aObjects[i]);
- } else if (showOffscreen && 0 != (accState & MSAA.STATE_OFFSCREEN)) {
- node = new FlashMSAANodeImpl(parent.base, parent, parent.topNode, aObjects[i]);
- }
- if (node != null) {
- node.number = total++;
- list.add(node);
- }
- }
- }
- }
-
- public int getLength() {
- return list.size();
- }
-
- public Node item(int index) {
- return list.get(index);
- }
-
- }
-
- @Override
- public String getLinkURI() {
- return "";
- }
-
- @Override
- public boolean doClick() {
- return aObject.doDefaultAction();
- }
-
- @Override
- public NodeList getChildNodes() {
- if (aObject == null) {
- return new NodeListImpl(new FlashMSAAObject[0], this, isTop, 0);
- }
- return new NodeListImpl(aObject.getChildren(), this, isTop, 0);
- }
-
- @Override
- public boolean hasChildNodes() {
- if (aObject == null)
- return false;
- return aObject.getChildCount() > 0;
- }
-
- @Override
- public Node getFirstChild() {
- NodeList list = new NodeListImpl(aObject.getChildren(), this, isTop, 0);
- if (list.getLength() > 0)
- return list.item(0);
- return null;
- }
-
- @Override
- public Node getLastChild() {
- NodeList list = new NodeListImpl(aObject.getChildren(), this, isTop, 0);
- if (list.getLength() > 0)
- return list.item(list.getLength() - 1);
- return null;
- }
-
- @Override
- public Node getNextSibling() {
- return null;
- }
-
- @Override
- public String extractString() {
- if (aObject == null)
- return "";
-
- int r = aObject.getAccRole();
- String accName = aObject.getAccName();
- if (accName == null)
- accName = "";
-
- if (r == MSAA.ROLE_SYSTEM_PUSHBUTTON) {
- if (accName.length() == 0) {
- accName = "" + number;
- }
- }
- if (accName.length() > 0)
- return accName;
- return accName;
- }
-
- @Override
- public String getTagName() {
- return super.getTagName();
- }
-
- @Override
- public boolean highlight() {
- aObject.select(MSAA.SELFLAG_TAKEFOCUS);
- return true;
- }
-
-
- @Override
- public boolean setFocus() {
- if (aObject == null)
- return false;
- aObject.select(MSAA.SELFLAG_TAKEFOCUS);
- return true;
- }
-
- @Override
- public boolean unhighlight() {
- if (aObject == null)
- return false;
- aObject.select(MSAA.SELFLAG_REMOVESELECTION);
- return true;
- }
-
- @Override
- public String getText() {
- return "";
- }
-
- @Override
- public String getNodeName() {
- if (aObject == null)
- return "";
-// String id = aObject.getAccKeyboardShortcut();
-// System.out.println("ID = " + id);
- //
- String role = MSAA.getRoleText(aObject.getAccRole());
- String accName = aObject.getAccName();
- if (accName == null)
- accName = "";
- //return aObject.getAccLocation() + "(" + role + ")" + accName;
- return "(" + role + ")" + accName;
- }
-
- @Override
- public Node getPreviousSibling() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public short getNodeType() {
- // return FLASH_NODE;
- return Node.ELEMENT_NODE;
- }
-
- @Override
- public String getAttribute(String name) {
- return "";
- }
-
- public long getWindow() {
- return aObject.getWindow();
- }
-
- @Override
- public AbstractTerms getTerms(){
- return FlashMSAATerms.getInstance();
- }
-
- private IFlashMSAANode searchByIDInternal(String id) {
- String target = aObject.getAccKeyboardShortcut();
- if (id.equals(target)) return this;
- NodeList nl = getChildNodes();
- int len = nl.getLength();
- for (int i = 0; i < len; i++) {
- FlashMSAANodeImpl n = (FlashMSAANodeImpl) nl.item(i);
- IFlashMSAANode ret = n.searchByIDInternal(id);
- if (ret != null) return ret;
- }
- return null;
- }
-
- public IFlashMSAANode searchByID(String id) {
- return topNode.searchByIDInternal(id);
- }
-
- public INodeEx getBaseNode() {
- return base;
- }
-
- @Override
- public short getHeadingLevel() {
- if (isTop)
- return super.getHeadingLevel();
- return 0;
- }
-
- @Override
- public Rectangle getLocation() {
- return base.getLocation();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashMSAATerms.java b/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashMSAATerms.java
deleted file mode 100644
index dd4f33d..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashMSAATerms.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.flash;
-
-import org.eclipse.actf.util.vocab.AbstractTerms;
-import org.eclipse.actf.util.vocab.IEvalTarget;
-import org.eclipse.actf.util.win32.msaa.MSAA;
-
-
-
-public class FlashMSAATerms extends AbstractTerms {
- private static FlashMSAATerms instance;
-
- public static FlashMSAATerms getInstance() {
- if (instance == null) {
- instance = new FlashMSAATerms();
- }
- return instance;
- }
-
- @Override
- public boolean isClickable(IEvalTarget target) {
- if (target instanceof FlashMSAANodeImpl) {
- FlashMSAANodeImpl node = (FlashMSAANodeImpl) target;
-
- int role = node.aObject.getAccRole();
-
- return role == MSAA.ROLE_SYSTEM_PUSHBUTTON || role == MSAA.ROLE_SYSTEM_RADIOBUTTON
- || role == MSAA.ROLE_SYSTEM_CHECKBUTTON || role == MSAA.ROLE_SYSTEM_LINK;
- }
- return false;
- }
-
- @Override
- public boolean isEmbeddedObject(IEvalTarget target) {
- return false;
- }
-
- @Override
- public boolean isInputable(IEvalTarget target) {
- if (target instanceof FlashMSAANodeImpl) {
- FlashMSAANodeImpl node = (FlashMSAANodeImpl) target;
-
- int role = node.aObject.getAccRole();
- int state = node.aObject.getAccState();
-
- return role == MSAA.ROLE_SYSTEM_TEXT && state != MSAA.STATE_READONLY;
- }
- return false;
- }
-
- @Override
- public boolean isValidNode(IEvalTarget target) {
- return true;
- }
-
- @Override
- public boolean isVisibleNode(IEvalTarget target) {
- return true;
- }
-
- @Override
- public boolean isButton(IEvalTarget target) {
- if (target instanceof FlashMSAANodeImpl) {
- FlashMSAANodeImpl node = (FlashMSAANodeImpl) target;
-
- int role = node.aObject.getAccRole();
-
- return role == MSAA.ROLE_SYSTEM_PUSHBUTTON;
- }
-
- return false;
- }
-
- @Override
- public boolean isAlterable(IEvalTarget target) {
- if (!(target instanceof FlashMSAANodeImpl)) return false;
- if (!isClickable(target)) return false;
- FlashMSAANodeImpl mn = (FlashMSAANodeImpl) target;
- String id = mn.getID();
- if (id == null) return false;
- if (id.length() == 0) return false;
- return true;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashNodeImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashNodeImpl.java
deleted file mode 100644
index 93a9abc..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashNodeImpl.java
+++ /dev/null
@@ -1,534 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.flash;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-
-import org.eclipse.actf.model.dom.dombycom.AnalyzedResult;
-import org.eclipse.actf.model.dom.dombycom.IFlashMSAANode;
-import org.eclipse.actf.model.dom.dombycom.IFlashNode;
-import org.eclipse.actf.model.dom.dombycom.INodeEx;
-import org.eclipse.actf.model.dom.dombycom.impl.DocumentImpl;
-import org.eclipse.actf.model.flash.ASAccInfo;
-import org.eclipse.actf.model.flash.IASBridge;
-import org.eclipse.actf.model.flash.IASNode;
-import org.eclipse.actf.model.flash.IFlashConst;
-import org.eclipse.actf.util.dom.EmptyNodeListImpl;
-import org.eclipse.actf.util.vocab.AbstractTerms;
-import org.eclipse.actf.util.win32.comclutch.ComPlugin;
-import org.eclipse.actf.util.win32.keyhook.ISendEvent;
-import org.eclipse.swt.graphics.Rectangle;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.UserDataHandler;
-
-class FlashNodeImpl implements IFlashNode, IFlashConst {
- // final ASObject nodeASObj;
- private final ASAccInfo accInfo;
- private final String target;
- private final IFlashNode parent;
- private final boolean hasChildren;
- private FlashTopNodeImpl swf;
- private DocumentImpl doc;
-
- private final IASNode flashNode;
- private final IASBridge flashPlayer;
-
- @Override
- public int hashCode() {
- return this.target.intern().hashCode();
- }
-
- @Override
- public boolean equals(Object o) {
- if (o instanceof FlashNodeImpl) {
- FlashNodeImpl f = (FlashNodeImpl) o;
- return swf.equals(f.swf) && this.target.equals(f.target);
- }
- return false;
- }
-
- private FlashNodeImpl(IASNode node, IFlashNode parent) {
- this.flashNode = node;
- this.flashPlayer = node.getPlayer();
- this.target = node.getTarget();
- this.accInfo = node.getAccInfo();
- if (node.isOpaqueObject()) {
- this.hasChildren = false;
- } else {
- this.hasChildren = true;
- }
- this.parent = parent;
- }
-
- FlashNodeImpl(FlashNodeImpl baseNode, IASNode node) {
- this(node, baseNode);
- this.swf = baseNode.swf;
- this.doc = baseNode.doc;
- }
-
- FlashNodeImpl(FlashTopNodeImpl baseNode, IASNode node) {
- this(node, baseNode);
- this.swf = baseNode;
- this.doc = (DocumentImpl) baseNode.getOwnerDocument();
- }
-
- private Object getProperty(String prop) {
- return flashPlayer.getProperty(getTarget(), prop);
- }
-
- private void setProperty(String prop, Object value) {
- flashPlayer.setProperty(getTarget(), prop, value);
- }
-
- private static ISendEvent sendEvent;
-
- private ISendEvent getSendEvent() {
- if (sendEvent == null) {
- sendEvent = ComPlugin.getDefault().newSendEvent();
- }
- return sendEvent;
- }
-
- public String getNodeName() {
- return "#flashNode:" + getTarget();
- }
-
- public String getNodeValue() throws DOMException {
- return null;
- }
-
- public void setNodeValue(String nodeValue) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public short getNodeType() {
- // return FLASH_NODE;
- return Node.ELEMENT_NODE;
- }
-
- public Node getParentNode() {
- return parent;
- }
-
- private static class NodeListImpl implements NodeList {
- private final IFlashNode[] nodes;
-
- public Node item(int index) {
- if ((index < 0) || (index >= nodes.length))
- return null;
- return nodes[index];
- }
-
- public int getLength() {
- return nodes.length;
- }
-
- NodeListImpl(IFlashNode[] nodes) {
- this.nodes = nodes;
- }
- }
-
- public NodeList getChildNodes() {
- if (!hasChildren)
- return EmptyNodeListImpl.getInstance();
- IFlashNode[] r = getSWFChildNodes();
- return new NodeListImpl(r);
- }
-
- public Node getFirstChild() {
- if (!hasChildren)
- return null;
- IFlashNode[] r = getSWFChildNodes();
- if (r == null)
- return null;
- if (r.length == 0)
- return null;
- return r[0];
- }
-
- public Node getLastChild() {
- if (!hasChildren)
- return null;
- IFlashNode[] r = getSWFChildNodes();
- if (r == null)
- return null;
- if (r.length == 0)
- return null;
- return r[r.length - 1];
- }
-
- public Node getPreviousSibling() {
- throw new UnsupportedOperationException();
- }
-
- public Node getNextSibling() {
- throw new UnsupportedOperationException();
- }
-
- public NamedNodeMap getAttributes() {
- return null;
- }
-
- public Document getOwnerDocument() {
- return doc;
- }
-
- public Node insertBefore(Node newChild, Node refChild) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public Node removeChild(Node oldChild) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public Node appendChild(Node newChild) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasChildNodes() {
- // IFlashNode[] r = getInnerNodes();
- if (!hasChildren)
- return false;
- IFlashNode[] r = getSWFChildNodes();
- if (r == null)
- return false;
- if (r.length == 0)
- return false;
- return true;
- }
-
- public Node cloneNode(boolean deep) {
- throw new UnsupportedOperationException();
- }
-
- public void normalize() {
- }
-
- public boolean isSupported(String feature, String version) {
- return false;
- }
-
- public String getNamespaceURI() {
- return null;
- }
-
- public String getPrefix() {
- return null;
- }
-
- public void setPrefix(String prefix) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public String getLocalName() {
- String target = getTarget();
- int idx = target.lastIndexOf('.');
- if (idx < 0)
- return target;
- return target.substring(idx + 1);
- }
-
- public boolean hasAttributes() {
- return false;
- }
-
- public String getBaseURI() {
- return null;
- }
-
- public short compareDocumentPosition(Node other) throws DOMException {
- return 0;
- }
-
- public String getTextContent() throws DOMException {
- return extractString();
- }
-
- public void setTextContent(String textContent) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public boolean isSameNode(Node other) {
- return false;
- }
-
- public String lookupPrefix(String namespaceURI) {
- return null;
- }
-
- public boolean isDefaultNamespace(String namespaceURI) {
- return false;
- }
-
- public String lookupNamespaceURI(String prefix) {
- return null;
- }
-
- public boolean isEqualNode(Node arg) {
- return false;
- }
-
- public Object getFeature(String feature, String version) {
- return null;
- }
-
- public Object setUserData(String key, Object data, UserDataHandler handler) {
- throw new UnsupportedOperationException();
- }
-
- public Object getUserData(String key) {
- throw new UnsupportedOperationException();
- }
-
- // --------------------------------------------------------------------------------
- // INodeEx interface
- // --------------------------------------------------------------------------------
-
- @SuppressWarnings("unused")
- private String decodeString(String input) {
- if (input == null)
- return "";
- try {
- return URLDecoder.decode(input, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- }
- return input;
- }
-
- public String extractString() {
- String r = null;
- if (null != accInfo) {
- accInfo.getName();
- }
- if (r == null) {
- r = flashNode.getText(false);
- }
- if (r == null)
- return "";
- // return decodeString(r);
- return r;
- }
-
- public short getHeadingLevel() {
- return 0;
- }
-
- public String getLinkURI() {
- // TODO
- return null;
- }
-
- public void setText(String text) {
- setProperty(ASNODE_TEXT, text);
- }
-
- public String getText() {
- Object o = getProperty(ASNODE_TEXT);
- if (o instanceof String)
- return (String) o;
- return "";
- }
-
- private boolean doHardwareClick() {
- long hwnd = swf.getHWND();
- int ix = (int) flashNode.getX();
- int iy = (int) flashNode.getY();
- int iw = (int) flashNode.getWidth();
- int ih = (int) flashNode.getHeight();
- int x = ix + iw / 4;
- int y = iy + ih / 4;
-
- // System.err.println("Click to:" + x + "," + y);
-
- // getSendEvent().postMouse(x, y, false);
- getSendEvent().focusWindow(hwnd);
- setFocus();
- getSendEvent().postMouse(x, y, false);
- boolean result = getSendEvent().postMouse(x, y, true);
- return result;
- }
-
- String getClickableTarget(String current) {
- while (current.length() > 0) {
- String tryOnRelease = current + PATH_ON_RELEASE;
- if (swf.getNodeFromPath(tryOnRelease) != null) {
- return current;
- }
- String tryOnPress = current + PATH_ON_PRESS;
- if (swf.getNodeFromPath(tryOnPress) != null) {
- return current;
- }
- int idx = current.lastIndexOf('.');
- if (idx <= 0)
- break;
- current = current.substring(0, idx);
- }
- return null;
- }
-
- public boolean doClick() {
- String current = getTarget();
- while (current.length() > 0) {
- String tryOnRelease = current + PATH_ON_RELEASE;
- if (swf.getNodeFromPath(tryOnRelease) != null) {
- flashPlayer.callMethod(flashNode, M_ON_RELEASE);
- return true;
- }
- String tryOnPress = current + PATH_ON_PRESS;
- if (swf.getNodeFromPath(tryOnPress) != null) {
- flashPlayer.callMethod(flashNode, M_ON_PRESS);
- return true;
- }
- if (true)
- break;
- int idx = current.lastIndexOf('.');
- if (idx <= 0)
- break;
- current = current.substring(0, idx);
- }
- if (doHardwareClick())
- return true;
- return false;
- }
-
- public boolean highlight() {
- flashPlayer.callMethod(flashNode, M_ON_ROLL_OVER);
- boolean ret1 = swf.highlight();
- boolean ret2 = flashNode.setMarker();
- return ret1 && ret2;
- }
-
- public boolean unhighlight() {
- flashPlayer.callMethod(flashNode, M_ON_ROLL_OUT);
- boolean ret1 = swf.unhighlight();
- boolean ret2 = flashPlayer.unsetMarker();
- return ret1 && ret2;
- }
-
- public boolean setFocus() {
- if (!swf.setFocus())
- return false;
- return flashPlayer.setFocus(getTarget());
- }
-
- public int getNth() {
- // TODO!
- return 0;
- }
-
- // --------------------------------------------------------------------------------
- // IFlashNode interface
- // --------------------------------------------------------------------------------
-
- public String getTarget() {
- return target;
- }
-
- public IFlashNode getNodeFromPath(String path) {
- return swf.getNodeFromPath(path);
- }
-
- public IFlashNode getNodeAtDepth(int depth) {
- IASNode result = flashPlayer.getNodeAtDepthWithPath(getTarget(),
- depth);
- if (result == null)
- return null;
- return new FlashNodeImpl(swf, result);
- }
-
- private IFlashNode[] createIFlashNodeArray(IASNode[] nodes) {
- IFlashNode[] results = new IFlashNode[nodes.length];
- for (int i = 0; i < nodes.length; i++) {
- results[i] = new FlashNodeImpl(this, nodes[i]);
- }
- return results;
- }
-
- public IFlashNode[] getInnerNodes() {
- return createIFlashNodeArray(flashPlayer.getChildren(flashNode, true));
- }
-
- public IFlashNode[] getSWFChildNodes() {
- return createIFlashNodeArray(flashPlayer.getChildren(flashNode, false));
- }
-
- public int getDepth() {
- return flashNode.getDepth();
- }
-
- public int getCurrentFrame() {
- return flashNode.getCurrentFrame();
- }
-
- public IFlashNode[] translate() {
- return createIFlashNodeArray(flashPlayer.translateWithPath(getTarget()));
- }
-
- public INodeEx getBaseNode() {
- return swf;
- }
-
- // --------------------------------------------------------------------------------
- // extensions.
- // --------------------------------------------------------------------------------
-
- boolean isInputable() {
- return flashNode.isInputable();
- }
-
- boolean isSilent() {
- return accInfo.isSilent();
- }
-
- public AnalyzedResult analyze(AnalyzedResult ar) {
- return ar;
- }
-
- public AbstractTerms getTerms() {
- return FlashTerms.getInstance();
- }
-
- public Rectangle getLocation() {
- // TODO
- return swf.getLocation();
- }
-
- // --------------------------------------------------------------------------------
- // Dummy
- // --------------------------------------------------------------------------------
- public IFlashMSAANode getMSAA() {
- return null;
- }
-
- public void repairFlash() {
- }
-
- // !FN!
- public String[] getStillPictureData() {
- return new String[3];
- }
-
- public char getAccessKey() {
- return 0;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashSoundImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashSoundImpl.java
deleted file mode 100644
index c8d2cbb..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashSoundImpl.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.flash;
-
-import org.eclipse.actf.model.dom.dombycom.INodeExSound;
-import org.eclipse.actf.model.flash.IASBridge;
-import org.eclipse.actf.model.flash.IASNode;
-import org.eclipse.actf.model.flash.IFlashConst;
-
-class FlashSoundImpl implements INodeExSound, IFlashConst {
-
- private int volBeforeMuted = -1;
- private final IASBridge player;
- private final IASNode target;
-
- FlashSoundImpl(IASNode node) {
- this.target = node;
- this.player = node.getPlayer();
- }
-
- public boolean muteMedia(boolean flag) {
- if (flag) {
- if (volBeforeMuted < 0) {
- volBeforeMuted = getVolume();
- return setVolume(0);
- }
- } else {
- if (volBeforeMuted >= 0) {
- boolean success = setVolume(volBeforeMuted);
- volBeforeMuted = -1;
- return success;
- }
- }
- return true;
- }
-
- public int getVolume() {
- Object o = player.callMethod(target, M_GET_VOLUME);
- if (o instanceof Double) {
- return ((Double) o).intValue() * 10;
- } else if (o instanceof Integer) {
- return ((Integer) o).intValue() * 10;
- }
- return -1;
- }
-
- public boolean setVolume(int val) {
- val = val / 10;
- player.callMethod(target, M_SET_VOLUME, new Object[] { Integer
- .valueOf(val) });
- return true;
- }
-
- public boolean getMuteState() {
- if (volBeforeMuted < 0)
- return false;
- return true;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashTerms.java b/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashTerms.java
deleted file mode 100644
index e49aeef..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashTerms.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.flash;
-
-import org.eclipse.actf.model.dom.dombycom.impl.html.ElementImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.html.HTMLTerms;
-import org.eclipse.actf.util.vocab.AbstractTerms;
-import org.eclipse.actf.util.vocab.IEvalTarget;
-import org.w3c.dom.Node;
-
-
-
-
-public class FlashTerms extends AbstractTerms {
- @Override
- public boolean isAlterable(IEvalTarget target) {
- return isClickable(target);
- }
-
- private static FlashTerms instance;
-
- public static FlashTerms getInstance() {
- if (instance == null) {
- instance = new FlashTerms();
- }
- return instance;
- }
-
- @Override
- public boolean isValidNode(IEvalTarget target) {
- return true;
- }
-
- @Override
- public boolean isVisibleNode(IEvalTarget target) {
- if (target instanceof FlashNodeImpl) {
- FlashNodeImpl flash = (FlashNodeImpl) target;
- return !(flash.isSilent());
- }
- return true;
- }
-
- @Override
- public boolean isInputable(IEvalTarget target) {
- if (target instanceof FlashNodeImpl) {
- FlashNodeImpl flash = (FlashNodeImpl) target;
- return flash.isInputable();
- }
- return false;
- }
-
- @Override
- public boolean isClickable(IEvalTarget target) {
- if (target instanceof FlashNodeImpl) {
- FlashNodeImpl flash = (FlashNodeImpl) target;
-
- String clickableTarget = flash.getClickableTarget(flash.getTarget());
- if (clickableTarget != null)
- return true;
-
- }
- return false;
- }
-
- @Override
- public boolean isButton(IEvalTarget target) {
- if (target instanceof FlashNodeImpl) {
- FlashNodeImpl flash = (FlashNodeImpl) target;
-
- String clickableTarget = flash.getClickableTarget(flash.getTarget());
- if (clickableTarget != null)
- return true;
-
- }
- return false;
- }
-
- @Override
- public boolean isFlashTopNode(IEvalTarget target) {
- if (target instanceof FlashTopNodeImpl)
- return true;
- return false;
- }
-
- @Override
- public boolean isMSAAFlash(IEvalTarget target) {
- if (target instanceof FlashTopNodeImpl) {
- return ((FlashTopNodeImpl) target).getMSAA() != null;
- }
- return false;
- }
-
- @Override
- public boolean isEmbeddedObject(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
-
- String name = element.getLocalName();
- if ("EMBED".equals(name) || "OBJECT".equals(name))
- return true;
- }
- return false;
- }
-
- @Override
- public boolean isAccessKey(char key, IEvalTarget target) {
- if (target instanceof FlashTopNodeImpl)
- return HTMLTerms.getInstance().isAccessKey(key, target);
- return super.isAccessKey(key, target);
- }
-
- @Override
- public boolean isBlockJumpPointB(IEvalTarget target) {
- if (target instanceof FlashTopNodeImpl)
- return HTMLTerms.getInstance().isBlockJumpPointB(target);
- return super.isBlockJumpPointB(target);
- }
-
- @Override
- public boolean isBlockJumpPointF(IEvalTarget target) {
- if (target instanceof FlashTopNodeImpl)
- return HTMLTerms.getInstance().isBlockJumpPointF(target);
- return super.isBlockJumpPointF(target);
- }
-
- @Override
- public boolean isHeading(int level, IEvalTarget target) {
- if (target instanceof FlashTopNodeImpl)
- return HTMLTerms.getInstance().isHeading(level, target);
- return super.isHeading(level, target);
- }
-
- @Override
- public boolean isHeadingJumpPoint(IEvalTarget target) {
- if (target instanceof FlashTopNodeImpl)
- return HTMLTerms.getInstance().isHeadingJumpPoint(target);
- return super.isHeadingJumpPoint(target);
- }
-
- @Override
- public boolean nodeLocation(Node refNode, boolean backward, IEvalTarget target) {
- if (target instanceof FlashTopNodeImpl)
- return HTMLTerms.getInstance().nodeLocation(refNode, backward, target);
- return super.nodeLocation(refNode, backward, target);
- }
-
- @Override
- public boolean isMedia(IEvalTarget target) {
- if (target instanceof FlashTopNodeImpl) {
- FlashTopNodeImpl swf = (FlashTopNodeImpl) target;
- return swf.hasMedia();
- } else {
- return super.isMedia(target);
- }
- }
-
- @Override
- public boolean hasContent(IEvalTarget target) {
- if (isFlashTopNode(target)) return true;
- if (isInputable(target)) return true;
- if (isListTop(target)) return true;
- return super.hasContent(target);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashTopNodeImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashTopNodeImpl.java
deleted file mode 100644
index b1cc598..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashTopNodeImpl.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.flash;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.actf.model.dom.dombycom.AnalyzedResult;
-import org.eclipse.actf.model.dom.dombycom.IFlashMSAANode;
-import org.eclipse.actf.model.dom.dombycom.IFlashNode;
-import org.eclipse.actf.model.dom.dombycom.INodeEx;
-import org.eclipse.actf.model.dom.dombycom.INodeExSound;
-import org.eclipse.actf.model.dom.dombycom.INodeExVideo;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.ListNodeListImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.html.ElementImpl;
-import org.eclipse.actf.model.flash.FlashPlayerFactory;
-import org.eclipse.actf.model.flash.IASNode;
-import org.eclipse.actf.model.flash.IFlashConst;
-import org.eclipse.actf.model.flash.IFlashPlayer;
-import org.eclipse.actf.util.vocab.AbstractTerms;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-class FlashTopNodeImpl extends ElementImpl implements IFlashNode, IFlashConst {
-
- private static final String CLSID = "CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000";
- private static final String APP_TYPE = "application/x-shockwave-flash";
-
- private static final IFlashNode[] emptyResult = new IFlashNode[0];
-
- private FlashMSAANodeImpl cachedMSAA;
-
- private IFlashPlayer flashPlayer;
-
- static FlashTopNodeImpl newFlashNode(NodeImpl baseNode, IDispatch inode) {
- String clsid = (String) Helper.get(inode, "classid");
- if (CLSID.equalsIgnoreCase(clsid)) {
- return new FlashTopNodeImpl(baseNode, inode);
- }
- String type = (String) Helper.get((IDispatch) inode.invoke1(
- "getAttributeNode", "type"), "value");
- if (APP_TYPE.equalsIgnoreCase(type)) {
- return new FlashTopNodeImpl(baseNode, inode);
- }
- return null;
- }
-
- private FlashTopNodeImpl(NodeImpl baseNode, IDispatch idisp) {
- super(baseNode, idisp);
-
- flashPlayer = FlashPlayerFactory.getPlayerFromIDsipatch(idisp);
-
- }
-
- private INodeExVideo[] searchVideo() {
- IASNode[] videos = flashPlayer.searchVideo();
- int len = videos.length;
- INodeExVideo[] result = new INodeExVideo[len];
- for (int i = 0; i < len; i++) {
- // System.err.println("SVO:" + videos[i]);
- result[i] = new FlashVideoImpl(this, videos[i]);
- }
- return result;
- }
-
- private INodeExSound[] searchSound() {
- IASNode[] sounds = flashPlayer.searchSound();
- int len = sounds.length;
- INodeExSound[] result = new INodeExSound[len];
- for (int i = 0; i < len; i++) {
- result[i] = new FlashSoundImpl(sounds[i]);
- }
- return result;
- }
-
- public String getTarget() {
- return "";
- }
-
- public IFlashNode getNodeFromPath(String path) {
- IASNode node = flashPlayer.getNodeFromPath(path);
- if (node == null)
- return null;
- return new FlashNodeImpl(this, node);
- }
-
- public IFlashNode getNodeAtDepth(int depth) {
- return null;
- }
-
- public IFlashNode[] getInnerNodes() {
- return emptyResult;
- }
-
- private IFlashNode[] createIFlashNodeArray(IASNode[] nodes) {
- IFlashNode[] results = new IFlashNode[nodes.length];
- for (int i = 0; i < nodes.length; i++) {
- results[i] = new FlashNodeImpl(this, nodes[i]);
- }
- return results;
- }
-
- public IFlashNode[] translate() {
- return createIFlashNodeArray(flashPlayer
- .translateWithPath(PATH_ROOTLEVEL));
- }
-
- public int getDepth() {
- return INVALID_DEPTH;
- }
-
- public int getCurrentFrame() {
- return -1;
- }
-
- public INodeEx getBaseNode() {
- return this;
- }
-
- // --------------------------------------------------------------------------------
- // Node Overriding Impl.
- // --------------------------------------------------------------------------------
-
- @Override
- public Node getFirstChild() {
- //System.err.println("invalid(getFirstChild).");
- return null;
- }
-
- @Override
- public Node getLastChild() {
- //System.err.println("invalid(getLastChild).");
- return null;
- }
-
- @Override
- public NodeList getChildNodes() {
- List<Node> l = new ArrayList<Node>(3);
- for (int i = 0; i < 3; i++) {
- String levelxName = "_level" + i;
- IFlashNode levelx = getNodeFromPath(levelxName);
- if (levelx != null) {
- // System.err.println(levelxName + " is found.");
- l.add(levelx);
- }
- }
-
- return new ListNodeListImpl(l);
- }
-
- private boolean hasMedia = false;
-
- boolean hasMedia() {
- return hasMedia;
- }
-
- @Override
- public AnalyzedResult analyze(AnalyzedResult ar) {
- INodeExVideo[] videos = searchVideo();
- if (videos.length > 0) {
- hasMedia = true;
- for (int i = 0; i < videos.length; i++) {
- ar.addVideo(videos[i]);
- }
- }
- INodeExSound[] sounds = searchSound();
- for (int i = 0; i < sounds.length; i++) {
- ar.addSound(sounds[i]);
- }
- ar.addFlashTopNode(this);
- return ar;
- }
-
- public void repairFlash() {
- flashPlayer.repairFlash();
- }
-
- public IFlashMSAANode getMSAA() {
- if (cachedMSAA == null)
- cachedMSAA = FlashMSAANodeImpl.newMSAANode(this, inode);
- if ((cachedMSAA == null) || (cachedMSAA.getWindow() == 0))
- return null;
- // repairFlash();
- updateTarget();
- return cachedMSAA;
- }
-
- public long getHWND() {
- return FlashMSAANodeImpl.getHWNDFromObject(super.getINode());
- }
-
- @Override
- public AbstractTerms getTerms() {
- return FlashTerms.getInstance();
- }
-
- // TODO...
- private boolean updatedTarget = false;
-
- public void updateTarget() {
- if (updatedTarget)
- return;
- updatedTarget = flashPlayer.updateTarget();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashVideoImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashVideoImpl.java
deleted file mode 100644
index 00e347a..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom.flash/src/org/eclipse/actf/model/dom/dombycom/impl/flash/FlashVideoImpl.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.flash;
-
-import org.eclipse.actf.model.dom.dombycom.INodeEx;
-import org.eclipse.actf.model.dom.dombycom.INodeExVideo;
-import org.eclipse.actf.model.flash.IASBridge;
-import org.eclipse.actf.model.flash.IASNode;
-import org.eclipse.actf.model.flash.IFlashConst;
-
-class FlashVideoImpl implements INodeExVideo, IFlashConst {
- private final FlashTopNodeImpl swf;
- private final IASNode target;
- private final IASBridge player;
- // Some sort of hacking solution!!!
- private VideoState currentState = VideoState.STATE_UNKNOWN;
-
- // public String getTarget() {
- // return target.getTarget();
- // }
-
- FlashVideoImpl(FlashTopNodeImpl swf, IASNode node) {
- this.swf = swf;
- this.target = node;
- this.player = node.getPlayer();
- }
-
- public boolean previousTrack() {
- return false;
- }
-
- public boolean nextTrack() {
- return false;
- }
-
- public boolean stopMedia() {
- player.callMethod(target, M_STOP);
- currentState = VideoState.STATE_STOP;
- return true;
- }
-
- public boolean playMedia() {
- player.callMethod(target, M_PLAY);
- currentState = VideoState.STATE_PLAY;
- return true;
- }
-
- public boolean pauseMedia() {
- player.callMethod(target, M_PAUSE);
- currentState = VideoState.STATE_PAUSE;
- return true;
- }
-
- public boolean fastReverse() {
- return false;
- }
-
- public boolean fastForward() {
- return false;
- }
-
- public double getCurrentPosition() {
- Object o = player.callMethod(target, M_GET_CURRENT_POSITION);
- if (o instanceof Double) {
- return ((Double) o).doubleValue();
- } else if (o instanceof Float) {
- return ((Float) o).floatValue();
- } else if (o instanceof Integer) {
- return ((Integer) o).intValue();
- }
- return 0;
- }
-
- public double getTotalLength() {
- return -1;
- }
-
- public VideoState getCurrentState() {
- // TODO
- return currentState;
- }
-
- public INodeEx getReferenceNode() {
- // Returns the top node (maybe a makeshift).
- return swf;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/.classpath b/plugins/org.eclipse.actf.model.dom.dombycom/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/.cvsignore b/plugins/org.eclipse.actf.model.dom.dombycom/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/.project b/plugins/org.eclipse.actf.model.dom.dombycom/.project
deleted file mode 100644
index 5e56c10..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.model.dom.dombycom</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.model.dom.dombycom/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.model.dom.dombycom/META-INF/MANIFEST.MF
deleted file mode 100644
index c407c42..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF DomByCom Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.model.dom.dombycom;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.actf.model.dom.dombycom.DombycomPlugin
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.swt,
- org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.actf.core,
- org.eclipse.actf.util.vocab,
- org.eclipse.actf.util.comclutch.win32
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.actf.model.dom.dombycom
-Bundle-ClassPath: bin/,
- runtimes/dombycom.jar
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/about.html b/plugins/org.eclipse.actf.model.dom.dombycom/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/build.properties b/plugins/org.eclipse.actf.model.dom.dombycom/build.properties
deleted file mode 100644
index 3ca8c8b..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- runtimes/dombycom.jar,\
- plugin.xml
-source.runtimes/dombycom.jar = src/
-output.runtimes/dombycom.jar = bin/
-jars.compile.order = runtimes/dombycom.jar
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/plugin.xml b/plugins/org.eclipse.actf.model.dom.dombycom/plugin.xml
deleted file mode 100644
index c43aa44..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/plugin.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="elementFactory" name="elementFactory" schema="schema/elementFactory.exsd"/>
-
-</plugin>
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/schema/elementFactory.exsd b/plugins/org.eclipse.actf.model.dom.dombycom/schema/elementFactory.exsd
deleted file mode 100644
index 9be6b2b..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/schema/elementFactory.exsd
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.actf.model.dom.dombycom">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.actf.model.dom.dombycom" id="elementFactory" name="elementFactory"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="objectElementFactory" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="objectElementFactory">
- <complexType>
- <attribute name="implementations" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.actf.model.dom.dombycom.IObjectElementFactory"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2008 IBM Corporation and others.<br>
-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 <a
-href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/AnalyzedResult.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/AnalyzedResult.java
deleted file mode 100644
index a5c07fa..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/AnalyzedResult.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom;
-
-import java.util.ArrayList;
-
-/**
- * AnalyzedResult is used as the object storage for DOM tree traversal.
- * Currently it will have video objects, sound objects, access key list, and
- * Flash nodes. You can collect those objects with
- * {@link INodeEx#analyze(AnalyzedResult)} method.
- */
-public class AnalyzedResult {
- private static final INodeExVideo[] emptyVideoArray = new INodeExVideo[0];
- private static final INodeExSound[] emptySoundArray = new INodeExSound[0];
- private ArrayList<INodeExVideo> videoList = new ArrayList<INodeExVideo>();
- private ArrayList<INodeExSound> soundList = new ArrayList<INodeExSound>();
-
- private static final INodeEx[] emptyAccessKeyArray = new INodeEx[0];
- private ArrayList<INodeEx> accessKeyList = new ArrayList<INodeEx>();
-
- private static final IFlashNode[] emptyFlashTopNodeArray = new IFlashNode[0];
- private ArrayList<IFlashNode> flashNodeList = new ArrayList<IFlashNode>();
-
- /**
- * This method is used by items of tree.
- * @param f
- */
- public void addFlashTopNode(IFlashNode f) {
- flashNodeList.add(f);
- }
-
- /**
- * This method is used by items of tree.
- * @param v
- */
- public void addVideo(INodeExVideo v) {
- videoList.add(v);
- }
-
- /**
- * This method is used by items of tree.
- * @param s
- */
- public void addSound(INodeExSound s) {
- soundList.add(s);
- }
-
- /**
- * This method is used by items of tree.
- * @param a
- */
- public void addAccessKey(INodeEx a) {
- accessKeyList.add(a);
- }
-
- /**
- * @return video objects in the tree.
- */
- public INodeExVideo[] getVideoNodes() {
- return videoList.toArray(emptyVideoArray);
- }
-
- /**
- * @return sound objects in the tree.
- */
- public INodeExSound[] getSoundNodes() {
- return soundList.toArray(emptySoundArray);
- }
-
- /**
- * @return node objects that has one or more access keys in the tree.
- */
- public INodeEx[] getAccessKeyNodes() {
- return accessKeyList.toArray(emptyAccessKeyArray);
- }
-
- /**
- * @return Flash objects. Each object is corresponding to a Flash object.
- */
- public IFlashNode[] getFlashTopNodes() {
- return flashNodeList.toArray(emptyFlashTopNodeArray);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/DomByCom.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/DomByCom.java
deleted file mode 100644
index aeed499..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/DomByCom.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom;
-
-import org.eclipse.actf.model.dom.dombycom.impl.DocumentImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.StyleSheetImpl;
-import org.eclipse.actf.util.win32.comclutch.ComPlugin;
-import org.eclipse.actf.util.win32.comclutch.ComService;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.actf.util.win32.comclutch.ResourceManager;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * DomByCom is a utility class to obtain the COM wrapper object form the pointer
- * of the web browser object.
- */
-public class DomByCom {
- private ResourceManager resourceManager;
-
- private final IDispatch iWebBrowser2;
-
- /**
- * This id is used for div elements created by aiBrowser to show border line
- * of the focused object.
- */
- public static final String ID_DIV = "__org_eclipse_actf_highlight_div__";
-
- public static final int DIV_BORDER_WIDTH = 3;
-
- public static final int STYLE_BORDER = 0;
-
- public static final int DIV_BORDER = 1;
-
- public static final int STYLE_BORDER2 = 2;
-
- public static final int BORDER_MODE = STYLE_BORDER2;
-
- public static final String BORDER_STYLE_STRING = "border: 3px solid #071; background: #fdd;";
-
- private void addStyles(DocumentImpl doc) {
- StyleSheetImpl style = doc.createStyleSheet();
- if (style != null) {
- style.addRule(".CSStoHighlight", BORDER_STYLE_STRING);
- }
- }
-
- private void addDivs(DocumentImpl doc) {
- Element el = doc.getElementById(ID_DIV);
- if (el == null) {
- el = doc.createElement("div");
- el.setAttribute("id", ID_DIV);
-
- NodeList body = doc.getElementsByTagName("body");
- if (body != null && body.getLength() > 0) {
- System.out.println("insert");
- body.item(0).appendChild(el);
-
- try {
- IElementEx elx = (IElementEx) el;
- IStyle st = elx.getStyle();
-
- st.put("position", "absolute");
- st.put("backgroundColor", "transparent");
- st.put("border", DIV_BORDER_WIDTH + "px solid green");
- st.put("zIndex", "10000");
- st.put("left", "-1000px");
- st.put("top", "-1000px");
- st.put("width", "100px");
- st.put("height", "100px");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- private void initialize(DocumentImpl doc) {
- if (BORDER_MODE == STYLE_BORDER) {
- addStyles(doc);
- } else if (BORDER_MODE == DIV_BORDER) {
- addDivs(doc);
- } else if (BORDER_MODE == STYLE_BORDER2) {
- // do nothing;
- }
- }
-
- /**
- * Release all objects managed by the DomByCom. DomByCom has a resource
- * manager which manages the life cycle of the objects obtained from the
- * document.
- */
- public void release() {
- resourceManager.releaseAll(iWebBrowser2);
- }
-
- /**
- * @return the document object of the web browser.
- */
- public IDocumentEx getDocument() {
- IDispatch iDocument = (IDispatch) iWebBrowser2.get("Document");
- DocumentImpl doc = new DocumentImpl(iDocument);
- initialize(doc);
- return doc;
- }
-
- /**
- * DomByCom is a utility class to obtain the COM wrapper object form the
- * pointer of the web browser object.
- *
- * @param iWebBrowser2
- * the native pointer of the IWebBrowser2 object.
- */
- public DomByCom(long iWebBrowser2) {
- this.resourceManager = ComPlugin.getDefault().newResourceManager(null);
- this.iWebBrowser2 = ComService.newIDispatch(resourceManager,
- iWebBrowser2, true);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/DombycomPlugin.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/DombycomPlugin.java
deleted file mode 100644
index 0e70fca..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/DombycomPlugin.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.dombycom;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class DombycomPlugin extends Plugin {
-
- //The shared instance.
- private static DombycomPlugin plugin;
-
- /**
- * The constructor.
- */
- public DombycomPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static DombycomPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IDocumentEx.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IDocumentEx.java
deleted file mode 100644
index a316406..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IDocumentEx.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom;
-
-import java.util.List;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- * The extended interface of the {@link Document}.
- */
-public interface IDocumentEx extends Document {
- /**
- * CSS compatible mode (IE)
- */
- String CSS1_COMPAT = "CSS1Compat";
-
- /**
- * Back compatible mode (IE)
- */
- String BACK_COMPAT = "BackCompat";
-
- /**
- * getElementById will return a node, but actual content sometimes
- * has more than one objects having save ID and it can't search in the
- * document of iframes in the top document.
- *
- * @param id to be used for the search
- * @return the objects which has <i>id</i> as its id attribute.
- */
- List<Node> getElementsByIdInAllFrames(String id);
-
- /**
- * @return the CSS compatible mode (IE)
- */
- String getCompatMode();
-
- /**
- * @param target the anchor name to be searched.
- * @return the first element whose name is <i>target</i>.
- */
- Element getTargetElement(String target);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IElementEx.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IElementEx.java
deleted file mode 100644
index b8ce3a5..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IElementEx.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom;
-
-import org.w3c.dom.Element;
-
-/**
- * The extended interface of the {@link Element}
- */
-public interface IElementEx extends Element, INodeEx{
- /**
- * An instance of Position represents a nth position of a element in a radio
- * button group and list group.
- */
- public class Position {
- public int index;
- public int total;
- }
-
- /**
- * @return the CSS style object.
- */
- public IStyle getStyle();
-
- /**
- * @return the position of the element in the radio group. This is valid if
- * the element is a radio button in the radio group.
- */
- public Position getRadioPosition();
-
- /**
- * @return the position of the element in the list. This is valid if the
- * element is an item of the list.
- */
- public Position getListPosition();
-
- /**
- * @return the label object annotating the element. This is valid if the
- * element is a form element and a label element for the element is
- * existing.
- */
- public Element getFormLabel();
-
- /**
- * @return the attribute value originally specified to the element. If no value is specified, returns null.
- * @see org.w3c.dom.Element#getAttribute(java.lang.String)
- */
- public String getAttribute(String name);
-
- /**
- * @return the attribute value currently assigned to the element. (same as getAttribute method of IE DOM)
- */
- public String getCurrentAttribute(String name);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IFlashMSAANode.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IFlashMSAANode.java
deleted file mode 100644
index d6dfcf4..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IFlashMSAANode.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.dombycom;
-
-/**
- * The IFlashMSAANode interface defines the methods to be implemented by the MSAA
- * object.
- */
-public interface IFlashMSAANode extends INodeEx {
- /**
- * @return the unique ID of the node. A node should return an id.
- */
- String getID();
-
- /**
- * @param id the id to be used for the search
- * @return the MSAA node specified by the <i>id<i>.
- */
- IFlashMSAANode searchByID(String id);
-
- /**
- * @return the base node. It might be an object element of the Flash object.
- */
- INodeEx getBaseNode();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IFlashNode.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IFlashNode.java
deleted file mode 100644
index 69d865d..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IFlashNode.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.dombycom;
-
-/**
- * IFlashNode interface defines the methods to be implemented by the Flash node
- * objects. It extends the {@link INodeEx} interface for Flash object.
- */
-public interface IFlashNode extends INodeEx {
- short FLASH_NODE = 120;
-
- /**
- * @return the target path of the Flash object from the root. It might be
- * like a "_level0.hoge.hoge".
- */
- String getTarget();
-
- /**
- * @param path the target path to be obtained.
- * @return the Flash object specified by the <i>path</i>
- */
- IFlashNode getNodeFromPath(String path);
-
- /**
- * @param depth the target depth to be obtained.
- * @return the Flash object specified by the <i>depth</i>
- */
- IFlashNode getNodeAtDepth(int depth);
-
- /**
- * @return the original child nodes of the Flash node.
- */
- IFlashNode[] getInnerNodes();
-
- /**
- * @return the depth of the node.
- */
- int getDepth();
-
- /**
- * @return the frame number of the current state.
- */
- int getCurrentFrame();
-
- /**
- * This method is used by the auto translate function.
- * @return the translated nodes.
- */
- IFlashNode[] translate();
-
- /**
- * @return the MSAA representation of the Flash element.
- */
- IFlashMSAANode getMSAA();
-
- /**
- * do the Flash repairing function. (experimental)
- */
- void repairFlash();
-
- /**
- * @return the root Flash object node.
- */
- INodeEx getBaseNode();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IImageElement.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IImageElement.java
deleted file mode 100644
index c5851ae..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IImageElement.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom;
-
-import org.w3c.dom.Element;
-
-/**
- * The IImageElement interface defines the methods to be implemented by the
- * image element.
- */
-public interface IImageElement extends INodeEx {
- /**
- * @return the map element specified in the image element as a attribute.
- */
- public Element getMap();
-
- /**
- * @return whether the element has usemap attribute or not.
- */
- public boolean hasUsemap();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/INodeEx.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/INodeEx.java
deleted file mode 100644
index a04a90d..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/INodeEx.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.dombycom;
-
-import org.eclipse.actf.util.vocab.IEvalTarget;
-import org.eclipse.swt.graphics.Rectangle;
-import org.w3c.dom.Node;
-
-/**
- * The INodeEx interface defines the methods to be implemented by the node
- * objects that are used in the application. These methods are basic functions
- * for alternative interface.
- */
-public interface INodeEx extends Node, IEvalTarget {
- /**
- * @return the text representation of the node.
- */
- String extractString();
-
- /**
- * @return the heading level of the node. If the node is not heading then
- * "0" will be returned.
- */
- short getHeadingLevel();
-
- /**
- * @return the link URI if the node is a link.
- */
- String getLinkURI();
-
- /**
- * @return the access key of the node.
- */
- char getAccessKey();
-
- /**
- * This maybe a heavy task.
- *
- * @return the nth position of the node in the siblings.
- */
- int getNth();
-
- /**
- * The click operation for the element will be simulated.
- *
- * @return whether the click is succeeded or not.
- */
- boolean doClick();
-
- /**
- * Highlight the node.
- *
- * @return whether the highlight is succeeded or not
- */
- boolean highlight();
-
- /**
- * Unhighlight the node.
- *
- * @return whether the unhighlight is succeeded or not
- */
- boolean unhighlight();
-
- /**
- * Set the Focus to the node.
- *
- * @return whether the focusing is succeeded or not.
- */
- boolean setFocus();
-
- /**
- * Set the text to the node.
- *
- * @param text
- * the text to be set.
- */
- void setText(String text);
-
- /**
- * @return the text of the form element. It is NOT the text representation
- * of the node.
- */
- String getText();
-
- // !FN!
- /**
- * @return the string array of the information about the image. The array
- * length is 3. Index 0 is the MIMETYPE of the image, Index 1 is the
- * src attribute of the image, Index 2 is an empty string.
- */
- String[] getStillPictureData();
-
- /**
- * @param ar
- * the instance of the AnalyzedResult for store the nodes.
- * @return it is the same as <i>ar</i>
- */
- AnalyzedResult analyze(AnalyzedResult ar);
-
- /**
- * @return the location of the node on the client window.
- */
- Rectangle getLocation();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/INodeExSound.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/INodeExSound.java
deleted file mode 100644
index 30021f8..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/INodeExSound.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom;
-
-/**
- * INodeExSound interface defines the methods to be implemented by the sound
- * object.
- */
-public interface INodeExSound {
- /**
- * The minimum volume value. Each implementation convert the 0-1090 scale to
- * the original scale.
- */
- int VOLUME_MIN = 0;
- /**
- * The maximum volume value. Each implementation convert the 0-1000 scale to
- * the original scale.
- */
- int VOLUME_MAX = 1000;
-
- /**
- * @return whether the sound object is muted or not.
- */
- boolean getMuteState();
-
- /**
- * @param flag whether the sound object will be muted or not.
- * @return whether the operation is succeeded or not.
- */
- boolean muteMedia(boolean flag);
-
- // 0 -- 1000
- /**
- * @return the volume.
- */
- int getVolume();
-
- /**
- * @param val the volume
- * @return whether the operation is succeeded or not.
- */
- boolean setVolume(int val);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/INodeExVideo.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/INodeExVideo.java
deleted file mode 100644
index 07fb364..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/INodeExVideo.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom;
-
-/**
- * INodeExVideo interface defines the methods to be implemented by the video
- * object.
- */
-public interface INodeExVideo {
- /**
- * The enumeration of the state of the video.
- */
- public enum VideoState {
- STATE_UNKNOWN, //
- STATE_PLAY, //
- STATE_STOP, //
- STATE_PAUSE, //
- STATE_FASTFORWARD, //
- STATE_FASTREVERSE, //
- STATE_WAITING
- };
-
- /**
- * @return the current state.
- */
- VideoState getCurrentState();
-
- /**
- * @return whether the operation is succeeded or not.
- */
- boolean previousTrack();
-
- /**
- * @return whether the operation is succeeded or not.
- */
- boolean nextTrack();
-
- /**
- * @return whether the operation is succeeded or not.
- */
- boolean stopMedia();
-
- /**
- * @return whether the operation is succeeded or not.
- */
- boolean playMedia();
-
- /**
- * @return whether the operation is succeeded or not.
- */
- boolean pauseMedia();
-
- /**
- * @return whether the operation is succeeded or not.
- */
- boolean fastReverse();
-
- /**
- * @return whether the operation is succeeded or not.
- */
- boolean fastForward();
-
- /**
- * @return the current playing position in seconds.
- */
- double getCurrentPosition();
-
- /**
- * @return the total media length in seconds.
- */
- double getTotalLength();
-
- /**
- * @return the HTML element corresponding to the video object.
- */
- INodeEx getReferenceNode();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IObjectElementFactory.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IObjectElementFactory.java
deleted file mode 100644
index baffd23..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IObjectElementFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.dombycom;
-
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-/**
- * IObjectElementFactory interface defines the methods to be implemented by the
- * extension of the DOM object.
- */
-public interface IObjectElementFactory {
-
- /**
- * @param base an instance of INodeEx which becomes the base of the new Node.
- * @param inode the instance of the IDispatch which is the target to create.
- * @return the new node of wrapper of the <i>inode</i>.
- */
- public NodeImpl createTopNode(NodeImpl base, IDispatch inode);
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/ISelectElement.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/ISelectElement.java
deleted file mode 100644
index 6a4e68a..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/ISelectElement.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom;
-
-/**
- * ISelectElement interface defines the methods to be implemented by the form
- * select element such as combo box and list box.
- */
-public interface ISelectElement extends INodeEx {
- /**
- * @param indices
- * the indices to be set.
- */
- public void setSelectedIndices(int[] indices);
-
- /**
- * @return the selected indices.
- */
- public int[] getSelectedIndices();
-
- /**
- * @return the total number of the item in the select.
- */
- public int getOptionsCount();
-
- /**
- * @param index the index of the option to be obtained.
- * @return the text of the item specified by the <i>index</i>.
- */
- public String getOptionTextAt(int index);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IStyle.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IStyle.java
deleted file mode 100644
index 9a9576d..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/IStyle.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom;
-
-/**
- * IStyle interface defines the simplest methods to be implemented by HTML Style
- * object.
- */
-public interface IStyle {
- /**
- * @param name the style name.
- * @param value the style value.
- * @return whether the operation is succeeded or not.
- */
- boolean put(String name, String value);
-
- /**
- * @param name the style name to be obtained.
- * @return the value of the style. It might be a String, a Number, or a Object.
- */
- Object get(String name);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/AttrImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/AttrImpl.java
deleted file mode 100644
index b04448c..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/AttrImpl.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.TypeInfo;
-
-
-
-public class AttrImpl extends NodeImpl implements Attr {
- AttrImpl(NodeImpl baseNode, IDispatch inode) {
- super(baseNode, inode, Node.ATTRIBUTE_NODE);
- }
-
- public String getName() {
- return (String) Helper.get(inode, "name");
- }
-
- public boolean getSpecified() {
- // We regard `this' attribute is always specified in HTML DOM whenever `this' exists.
- return true;
- }
-
- public String getValue() {
- return (String) Helper.get(inode, "value");
- }
-
- public void setValue(String value) throws DOMException {
- Helper.put(inode, "value", value);
- }
-
- public Element getOwnerElement() {
- IDispatch i = (IDispatch) Helper.get(inode, "parentNode");
- if (i == null) return null;
- return (Element) newNode(i, Node.ELEMENT_NODE);
- }
-
- public TypeInfo getSchemaTypeInfo() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean isId() {
- // TODO Auto-generated method stub
- return false;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/DocumentImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/DocumentImpl.java
deleted file mode 100644
index e1ae908..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/DocumentImpl.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.actf.model.dom.dombycom.IDocumentEx;
-import org.eclipse.actf.model.dom.dombycom.impl.html.HTMLElementFactory;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.actf.util.win32.comclutch.IEnumUnknown;
-import org.eclipse.actf.util.win32.comclutch.IOleContainer;
-import org.eclipse.actf.util.win32.comclutch.IUnknown;
-import org.w3c.dom.Attr;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Comment;
-import org.w3c.dom.DOMConfiguration;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-
-
-public class DocumentImpl extends NodeImpl implements IDocumentEx {
- private IDispatch htmlDocument;
-
- // Unique ID -> NodeImpl
- private HashMap<String, NodeImpl> inodeMap;
-
- synchronized NodeImpl lookupNode(String uniqueName) {
- NodeImpl n = inodeMap.get(uniqueName);
- return n;
- }
-
- synchronized void regNode(String uniqueName, NodeImpl node) {
- inodeMap.put(uniqueName, node);
- }
-
- public DocumentImpl(IDispatch htmlDocument) {
- super(htmlDocument);
- inodeMap = new HashMap<String, NodeImpl>();
- this.htmlDocument = htmlDocument;
- }
-
- public Element getDocumentElement() {
- IDispatch inode = (IDispatch) Helper.get(htmlDocument, "documentElement");
- return (Element) newNode(inode, Node.ELEMENT_NODE);
- }
-
- public DocumentType getDoctype() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public DOMImplementation getImplementation() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public DocumentFragment createDocumentFragment() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Text createTextNode(String data) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Comment createComment(String data) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public CDATASection createCDATASection(String data) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Attr createAttribute(String name) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public EntityReference createEntityReference(String name) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public NodeList getElementsByTagName(String tagname) {
- IDispatch r = (IDispatch) inode.invoke1("getElementsByTagName", tagname);
- if (r == null)
- return null;
- return new NodeListImpl(this, r);
- }
-
- public Node importNode(Node importedNode, boolean deep) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Element getElementById(String elementId) {
- IDispatch i = (IDispatch) inode.invoke1("getElementById", elementId);
- if (i == null)
- return null;
- return (Element) newNode(i, Node.ELEMENT_NODE);
- }
-
- public List getElementsByIdInAllFrames(String id) {
- List<Node> r = new ArrayList<Node>();
- Element e = getElementById(id);
- if (e != null)
- r.add(e);
-
- List<Node> ids = getElementsByIdInFrames(htmlDocument, id);
- if (ids != null)
- r.addAll(ids);
- return r;
- }
-
- private List<Node> getElementsByIdInFrames(IDispatch htmlDocument, String id) {
- if (!hasFrames(htmlDocument))
- return null;
-
- List<Node> r = new ArrayList<Node>();
- IOleContainer iole = (IOleContainer) htmlDocument.queryInterface(IUnknown.IID_IOleContainer);
- IEnumUnknown ieu = iole.enumObjects(IOleContainer.OLECONTF_EMBEDDINGS);
-
- if (ieu != null) {
- IUnknown[] iunks;
- for (iunks = ieu.next(1); iunks != null && iunks.length > 0; iunks = ieu.next(1)) {
- try {
- IDispatch idisp = (IDispatch) iunks[0].queryInterface(IUnknown.IID_IWebBrowser2);
- if (idisp != null) {
- IDispatch d = (IDispatch) Helper.get(idisp, "Document");
- if (d == null)
- continue;
- List<Node> r2 = getElementsByIdInFrames(d, id);
- if (r2 != null)
- r.addAll(r2);
- IDispatch in = (IDispatch) d.invoke1("getElementById", id);
- if (in == null)
- continue;
- Node n = newNode(in, Node.ELEMENT_NODE);
- if (n == null)
- continue;
- r.add(n);
- }
- } catch (DispatchException ex) {
- }
- }
- }
- return r;
- }
-
- private boolean hasFrames(IDispatch htmlDocument) {
- IDispatch r = (IDispatch) htmlDocument.invoke1("getElementsByTagName", "frame");
- if (r != null) {
- NodeListImpl nl = new NodeListImpl(this, r);
- if (nl.getLength() > 0)
- return true;
- }
-
- r = (IDispatch) htmlDocument.invoke1("getElementsByTagName", "iframe");
- if (r != null) {
- NodeListImpl nl = new NodeListImpl(this, r);
- if (nl.getLength() > 0)
- return true;
- }
-
- return false;
- }
-
- public String getInputEncoding() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getXmlEncoding() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean getXmlStandalone() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
- // TODO Auto-generated method stub
-
- }
-
- public String getXmlVersion() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setXmlVersion(String xmlVersion) throws DOMException {
- // TODO Auto-generated method stub
-
- }
-
- public boolean getStrictErrorChecking() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void setStrictErrorChecking(boolean strictErrorChecking) {
- // TODO Auto-generated method stub
-
- }
-
- public String getDocumentURI() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setDocumentURI(String documentURI) {
- // TODO Auto-generated method stub
-
- }
-
- public Node adoptNode(Node source) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public DOMConfiguration getDomConfig() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void normalizeDocument() {
- // TODO Auto-generated method stub
-
- }
-
- public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Element getTargetElement(String target) {
- NodeList list = getElementsByTagName("A");
- for (int i = 0; i < list.getLength(); i++) {
- Element el = (Element) list.item(i);
- if (target.equals(el.getAttribute("name"))) {
- return el;
- }
- }
-
- return getElementById(target);
- }
-
- // --------------------------------------------------------------------------------
- // private extension
- // --------------------------------------------------------------------------------
-
- public StyleSheetImpl createStyleSheet() {
- try {
- if (inode == null)
- return null;
- IDispatch r = (IDispatch) inode.invoke0("createStyleSheet");
- if (r == null)
- return null;
- return new StyleSheetImpl(r);
- } catch (DispatchException e) {
- return null;
- }
- }
-
- public Element createElement(String tagName) throws DOMException {
- return HTMLElementFactory.createElement(this, inode, tagName);
- }
-
- public String getCompatMode() {
- return (String) Helper.get(htmlDocument, "compatMode");
- }
-
- public IDispatch getWindow() {
- return (IDispatch) Helper.get(inode, "parentWindow");
- }
-
- public IDispatch getDocument() {
- return (IDispatch) Helper.get(inode, "documentElement");
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/Helper.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/Helper.java
deleted file mode 100644
index 8a637dd..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/Helper.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.swt.graphics.Rectangle;
-import org.w3c.dom.DOMException;
-
-
-
-public class Helper {
- static public Object get(IDispatch idisp, String prop) {
- try {
- if (idisp == null) return null;
- return idisp.get(prop);
- } catch (DispatchException e) {
- //e.printStackTrace();
- return null;
- }
- }
- static public boolean put(IDispatch idisp, String prop, Object val) {
- try {
- idisp.put(prop, val);
- return true;
- } catch (DispatchException e) {
- e.printStackTrace();
- return false;
- }
- }
-
- static public boolean hasProperty(IDispatch idisp, String prop) {
- try {
- Object r = idisp.get(prop);
- if (r != null) return true;
- } catch (DispatchException e) {
- }
- return false;
- }
-
- static public String trimHTMLStr(String src) {
- src = src.trim();
- StringBuffer ret = new StringBuffer();
- for (int i = 0; i < src.length(); i++) {
- char c = src.charAt(i);
- if (c == '\u00a0') {
- //
- } else {
- ret.append(c);
- }
- }
- String r = ret.toString();
- // if (r.matches("\\A([\\uff5c\\u30fb|])\\z")) return "";
- return r;
- }
-
- static public void notSupported() throws DOMException {
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
- "The specified node must be created by DomByCom"); // $NON-NLS-1$
- }
-
- static public Rectangle getLocation(IDispatch idisp) {
- Rectangle r = new Rectangle(0, 0, 0, 0);
- getOffset(idisp, r);
-
- r.width = (Integer) Helper.get(idisp, "offsetWidth");
- r.height = (Integer) Helper.get(idisp, "offsetHeight");
-
- return r;
- }
-
- private static void getOffset(IDispatch inode, Rectangle r) {
- int ol = (Integer) Helper.get(inode, "offsetLeft");
- int ot = (Integer) Helper.get(inode, "offsetTop");
-
- r.x += ol;
- r.y += ot;
-
- IDispatch parent = (IDispatch) Helper.get(inode, "offsetParent");
- //System.out.println(r);
- if (parent == null)
- return;
- getOffset(parent, r);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/ListNodeListImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/ListNodeListImpl.java
deleted file mode 100644
index 00db796..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/ListNodeListImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import java.util.List;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-
-public class ListNodeListImpl implements NodeList {
- private final List<Node> l;
-
- public Node item(int index) {
- if ((index < 0) || (index >= l.size())) return null;
- return (Node) l.get(index);
- }
-
- public int getLength() {
- return l.size();
- }
-
- public ListNodeListImpl(List<Node> l) {
- this.l = l;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NamedNodeMapImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NamedNodeMapImpl.java
deleted file mode 100644
index e1da340..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NamedNodeMapImpl.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import java.util.HashMap;
-
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-
-
-public class NamedNodeMapImpl implements NamedNodeMap {
- private IDispatch attributes;
- private HashMap<AttrKey, Node> attrMap;
- private NodeImpl baseNode;
-
- private static class AttrKey {
- String ns;
- String name;
-
- @Override
- public boolean equals(Object o) {
- if (!(o instanceof AttrKey)) return false;
- AttrKey ak = (AttrKey) o;
- return ns.equals(ak.ns) && name.equals(ak.name);
- }
-
- @Override
- public int hashCode() {
- return ns.hashCode() ^ name.hashCode();
- }
-
- AttrKey(String ns, String name) {
- this.ns = ns;
- this.name = name;
- }
- }
-
- public NamedNodeMapImpl(NodeImpl baseNode, IDispatch attributes) {
- this.baseNode = baseNode;
- this.attributes = attributes;
- }
-
- private void initCache() {
- if (attrMap != null) return;
- attrMap = new HashMap<AttrKey, Node>();
- int len = getLength();
- for (int i = 0; i < len; i++) {
- Node n = item(i);
- AttrKey key = new AttrKey(n.getNamespaceURI(), n.getLocalName());
- attrMap.put(key, n);
- }
- }
-
- public Node item(int index) {
- try {
- IDispatch i = (IDispatch) attributes.invoke1("item", Integer.valueOf(index));
- return baseNode.newNode(i);
- } catch (DispatchException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- public int getLength() {
- Integer i = (Integer) Helper.get(attributes, "length");
- if (i == null) return 0;
- return i.intValue();
- }
-
- public Node getNamedItem(String name) {
- try {
- IDispatch i = (IDispatch) attributes.invoke1("removeNamedItem", name);
- return baseNode.newNode(i);
- } catch (DispatchException e) {
- return null;
- }
- }
-
- public Node setNamedItem(Node node) throws DOMException {
- if (!(node instanceof NodeImpl)) {
- Helper.notSupported();
- }
- NodeImpl ni = (NodeImpl) node;
- try {
- IDispatch i = (IDispatch) attributes.invoke1("setNamedItem",
- ni.getINode());
- return baseNode.newNode(i);
- } catch (DispatchException e) {
- return null;
- }
- }
-
- public Node removeNamedItem(String name) throws DOMException {
- try {
- IDispatch i = (IDispatch) attributes.invoke1("removeNamedItem", name);
- return baseNode.newNode(i);
- } catch (DispatchException e) {
- return null;
- }
- }
-
- public Node getNamedItemNS(String namespaceURI, String localName) {
- initCache();
- Node n = (Node) attrMap.get(new AttrKey(namespaceURI, localName));
- return n;
- }
-
- public Node setNamedItemNS(Node node) throws DOMException {
- initCache();
- Node n = (Node) attrMap.get(new AttrKey(node.getNamespaceURI(), node.getLocalName()));
- return setNamedItem(n);
- }
-
- public Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException {
- initCache();
- Node n = (Node) attrMap.get(new AttrKey(namespaceURI, localName));
- return removeNamedItem(n.getNodeName());
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NodeImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NodeImpl.java
deleted file mode 100644
index 982631f..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NodeImpl.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import org.eclipse.actf.model.dom.dombycom.AnalyzedResult;
-import org.eclipse.actf.model.dom.dombycom.INodeEx;
-import org.eclipse.actf.model.dom.dombycom.impl.html.HTMLElementFactory;
-import org.eclipse.actf.model.dom.dombycom.impl.object.ObjectElementFactory;
-import org.eclipse.actf.util.vocab.IEvalTarget;
-import org.eclipse.actf.util.vocab.Vocabulary;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.UserDataHandler;
-
-
-
-public class NodeImpl implements Node {
- protected final IDispatch inode;
-
- IDispatch getIDispatch() {
- return inode;
- }
-
- protected final short nodeType;
-
- private NodeImpl parentNode;
-
- private DocumentImpl doc;
-
- String uniqueName;
-
- private static String getUniqueName(IDispatch inode) {
- return (String) Helper.get(inode, "uniqueID");
- }
-
- private NodeImpl newNodeByType(IDispatch inode, short type) {
- switch (type) {
- case Node.ATTRIBUTE_NODE:
- return new AttrImpl(this, inode);
- case Node.DOCUMENT_NODE:
- // return new DocumentImpl(inode);
- // We would like to keep object identity of DocumentImpl.
- // Thus returns the base DocumentImpl that must be the same as the document of "inode".
- return doc;
-
- case Node.CDATA_SECTION_NODE:
- case Node.COMMENT_NODE:
- // case Node.DOCUMENT_FLAGMENT_NODE:
- case Node.DOCUMENT_TYPE_NODE:
- return new NodeImpl(this, inode, type);
-
- case Node.ELEMENT_NODE:
- if (Helper.hasProperty(inode, "contentWindow")) {
- return HTMLElementFactory.create(this, inode, "FrameNode");
- }
- String name = (String) Helper.get(inode, "nodeName");
- if ("OBJECT".equals(name) || "EMBED".equals(name)) {
- NodeImpl newNode = ObjectElementFactory.create(this, inode);
- if (newNode != null)
- return newNode;
- }
- return HTMLElementFactory.create(this, inode, name);
-
- case Node.ENTITY_NODE:
- case Node.ENTITY_REFERENCE_NODE:
- case Node.NOTATION_NODE:
- case Node.PROCESSING_INSTRUCTION_NODE:
- return new NodeImpl(this, inode, type);
- case Node.TEXT_NODE:
- return HTMLElementFactory.create(this, inode, "Text");
-
- default:
- return new NodeImpl(this, inode, type);
- }
- }
-
- NodeImpl newNode(IDispatch inode) {
- if (inode == null)
- return null;
- String uniqueName = getUniqueName(inode);
- if (uniqueName != null) {
- NodeImpl anode = doc.lookupNode(uniqueName);
- if (anode != null) {
- inode.release();
- return anode;
- }
- }
- Integer val = (Integer) Helper.get(inode, "nodeType");
- if (val == null)
- return null;
- short type = (short) val.intValue();
- NodeImpl node = newNodeByType(inode, type);
-
- if (uniqueName != null) {
- node.uniqueName = uniqueName;
- doc.regNode(uniqueName, node);
- }
- return node;
- }
-
- protected NodeImpl newNode(IDispatch inode, short type) {
- if (inode == null)
- return null;
- String uniqueName = getUniqueName(inode);
- if (uniqueName != null) {
- NodeImpl anode = doc.lookupNode(uniqueName);
- if (anode != null) {
- inode.release();
- return anode;
- }
- NodeImpl node = newNodeByType(inode, type);
- node.uniqueName = uniqueName;
- doc.regNode(uniqueName, node);
- return node;
- } else {
- return newNodeByType(inode, type);
- }
- }
-
- protected NodeImpl newNode(IDispatch inode, short type, NodeImpl parent) {
- NodeImpl node = newNode(inode, type);
- node.parentNode = parent;
- return node;
- }
-
- public IDispatch getINode() {
- return inode;
- }
-
- // Special constructor for Document Node.
- NodeImpl(IDispatch inode) {
- this.doc = (DocumentImpl) this;
- this.inode = inode;
- this.nodeType = Node.DOCUMENT_NODE;
- }
-
- protected NodeImpl(NodeImpl baseNode, IDispatch inode, short nodeType) {
- this.doc = baseNode.doc;
- this.inode = inode;
- this.nodeType = nodeType;
- }
-
- private String cachedNodeName = null;
-
- public String getNodeName() {
- if (cachedNodeName == null) {
- cachedNodeName = (String) Helper.get(inode, "nodeName");
- }
- return cachedNodeName;
- }
-
- public String getNodeValue() throws DOMException {
- Object text = Helper.get(inode, "nodeValue");
- if (text == null)
- return null;
- if (text instanceof String)
- return (String) text;
- if (text instanceof IDispatch) {
- return (String) Helper.get((IDispatch) text, "data");
- }
- return null;
- }
-
- public void setNodeValue(String nodeValue) throws DOMException {
- Helper.put(inode, "nodeValue", nodeValue);
- }
-
- public short getNodeType() {
- return nodeType;
- }
-
- public Node getParentNode() {
- if (parentNode == null) {
- IDispatch parent = (IDispatch) Helper.get(inode, "parentNode");
- parentNode = newNode(parent);
- }
- return parentNode;
- }
-
- private NodeListNextSiblingImpl cachedChildNodes;
-
- public NodeList getChildNodes() {
- if (cachedChildNodes != null) {
- cachedChildNodes.initialize();
- } else {
- if (false) {
- // Caution!
- // Due to IE's problem, "childNodes" property may have wrong value
- // unless the document is well-formed. We avoid using this property,
- // and use "nextSibling" instead of that.
- IDispatch nodeCollection = (IDispatch) Helper.get(inode, "childNodes");
- if (nodeCollection == null)
- return null;
- // cachedChildNodes = new NodeListImpl(this, nodeCollection);
- } else {
- cachedChildNodes = new NodeListNextSiblingImpl(this);
- }
- }
- return cachedChildNodes;
- }
-
- public Node getFirstChild() {
- IDispatch firstChild = (IDispatch) Helper.get(inode, "firstChild");
- return newNode(firstChild);
- }
-
- public Node getLastChild() {
- IDispatch lastChild = (IDispatch) Helper.get(inode, "lastChild");
- return newNode(lastChild);
- }
-
- public Node getPreviousSibling() {
- IDispatch previousSibling = (IDispatch) Helper.get(inode, "previousSibling");
- return newNode(previousSibling);
- }
-
- public Node getNextSibling() {
- IDispatch nextSibling = (IDispatch) Helper.get(inode, "nextSibling");
- return newNode(nextSibling);
- }
-
- public NamedNodeMap getAttributes() {
- IDispatch attributes = (IDispatch) Helper.get(inode, "attributes");
- if (attributes == null)
- return null;
- return new NamedNodeMapImpl(this, attributes);
- }
-
- public Document getOwnerDocument() {
- return doc;
- }
-
- public Node insertBefore(Node newChild, Node refChild) throws DOMException {
- if (!((newChild instanceof NodeImpl) && (refChild instanceof NodeImpl))) {
- Helper.notSupported();
- }
- NodeImpl nci = (NodeImpl) newChild;
- NodeImpl rci = (NodeImpl) refChild;
- IDispatch i = (IDispatch) inode.invoke("insertBefore", new Object[] { nci.getINode(), rci.getINode() });
- return newNode(i);
- }
-
- public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
- if (!((newChild instanceof NodeImpl) && (oldChild instanceof NodeImpl))) {
- Helper.notSupported();
- }
- NodeImpl nci = (NodeImpl) newChild;
- NodeImpl oci = (NodeImpl) oldChild;
- IDispatch i = (IDispatch) inode.invoke("replaceChild", new Object[] { nci.getINode(), oci.getINode() });
- return newNode(i);
- }
-
- public Node removeChild(Node oldChild) throws DOMException {
- if (!(oldChild instanceof NodeImpl)) {
- Helper.notSupported();
- }
- NodeImpl oci = (NodeImpl) oldChild;
- IDispatch i = (IDispatch) inode.invoke1("removeChild", oci.getINode());
- return newNode(i);
- }
-
- public Node appendChild(Node newChild) throws DOMException {
- if (!(newChild instanceof NodeImpl)) {
- Helper.notSupported();
- }
- NodeImpl nci = (NodeImpl) newChild;
- IDispatch i = (IDispatch) inode.invoke1("appendChild", nci.getINode());
- return newNode(i);
- }
-
- public boolean hasChildNodes() {
- Boolean b = (Boolean) inode.invoke0("hasChildNodes");
- if (b == null)
- return false;
- return b.booleanValue();
- }
-
- public Node cloneNode(boolean deep) {
- IDispatch i = (IDispatch) inode.invoke1("cloneNode", Boolean.valueOf(deep));
- return newNode(i);
- }
-
- public void normalize() {
- // Do nothing.
- }
-
- public boolean isSupported(String feature, String version) {
- // TODO: Currently we regard all features are not supported.
- return false;
- }
-
- public String getNamespaceURI() {
- String r = (String) Helper.get(inode, "namespaceURI");
- if (r == null) return "";
- // Treat the local namespace as null for XPath 1.0 data model.
- if (r.length() == 0) return "";
- return r;
- }
-
- public String getPrefix() {
- String r = getNodeName();
- if (r == null)
- return "";
- int pos = r.indexOf(":");
- if (pos < 0)
- return "";
- return r.substring(0, pos);
- }
-
- public void setPrefix(String prefix) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public String getLocalName() {
- String r = getNodeName();
- if (r == null)
- return "";
- int pos = r.indexOf(":");
- if (pos < 0)
- return r;
- return r.substring(pos + 1);
- }
-
- public boolean hasAttributes() {
- IDispatch attributes = (IDispatch) Helper.get(inode, "attributes");
- if (attributes == null)
- return false;
- return true;
- }
-
- public String getBaseURI() {
- // No way to obtain base URI!
- return null;
- }
-
- public short compareDocumentPosition(Node other) throws DOMException {
- // We do not support compareDocumentPosition
- return 0;
- }
-
- public String getTextContent() throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public void setTextContent(String textContent) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public boolean isSameNode(Node other) {
- if (this == other)
- return true;
- return false;
- }
-
- public String lookupPrefix(String namespaceURI) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isDefaultNamespace(String namespaceURI) {
- throw new UnsupportedOperationException();
- }
-
- public String lookupNamespaceURI(String prefix) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isEqualNode(Node arg) {
- throw new UnsupportedOperationException();
- }
-
- public Object getFeature(String feature, String version) {
- throw new UnsupportedOperationException();
- }
-
- public Object getUserData(String key) {
- throw new UnsupportedOperationException();
- }
-
- public Object setUserData(String key, Object data, UserDataHandler handler) {
- // TODO Auto-generated method stub
- return null;
- }
-
- // --------------------------------------------------------------------------------
- // INodeEx interface
- // --------------------------------------------------------------------------------
- public String getLinkURI() {
- String uri = (String) Helper.get(inode, "href");
- if (uri == null) {
- Node p = getParentNode();
- if (p instanceof INodeEx) {
- return ((INodeEx) p).getLinkURI();
- }
- return null;
- }
- return uri;
- }
-
- public short getHeadingLevel() {
- Node parent = getParentNode();
- if (parent instanceof INodeEx) {
- return ((INodeEx) parent).getHeadingLevel();
- }
- return (short) 0;
- }
-
- public AnalyzedResult analyze(AnalyzedResult ar) {
- if (!Vocabulary.isValidNode().eval((IEvalTarget) this))
- return ar;
- Node n = getFirstChild();
-
- while (n != null) {
- if (n instanceof INodeEx) {
- ar = ((INodeEx) n).analyze(ar);
- }
- n = n.getNextSibling();
- }
- return ar;
- }
-
- public void setText(String text) {
- if (Helper.hasProperty(inode, "value")) {
- Helper.put(inode, "value", text);
- } else {
- NodeImpl element = (NodeImpl) getParentNode();
- if ("TEXTAREA".equals(element.getLocalName())) {
- IDispatch tr = (IDispatch) element.inode.invoke0("createTextRange");
- Helper.put(tr, "text", text);
- }
- }
- }
-
- public String getText() {
- String ret = "";
- if (Helper.hasProperty(inode, "value")) {
- Object obj = Helper.get(inode, "value");
- if(obj instanceof String){
- return (String)obj;
- }else if(null != obj){
- //TODO check other case
- //System.err.println(obj+" "+obj.toString());
- return obj.toString();
- }
- } else {
- NodeImpl element = (NodeImpl) getParentNode();
- if ("TEXTAREA".equals(element.getLocalName())) {
- IDispatch tr = (IDispatch) element.inode.invoke0("createTextRange");
- ret = (String) Helper.get(tr, "text");
- }
- }
- if (ret == null)
- return "";
- return ret;
- }
-
- public int getNth() {
- IDispatch current = inode;
- int i;
- for (i = 1; current != null; i++) {
- current = (IDispatch) Helper.get(current, "previousSibling");
- }
- return i;
- }
-
- public String getUniqueID() {
- return (String) Helper.get(inode, "uniqueID");
- }
-
- // !FN!
- public String[] getStillPictureData() {
- String[] ret = new String[3];
- ret[1] = (String) Helper.get(inode, "src");
- ret[2] = "";
- String mt = (String) Helper.get(inode, "mimeType");
- if (mt == null) {
- ret[0] = "";
- } else {
- mt = mt.toUpperCase();
- if (mt.contains("GIF")) {
- ret[0] = "image/gif";
- } else if (mt.contains("JPEG")) {
- ret[0] = "image/jpeg";
- } else if (mt.contains("PNG")) {
- ret[0] = "image/png";
- } else {
- ret[0] = "";
- }
- }
- return ret;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NodeListImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NodeListImpl.java
deleted file mode 100644
index 6f62015..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NodeListImpl.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-
-public class NodeListImpl implements NodeList {
- private IDispatch inodeCollection;
- private NodeImpl baseNode;
-
- public NodeListImpl(NodeImpl baseNode, IDispatch inodeCollection) {
- this.baseNode = baseNode;
- this.inodeCollection = inodeCollection;
- }
-
- public Node item(int index) {
- try {
- IDispatch i = (IDispatch) inodeCollection.invoke1("item", Integer.valueOf(index));
- return baseNode.newNode(i);
- } catch (DispatchException e) {
- return null;
- }
- }
-
- public int getLength() {
- Integer i = (Integer) Helper.get(inodeCollection, "length");
- if (i == null) return 0;
- return i.intValue();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NodeListNextSiblingImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NodeListNextSiblingImpl.java
deleted file mode 100644
index bf8bbc1..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/NodeListNextSiblingImpl.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import java.util.ArrayList;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-public class NodeListNextSiblingImpl implements NodeList {
- private ArrayList<NodeImpl> inodeList = new ArrayList<NodeImpl>();
-
- private final NodeImpl baseNode;
-
- public NodeListNextSiblingImpl(NodeImpl baseNode) {
- this.baseNode = baseNode;
- initialize();
- }
-
- public void initialize() {
- inodeList.clear();
- NodeImpl node = (NodeImpl) baseNode.getFirstChild();
- while (node != null) {
- if ("HTML".equals(node.getNodeName()) && !("#document".equals(baseNode.getNodeName()))) {
- node = (NodeImpl) node.getNextSibling();
- continue;
- }
-
- inodeList.add(node);
- node = (NodeImpl) node.getNextSibling();
- }
- }
-
- public Node item(int index) {
- try {
- return inodeList.get(index);
- } catch (IndexOutOfBoundsException e) {
- return null;
- }
- }
-
- public int getLength() {
- return inodeList.size();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/SingletonNodeListImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/SingletonNodeListImpl.java
deleted file mode 100644
index 07e02db..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/SingletonNodeListImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-
-public class SingletonNodeListImpl implements NodeList {
- private final Node node;
- public Node item(int index) {
- if (index == 0) return node;
- return null;
- }
-
- public int getLength() {
- return 1;
- }
-
- public SingletonNodeListImpl(Node node) {
- this.node = node;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/StyleImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/StyleImpl.java
deleted file mode 100644
index e441b06..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/StyleImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import org.eclipse.actf.model.dom.dombycom.IStyle;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-
-
-
-public class StyleImpl implements IStyle {
-
- IDispatch style;
-
- public StyleImpl(IDispatch style){
- this.style = style;
- }
-
- public Object get(String name) {
- return Helper.get(style, name);
- }
-
- public boolean put(String name, String value) {
- return Helper.put(style, name, value);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/StyleSheetImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/StyleSheetImpl.java
deleted file mode 100644
index d3b424c..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/StyleSheetImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl;
-
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-
-public class StyleSheetImpl {
- private IDispatch idispatch;
-
- public StyleSheetImpl(IDispatch idispatch) {
- this.idispatch = idispatch;
- }
-
- public void addRule(String selector, String style) {
- idispatch.invoke("addRule", new Object[]{selector, style});
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/CharacterDataImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/CharacterDataImpl.java
deleted file mode 100644
index b049c4e..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/CharacterDataImpl.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.html;
-
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.vocab.AbstractTerms;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.DOMException;
-
-
-
-abstract class CharacterDataImpl extends NodeImpl implements CharacterData {
- CharacterDataImpl(NodeImpl baseNode, IDispatch inode, short type) {
- super(baseNode, inode, type);
- }
-
- public String getData() throws DOMException {
- return (String) Helper.get(inode, "data");
- }
-
- public void setData(String data) throws DOMException {
- Helper.put(inode, "data", data);
- }
-
- public int getLength() {
- Integer i = (Integer) Helper.get(inode, "length");
- if (i == null) return 0;
- return i.intValue();
- }
-
- public String substringData(int offset, int count) throws DOMException {
- String r = (String) inode.invoke("substringData",
- new Object[]{Integer.valueOf(offset),
- Integer.valueOf(count)});
- return r;
- }
-
- public void appendData(String str) throws DOMException {
- inode.invoke1("appendData", str);
- }
-
- public void insertData(int offset, String str) throws DOMException {
- inode.invoke("insertData",
- new Object[]{Integer.valueOf(offset), str});
- }
-
- public void deleteData(int offset, int count) throws DOMException {
- inode.invoke("deleteData",
- new Object[]{Integer.valueOf(offset),
- Integer.valueOf(count)});
- }
-
- public void replaceData(int offset, int count, String str) throws DOMException {
- inode.invoke("replaceData",
- new Object[]{Integer.valueOf(offset),
- Integer.valueOf(count),
- str});
- }
-
- public AbstractTerms getTerms(){
- return HTMLTerms.getInstance();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/ElementImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/ElementImpl.java
deleted file mode 100644
index 908cbdd..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/ElementImpl.java
+++ /dev/null
@@ -1,759 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.html;
-
-import java.util.HashSet;
-
-import org.eclipse.actf.model.dom.dombycom.AnalyzedResult;
-import org.eclipse.actf.model.dom.dombycom.DomByCom;
-import org.eclipse.actf.model.dom.dombycom.IDocumentEx;
-import org.eclipse.actf.model.dom.dombycom.IElementEx;
-import org.eclipse.actf.model.dom.dombycom.INodeEx;
-import org.eclipse.actf.model.dom.dombycom.IStyle;
-import org.eclipse.actf.model.dom.dombycom.impl.AttrImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.DocumentImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NamedNodeMapImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeListImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.StyleImpl;
-import org.eclipse.actf.util.vocab.AbstractTerms;
-import org.eclipse.actf.util.vocab.Vocabulary;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.swt.graphics.Rectangle;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.TypeInfo;
-
-public class ElementImpl extends NodeImpl implements IElementEx {
- protected ElementImpl(NodeImpl baseNode, IDispatch inode) {
- super(baseNode, inode, Node.ELEMENT_NODE);
- }
-
- protected ElementImpl(DocumentImpl baseDoc, IDispatch inode) {
- super(baseDoc, inode, Node.ELEMENT_NODE);
- }
-
- public String getTagName() {
- return (String) Helper.get(inode, "tagName");
- }
-
- private static final Integer getSetAttributeFlag = Integer.valueOf(2);
-
- public String getAttribute(String name) {
- IDispatch r = (IDispatch) inode.invoke1("getAttributeNode", name);
- if (r == null)
- return null;
- Boolean b = (Boolean) Helper.get(r, "specified");
- if (!b.booleanValue())
- return null;
- return (String) Helper.get(r, "value");
- }
-
- public void setAttribute(String name, String value) throws DOMException {
- inode.invoke("setAttribute", new Object[] { name, value,
- getSetAttributeFlag });
- }
-
- public void removeAttribute(String name) throws DOMException {
- inode.invoke1("removeAttribute", name);
- }
-
- public String getCurrentAttribute(String name) {
- String r = (String) inode.invoke("getAttribute", new Object[] { name,
- getSetAttributeFlag });
- return r;
- }
-
- // public String getSpecifiedAttribute(String name) {
- // IDispatch r = (IDispatch) inode.invoke1("getAttributeNode", name);
- // if (r == null)
- // return null;
- // Boolean b = (Boolean) Helper.get(r, "specified");
- // if (!b.booleanValue())
- // return null;
- // return (String) Helper.get(r, "value");
- // }
-
- public Attr getAttributeNode(String name) {
- IDispatch r = (IDispatch) inode.invoke1("getAttributeNode", name);
- if (r == null)
- return null;
- return (Attr) newNode(r, Node.ATTRIBUTE_NODE);
- }
-
- public Attr setAttributeNode(Attr newAttr) throws DOMException {
- if (!(newAttr instanceof AttrImpl)) {
- Helper.notSupported();
- }
- AttrImpl a = (AttrImpl) newAttr;
- IDispatch r = (IDispatch) inode.invoke1("setAttributeNode", a
- .getINode());
- if (r == null)
- return null;
- return (Attr) newNode(r, Node.ATTRIBUTE_NODE);
- }
-
- public Attr removeAttributeNode(Attr oldAttr) throws DOMException {
- if (!(oldAttr instanceof AttrImpl)) {
- Helper.notSupported();
- }
- AttrImpl a = (AttrImpl) oldAttr;
- IDispatch r = (IDispatch) inode.invoke1("removeAttributeNode", a
- .getINode());
- if (r == null)
- return null;
- return (Attr) newNode(r, Node.ATTRIBUTE_NODE);
- }
-
- public NodeList getElementsByTagName(String name) {
- IDispatch r = (IDispatch) inode.invoke1("getElementsByTagName", name);
- if (r == null)
- return null;
- return new NodeListImpl(this, r);
- }
-
- private NamedNodeMapImpl cachedAttributes;
-
- private void initCache() {
- if (cachedAttributes != null)
- return;
- cachedAttributes = (NamedNodeMapImpl) getAttributes();
- }
-
- public String getAttributeNS(String namespaceURI, String localName) {
- initCache();
- Attr a = (Attr) cachedAttributes
- .getNamedItemNS(namespaceURI, localName);
- if (a == null)
- return null;
- return a.getValue();
- }
-
- public void setAttributeNS(String namespaceURI, String qualifiedName,
- String value) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public void removeAttributeNS(String namespaceURI, String localName)
- throws DOMException {
- initCache();
- Attr a = (Attr) cachedAttributes
- .getNamedItemNS(namespaceURI, localName);
- if (a == null)
- return;
- removeAttributeNode(a);
- }
-
- public Attr getAttributeNodeNS(String namespaceURI, String localName) {
- initCache();
- Attr a = (Attr) cachedAttributes
- .getNamedItemNS(namespaceURI, localName);
- if (a == null)
- return null;
- return a;
- }
-
- public Attr setAttributeNodeNS(Attr newAttr) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasAttribute(String name) {
- String val = getAttribute(name);
- if (val == null)
- return false;
- return true;
- }
-
- public boolean hasAttributeNS(String namespaceURI, String localName) {
- String val = getAttributeNS(namespaceURI, localName);
- if (val == null)
- return false;
- return true;
- }
-
- public TypeInfo getSchemaTypeInfo() {
- throw new UnsupportedOperationException();
- }
-
- public void setIdAttribute(String name, boolean isId) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public void setIdAttributeNS(String namespaceURI, String localName,
- boolean isId) throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- public void setIdAttributeNode(Attr idAttr, boolean isId)
- throws DOMException {
- throw new UnsupportedOperationException();
- }
-
- // --------------------------------------------------------------------------------
- // INodeEx interface
- // --------------------------------------------------------------------------------
-
- public boolean doClick() {
- try {
- if ("OPTION".equals(getLocalName())) {
- Helper.put(inode, "selected", Boolean.valueOf(true));
- return true;
- } else if ("SELECT".equals(getLocalName())) {
- return false;
- }
- inode.invoke0("click");
- return true;
- } catch (DispatchException e) {
- e.printStackTrace();
- return false;
- }
- }
-
- private String originalBorder;
-
- public boolean highlight() {
- if (DomByCom.BORDER_MODE == DomByCom.STYLE_BORDER) {
- String className = (String) Helper.get(inode, "className");
- if (className == null)
- return false;
- className += " CSStoHighlight";
- Helper.put(inode, "className", className);
- } else if (DomByCom.BORDER_MODE == DomByCom.DIV_BORDER) {
- Element div = getOwnerDocument().getElementById(DomByCom.ID_DIV);
- IStyle style = ((IElementEx) div).getStyle();
-
- Rectangle r = Helper.getLocation(inode);
-
- String compatMode = ((IDocumentEx) getOwnerDocument())
- .getCompatMode();
- int w = 0;
- if (compatMode.equals(IDocumentEx.CSS1_COMPAT)) {
- w = 0;
- } else if (compatMode.equals(IDocumentEx.BACK_COMPAT)) {
- w = DomByCom.DIV_BORDER_WIDTH * 2;
- }
-
- style.put("left", (r.x - DomByCom.DIV_BORDER_WIDTH) + "px");
- style.put("top", (r.y - DomByCom.DIV_BORDER_WIDTH) + "px");
- style.put("width", (r.width + w) + "px");
- style.put("height", (r.height + w) + "px");
- } else if (DomByCom.BORDER_MODE == DomByCom.STYLE_BORDER2) {
- IDispatch style = (IDispatch) Helper.get(inode, "style");
- if (style == null)
- return false;
- originalBorder = (String) Helper.get(style, "cssText");
- String border = originalBorder + DomByCom.BORDER_STYLE_STRING;
- Helper.put(style, "cssText", border);
- }
-
- try {
- inode.invoke0("scrollIntoView");
- inode.invoke0("onmouseover");
- return true;
- } catch (DispatchException e) {
- }
- return false;
- }
-
- public boolean unhighlight() {
- if (DomByCom.BORDER_MODE == DomByCom.STYLE_BORDER) {
- String className = (String) Helper.get(inode, "className");
- if (className == null)
- return false;
- String newClassName = className.replaceAll(" CSStoHighlight", "");
- Helper.put(inode, "className", newClassName);
- } else if (DomByCom.BORDER_MODE == DomByCom.DIV_BORDER) {
- Element div = getOwnerDocument().getElementById(DomByCom.ID_DIV);
- IStyle style = ((IElementEx) div).getStyle();
- style.put("left", "-1000px");
- style.put("top", "-1000px");
- style.put("width", "100px");
- style.put("height", "100px");
- } else if (DomByCom.BORDER_MODE == DomByCom.STYLE_BORDER2) {
- IDispatch style = (IDispatch) Helper.get(inode, "style");
- if (style == null)
- return false;
- Helper.put(style, "cssText", originalBorder);
- }
-
- try {
- inode.invoke0("onmouseout");
- } catch (DispatchException e) {
- }
- return false;
- }
-
- static class InputType {
- public enum InputClass {
- EDIT, BUTTON, RADIO, CHECKBOX, COMBOBOX, HIDDEN, PASSWORD, FILE
- }
-
- private final InputClass inputClass;
-
- private final String uiString;
-
- String getUIString() {
- return uiString;
- }
-
- boolean isEdit() {
- return (inputClass == InputClass.EDIT);
- }
-
- boolean isFileEdit() {
- return (inputClass == InputClass.FILE);
- }
-
- boolean isButton() {
- return (inputClass == InputClass.BUTTON);
- }
-
- boolean isRadio() {
- return (inputClass == InputClass.RADIO);
- }
-
- boolean isCheckBox() {
- return (inputClass == InputClass.CHECKBOX);
- }
-
- boolean isComboBox() {
- return (inputClass == InputClass.COMBOBOX);
- }
-
- boolean isHidden() {
- return (inputClass == InputClass.HIDDEN);
- }
-
- boolean isPassword() {
- return (inputClass == InputClass.PASSWORD);
- }
-
- boolean isClickable() {
- return (isButton() || isRadio() || isCheckBox() || isComboBox());
- }
-
- final String htmlType;
-
- InputType(String uiString, String htmlType, InputClass inputClass) {
- this.uiString = uiString;
- this.htmlType = htmlType;
- this.inputClass = inputClass;
- }
-
- }
-
- private static final InputType[] HTMLINPUTCLASSES = new InputType[] {
- new InputType("edit", "text", InputType.InputClass.EDIT),
- new InputType("password edit", "password",
- InputType.InputClass.PASSWORD),
- new InputType("radio button", "radio", InputType.InputClass.RADIO),
- new InputType("checkbox", "checkbox", InputType.InputClass.CHECKBOX),
- new InputType("file upload edit", "file", InputType.InputClass.FILE),
- new InputType("", "hidden", InputType.InputClass.HIDDEN),
- new InputType("button", "submit", InputType.InputClass.BUTTON),
- new InputType("reset button", "reset", InputType.InputClass.BUTTON),
- new InputType("button", "button", InputType.InputClass.BUTTON),
- new InputType("button", "image", InputType.InputClass.BUTTON) };
-
- InputType getInputType() {
- Object o = Helper.get(inode, "type");
- if (!(o instanceof String))
- return null;
- String type = (String) o;
- for (int i = 0; i < HTMLINPUTCLASSES.length; i++) {
- if (type.equals(HTMLINPUTCLASSES[i].htmlType)) {
- return HTMLINPUTCLASSES[i];
- }
- }
- return null;
- }
-
- private String getInputValue() {
- return (String) Helper.get(inode, "value");
- }
-
- private String modifySrcStr(String src) {
- int st = src.lastIndexOf('/');
- int end = src.lastIndexOf('?');
- if (end == -1)
- end = src.length();
- if (st < 0) {
- if (end < 0)
- return src;
- st = 0;
- } else {
- st++;
- }
- if (end <= st) {
- return src.substring(st);
- } else {
- return src.substring(st, end);
- }
- }
-
- public String extractString() {
- String name = getLocalName();
- if ("IMG".equals(name)) {
-
- String alt = getAttribute("alt");
- if (alt != null) {
- alt = Helper.trimHTMLStr(alt);
- }
- String title = getAttribute("title");
- if (title != null) {
- title = Helper.trimHTMLStr(title);
- if (alt == null || alt.length() == 0)
- alt = title;
- }
-
- String src = getAttribute("src");
- if (src != null) {
- src = modifySrcStr(src);
- }
-
- boolean noAlt = (alt == null);
- boolean nullAlt = ((alt != null) && (alt.length() == 0));
- boolean isLink = Vocabulary.isLink().eval(this);
-
- if (isLink) {
- if (noAlt) {
- if (Vocabulary.isReadNoAltImageLink()) {
- return src;
- } else {
- return "";
- }
- } else if (nullAlt && Vocabulary.isReadNullAltImageLink()) {
- if (false) {
- if (anyTextInParentLink())
- return alt;
- }
- return src;
- }
- return alt;
- } else {
- if (noAlt) {
- if (Vocabulary.isReadNoAltImage()) {
- return src;
- } else {
- return "";
- }
- } else if (nullAlt && Vocabulary.isReadNullAltImage()) {
- return src;
- }
- return alt;
- }
- } else if (Vocabulary.isEmbeddedObject().eval(this)) {
- return "(Embedded Object)";
- } else if ("INPUT".equals(name)) {
- InputType type = getInputType();
- if (type != null) {
- if (type.isHidden())// || type.isCheckBox() || type.isRadio())
- return "";
- String alt = getAttribute("alt");
- if (alt != null) {
- alt = Helper.trimHTMLStr(alt);
- if (alt.length() > 0)
- return alt;
- }
- String value = getInputValue();
- if (type.isPassword())
- value = value.replaceAll(".", "*");
- if (value != null && value.length() > 0) {
- return value;
- }
- String title = getAttribute("title");
- if (title != null)
- return title;
-
- }
- } else if ("SELECT".equals(name)) {
- return "Select";
- } else if ("AREA".equals(name)) {
- String alt = getAttribute("alt");
- if (alt != null) {
- alt = Helper.trimHTMLStr(alt);
- if (alt.length() > 0)
- return alt;
- }
- }
-
- if (false) {
- // title attribute can be added to any element accoding to XHTML2.
- String title = getAttribute("title");
- if (title != null) {
- title = Helper.trimHTMLStr(title);
- return title;
- }
- }
-
- return "";
- }
-
- private boolean anyTextInParentLink() {
- Node current = this.getParentNode();
- if (current == null)
- return false;
- while (current != null) {
- if ("A".equals(current.getNodeName())) {
- break;
- }
- current = current.getParentNode();
- }
- if (current == null)
- return false;
-
- return anyTextInSiblings(current.getFirstChild());
- }
-
- private boolean anyTextInSiblings(Node element) {
- StringBuffer buff = new StringBuffer();
- Node next = element;
- while (next != null) {
- if (next instanceof ImageElementImpl) {
- next = next.getNextSibling();
- continue;
- }
- if (next instanceof Element) {
- if (anyTextInSiblings(next.getFirstChild())) {
- return true;
- }
- }
- if (next instanceof INodeEx) {
- INodeEx nex = (INodeEx) next;
- buff.append(nex.extractString());
- }
- next = next.getNextSibling();
- }
-
- return Helper.trimHTMLStr(buff.toString()).length() > 0;
- }
-
- @Override
- public short getHeadingLevel() {
- String name = getLocalName();
- if (name.length() != 2)
- return super.getHeadingLevel();
- if (name.charAt(0) != 'H')
- return super.getHeadingLevel();
- switch (name.charAt(1)) {
- case '1':
- return 1;
- case '2':
- return (short) 2;
- case '3':
- return (short) 3;
- case '4':
- return (short) 4;
- case '5':
- return (short) 5;
- case '6':
- return (short) 6;
- }
- return super.getHeadingLevel();
- }
-
- public boolean setFocus() {
- try {
- inode.invoke0("focus");
- return true;
- } catch (DispatchException e) {
- e.printStackTrace();
- }
- return false;
- }
-
- @Override
- public void setTextContent(String text) {
- try {
- Helper.put(inode, "innerText", text);
- } catch (DispatchException e) {
- e.printStackTrace();
- }
- }
-
- public IStyle getStyle() {
- IDispatch style = (IDispatch) Helper.get(inode, "currentStyle");
- return (IStyle) new StyleImpl(style);
- }
-
- public AbstractTerms getTerms() {
- return HTMLTerms.getInstance();
- }
-
- public Rectangle getLocation() {
- try {
- return Helper.getLocation(inode);
- } catch (Exception e) {
- // System.out.println("getLocation error "+this.extractString());
- }
- return null;
- }
-
- public Position getRadioPosition() {
- if (getInputType() == null)
- return null;
- if (!getInputType().isRadio())
- return null;
-
- Element form = getParentElement(new String[] { "FORM" });
- if (form == null)
- return null;
-
- String radioName = (String) Helper.get(inode, "name");
-
- Position p = new Position();
- searchRadioPosition(form, radioName, p, false);
- return p;
- }
-
- private void searchRadioPosition(Element parent, String radioName,
- Position p, boolean found) {
- NodeList list = parent.getChildNodes();
- int len = list.getLength();
- for (int i = 0; i < len; i++) {
- Node n = list.item(i);
- if (n instanceof ElementImpl) {
- ElementImpl e = (ElementImpl) n;
- if (e.hasChildNodes()) {
- searchRadioPosition(e, radioName, p, found);
- }
- if (e.getInputType() == null)
- continue;
- if (!e.getInputType().isRadio())
- continue;
-
- String name = (String) Helper.get(e.getINode(), "name");
- if (radioName.equals(name)) {
- if (!found)
- p.index++;
- p.total++;
- }
- if (e.isSameNode(this)) {
- found = true;
- }
- }
- }
- }
-
- public Position getListPosition() {
- Element list = getParentElement(new String[] { "UL", "OL", "DL" });
- Element item = getParentElement(new String[] { "LI", "DT" });
- if (list == null)
- return null;
- Position p = new Position();
- searchListPosition(list, item, p, false);
- return p;
- }
-
- private void searchListPosition(Element parent, Element item, Position p,
- boolean found) {
- NodeList list = parent.getChildNodes();
- int len = list.getLength();
- for (int i = 0; i < len; i++) {
- Node n = list.item(i);
- if (n instanceof ElementImpl) {
- ElementImpl e = (ElementImpl) n;
- String name = e.getNodeName();
- if (e.hasChildNodes()
- && !("UL".equals(name) || "OL".equals(name) || "DL"
- .equals(name))) {
- searchListPosition(e, item, p, found);
- }
- if (!"LI".equals(e.getNodeName())
- && !"DT".equals(e.getNodeName()))
- continue;
-
- if (!found)
- p.index++;
- p.total++;
- if (e.isSameNode(item)) {
- found = true;
- }
- }
- }
- }
-
- private Element getParentElement(String[] tagNames) {
- Element parent = this;
- HashSet<String> set = new HashSet<String>();
- for (int i = 0; i < tagNames.length; i++) {
- set.add(tagNames[i].intern());
- }
- String name = parent.getNodeName();
- while (!set.contains(name.intern())) {
- Node temp = parent.getParentNode();
- if (temp == null || !(temp instanceof Element))
- return null;
- parent = (Element) temp;
- name = parent.getNodeName();
- }
-
- return parent;
- }
-
- public Element getFormLabel() {
- NodeList nl = getOwnerDocument().getElementsByTagName("LABEL");
- Object myId = Helper.get(inode, "id");
- for (int i = 0; i < nl.getLength(); i++) {
- Node node = nl.item(i);
- if (node instanceof ElementImpl) {
- ElementImpl label = (ElementImpl) node;
- String id = (String) Helper.get(label.inode, "htmlFor");
-
- if (id == null)
- continue;
- if (id.equals(myId))
- return label;
- }
- }
- return null;
- }
-
- public char getAccessKey() {
- String key = null;
-
- String name = getNodeName();
- if ("LABEL".equals(name))
- return 0;
-
- Element label = getFormLabel();
- if (label != null && label instanceof ElementImpl) {
- key = (String) Helper.get(((ElementImpl) label).inode, "accessKey");
- } else {
- key = (String) Helper.get(inode, "accessKey");
- }
-
- if (key != null && key.length() == 1)
- return key.toUpperCase().charAt(0);
-
- return 0;
- }
-
- @Override
- public AnalyzedResult analyze(AnalyzedResult ar) {
- char key = getAccessKey();
- if (key != 0)
- ar.addAccessKey(this);
-
- return super.analyze(ar);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/FrameNodeImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/FrameNodeImpl.java
deleted file mode 100644
index 23251b3..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/FrameNodeImpl.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.html;
-
-import org.eclipse.actf.model.dom.dombycom.INodeEx;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeListImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.SingletonNodeListImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.StyleSheetImpl;
-import org.eclipse.actf.util.dom.EmptyNodeListImpl;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.actf.util.win32.comclutch.IEnumUnknown;
-import org.eclipse.actf.util.win32.comclutch.IOleContainer;
-import org.eclipse.actf.util.win32.comclutch.IUnknown;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-
-
-class FrameNodeImpl extends HTMLElementImpl {
- FrameNodeImpl(NodeImpl baseNode, IDispatch idisp) {
- super(baseNode, idisp);
- }
-
- @Override
- public NodeList getElementsByTagName(String tagName){
- IDispatch document = (IDispatch) Helper.get(inode, "document");
- IDispatch r = (IDispatch) document.invoke1("getElementsByTagName", tagName);
- if (r == null)
- return null;
- return new NodeListImpl(this, r);
- }
-
- private int getFrameIndex() {
- NodeList frame = getElementsByTagName("frame");
- if (frame.getLength() > 0)
- return getFrameIndex(frame);
-
- NodeList iframe = getElementsByTagName("iframe");
- if (iframe.getLength() > 0)
- return getFrameIndex(iframe);
-
- return -1;
- }
-
- private int getFrameIndex(NodeList frame) {
- int len = frame.getLength();
- for (int i = 0; i < len; i++) {
- Node node = frame.item(i);
- if (!(node instanceof INodeEx))
- continue;
- if(((INodeEx) node).isSameNode(this))
- return i;
- }
- return -1;
- }
-
- public IDispatch getFrameByIndex(IDispatch document, int index) {
- IOleContainer iole = (IOleContainer) document.queryInterface(IUnknown.IID_IOleContainer);
- IEnumUnknown ieu = iole.enumObjects(IOleContainer.OLECONTF_EMBEDDINGS);
- IUnknown[] iunks;
- int count = -1;
- for (iunks = ieu.next(1); iunks != null && iunks.length > 0; iunks = ieu.next(1)) {
- try {
- IDispatch idisp = (IDispatch) iunks[0].queryInterface(IUnknown.IID_IWebBrowser2);
- iunks[0].release();
- if (idisp == null)
- continue;
- count++;
- if (count == index) {
- return idisp;
- }
- } catch (DispatchException ex){
- }
- }
- return null;
- }
-
- private Element getFrameRootElement() {
- IDispatch document = (IDispatch) Helper.get(inode, "document");
-
- int index = getFrameIndex();
- if (index < 0)
- return null;
-
- IDispatch idisp = getFrameByIndex(document, index);
- if (idisp == null)
- return null;
-
- IDispatch idoc = (IDispatch) Helper.get(idisp, "Document");
- if (idoc == null)
- return null;
- IDispatch ielem = (IDispatch) Helper.get(idoc, "documentElement");
- if (ielem == null)
- return null;
-
- initialize(idoc);
- return (Element) newNode(ielem, Node.ELEMENT_NODE, this);
- }
-
- private void initialize(IDispatch doc) {
- try {
- IDispatch r = (IDispatch) doc.invoke0("createStyleSheet");
- if (r == null)
- return;
- StyleSheetImpl style = new StyleSheetImpl(r);
- if (style != null) {
- style.addRule(".CSStoHighlight", "border: 3px solid green; background: #fdd;");
- }
- } catch (DispatchException e) {
-
- }
- }
-
- //--------------------------------------------------------------------------------
- // Node Overriding Impl.
- //--------------------------------------------------------------------------------
-
- @Override
- public Node getFirstChild() {
- return getFrameRootElement();
- }
-
- @Override
- public Node getLastChild() {
- return getFrameRootElement();
- }
-
- @Override
- public NodeList getChildNodes() {
- Node n = getFrameRootElement();
- if (n == null)
- return EmptyNodeListImpl.getInstance();
- return new SingletonNodeListImpl(n);
- }
-
- @Override
- public boolean hasChildNodes() {
- Node n = getFrameRootElement();
- if (n == null)
- return false;
- return true;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/HTMLElementFactory.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/HTMLElementFactory.java
deleted file mode 100644
index d5d4994..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/HTMLElementFactory.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.html;
-
-import org.eclipse.actf.model.dom.dombycom.impl.DocumentImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.w3c.dom.Element;
-
-public class HTMLElementFactory {
-
- private static final String IFRAME = "iframe";
- private static final String TITLE = "title";
- private static final String IMG = "img";
- private static final String SELECT = "select";
- private static final String TEXT = "text";
- private static final String FRAMENODE = "framenode";
-
- public static NodeImpl create(NodeImpl base, IDispatch inode, String tagName) {
- String tagNameLower = tagName.toLowerCase();
- try {
- if (tagNameLower.equals(FRAMENODE)) {
- return new FrameNodeImpl(base, inode);
- } else if (tagNameLower.equals(TEXT)) {
- return new TextImpl(base, inode);
- } else if (tagNameLower.equals(SELECT)) {
- return new SelectElementImpl(base, inode);
- } else if (tagNameLower.equals(IMG)) {
- return new ImageElementImpl(base, inode);
- } else if (tagNameLower.equals(TITLE)) {
- return new TitleElementImpl(base, inode);
- }
- return new HTMLElementImpl(base, inode);
- } catch (DispatchException e) {
- }
- return null;
- }
-
- public static Element createElement(DocumentImpl base, IDispatch inode,
- String tagName) {
- try {
- IDispatch r;
- r = (IDispatch) inode.invoke1("createElement", tagName);
- if (r == null)
- return null;
-
- if (tagName.toLowerCase().equals(IFRAME)) {
- return new FrameNodeImpl(base, r);
- }
- return new HTMLElementImpl(base, r);
- } catch (DispatchException e) {
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/HTMLElementImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/HTMLElementImpl.java
deleted file mode 100644
index bcba481..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/HTMLElementImpl.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.dombycom.impl.html;
-
-import org.eclipse.actf.model.dom.dombycom.impl.DocumentImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.w3c.dom.html.HTMLElement;
-
-public class HTMLElementImpl extends ElementImpl implements HTMLElement {
-
- private static final String TITLE = "title";
- private static final String LANG = "lang";
- private static final String ID = "id";
- private static final String DIR = "dir";
- private static final String CLASS = "class";
-
- protected HTMLElementImpl(NodeImpl baseNode, IDispatch inode) {
- super(baseNode, inode);
- }
-
- protected HTMLElementImpl(DocumentImpl baseDoc, IDispatch inode) {
- super(baseDoc, inode);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.w3c.dom.html.HTMLElement#getClassName()
- */
- public String getClassName() {
- return getAttribute(CLASS);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.w3c.dom.html.HTMLElement#getDir()
- */
- public String getDir() {
- return getAttribute(DIR);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.w3c.dom.html.HTMLElement#getId()
- */
- public String getId() {
- return getAttribute(ID);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.w3c.dom.html.HTMLElement#getLang()
- */
- public String getLang() {
- return getAttribute(LANG);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.w3c.dom.html.HTMLElement#getTitle()
- */
- public String getTitle() {
- return getAttribute(TITLE);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.w3c.dom.html.HTMLElement#setClassName(java.lang.String)
- */
- public void setClassName(String className) {
- setAttribute(CLASS, className);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.w3c.dom.html.HTMLElement#setDir(java.lang.String)
- */
- public void setDir(String dir) {
- setAttribute(DIR, dir);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.w3c.dom.html.HTMLElement#setId(java.lang.String)
- */
- public void setId(String id) {
- setAttribute(ID, id);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.w3c.dom.html.HTMLElement#setLang(java.lang.String)
- */
- public void setLang(String lang) {
- setAttribute(LANG, lang);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.w3c.dom.html.HTMLElement#setTitle(java.lang.String)
- */
- public void setTitle(String title) {
- setAttribute(TITLE, title);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/HTMLTerms.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/HTMLTerms.java
deleted file mode 100644
index 64bb7d3..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/HTMLTerms.java
+++ /dev/null
@@ -1,671 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.html;
-
-import java.util.HashSet;
-
-import org.eclipse.actf.model.dom.dombycom.INodeEx;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.html.ElementImpl.InputType;
-import org.eclipse.actf.util.vocab.AbstractTerms;
-import org.eclipse.actf.util.vocab.IEvalTarget;
-import org.eclipse.actf.util.vocab.Vocabulary;
-import org.eclipse.actf.util.win32.comclutch.ComPlugin;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-
-
-
-public class HTMLTerms extends AbstractTerms {
- // ADDED BY KOBAYASHI ( ////////////////////////////////
- //
- @Override
- public boolean isAlterable(IEvalTarget target) {
- return isImage(target);
- }
-
- private static HTMLTerms instance;
-
- private static HashSet<String> headingTags;
-
- private static HashSet<String> listItemTags;
-
- private static HashSet<String> blockTags;
-
- private static HashSet<String> listTopTags;
-
- static {
- headingTags = new HashSet<String>();
- headingTags.add("H1".intern());
- headingTags.add("H2".intern());
- headingTags.add("H3".intern());
- headingTags.add("H4".intern());
- headingTags.add("H5".intern());
- headingTags.add("H6".intern());
-
- listItemTags = new HashSet<String>();
- listItemTags.add("LI".intern());
- listItemTags.add("DT".intern());
-
- listTopTags = new HashSet<String>();
- listTopTags.add("UL".intern());
- listTopTags.add("OL".intern());
- listTopTags.add("DL".intern());
-
- blockTags = new HashSet<String>();
- blockTags.add("H1".intern());
- blockTags.add("H2".intern());
- blockTags.add("H3".intern());
- blockTags.add("H4".intern());
- blockTags.add("H5".intern());
- blockTags.add("H6".intern());
- blockTags.add("B".intern());
- blockTags.add("STRONG".intern());
- blockTags.add("DIV".intern());
- blockTags.add("SPAN".intern());
- blockTags.add("P".intern());
- blockTags.add("FONT".intern());
-
- }
-
- public static HTMLTerms getInstance() {
- if (instance == null) {
- instance = new HTMLTerms();
- }
- return instance;
- }
-
- @Override
- public boolean isValidNode(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- String name = element.getLocalName();
- if ("HEAD".equals(name) || "MAP".equals(name))
- return false;
- }
- return true;
- }
-
- @Override
- public boolean isVisibleNode(IEvalTarget target) {
- return true;
- }
-
- @Override
- public boolean isMultilineEdit(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- String name = element.getLocalName();
- if ("TEXTAREA".equals(name)) {
- return true;
- }
- } else if (target instanceof TextImpl) {
- TextImpl text = (TextImpl) target;
- Node parent = text.getParentNode();
- if (parent instanceof IEvalTarget) {
- return isMultilineEdit((IEvalTarget) parent);
- }
- }
- return false;
- }
-
- @Override
- public boolean isSelectOption(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- String name = element.getLocalName();
- if ("OPTION".equals(name)) {
- return true;
- }
- } else if (target instanceof TextImpl) {
- TextImpl text = (TextImpl) target;
- Node parent = text.getParentNode();
- if (parent instanceof IEvalTarget) {
- return isSelectOption((IEvalTarget) parent);
- }
- }
- return false;
- }
-
- @Override
- public boolean isInputable(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- String name = element.getLocalName();
- if ("INPUT".equals(name)) {
- InputType type = element.getInputType();
- if (type == null)
- return false;
- return type.isEdit() || type.isPassword() || type.isFileEdit() || type.isCheckBox() || type.isRadio();
- } else if ("TEXTAREA".equals(name)) {
- return true;
- }
- } else if (target instanceof TextImpl) {
- TextImpl text = (TextImpl) target;
- Node parent = text.getParentNode();
- if (parent instanceof IEvalTarget) {
- return Vocabulary.isInputable().eval((IEvalTarget) parent);
- }
- }
-
- return false;
- }
-
- @Override
- public boolean isCombobox(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- String name = element.getLocalName();
- if ("SELECT".equals(name)) {
- return true;
- }
- } else if (target instanceof TextImpl) {
- TextImpl text = (TextImpl) target;
- Node parent = text.getParentNode();
- if (parent instanceof IEvalTarget) {
- return Vocabulary.isSelectable().eval((IEvalTarget) parent);
- }
- }
-
- return false;
- }
-
- @Override
- public boolean isMultiSelectable(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- String name = element.getLocalName();
- if ("SELECT".equals(name)) {
- return (Boolean) Helper.get(element.getINode(), "multiple");
- }
- } else if (target instanceof TextImpl) {
- TextImpl text = (TextImpl) target;
- Node parent = text.getParentNode();
- if (parent instanceof IEvalTarget) {
- return Vocabulary.isMultiSelectable().eval((IEvalTarget) parent);
- }
- }
-
- return false;
- }
-
- @Override
- public boolean isClickable(IEvalTarget target) {
- if (target instanceof TextImpl) {
- TextImpl text = (TextImpl) target;
- Node parent = text.getParentNode();
- if (parent instanceof IEvalTarget) {
- return Vocabulary.isClickable().eval((IEvalTarget) parent);
- }
- }
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- String name = element.getLocalName();
- String href = (String) Helper.get(element.getINode(), "href");
- if (("A".equals(name) || "AREA".equals(name))
- && href != null && href.length() > 0)
- return true;
- if ("BUTTON".equals(name) || "OPTION".equals(name))
- return true;
- if ("INPUT".equals(name)) {
- InputType type = element.getInputType();
- if (type != null) {
- return type.isClickable();
- }
- }
-
- if (Helper.hasProperty(element.getINode(), "onclick"))
- return true;
-
- }
- if (target instanceof Node) {
- Node node = (Node) target;
- Node p = node.getParentNode();
- if (p instanceof IEvalTarget)
- return Vocabulary.isClickable().eval((IEvalTarget) p);
- }
-
- return false;
- }
-
- @Override
- public boolean isLink(IEvalTarget target) {
- if (target instanceof TextImpl) {
- TextImpl text = (TextImpl) target;
- Node parent = text.getParentNode();
- if (parent instanceof IEvalTarget) {
- return Vocabulary.isLink().eval((IEvalTarget) parent);
- }
- }
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- String name = element.getLocalName();
- String href = (String) Helper.get(element.getINode(), "href");
- if (("A".equals(name) || "AREA".equals(name))
- && href != null && href.length() > 0)
- return true;
-
- }
- if (target instanceof Node) {
- Node node = (Node) target;
- Node p = node.getParentNode();
- if (p instanceof IEvalTarget)
- return Vocabulary.isLink().eval((IEvalTarget) p);
- }
- return false;
- }
-
- @Override
- public boolean isCheckbox(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- InputType type = element.getInputType();
- if (type != null)
- return type.isCheckBox();
- }
- return false;
- }
-
- @Override
- public boolean isChecked(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- Object obj = Helper.get(((ElementImpl) target).getINode(), "checked");
- if (obj != null)
- return (Boolean) obj;
- }
- return false;
- }
-
- @Override
- public boolean isRadio(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- InputType type = element.getInputType();
- if (type != null)
- return type.isRadio();
- }
- return false;
- }
-
- @Override
- public boolean isTextbox(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- InputType type = element.getInputType();
- if (type != null)
- return type.isEdit();
- }
- return false;
- }
-
- @Override
- public boolean isPassword(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- InputType type = element.getInputType();
- if (type != null)
- return type.isPassword();
- }
- return false;
- }
-
- @Override
- public boolean isButton(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- InputType type = element.getInputType();
- if (type != null)
- return type.isButton();
- }
- return false;
- }
-
- private boolean isInTags(IEvalTarget target, HashSet<String> tags) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- String name = element.getNodeName();
- if (tags.contains(name.intern()))
- return true;
- }
-
- return false;
- }
-
- @Override
- public boolean isListTop(IEvalTarget target) {
- if (isInTags(target, listTopTags)) {
- if (target instanceof Element) {
- Element e = (Element) target;
- NodeList nl = e.getChildNodes();
- int count = 0;
- for (int i = 0; i < nl.getLength(); i++) {
- Node n = nl.item(i);
- if (n instanceof IEvalTarget && isListItem((IEvalTarget) n))
- count++;
- }
- if (count > 1)
- return true;
- }
- }
- return false;
- }
-
- @Override
- public boolean isListItem(IEvalTarget target) {
- return isListItemJumpPoint(target);
- }
-
- @Override
- public boolean isFileEdit(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
- InputType type = element.getInputType();
- if (type != null)
- return type.isFileEdit();
- }
- return false;
- }
-
- @Override
- public boolean isEmbeddedObject(IEvalTarget target) {
- if (target instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) target;
-
- String name = element.getLocalName();
- if ("EMBED".equals(name) || "OBJECT".equals(name))
- return true;
- }
- return false;
- }
-
- @Override
- public boolean isImage(IEvalTarget target) {
- if (!(target instanceof ElementImpl))
- return false;
-
- ElementImpl element = (ElementImpl) target;
- String name = element.getLocalName();
- return "IMG".equals(name);
- }
-
- @Override
- public boolean hasContent(IEvalTarget target) {
- if (isMultilineEdit(target)) {
- if (target instanceof Element) {
- return !hasContent((IEvalTarget) ((Element) target).getFirstChild());
- }
- }
- if (isInputable(target)) return true;
- if (isListTop(target)) return true;
- return super.hasContent(target);
- }
-
- private static final HashSet<String> reducibleElementNames = new HashSet<String>();
- static {
- reducibleElementNames.add("FONT".intern());
- reducibleElementNames.add("BASEFONT".intern());
- reducibleElementNames.add("S".intern());
- reducibleElementNames.add("STRIKE".intern());
- reducibleElementNames.add("U".intern());
- reducibleElementNames.add("EM".intern());
- reducibleElementNames.add("STRONG".intern());
- reducibleElementNames.add("SPAN".intern());
- reducibleElementNames.add("VAR".intern());
- reducibleElementNames.add("CODE".intern());
- reducibleElementNames.add("CITE".intern());
- reducibleElementNames.add("ABBR".intern());
- reducibleElementNames.add("ACRONYM".intern());
- reducibleElementNames.add("Q".intern());
- reducibleElementNames.add("B".intern());
- reducibleElementNames.add("BIG".intern());
- reducibleElementNames.add("I".intern());
- reducibleElementNames.add("SMALL".intern());
- reducibleElementNames.add("TT".intern());
- reducibleElementNames.add("SUB".intern());
- reducibleElementNames.add("SUP".intern());
-
- // non official tag
- reducibleElementNames.add("WBR".intern());
- }
-
- @Override
- public boolean isReducible(IEvalTarget target) {
- // Might it be included in the rules?
- // if (Vocabulary.isClickable().eval(target)) return false;
- if (!(target instanceof ElementImpl))
- return false;
- ElementImpl element = (ElementImpl) target;
- String name = element.getLocalName().intern();
- return reducibleElementNames.contains(name);
- }
-
- @Override
- public boolean isVisitedLink(IEvalTarget target) {
- if (!(target instanceof INodeEx))
- return false;
- INodeEx nex = (INodeEx) target;
-
- String url = nex.getLinkURI();
- if (url == null)
- return false;
-
- return ComPlugin.getDefault().getBrowserHistory().isVisited(url);
- }
-
- @Override
- public boolean isHeadingJumpPoint(IEvalTarget target) {
- return isJumpPoint(target, headingTags);
- }
-
- @Override
- public boolean isListItemJumpPoint(IEvalTarget target) {
- return isJumpPoint(target, listItemTags);
- }
-
- @Override
- public boolean isBlockJumpPointF(IEvalTarget target) {
- return isJumpPoint(target, blockTags, 3) || isJumpPoint2(target, headingTags, 3);
- }
-
- @Override
- public boolean isBlockJumpPointB(IEvalTarget target) {
- return isJumpPoint(target, blockTags, 3) || isJumpPoint2(target, headingTags, 3);
- }
-
- private boolean isJumpPoint(IEvalTarget target, HashSet tags) {
- return isJumpPoint(target, tags, 100);
- }
-
- private boolean isJumpPoint(IEvalTarget target, HashSet tags, int depth) {
- if (depth <= 0)
- return false;
-
- if (target instanceof Element) {
- Element element = (Element) target;
- String name = element.getLocalName();
- if (tags.contains(name.intern())) {
- return true;
- }
- }
-
- if (!(target instanceof Node))
- return false;
- Node node = (Node) target;
- Node prev = node.getPreviousSibling();
- while (prev != null) {
- if (hasText(prev)) {
- return false;
- }
- prev = prev.getPreviousSibling();
- }
-
- Node parent = node.getParentNode();
- if (parent == null)
- return false;
-
- if (parent instanceof IEvalTarget) {
- return isJumpPoint((IEvalTarget) parent, tags, depth - 1);
- }
-
- return false;
- }
-
- private boolean isJumpPoint2(IEvalTarget target, HashSet tags, int depth) {
- if (depth <= 0)
- return false;
-
- if (target instanceof Element) {
- Element element = (Element) target;
- String name = element.getLocalName();
- if (tags.contains(name.intern())) {
- return true;
- }
- }
-
- if (!(target instanceof Node))
- return false;
- Node node = (Node) target;
-
- Node parent = node.getParentNode();
- if (parent == null)
- return false;
-
- if (parent instanceof IEvalTarget) {
- return isJumpPoint((IEvalTarget) parent, tags, depth - 1);
- }
-
- return false;
- }
-
- private boolean hasText(Node prev) {
- if (prev instanceof INodeEx) {
- INodeEx nex = (INodeEx) prev;
- if (nex.hasChildNodes()) {
- NodeList list = nex.getChildNodes();
- for (int i = 0; i < list.getLength(); i++) {
- Node cn = list.item(i);
- if (hasText(cn))
- return true;
- }
- } else {
- if (nex.extractString().length() > 0) {
- return true;
- }
- }
- }
- return false;
- }
-
- @Override
- public boolean isAccessKey(char key, IEvalTarget node) {
- if (!(node instanceof INodeEx))
- return false;
- INodeEx nex = (INodeEx) node;
- char c = nex.getAccessKey();
-
- return c == key;
- }
-
- @Override
- public boolean isReachable(IEvalTarget evalTarget, Node target) {
- if (!(evalTarget instanceof Node))
- return false;
-
- Node node = (Node) evalTarget;
-
- Node a1 = searchNonReducibleAncestor(node);
- if (a1 == null)
- return false;
- Node a2 = searchNonReducibleAncestor(target);
- if (a2 == null)
- return false;
-
-
- if (a1.getParentNode() == null)
- return false;
- if (a2.getParentNode() == null)
- return false;
-
-
- if (!(a1.getParentNode().isSameNode(a2.getParentNode()))) {
- return false;
- } else {
- if (a1 instanceof IEvalTarget && a2 instanceof IEvalTarget) {
- IEvalTarget t1 = (IEvalTarget) a1;
- IEvalTarget t2 = (IEvalTarget) a2;
- if (isLink(t1) && isLink(t2)) {
- return true;
- }
- if (isButton(t1) && isButton(t2)) {
- return true;
- }
- }
- }
-
-
- Node start = node;
-
- Node end = target;
- if (end instanceof Text)
- end = getPrev(end);
- if (end == null)
- return false;
-
- Node next = getNext(start);
- while (next != null) {
- if (!(next instanceof IEvalTarget)) {
- next = getNext(next);
- continue;
- }
- if ((!Vocabulary.isReducible().eval((IEvalTarget) next)))
- return false;
-
- if(next.isSameNode(end))
- break;
- next = getNext(next);
- }
-
- return true;
- }
-
- private Node getPrev(Node node) {
- Node prev = node.getPreviousSibling();
- if (prev != null)
- return prev;
- return node.getParentNode();
- }
-
- private Node getNext(Node node) {
- Node next = node.getNextSibling();
- if (next != null)
- return next;
- return node.getParentNode();
- }
-
- private Node searchNonReducibleAncestor(Node node) {
- Node child = null;
- Node parent = node;
-
- while (parent != null && parent instanceof IEvalTarget &&
- (parent instanceof Text
- || isImage((IEvalTarget) parent))
- || isReducible((IEvalTarget) parent)) {
- child = parent;
- parent = parent.getParentNode();
- }
-
- return child;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/ImageElementImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/ImageElementImpl.java
deleted file mode 100644
index 6d2b5f0..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/ImageElementImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.html;
-
-import org.eclipse.actf.model.dom.dombycom.IImageElement;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-
-
-public class ImageElementImpl extends HTMLElementImpl implements IImageElement {
-
- public ImageElementImpl(NodeImpl baseNode, IDispatch inode) {
- super(baseNode, inode);
- }
-
- public boolean hasUsemap() {
- String usemap = (String) Helper.get(inode, "usemap");
- return (usemap != null && usemap.length() >= 2);
- }
-
- public Element getMap() {
- String usemap = (String) Helper.get(inode, "usemap");
- if (usemap == null)
- return null;
-
- String name;
- if (usemap.startsWith("#")) {
- name = usemap.substring(1);
- } else {
- name = usemap;
- }
- NodeList nl = getOwnerDocument().getElementsByTagName("MAP");
- for (int i = 0; i < nl.getLength(); i++){
- Node node = nl.item(i);
- if ("MAP".equals(node.getNodeName())) {
- Element area = (Element) node;
- if (name.equals(area.getAttribute("name")))
- return area;
- }
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/SelectElementImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/SelectElementImpl.java
deleted file mode 100644
index 201f7a9..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/SelectElementImpl.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.html;
-
-import java.util.ArrayList;
-
-import org.eclipse.actf.model.dom.dombycom.ISelectElement;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-
-
-
-public class SelectElementImpl extends HTMLElementImpl implements ISelectElement {
-
- public SelectElementImpl(NodeImpl baseNode, IDispatch inode) {
- super(baseNode, inode);
- }
-
- public void setSelectedIndices(int[] indices) {
- int[] prev = getSelectedIndices();
-
- int length = (Integer) Helper.get(inode, "length");
- for (int i = 0; i < length; i++) {
- IDispatch option = (IDispatch) inode.invoke1("item", i);
- Helper.put(option, "selected", false);
- }
-
- for (int i = 0; i < indices.length; i++) {
- IDispatch option = (IDispatch) inode.invoke1("item", indices[i]);
- Helper.put(option, "selected", true);
- }
-
- if (Helper.hasProperty(inode, "onchange")) {
- if (prev.length != indices.length) {
- inode.invoke0("onchange");
- } else {
- for (int i = 0; i < prev.length; i++) {
- if (prev[i] != indices[i]) {
- inode.invoke0("onchange");
- break;
- }
- }
- }
- }
-
- }
-
- public int[] getSelectedIndices() {
- ArrayList<Integer> list = new ArrayList<Integer>();
- int length = (Integer) Helper.get(inode, "length");
- for (int i = 0; i < length; i++) {
- IDispatch option = (IDispatch) inode.invoke1("item", i);
- boolean selected = (Boolean) Helper.get(option, "selected");
- if (selected)
- list.add(i);
- }
-
- int[] indices = new int[list.size()];
- for (int i = 0; i < indices.length; i++)
- indices[i] = list.get(i);
- return indices;
- }
-
- public int getOptionsCount() {
- int length = (Integer) Helper.get(inode, "length");
- return length;
- }
-
- public String getOptionTextAt(int index) {
- IDispatch option = (IDispatch) inode.invoke1("item", index);
- return (String) Helper.get(option, "text");
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/TextImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/TextImpl.java
deleted file mode 100644
index a49f43b..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/TextImpl.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.html;
-
-import org.eclipse.actf.model.dom.dombycom.IElementEx;
-import org.eclipse.actf.model.dom.dombycom.INodeEx;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.swt.graphics.Rectangle;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-class TextImpl extends CharacterDataImpl implements Text, INodeEx {
- TextImpl(NodeImpl baseNode, IDispatch inode) {
- super(baseNode, inode, Node.TEXT_NODE);
- }
-
- public Text splitText(int offset) throws DOMException {
- try {
- IDispatch r = (IDispatch) inode.invoke1("splitText", Integer
- .valueOf(offset));
- if (r == null)
- return null;
- return (Text) newNode(r, Node.TEXT_NODE);
- } catch (DispatchException e) {
- return null;
- }
- }
-
- public boolean isElementContentWhitespace() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public String getWholeText() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Text replaceWholeText(String content) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- // --------------------------------------------------------------------------------
- // INodeEx interface
- // --------------------------------------------------------------------------------
-
- public boolean doClick() {
- Node parent = getParentNode();
- if (parent instanceof INodeEx) {
- return ((INodeEx) parent).doClick();
- }
- return false;
- }
-
- public boolean highlight() {
- Node parent = getParentNode();
- if (parent instanceof INodeEx) {
- return ((INodeEx) parent).highlight();
- }
- return false;
- }
-
- public boolean unhighlight() {
- Node parent = getParentNode();
- if (parent instanceof INodeEx) {
- return ((INodeEx) parent).unhighlight();
- }
- return false;
- }
-
- public String extractString() {
- String nv = getNodeValue();
- if (nv == null)
- return "";
- nv = Helper.trimHTMLStr(nv);
-
- Node parent = getParentNode();
-
- if (!(parent instanceof ElementImpl))
- return nv;
-
- if (!"ABBR".equals(parent.getNodeName()) //
- && !"ACRONYM".equals(parent.getNodeName()))
- return nv;
-
- ElementImpl el = (ElementImpl) parent;
-
- String title = el.getAttribute("title");
- if (null != title) {
- return nv + " (" + title + ")";
- }
- return nv;
- }
-
- public boolean setFocus() {
- return false;
- }
-
- public Rectangle getLocation() {
- Node parent = getParentNode();
- while (parent != null && !(parent instanceof IElementEx)) {
- parent = parent.getParentNode();
- }
- if (parent == null) {
- return new Rectangle(0, 0, 0, 0);
- }
- return ((INodeEx) parent).getLocation();
- }
-
- public char getAccessKey() {
- Node parent = getParentNode();
-
- if (!(parent instanceof INodeEx))
- return 0;
-
- return ((INodeEx) parent).getAccessKey();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/TitleElementImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/TitleElementImpl.java
deleted file mode 100644
index db2bb50..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/html/TitleElementImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.dombycom.impl.html;
-
-import org.eclipse.actf.model.dom.dombycom.impl.DocumentImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.w3c.dom.html.HTMLTitleElement;
-
-public class TitleElementImpl extends HTMLElementImpl implements
- HTMLTitleElement {
-
- private static final String TEXT = "text";
-
- protected TitleElementImpl(NodeImpl baseNode, IDispatch inode) {
- super(baseNode, inode);
- }
-
- protected TitleElementImpl(DocumentImpl baseDoc, IDispatch inode) {
- super(baseDoc, inode);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.dom.dombycom.impl.NodeImpl#getText()
- */
- @Override
- public String getText() {
- String ret = "";
- ret = (String) Helper.get(inode, TEXT);
- return ret;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.dom.dombycom.impl.NodeImpl#setText(java.lang.String)
- */
- @Override
- public void setText(String text) {
- Helper.put(inode, TEXT, text);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/MediaObjectImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/MediaObjectImpl.java
deleted file mode 100644
index f4ced8e..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/MediaObjectImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.object;
-
-import org.eclipse.actf.model.dom.dombycom.AnalyzedResult;
-import org.eclipse.actf.model.dom.dombycom.INodeEx;
-import org.eclipse.actf.model.dom.dombycom.INodeExSound;
-import org.eclipse.actf.model.dom.dombycom.INodeExVideo;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.model.dom.dombycom.impl.html.ElementImpl;
-import org.eclipse.actf.util.vocab.AbstractTerms;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-
-
-
-
-abstract class MediaObjectImpl extends ElementImpl implements INodeExVideo, INodeExSound {
- @Override
- public AnalyzedResult analyze(AnalyzedResult ar) {
- ar.addVideo(this);
- ar.addSound(this);
- return ar;
- }
-
- public INodeEx getReferenceNode() {
- return this;
- }
-
- @Override
- public AbstractTerms getTerms() {
- return MediaObjectTerms.getInstance();
- }
-
- protected MediaObjectImpl(NodeImpl baseNode, IDispatch idisp) {
- super(baseNode, idisp);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/MediaObjectTerms.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/MediaObjectTerms.java
deleted file mode 100644
index fbac4e2..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/MediaObjectTerms.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.object;
-
-import org.eclipse.actf.util.vocab.AbstractTerms;
-import org.eclipse.actf.util.vocab.IEvalTarget;
-
-
-
-
-class MediaObjectTerms extends AbstractTerms {
- private static final MediaObjectTerms instance = new MediaObjectTerms();
-
- @Override
- public boolean hasContent(IEvalTarget target) {
- return true;
- }
-
- @Override
- public boolean isMedia(IEvalTarget node) {
- return true;
- }
-
- @Override
- public boolean isAlterable(IEvalTarget target) {
- return true;
- }
-
- @Override
- public boolean isValidNode(IEvalTarget target) {
- return true;
- }
-
- @Override
- public boolean isVisibleNode(IEvalTarget target) {
- return true;
- }
-
- @Override
- public boolean isEmbeddedObject(IEvalTarget target) {
- return true;
- }
-
- static MediaObjectTerms getInstance() {
- return instance;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/ObjectElementFactory.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/ObjectElementFactory.java
deleted file mode 100644
index 2ca8d2c..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/ObjectElementFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.object;
-
-import org.eclipse.actf.model.dom.dombycom.IObjectElementFactory;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-public class ObjectElementFactory {
-
- private static IObjectElementFactory[] factories = ObjectElementFactoryExtension.getObjectElementFactories();
-
- public static NodeImpl create(NodeImpl base, IDispatch inode) {
- for (IObjectElementFactory factory : factories){
- NodeImpl newNode = factory.createTopNode(base, inode);
- if (newNode != null)
- return newNode;
- }
-
- Object controls = Helper.get(inode, "controls");
- if (controls instanceof IDispatch) {
- return new WMPNodeImpl(base, inode, (IDispatch) controls);
- }
-
- Object clientID = Helper.get(inode, "ClientID");
- if (clientID != null) {
- return new WMP64NodeImpl(base, inode);
- }
-
- try {
- Object qtVersion = inode.invoke0("GetQuickTimeVersion");
- if (qtVersion != null) {
- return new QTNodeImpl(base, inode);
- }
- } catch (DispatchException e) {
- }
-
- try {
- Object rpVersion = inode.invoke0("GetVersionInfo");
- if (rpVersion != null) {
- return new RPNodeImpl(base, inode);
- }
- } catch (DispatchException e) {
- }
-
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/ObjectElementFactoryExtension.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/ObjectElementFactoryExtension.java
deleted file mode 100644
index 762007a..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/ObjectElementFactoryExtension.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.dombycom.impl.object;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.actf.model.dom.dombycom.IObjectElementFactory;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.Platform;
-
-public class ObjectElementFactoryExtension {
- private static final String EXTENSION_NAME = "elementFactory";
-
- private static final String OBJECT_ELEMENT_FACTORY = "objectElementFactory";
-
- private static final String ATTR_IMPL = "implementations";
-
- private static ObjectElementFactoryExtension[] extensions;
-
- private static IObjectElementFactory[] factories = null;
-
- public static IObjectElementFactory[] getObjectElementFactories() {
- if (factories != null) {
- return factories;
- }
-
- ObjectElementFactoryExtension[] tmpExtensions = getExtensions();
- ArrayList<IObjectElementFactory> tmpList = new ArrayList<IObjectElementFactory>();
- if (tmpExtensions != null) {
- for (int i = 0; i < tmpExtensions.length; i++) {
- IObjectElementFactory tmpFactory = tmpExtensions[i].getFactory();
- if (tmpFactory != null) {
- tmpList.add(tmpFactory);
- }
- }
- }
- factories = new IObjectElementFactory[tmpList.size()];
- tmpList.toArray(factories);
- return factories;
- }
-
- private static ObjectElementFactoryExtension[] getExtensions() {
- if (extensions != null)
- return extensions;
-
- IExtension[] tmpExtensions = Platform.getExtensionRegistry()
- .getExtensionPoint("org.eclipse.actf.model.dom.dombycom", EXTENSION_NAME)
- .getExtensions();
-
- List<ObjectElementFactoryExtension> l = new ArrayList<ObjectElementFactoryExtension>();
- for (int i = 0; i < tmpExtensions.length; i++) {
- IConfigurationElement[] configElements = tmpExtensions[i]
- .getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- ObjectElementFactoryExtension ex = parseExtension(configElements[j]);
- if (ex != null) {
- l.add(ex);
- }
- }
- }
- extensions = l.toArray(new ObjectElementFactoryExtension[l.size()]);
- return extensions;
- }
-
- private static ObjectElementFactoryExtension parseExtension(
- IConfigurationElement configElement) {
- if (!configElement.getName().equals(OBJECT_ELEMENT_FACTORY)) {
- return null;
- }
- try {
- return new ObjectElementFactoryExtension(configElement);
- } catch (Exception e) {
- }
- return null;
- }
-
- private IObjectElementFactory factory = null;
-
- private ObjectElementFactoryExtension(IConfigurationElement configElement) {
- try {
- this.factory = (IObjectElementFactory) configElement
- .createExecutableExtension(ATTR_IMPL);
- } catch (Exception e) {
- }
-
- }
-
- private IObjectElementFactory getFactory() {
- return this.factory;
- }
-
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/QTNodeImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/QTNodeImpl.java
deleted file mode 100644
index 5636676..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/QTNodeImpl.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.object;
-
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-
-
-
-class QTNodeImpl extends MediaObjectImpl {
-
- boolean pause = false;
-
- private VideoState currentState = VideoState.STATE_UNKNOWN;
-
- QTNodeImpl(NodeImpl baseNode, IDispatch inode) {
- super(baseNode, inode);
- }
-
- private Object exec0(String cmd) {
- try {
- return inode.invoke0(cmd);
- } catch (DispatchException e) {
- }
- return null;
- }
-
- private Object exec1(String cmd, Object obj) {
- try {
- return inode.invoke1(cmd, obj);
- } catch (DispatchException e) {
- }
- return null;
- }
-
- public boolean getMuteState() {
- Object bool = exec0("GetMute");
- if (bool != null)
- return ((Integer) bool).intValue() != 0;
- else
- return false;
- }
-
- public int getVolume() {
- // range is 0-256
- // mapping to 0-1000
- Object volume = exec0("GetVolume");
-
- if (volume != null)
- return ((Integer) volume).intValue() * 1000 / 256;
- else
- return 0;
- }
-
- public boolean muteMedia(boolean flag) {
- exec1("setMute", Boolean.valueOf(flag));
- return true;
- }
-
- public boolean setVolume(int val) {
- int volume = val * 256 / 1000;
- exec1("SetVolume", volume);
- return true;
- }
-
- public boolean fastForward() {
- // TODO
- return false;
- }
-
- public boolean fastReverse() {
- exec0("Rewind");
- return true;
- }
-
- public double getCurrentPosition() {
- Object time = exec0("GetTime");
- Object scale = exec0("GetTimeScale");
-
- if (time != null)
- return ((Integer) time).doubleValue() / ((Integer) scale).doubleValue();
- else
- return 0;
- }
-
- public VideoState getCurrentState() {
- return currentState;
- }
-
- public double getTotalLength() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public boolean nextTrack() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean pauseMedia() {
- if (currentState == VideoState.STATE_PAUSE)
- return playMedia();
- exec0("Stop");
- currentState = VideoState.STATE_PAUSE;
- return true;
- }
-
- public boolean playMedia() {
- exec0("Play");
- currentState = VideoState.STATE_PLAY;
- return true;
- }
-
- public boolean previousTrack() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean stopMedia() {
- exec0("Stop");
- exec1("SetTime", 0);
- currentState = VideoState.STATE_STOP;
- return true;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/RPNodeImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/RPNodeImpl.java
deleted file mode 100644
index 5735ed5..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/RPNodeImpl.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.object;
-
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-
-
-
-class RPNodeImpl extends MediaObjectImpl {
-
- // Holding internal state because Real Player's state
- // is not changed right after executing command
-
- private boolean pause = false;
-
- private boolean play = false;
-
- private boolean stop = false;
-
- private boolean mute = false;
-
- RPNodeImpl(NodeImpl baseNode, IDispatch inode) {
- super(baseNode, inode);
- }
-
- private Object exec0(String cmd) {
- try {
- return inode.invoke0(cmd);
- } catch (DispatchException e) {
- }
- return null;
- }
-
- private Object exec1(String cmd, Object obj) {
- try {
- return inode.invoke1(cmd, obj);
- } catch (DispatchException e) {
- }
- return null;
- }
-
- public boolean getMuteState() {
- Object bool = exec0("GetMute");
-
- if (mute) {
- mute = false;
- return true;
- }
-
- if (bool != null)
- return ((Boolean) bool).booleanValue();
- else
- return false;
- }
-
- public int getVolume() {
- // range is 0-100
- // mapping to 0-1000
- Object volume = exec0("GetVolume");
-
- if (volume != null)
- return ((Short) volume).intValue() * 1000 / 100;
- else
- return 0;
- }
-
- public boolean muteMedia(boolean flag) {
- // cannot mute media with "true", but can mute media with "1"
- // [ exec1("SetMute", true); ] x
- // [ exec1("SetMute", 1); ] o
- // [ exec1("SetMute", false);] o
-
- exec1("SetMute", flag ? 1 : 0);
- mute = true;
- return true;
- }
-
- public boolean setVolume(int val) {
- int volume = val * 100 / 1000;
- exec1("SetVolume", volume);
- return true;
- }
-
- public boolean fastForward() {
- // TODO
- return false;
- }
-
- public boolean fastReverse() {
- exec0("Rewind");
- return true;
- }
-
- public double getCurrentPosition() {
- Object time = exec0("GetPosition");
-
- if (time != null)
- return ((Integer) time).doubleValue() / 1000;
- else
- return 0;
- }
-
- public VideoState getCurrentState() {
- Object state = exec0("GetPlayState");
-
- if (pause) {
- pause = play = stop = false;
- return VideoState.STATE_PAUSE;
- }
- if (play) {
- pause = play = stop = false;
- return VideoState.STATE_PLAY;
- }
- if (stop) {
- pause = play = stop = false;
- return VideoState.STATE_STOP;
- }
-
- if (state != null) {
- switch (((Integer) state).intValue()) {
- case 0:
- return VideoState.STATE_STOP;
- case 1:
- case 2:
- return VideoState.STATE_WAITING;
- case 3:
- return VideoState.STATE_PLAY;
- case 4:
- return VideoState.STATE_PAUSE;
- case 5:
- return VideoState.STATE_WAITING;
- }
- }
- return VideoState.STATE_UNKNOWN;
- }
-
- public double getTotalLength() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public boolean nextTrack() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean pauseMedia() {
- if (getCurrentState() == VideoState.STATE_PAUSE)
- return playMedia();
- exec0("DoPause");
- pause = true;
- return true;
- }
-
- public boolean playMedia() {
- exec0("DoPlay");
- play = true;
- return true;
- }
-
- public boolean previousTrack() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean stopMedia() {
- exec0("DoStop");
- stop = true;
- return true;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/WMP64NodeImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/WMP64NodeImpl.java
deleted file mode 100644
index 99762e9..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/WMP64NodeImpl.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.object;
-
-import org.eclipse.actf.model.dom.dombycom.INodeExSound;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-
-
-
-class WMP64NodeImpl extends MediaObjectImpl {
- // This flag is somewhat a workaround.
- // Even if we put "Mute" property to "true",
- // it does not affect the value to be obtained.
- // Therefore, we remember the mute state by ourselves.
- private boolean muteState;
-
- WMP64NodeImpl(NodeImpl baseNode, IDispatch idisp) {
- super(baseNode, idisp);
- }
-
- private boolean execControls(String cmd) {
- try {
- inode.invoke0(cmd);
- return true;
- } catch (DispatchException e) {
- }
- return false;
- }
-
- private boolean putSettings(String prop, Object val) {
- try {
- inode.put(prop, val);
- return true;
- } catch (DispatchException e) {
- }
- return false;
- }
-
- private Object getSettings(String prop) {
- return Helper.get(inode, prop);
- }
-
- public boolean fastForward() {
- return execControls("fastForward");
- }
-
- public boolean fastReverse() {
- return execControls("fastReverse");
- }
-
- public double getCurrentPosition() {
- Object o = Helper.get(inode, "currentPosition");
- if (o instanceof Double) {
- return ((Double) o).doubleValue();
- } else if (o instanceof Float) {
- return ((Float) o).floatValue();
- } else if (o instanceof Integer) {
- return ((Integer) o).intValue();
- }
- return 0;
- }
-
- public double getTotalLength() {
- return -1;
- }
-
- public boolean nextTrack() {
- return execControls("next");
- }
-
- public boolean pauseMedia() {
- return execControls("pause");
- }
-
- public boolean playMedia() {
- return execControls("play");
- }
-
- public boolean previousTrack() {
- return execControls("previous");
- }
-
- public boolean stopMedia() {
- return execControls("stop");
- }
-
- public int getVolume() {
- Object o = getSettings("Volume");
- if (!(o instanceof Integer))
- return -1;
- int vol = ((Integer) o).intValue();
- // WMP64 volume range is 0 -- -10000. Default is -600. We rescale it to 0 -- -2000
- if (vol < -2000) {
- return INodeExSound.VOLUME_MIN;
- }
- return (((vol + 2000) * (INodeExSound.VOLUME_MAX - INodeExSound.VOLUME_MIN) / 2000)
- + INodeExSound.VOLUME_MIN);
- }
-
- public boolean muteMedia(boolean flag) {
- if (putSettings("Mute", flag)) {
- muteState = flag;
- return true;
- } else {
- return false;
- }
- }
-
- public boolean getMuteState() {
- Object o = getSettings("Mute");
- if (!(o instanceof Boolean))
- return false;
- return ((Boolean) o).booleanValue() || muteState;
- }
-
- public boolean setVolume(int val) {
- // First, scale our volume range to 2000 -- 0;
- val = (((val - INodeExSound.VOLUME_MIN) * 2000)
- / (INodeExSound.VOLUME_MAX - INodeExSound.VOLUME_MIN));
- if (val == 0) {
- val = - 10000;
- } else {
- val -= 2000;
- }
- return putSettings("Volume", Integer.valueOf(val));
- }
-
- public VideoState getCurrentState() {
- Object o = Helper.get(inode, "PlayState");
- if (o instanceof Integer) {
- int wmpst = (Integer) o;
- switch (wmpst) {
- case 0:
- return VideoState.STATE_STOP;
- case 1:
- return VideoState.STATE_PAUSE;
- case 2:
- return VideoState.STATE_PLAY;
- case 3:
- return VideoState.STATE_WAITING;
- case 4:
- case 6:
- return VideoState.STATE_FASTFORWARD;
- case 5:
- case 7:
- return VideoState.STATE_FASTREVERSE;
- default:
- return VideoState.STATE_STOP;
- }
- } else {
- return VideoState.STATE_UNKNOWN;
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/WMPNodeImpl.java b/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/WMPNodeImpl.java
deleted file mode 100644
index 9ee2748..0000000
--- a/plugins/org.eclipse.actf.model.dom.dombycom/src/org/eclipse/actf/model/dom/dombycom/impl/object/WMPNodeImpl.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.dombycom.impl.object;
-
-import org.eclipse.actf.model.dom.dombycom.INodeExSound;
-import org.eclipse.actf.model.dom.dombycom.impl.Helper;
-import org.eclipse.actf.model.dom.dombycom.impl.NodeImpl;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-
-
-
-class WMPNodeImpl extends MediaObjectImpl {
- private final IDispatch controls;
- private final IDispatch settings;
-
- WMPNodeImpl(NodeImpl baseNode, IDispatch idisp, IDispatch controls) {
- super(baseNode, idisp);
- this.controls = controls;
- Object o = Helper.get(idisp, "settings");
- if (o instanceof IDispatch) {
- this.settings = (IDispatch) o;
- } else {
- this.settings = null;
- }
- }
-
- private boolean execControls(String cmd) {
- try {
- controls.invoke0(cmd);
- return true;
- } catch (DispatchException e) {
- }
- return false;
- }
-
- private boolean putSettings(String prop, Object val) {
- if (settings == null) return false;
- try {
- settings.put(prop, val);
- return true;
- } catch (DispatchException e) {
- }
- return false;
- }
-
- private Object getSettings(String prop) {
- if (settings == null) return null;
- return Helper.get(settings, prop);
- }
-
- public boolean fastForward() {
- return execControls("fastForward");
- }
-
- public boolean fastReverse() {
- return execControls("fastReverse");
- }
-
- public double getCurrentPosition() {
- Object o = Helper.get(controls, "currentPosition");
- if (o instanceof Double) {
- return ((Double) o).doubleValue();
- } else if (o instanceof Float) {
- return ((Float) o).floatValue();
- } else if (o instanceof Integer) {
- return ((Integer) o).intValue();
- }
- return 0;
- }
-
- public double getTotalLength() {
- return -1;
- }
-
- public boolean nextTrack() {
- return execControls("next");
- }
-
- public boolean pauseMedia() {
- return execControls("pause");
- }
-
- public boolean playMedia() {
- return execControls("play");
- }
-
- public boolean previousTrack() {
- return execControls("previous");
- }
-
- public boolean stopMedia() {
- return execControls("stop");
- }
-
- public int getVolume() {
- Object o = getSettings("volume");
- if (!(o instanceof Integer)) return -1;
- int vol = ((Integer) o).intValue();
- return ((vol * ((INodeExSound.VOLUME_MAX - INodeExSound.VOLUME_MIN) / 100))
- + INodeExSound.VOLUME_MIN);
- }
-
- public boolean muteMedia(boolean flag) {
- return putSettings("mute", flag);
- }
-
- public boolean setVolume(int val) {
- val = (((val - INodeExSound.VOLUME_MIN) * 100)
- / (INodeExSound.VOLUME_MAX - INodeExSound.VOLUME_MIN));
- return putSettings("volume", Integer.valueOf(val));
- }
-
- public VideoState getCurrentState() {
- Object o = Helper.get(inode, "playState");
- if (o instanceof Integer) {
- int wmpst = (Integer) o;
- switch (wmpst) {
- case 0:
- return VideoState.STATE_UNKNOWN;
- case 1:
- return VideoState.STATE_STOP;
- case 2:
- return VideoState.STATE_PAUSE;
- case 3:
- return VideoState.STATE_PLAY;
- case 4:
- return VideoState.STATE_FASTFORWARD;
- case 5:
- return VideoState.STATE_FASTREVERSE;
- case 6:
- case 7:
- return VideoState.STATE_WAITING;
- default:
- return VideoState.STATE_STOP;
- }
- } else {
- return VideoState.STATE_UNKNOWN;
- }
- }
-
- public boolean getMuteState() {
- Object o = getSettings("mute");
- if (!(o instanceof Boolean)) return false;
- return ((Boolean) o).booleanValue();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/.classpath b/plugins/org.eclipse.actf.model.dom.html/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.model.dom.html/.project b/plugins/org.eclipse.actf.model.dom.html/.project
deleted file mode 100644
index 6b02e77..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.model.dom.html</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.model.dom.html/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.actf.model.dom.html/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index a5e684f..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Feb 21 21:02:42 JST 2008
-eclipse.preferences.version=1
-encoding//about_files/W3C_Software_License.html=ISO-8859-1
diff --git a/plugins/org.eclipse.actf.model.dom.html/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.model.dom.html/META-INF/MANIFEST.MF
deleted file mode 100644
index 577a0b8..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF HTML Model Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.model.dom.html
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.actf.model.dom.html.HtmlParserPlugin
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.actf.model.dom.html,
- org.eclipse.actf.model.dom.html.errorhandler,
- org.eclipse.actf.model.dom.html.impl,
- org.eclipse.actf.model.dom.html.util,
- org.eclipse.actf.model.dom.sgml,
- org.eclipse.actf.model.dom.sgml.errorhandler,
- org.eclipse.actf.model.dom.sgml.util
diff --git a/plugins/org.eclipse.actf.model.dom.html/about.html b/plugins/org.eclipse.actf.model.dom.html/about.html
deleted file mode 100644
index 797bed8..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/about.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h1>About This Content</h1>
-
-<p>June 5, 2006</p>
-<h2>License</h2>
-<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/legal/epl-v10.html</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>
-
-
- <h2>Third Party Content</h2>
- <p>The Content includes items that have been sourced from third parties as set out below. If you
- did not receive this Content directly from the Eclipse Foundation, the following is provided
- for informational purposes only, and you should look to the Redistributor’s license for
- terms and conditions of use.</p>
-
-<h3>HTML DTDs</h3>
-
-<p>The plug-in includes software developed by the World Wide Web Consortium (W3C).</p>
-
-<p>The HTML DTDs are contained in this plug-in. These files are provided without modification.
-The corresponding source code can be obtained from <a href="http://www.w3c.org/">World Wide Web Consortium</a> Web site.</p>
-
-<p>Your use of the HTML DTDs is subject to the terms and conditions of the W3C® SOFTWARE NOTICE AND LICENSE.
-A copy of the license is contained in the file
-<a href="about_files/W3C_Software_License.html">W3C_Software_License.html</a>
-and is also available at
-<a href="http://www.w3.org/Consortium/Legal/copyright-software.html">http://www.w3.org/Consortium/Legal/copyright-software.html</a>.
-
-<p>The names of these DTDs and "World Wide Web Consortium (W3C)"
-must not be used to endorse or promote products derived from this software without prior written permission.
-For written permission, please contact <a href="mailto:site-policy@w3.org">site-policy@w3.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/about_files/W3C_Software_License.html b/plugins/org.eclipse.actf.model.dom.html/about_files/W3C_Software_License.html
deleted file mode 100644
index 2fde9a1..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/about_files/W3C_Software_License.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>W3C Software License</title>
- <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/base.css" />
- <style type="text/css">
- <!--
-h3#version { margin-top: -0.8em;}
--->
-
-
-
-
-
-
-
-
-
- </style>
-</head>
-
-<body text="#000000" bgcolor="#FFFFFF">
-<h1>W3C<sup>®</sup> SOFTWARE NOTICE AND LICENSE</h1>
-
-<h3 id="version"><a
-href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231</a></h3>
-
-<p>This work (and included software, documentation such as READMEs, or other
-related items) is being provided by the copyright holders under the following
-license. By obtaining, using and/or copying this work, you (the licensee)
-agree that you have read, understood, and will comply with the following
-terms and conditions.</p>
-
-<p>Permission to copy, modify, and distribute this software and its
-documentation, with or without modification, for any purpose and without
-fee or royalty is hereby granted, provided that you include the following on
-ALL copies of the software and documentation or portions thereof, including
-modifications:</p>
-<ol>
- <li>The full text of this NOTICE in a location viewable to users of the
- redistributed or derivative work.</li>
- <li>Any pre-existing intellectual property disclaimers, notices, or terms
- and conditions. If none exist, the <a
- href="copyright-software-short-notice-20021231.html">W3C Software Short
- Notice</a> should be included (hypertext is preferred, text is permitted)
- within the body of any redistributed or derivative code.</li>
- <li>Notice of any changes or modifications to the files, including the date
- changes were made. (We recommend you provide URIs to the location from
- which the code is derived.)</li>
-</ol>
-
-<p>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p>
-
-<p>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-DOCUMENTATION.</p>
-
-<p>The name and trademarks of copyright holders may NOT be used in
-advertising or publicity pertaining to the software without specific, written
-prior permission. Title to copyright in this software and any associated
-documentation will at all times remain with copyright holders.</p>
-
-<p></p>
-
-<p>____________________________________</p>
-
-<p>This formulation of W3C's notice and license became active on December 31
-2002. This version removes the copyright ownership notice such that this
-license can be used with materials other than those owned by the W3C,
-reflects that ERCIM is now a host of the W3C, includes references to this
-specific dated version of the license, and removes the ambiguous grant of
-"use". Otherwise, this version is the same as the <a
-href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">previous
-version</a> and is written so as to preserve the <a
-href="http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses">Free
-Software Foundation's assessment of GPL compatibility</a> and <a
-href="http://www.opensource.org/licenses/W3C.php">OSI's certification</a>
-under the <a href="http://www.opensource.org/docs/definition.php">Open Source
-Definition</a>. Please see our <a
-href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</a> for
-common questions about using materials from our site, including specific
-terms and conditions for packages like libwww, Amaya, and Jigsaw. Other
-questions about this notice can be directed to <a
-href="mailto:site-policy@w3.org">site-policy@w3.org</a>.<br />
-</body>
-</html>
diff --git a/plugins/org.eclipse.actf.model.dom.html/build.properties b/plugins/org.eclipse.actf.model.dom.html/build.properties
deleted file mode 100644
index abda515..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/CharsetHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/CharsetHandler.java
deleted file mode 100644
index eef1497..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/CharsetHandler.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html;
-
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import org.eclipse.actf.model.dom.html.internal.util.RereadableInputStream;
-import org.eclipse.actf.model.dom.sgml.DefaultDocumentHandler;
-import org.eclipse.actf.model.dom.sgml.ISGMLConstants;
-import org.xml.sax.AttributeList;
-import org.xml.sax.SAXException;
-
-
-/**
- * Watch a element that specify character encoding of the document. If
- * <code> <META http-equiv="Content-Type" content="text/html; charset=xxx">
- * appears in a document, this method changes character encoding.
- */
-public class CharsetHandler extends DefaultDocumentHandler {
- private RereadableInputStream ris;
-
- public CharsetHandler(HTMLParser parser, RereadableInputStream ris) {
- super(parser);
- this.ris = ris;
- }
-
- public void startElement(String name, AttributeList atts)
- throws SAXException {
- if (name.equalsIgnoreCase("META")) {
- String httpEquiv = null;
- String content = null;
- for (int i = 0; i < atts.getLength(); i++) {
- name = atts.getName(i);
- if (name.equalsIgnoreCase("http-equiv")) {
- httpEquiv = atts.getValue(i);
- } else if (name.equalsIgnoreCase("content")) {
- content = atts.getValue(i);
- }
- }
- if (httpEquiv == null || content == null) {
- super.startElement(name, atts);
- return;
- }
- if (httpEquiv.equalsIgnoreCase("Content-Type")) {
- int charsetIndex = content.indexOf("charset=");
- if (charsetIndex == -1) {
- charsetIndex = content.indexOf("CHARSET=");
- }
- if (charsetIndex != -1) {
- String encoding = content.substring(charsetIndex
- + "charset=".length());
- try {
- InputStreamReader newReader = new InputStreamReader(
- this.ris, encoding);
- if (((HTMLParser) parser).getEncoding() == null) {
- ((HTMLParser) parser).setEncoding(encoding);
- }
- encoding = newReader.getEncoding();
- String prevEncoding = ((HTMLParser) parser)
- .getISReader().getEncoding();
- if (prevEncoding.equals(encoding)) {
- parser.setDocumentHandler(another);
- } else {
- this.ris.reset();
- ((HTMLParser) parser).getISReader().close();
- parser.setDocumentHandler(another);
- throw new EncodingException(newReader);
- }
- } catch (IOException e) {
- parser.error(ISGMLConstants.MISC_ERR, e.getMessage());
- parser.setDocumentHandler(another);
- super.startElement(name, atts);
- return;
- }
- }
- }
- } else if (name.equalsIgnoreCase("BODY")) {
- parser.setDocumentHandler(another);
- }
- super.startElement(name, atts);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/EncodingException.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/EncodingException.java
deleted file mode 100644
index 413250c..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/EncodingException.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html;
-
-import java.io.InputStreamReader;
-
-import org.xml.sax.SAXException;
-
-class EncodingException extends SAXException {
- private InputStreamReader newReader;
-
- EncodingException(InputStreamReader reader) {
- super("");
- this.newReader = reader;
- }
-
- InputStreamReader getNewReader() {
- return this.newReader;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/HTMLParser.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/HTMLParser.java
deleted file mode 100644
index 0e1ddf1..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/HTMLParser.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html;
-
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.Reader;
-import java.util.Enumeration;
-import java.util.Properties;
-
-import org.eclipse.actf.model.dom.html.errorhandler.FramesetErrorHandler;
-import org.eclipse.actf.model.dom.html.errorhandler.HTMLErrorHandler;
-import org.eclipse.actf.model.dom.html.impl.SHDOMImpl;
-import org.eclipse.actf.model.dom.html.impl.SHDocument;
-import org.eclipse.actf.model.dom.html.internal.util.RereadableInputStream;
-import org.eclipse.actf.model.dom.sgml.IErrorLogListener;
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.html.HTMLDOMImplementation;
-import org.xml.sax.SAXException;
-
-/**
- * HTML Parser. To use this class,
- * <ol>
- * <li>Construct HTMLParser instance with a file to read.
- * <li>call parse(...) method. If an error occurred,
- * <code>ParseException</code> or IOException raises.
- * <li> get <code>Document</code> instance by calling {@link #getDocument()}.
- * If a <code>ParseException</code> was thrown, the returned instance holds
- * sub DOM created from sub document to the error point.
- * </ol>
- * For example,
- *
- * <pre>
- * <code>
- * HTMLParser parser = new HTMLParser();
- * try {
- * parser.parse(new FileInputStream("xxx.html"));
- * } catch (ParseException e) {
- * e.printStackTrace();
- * } catch (IOException e) {
- * e.printStackTrace();
- * }
- * org.w3c.Document doc = parser.getDocument();
- * </code>
- * </pre>
- *
- */
-public class HTMLParser extends SGMLParser {
- static {
- InputStream is = null;
- is = HTMLParser.class.getResourceAsStream("public_entities.properties");
- if (is != null) {
- Properties map = new Properties();
- try {
- map.load(is);
- // pubEntityMap.putAll(map);
- Enumeration keys = map.keys(); // CRS
- while (keys.hasMoreElements()) { // CRS
- String aKey = (String) keys.nextElement(); // CRS
- String replaceKey = aKey.replace('@', ' '); // CRS
- pubEntityMap.put(replaceKey, (String) map.get(aKey)); // CRS
- } // CRS
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- private RereadableInputStream ris;
-
- private InputStreamReader isReader;
-
- InputStreamReader getISReader() {
- return isReader;
- }
-
- /**
- * Constructs HTMLParser instance whose defaultDTD is
- * <code>"-//W3C//DTD HTML 4.0 Transitional//EN"</code>. And also,
- * {@link HTMLErrorHandler} and {@link FramesetErrorHandler} instances are
- * added.
- */
- public HTMLParser() {
- defaultDTD = "-//W3C//DTD HTML 4.0 Transitional//EN";
- addErrorHandler(new FramesetErrorHandler());
- addErrorHandler(new HTMLErrorHandler());
- setDocumentHandler(new PREHandler(this));
- setDOMImplementation(SHDOMImpl.getDOMImplementation());
- if (getDOMImplementation() == null) {
- setDocument(new SHDocument());
- }
- }
-
- protected Reader getResource(String resourceName) throws IOException {
- InputStream is = HTMLParser.class.getResourceAsStream("dtd/"
- + resourceName);
- if (is != null) {
- return new InputStreamReader(is);
- } else {
- return super.getResource(resourceName);
- }
- }
-
- /**
- * Reads files and print their top elements. This method is just for test.
- * usage: java org.eclipse.actf.model.dom.html.HTMLParser [options] files... <br>
- * options:
- * <DL>
- * <DT> -e encoding
- * <DD> specify character encoding to <code>encoding</code>
- * <DT> -c
- * <DD> If it meets
- * <code> <META http-equiv="Content-Type" content="text/html;
- * charset=xxx"></code>
- * tag, change encoding to <code>xxx</code>
- * <DT> -d
- * <DD> Dump results.
- * <DT> -o output file
- * <DT> -x [dtd]
- * <DD> Dump as xml format.
- * <DT> -w?
- * <DD> warning
- *
- * @param args
- * command line argument.
- */
- public static void main(String args[]) {
- boolean dump = false;
- String targetFileName = null;
- int length = args.length;
- String encoding = null;
- boolean ce = false;
- boolean indent = false;
- int warning = -1;
- boolean physical = false;
- boolean xml = false;
- String list = null;
- boolean keepUnknown = false;
- for (int i = 0; i < args.length; i++) {
- if (args[i].equals("-d")) {
- dump = true;
- length--;
- } else if (args[i].equals("-o")) {
- i++;
- targetFileName = args[i];
- length -= 2;
- } else if (args[i].equals("-e")) {
- if (++i == args.length)
- usage();
- encoding = args[i];
- length -= 2;
- } else if (args[i].equals("-c")) {
- ce = true;
- length--;
- } else if (args[i].equals("-x")) {
- xml = true;
- length--;
- } else if (args[i].equals("-i")) {
- indent = true;
- length--;
- } else if (args[i].startsWith("-w")) {
- if (args[i].length() == 2) {
- warning = 0;
- } else {
- try {
- warning = Integer.parseInt(args[i].substring(2));
- } catch (NumberFormatException e) {
- usage();
- }
- }
- length--;
- } else if (args[i].startsWith("-ku")) {
- keepUnknown = true;
- length--;
- } else if (args[i].equals("-physical")) {
- physical = true;
- length--;
- } else if (args[i].startsWith("-l") && args[i].length() > 2) {
- list = args[i].substring(2);
- length--;
- } else {
- break;
- }
- }
- if (length == 0) {
- usage();
- }
- HTMLParser parser;
- for (int i = args.length - length; i < args.length; i++) {
- try {
- parser = new HTMLParser();
- parser.keepUnknownElements(keepUnknown);
- if (warning != -1) {
- if (warning == 0) {
- parser.addErrorLogListener(new IErrorLogListener() {
- public void errorLog(int code, String msg) {
- System.err.println(msg);
- }
- });
- } else {
- final int errorKind = warning;
- parser.addErrorLogListener(new IErrorLogListener() {
- public void errorLog(int code, String msg) {
- if (code == errorKind) {
- System.err.println(msg);
- }
- }
- });
- }
- }
- if (physical) {
- parser.elementHandle(false);
- }
- if (xml) {
- parser.setDefaultTagCase(LOWER_CASE);
- parser.setTagCase(LOWER_CASE);
- parser.setAttrNameCase(LOWER_CASE);
- }
- InputStream is;
- if (args[i].equals("-u")) {
- i++;
- java.net.URL url = new java.net.URL(args[i]);
- is = url.openStream();
- } else {
- is = new FileInputStream(args[i]);
- }
- System.err.println("parsing " + args[i] + " ...");
- try {
- if (ce) {
- parser.parseSwitchEnc(is, encoding);
- System.out.println("Encoding: " + parser.getEncoding());
- } else {
- parser.parse(is, encoding);
- }
- } catch (ParseException e) {
- e.printStackTrace();
- } catch (SAXException e) {
- e.printStackTrace();
- }
- parser.close();
- if (dump) {
- PrintWriter pw;
- OutputStream os = targetFileName == null ? (OutputStream) System.out
- : new FileOutputStream(targetFileName);
- if (encoding != null) {
- pw = new PrintWriter(new OutputStreamWriter(os,
- encoding));
- } else {
- pw = new PrintWriter(os);
- }
- if (!xml) {
- ((SHDocument) parser.getDocument()).printAsSGML(pw,
- indent);
- } else {
- ((SHDocument) parser.getDocument()).printAsXHTML(pw,
- indent, encoding);
- }
- } else if (list != null) {
- NodeList nodeList = parser.getDocument()
- .getElementsByTagName(list);
- for (i = 0; i < nodeList.getLength(); i++) {
- System.out.println(nodeList.item(i));
- }
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Parses an HTML document and return its top element.
- *
- * @param is
- * inputstream to parse with default encoding.
- * @return Top element.
- * @exception PaserException
- * If unrecoverable syntax or token error occurred, throwed
- * @exception IOException
- */
- public Node parse(InputStream is) throws ParseException, IOException,
- SAXException {
- isReader = new InputStreamReader(is);
- return parse(isReader);
- }
-
- /**
- * Parses a HTML document and return its top element.
- *
- * @param is
- * inputstream to parse with default encoding.
- * @return Top element.
- * @exception PaserException
- * If unrecoverable syntax or token error occurred, throwed
- * @exception IOException
- */
- public Node parse(InputStream is, String charEncoding) throws SAXException,
- ParseException, IOException {
- if (charEncoding == null) {
- isReader = new InputStreamReader(is);
- } else {
- this.encoding = charEncoding;
- isReader = new InputStreamReader(is, charEncoding);
- }
- return parse(isReader);
- }
-
- /**
- * Parses a HTML document and return its top element. This method is almost
- * same as {@link #parse(InputStream) parse(InputStream)}. If it meets
- * <code> <META http-equiv="Content-Type"
- * content="text/html; charset=xxx"></code>
- * tag in a document, it tries to change encoding to <code>xxx</code>.
- *
- * @param is
- * inputstream to parse
- * @return Top element.
- * @exception PaserException
- * If unrecoverable syntax or token error occurred, throwed
- * @exception IOException
- */
- public Node parseSwitchEnc(InputStream is) throws ParseException,
- IOException, SAXException {
- return parseSwitchEnc(is, null);
- }
-
- /**
- * Parses a HTML document and return its top element. This method is the
- * same as {@link #parse(InputStream,String) parse(InputStream,String)} If
- * it meets <code> <META http-equiv="Content-Type"
- * content="text/html; charset=xxx"></code>
- * tag in a document, it tries to change encoding to <code>xxx</code>.
- *
- * @param is
- * inputstream to parse
- * @param defaultEncoding
- * default encoding before switching encoding.
- * @return Top element.
- * @exception PaserException
- * If unrecoverable syntax or token error occurred, throwed
- * @exception IOException
- */
- public Node parseSwitchEnc(InputStream is, String defaultEncoding)
- throws SAXException, ParseException, IOException {
- ris = new RereadableInputStream(is);
- setDocumentHandler(new CharsetHandler(this, ris));
- try {
- if (defaultEncoding == null) {
- isReader = new InputStreamReader(ris);
- } else {
- encoding = defaultEncoding;
- isReader = new InputStreamReader(ris, defaultEncoding);
- }
- return parse(isReader);
- } catch (EncodingException e) {
- // clear created child nodes.
- if (setDOMImplementation(getDOMImplementation()) == null) {
- Document doc = getDocument();
- while (doc.hasChildNodes()) {
- doc.removeChild(doc.getFirstChild());
- }
- }
- init();
- encoding = e.getNewReader().getEncoding();
- return parse(e.getNewReader());
- }
- }
-
- protected Document createDocument(DocumentType docType) {
- DOMImplementation domImpl = getDOMImplementation();
- try {
- if (!(domImpl instanceof HTMLDOMImplementation)) {
- return super.createDocument(docType);
- }
- } catch (Error e) {
- return super.createDocument(docType);
- }
- Document ret = ((HTMLDOMImplementation) domImpl)
- .createHTMLDocument("dummy");
- if (ret.getDocumentElement() != null) {
- ret.removeChild(ret.getDocumentElement());
- }
- if (docType != null) {
- try {
- ret.insertBefore(docType, null);
- } catch (DOMException e) {
- }
- }
- return ret;
- }
-
- private String encoding = null;
-
- /**
- * Character Encoding parsed a document with.
- *
- * @return If null parsed a document with default encoding.
- */
- public String getEncoding() {
- return encoding;
- }
-
- void setEncoding(String enc) {
- this.encoding = enc;
- }
-
- private static void usage() {
- System.out
- .println("usage java org.eclipse.actf.model.dom.html.HTMLParser [-w[#]] [-d] [-e encoding] [-c] files...");
- System.exit(1);
- }
-
- /**
- * Always returns "HTML"
- *
- * @return "HTML"
- */
- protected String getDefaultTopElement() {
- return "HTML";
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/HtmlParserPlugin.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/HtmlParserPlugin.java
deleted file mode 100644
index e25ed4c..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/HtmlParserPlugin.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.html;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class HtmlParserPlugin extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.actf.model.dom.html";
-
- // The shared instance
- private static HtmlParserPlugin plugin;
-
- /**
- * The constructor
- */
- public HtmlParserPlugin() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static HtmlParserPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/PREHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/PREHandler.java
deleted file mode 100644
index d30b561..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/PREHandler.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html;
-
-import org.eclipse.actf.model.dom.sgml.DefaultDocumentHandler;
-import org.xml.sax.AttributeList;
-import org.xml.sax.SAXException;
-
-
-public class PREHandler extends DefaultDocumentHandler {
- private boolean previousPrsvWS;
-
- public PREHandler(HTMLParser parser) {
- super(parser);
- }
-
- public void startElement(String name, AttributeList atts)
- throws SAXException {
- if (name.equalsIgnoreCase("PRE")) {
- previousPrsvWS = parser.getPreserveWhitespace();
- parser.setPreserveWhitespace(true);
- }
- super.startElement(name, atts);
- }
-
- public void endElement(String name) throws SAXException {
- if (name.equalsIgnoreCase("PRE")) {
- parser.setPreserveWhitespace(previousPrsvWS);
- }
- super.endElement(name);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTML32.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTML32.dtd
deleted file mode 100644
index 04e60d3..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTML32.dtd
+++ /dev/null
@@ -1,597 +0,0 @@
-<!--
- W3C Document Type Definition for the HyperText Markup Language
- version 3.2 as ratified by a vote of W3C member companies.
- For more information on W3C look at URL http://www.w3.org/
-
- Date: Tuesday January 14th 1997
-
- Author: Dave Raggett <dsr@w3.org>
-
- HTML 3.2 aims to capture recommended practice as of early '96
- and as such to be used as a replacement for HTML 2.0 (RFC 1866).
- Widely deployed rendering attributes are included where they
- have been shown to be interoperable. SCRIPT and STYLE are
- included to smooth the introduction of client-side scripts
- and style sheets. Browsers must avoid showing the contents
- of these element Otherwise support for them is not required.
- ID, CLASS and STYLE attributes are not included in this version
- of HTML.
--->
-
-<!ENTITY % HTML.Version
- "-//W3C//DTD HTML 3.2 Final//EN"
-
- -- Typical usage:
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
- <html>
- ...
- </html>
- --
- >
-
-<!--================== Deprecated Features Switch =========================-->
-
-<!ENTITY % HTML.Deprecated "INCLUDE">
-
-<!--================== Imported Names =====================================-->
-
-<!ENTITY % Content-Type "CDATA"
- -- meaning a MIME content type, as per RFC1521
- -->
-
-<!ENTITY % HTTP-Method "GET | POST"
- -- as per HTTP specification
- -->
-
-<!ENTITY % URL "CDATA"
- -- The term URL means a CDATA attribute
- whose value is a Uniform Resource Locator,
- See RFC1808 (June 95) and RFC1738 (Dec 94).
- -->
-
-<!-- Parameter Entities -->
-
-<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK" -- repeatable head elements -->
-
-<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
-
-<!ENTITY % list "UL | OL | DIR | MENU">
-
-<![ %HTML.Deprecated [
- <!ENTITY % preformatted "PRE | XMP | LISTING">
-]]>
-
-<!ENTITY % preformatted "PRE">
-
-<!--================ Character mnemonic entities ==========================-->
-
-<!ENTITY % ISOlat1 PUBLIC
- "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
-%ISOlat1;
-
-<!--================ Entities for special symbols =========================-->
-<!-- &trade and &cbsp are not widely deployed and so not included here -->
-
-<!ENTITY amp CDATA "&" -- ampersand -->
-<!ENTITY gt CDATA ">" -- greater than -->
-<!ENTITY lt CDATA "<" -- less than -->
-
-<!--=================== Text Markup =======================================-->
-
-<!ENTITY % font "TT | I | B | U | STRIKE | BIG | SMALL | SUB | SUP">
-
-<!ENTITY % phrase "EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE">
-
-<!ENTITY % special "A | IMG | APPLET | FONT | BASEFONT | BR | SCRIPT | MAP">
-
-<!ENTITY % form "INPUT | SELECT | TEXTAREA">
-
-<!ENTITY % text "#PCDATA | %font | %phrase | %special | %form">
-
-<!ELEMENT (%font|%phrase) - - (%text)*>
-
-<!-- there are also 16 widely known color names although
- the resulting colors are implementation dependent:
-
- aqua, black, blue, fuchsia, gray, green, lime, maroon,
- navy, olive, purple, red, silver, teal, white, and yellow
-
- These colors were originally picked as being the standard
- 16 colors supported with the Windows VGA palette.
- -->
-
-<!ELEMENT FONT - - (%text)* -- local change to font -->
-<!ATTLIST FONT
- size CDATA #IMPLIED -- [+]nn e.g. size="+1", size=4 --
- color CDATA #IMPLIED -- #RRGGBB in hex, e.g. red: color="#FF0000" --
- >
-
-<!ELEMENT BASEFONT - O EMPTY -- base font size (1 to 7)-->
-<!ATTLIST BASEFONT
- size CDATA #IMPLIED -- e.g. size=3 --
- >
-
-<!ELEMENT BR - O EMPTY -- forced line break -->
-<!ATTLIST BR
- clear (left|all|right|none) none -- control of text flow --
- >
-
-<!--================== HTML content models ================================-->
-<!--
- HTML has three basic content models:
-
- %text character level elements and text strings
- %flow block-like elements e.g. paragraphs and lists
- %bodytext as %flow plus headers H1-H6 and ADDRESS
--->
-
-<!ENTITY % block
- "P | %list | %preformatted | DL | DIV | CENTER |
- BLOCKQUOTE | FORM | ISINDEX | HR | TABLE">
-
-<!-- %flow is used for DD and LI -->
-
-<!ENTITY % flow "(%text | %block)*">
-
-<!--=================== Document Body =====================================-->
-
-<!ENTITY % body.content "(%heading | %text | %block | ADDRESS)*">
-
-<!ENTITY % color "CDATA" -- a color specification: #HHHHHH @@ details? -->
-
-<!ENTITY % body-color-attrs "
- bgcolor %color #IMPLIED
- text %color #IMPLIED
- link %color #IMPLIED
- vlink %color #IMPLIED
- alink %color #IMPLIED
- ">
-
-<!ELEMENT BODY O O %body.content>
-<!ATTLIST BODY
- background %URL #IMPLIED -- texture tile for document background --
- %body-color-attrs; -- bgcolor, text, link, vlink, alink --
- >
-
-<!ENTITY % address.content "((%text;) | P)*">
-
-<!ELEMENT ADDRESS - - %address.content>
-
-<!ELEMENT DIV - - %body.content>
-<!ATTLIST DIV
- align (left|center|right) #IMPLIED -- alignment of following text --
- >
-
-<!-- CENTER is a shorthand for DIV with ALIGN=CENTER -->
-<!ELEMENT center - - %body.content>
-
-<!--================== The Anchor Element =================================-->
-
-<!ELEMENT A - - (%text)* -(A)>
-<!ATTLIST A
- name CDATA #IMPLIED -- named link end --
- href %URL #IMPLIED -- URL for linked resource --
- rel CDATA #IMPLIED -- forward link types --
- rev CDATA #IMPLIED -- reverse link types --
- title CDATA #IMPLIED -- advisory title string --
- >
-
-<!--================== Client-side image maps ============================-->
-
-<!-- These can be placed in the same document or grouped in a
- separate document although this isn't yet widely supported -->
-
-<!ENTITY % SHAPE "(rect|circle|poly)">
-<!ENTITY % COORDS "CDATA" -- comma separated list of numbers -->
-
-<!ELEMENT MAP - - (AREA)*>
-<!ATTLIST MAP
- name CDATA #IMPLIED
- >
-
-<!ELEMENT AREA - O EMPTY>
-<!ATTLIST AREA
- shape %SHAPE rect
- coords %COORDS #IMPLIED -- defines coordinates for shape --
- href %URL #IMPLIED -- this region acts as hypertext link --
- nohref (nohref) #IMPLIED -- this region has no action --
- alt CDATA #REQUIRED -- needed for non-graphical user agents --
- >
-
-<!--================== The LINK Element ==================================-->
-
-<!ENTITY % Types "CDATA"
- -- See Internet Draft: draft-ietf-html-relrev-00.txt
- LINK has been part of HTML since the early days
- although few browsers as yet take advantage of it.
-
- Relationship values can be used in principle:
-
- a) for document specific toolbars/menus when used
- with the LINK element in the document head:
- b) to link to a separate style sheet
- c) to make a link to a script
- d) by stylesheets to control how collections of
- html nodes are rendered into printed documents
- e) to make a link to a printable version of this document
- e.g. a postscript or pdf version
--->
-
-<!ELEMENT LINK - O EMPTY>
-<!ATTLIST LINK
- href %URL #IMPLIED -- URL for linked resource --
- rel %Types #IMPLIED -- forward link types --
- rev %Types #IMPLIED -- reverse link types --
- title CDATA #IMPLIED -- advisory title string --
- >
-
-<!--=================== Images ============================================-->
-
-<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
-<!ENTITY % Pixels "NUMBER" -- integer representing length in pixels -->
-
-<!-- Suggested widths are used for negotiating image size
- with the module responsible for painting the image.
- align=left or right cause image to float to margin
- and for subsequent text to wrap around image -->
-
-<!ENTITY % IAlign "(top|middle|bottom|left|right)">
-
-<!ELEMENT IMG - O EMPTY -- Embedded image -->
-<!ATTLIST IMG
- src %URL #REQUIRED -- URL of image to embed --
- alt CDATA #IMPLIED -- for display in place of image --
- align %IAlign #IMPLIED -- vertical or horizontal alignment --
- height %Pixels #IMPLIED -- suggested height in pixels --
- width %Pixels #IMPLIED -- suggested width in pixels --
- border %Pixels #IMPLIED -- suggested link border width --
- hspace %Pixels #IMPLIED -- suggested horizontal gutter --
- vspace %Pixels #IMPLIED -- suggested vertical gutter --
- usemap %URL #IMPLIED -- use client-side image map --
- ismap (ismap) #IMPLIED -- use server image map --
- >
-
-<!-- USEMAP points to a MAP element which may be in this document
- or an external document, although the latter is not widely supported -->
-
-<!--=================== Java APPLET tag ===================================-->
-<!--
- This tag is supported by all Java enabled browsers. Applet resources
- (including their classes) are normally loaded relative to the document
- URL (or <BASE> element if it is defined). The CODEBASE attribute is used
- to change this default behavior. If the CODEBASE attribute is defined then
- it specifies a different location to find applet resources. The value
- can be an absolute URL or a relative URL. The absolute URL is used as is
- without modification and is not effected by the documents <BASE> element.
- When the codebase attribute is relative, then it is relative to the
- document URL (or <BASE> tag if defined).
--->
-<!ELEMENT APPLET - - (PARAM | %text)*>
-<!ATTLIST APPLET
- codebase %URL #IMPLIED -- code base --
- code CDATA #REQUIRED -- class file --
- alt CDATA #IMPLIED -- for display in place of applet --
- name CDATA #IMPLIED -- applet name --
- width %Pixels #REQUIRED -- suggested width in pixels --
- height %Pixels #REQUIRED -- suggested height in pixels --
- align %IAlign #IMPLIED -- vertical or horizontal alignment --
- hspace %Pixels #IMPLIED -- suggested horizontal gutter --
- vspace %Pixels #IMPLIED -- suggested vertical gutter --
- >
-
-<!ELEMENT PARAM - O EMPTY>
-<!ATTLIST PARAM
- name NMTOKEN #REQUIRED -- The name of the parameter --
- value CDATA #IMPLIED -- The value of the parameter --
- >
-
-<!--
-Here is an example:
-
- <applet codebase="applets/NervousText"
- code=NervousText.class
- width=300
- height=50>
- <param name=text value="Java is Cool!">
- <img src=sorry.gif alt="This looks better with Java support">
- </applet>
--->
-
-<!--=================== Horizontal Rule ===================================-->
-
-<!ELEMENT HR - O EMPTY>
-<!ATTLIST HR
- align (left|right|center) #IMPLIED
- noshade (noshade) #IMPLIED
- size %Pixels #IMPLIED
- width %Length #IMPLIED
- >
-<!--=================== Paragraphs=========================================-->
-
-<!ELEMENT P - O (%text)*>
-<!ATTLIST P
- align (left|center|right) #IMPLIED
- >
-
-<!--=================== Headings ==========================================-->
-
-<!--
- There are six levels of headers from H1 (the most important)
- to H6 (the least important).
--->
-
-<!ELEMENT ( %heading ) - - (%text;)*>
-<!ATTLIST ( %heading )
- align (left|center|right) #IMPLIED
- >
-
-<!--=================== Preformatted Text =================================-->
-
-<!-- excludes images and changes in font size -->
-
-<!ENTITY % pre.exclusion "IMG|BIG|SMALL|SUB|SUP|FONT">
-
-<!ELEMENT PRE - - (%text)* -(%pre.exclusion)>
-<!ATTLIST PRE
- width NUMBER #implied -- is this widely supported? --
- >
-
-<![ %HTML.Deprecated [
-
-<!ENTITY % literal "CDATA"
- -- historical, non-conforming parsing mode where
- the only markup signal is the end tag
- in full
- -->
-
-<!ELEMENT (XMP|LISTING) - - %literal>
-<!ELEMENT PLAINTEXT - O %literal>
-
-]]>
-
-<!--=================== Block-like Quotes =================================-->
-
-<!ELEMENT BLOCKQUOTE - - %body.content>
-
-<!--=================== Lists =============================================-->
-
-<!--
- HTML 3.2 allows you to control the sequence number for ordered lists.
- You can set the sequence number with the START and VALUE attributes.
- The TYPE attribute may be used to specify the rendering of ordered
- and unordered lists.
--->
-
-<!-- definition lists - DT for term, DD for its definition -->
-
-<!ELEMENT DL - - (DT|DD)+>
-<!ATTLIST DL
- compact (compact) #IMPLIED -- more compact style --
- >
-
-<!ELEMENT DT - O (%text)*>
-<!ELEMENT DD - O %flow;>
-
-<!-- Ordered lists OL, and unordered lists UL -->
-<!ELEMENT (OL|UL) - - (LI)+>
-
-<!--
- Numbering style
- 1 arablic numbers 1, 2, 3, ...
- a lower alpha a, b, c, ...
- A upper alpha A, B, C, ...
- i lower roman i, ii, iii, ...
- I upper roman I, II, III, ...
-
- The style is applied to the sequence number which by default
- is reset to 1 for the first list item in an ordered list.
-
- This can't be expressed directly in SGML due to case folding.
--->
-
-<!ENTITY % OLStyle "CDATA" -- constrained to: [1|a|A|i|I] -->
-
-<!ATTLIST OL -- ordered lists --
- type %OLStyle #IMPLIED -- numbering style --
- start NUMBER #IMPLIED -- starting sequence number --
- compact (compact) #IMPLIED -- reduced interitem spacing --
- >
-
-<!-- bullet styles -->
-
-<!ENTITY % ULStyle "disc|square|circle">
-
-<!ATTLIST UL -- unordered lists --
- type (%ULStyle) #IMPLIED -- bullet style --
- compact (compact) #IMPLIED -- reduced interitem spacing --
- >
-
-<!ELEMENT (DIR|MENU) - - (LI)+ -(%block)>
-<!ATTLIST DIR
- compact (compact) #IMPLIED
- >
-<!ATTLIST MENU
- compact (compact) #IMPLIED
- >
-
-<!-- <DIR> Directory list -->
-<!-- <DIR COMPACT> Compact list style -->
-<!-- <MENU> Menu list -->
-<!-- <MENU COMPACT> Compact list style -->
-
-<!-- The type attribute can be used to change the bullet style
- in unordered lists and the numbering style in ordered lists -->
-
-<!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle|%OLStyle)" -->
-
-<!ELEMENT LI - O %flow -- list item -->
-<!ATTLIST LI
- type %LIStyle #IMPLIED -- list item style --
- value NUMBER #IMPLIED -- reset sequence number --
- >
-
-<!--================ Forms ===============================================-->
-
-<!ELEMENT FORM - - %body.content -(FORM)>
-<!ATTLIST FORM
- action %URL #IMPLIED -- server-side form handler --
- method (%HTTP-Method) GET -- see HTTP specification --
- enctype %Content-Type; "application/x-www-form-urlencoded"
- >
-
-<!ENTITY % InputType
- "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT
- | RESET | FILE | HIDDEN | IMAGE)">
-
-<!ELEMENT INPUT - O EMPTY>
-<!ATTLIST INPUT
- type %InputType TEXT -- what kind of widget is needed --
- name CDATA #IMPLIED -- required for all but submit and reset --
- value CDATA #IMPLIED -- required for radio and checkboxes --
- checked (checked) #IMPLIED -- for radio buttons and check boxes --
- size CDATA #IMPLIED -- specific to each type of field --
- maxlength NUMBER #IMPLIED -- max chars allowed in text fields --
- src %URL #IMPLIED -- for fields with background images --
- align %IAlign #IMPLIED -- vertical or horizontal alignment --
- >
-
-<!ELEMENT SELECT - - (OPTION+)>
-<!ATTLIST SELECT
- name CDATA #REQUIRED
- size NUMBER #IMPLIED
- multiple (multiple) #IMPLIED
- >
-
-<!ELEMENT OPTION - O (#PCDATA)*>
-<!ATTLIST OPTION
- selected (selected) #IMPLIED
- value CDATA #IMPLIED -- defaults to element content --
- >
-
-<!-- Multi-line text input field. -->
-
-<!ELEMENT TEXTAREA - - (#PCDATA)*>
-<!ATTLIST TEXTAREA
- name CDATA #REQUIRED
- rows NUMBER #REQUIRED
- cols NUMBER #REQUIRED
- >
-
-<!--======================= Tables ========================================-->
-
-<!-- Widely deployed subset of the full table standard, see RFC 1942
- e.g. at http://www.ics.uci.edu/pub/ietf/html/rfc1942.txt -->
-
-<!-- horizontal placement of table relative to window -->
-<!ENTITY % Where "(left|center|right)">
-
-<!-- horizontal alignment attributes for cell contents -->
-<!ENTITY % cell.halign
- "align (left|center|right) #IMPLIED"
- >
-
-<!-- vertical alignment attributes for cell contents -->
-<!ENTITY % cell.valign
- "valign (top|middle|bottom) #IMPLIED"
- >
-
-<!ELEMENT table - - (caption?, tr+)>
-<!ELEMENT tr - O (th|td)*>
-<!ELEMENT (th|td) - O %body.content>
-
-<!ATTLIST table -- table element --
- align %Where; #IMPLIED -- table position relative to window --
- width %Length #IMPLIED -- table width relative to window --
- border %Pixels #IMPLIED -- controls frame width around table --
- cellspacing %Pixels #IMPLIED -- spacing between cells --
- cellpadding %Pixels #IMPLIED -- spacing within cells --
- >
-
-<!ELEMENT CAPTION - - (%text;)* -- table or figure caption -->
-<!ATTLIST CAPTION
- align (top|bottom) #IMPLIED
- >
-
-<!ATTLIST tr -- table row --
- %cell.halign; -- horizontal alignment in cells --
- %cell.valign; -- vertical alignment in cells --
- >
-
-<!ATTLIST (th|td) -- header or data cell --
- nowrap (nowrap) #IMPLIED -- suppress word wrap --
- rowspan NUMBER 1 -- number of rows spanned by cell --
- colspan NUMBER 1 -- number of cols spanned by cell --
- %cell.halign; -- horizontal alignment in cell --
- %cell.valign; -- vertical alignment in cell --
- width %Pixels #IMPLIED -- suggested width for cell --
- height %Pixels #IMPLIED -- suggested height for cell --
- >
-
-<!--================ Document Head ========================================-->
-
-<!-- %head.misc defined earlier on as "SCRIPT|STYLE|META|LINK" -->
-
-<!ENTITY % head.content "TITLE & ISINDEX? & BASE?">
-
-<!ELEMENT HEAD O O (%head.content) +(%head.misc)>
-
-<!ELEMENT TITLE - - (#PCDATA)* -(%head.misc)
- -- The TITLE element is not considered part of the flow of text.
- It should be displayed, for example as the page header or
- window title.
- -->
-
-<!ELEMENT ISINDEX - O EMPTY>
-<!ATTLIST ISINDEX
- prompt CDATA #IMPLIED -- prompt message -->
-
-<!--
- The BASE element gives an absolute URL for dereferencing relative
- URLs, e.g.
-
- <BASE href="http://foo.com/index.html">
- ...
- <IMG SRC="images/bar.gif">
-
- The image is deferenced to
-
- http://foo.com/images/bar.gif
-
- In the absence of a BASE element the document URL should be used.
- Note that this is not necessarily the same as the URL used to
- request the document, as the base URL may be overridden by an HTTP
- header accompanying the document.
--->
-
-<!ELEMENT BASE - O EMPTY>
-<!ATTLIST BASE
- href %URL #REQUIRED
- >
-
-<!ELEMENT META - O EMPTY -- Generic Metainformation -->
-<!ATTLIST META
- http-equiv NAME #IMPLIED -- HTTP response header name --
- name NAME #IMPLIED -- metainformation name --
- content CDATA #REQUIRED -- associated information --
- >
-
-<!-- SCRIPT/STYLE are place holders for transition to next version of HTML -->
-
-<!ELEMENT STYLE - - CDATA -- placeholder for style info -->
-<!ELEMENT SCRIPT - - CDATA -- placeholder for script statements -->
-
-<!--================ Document Structure ===================================-->
-
-<!ENTITY % version.attr "VERSION CDATA #FIXED '%HTML.Version;'">
-
-<![ %HTML.Deprecated [
- <!ENTITY % html.content "HEAD, BODY, PLAINTEXT?">
-]]>
-
-<!ENTITY % html.content "HEAD, BODY">
-
-<!ELEMENT HTML O O (%html.content)>
-<!ATTLIST HTML
- %version.attr;
- >
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTMLlat1.ent b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTMLlat1.ent
deleted file mode 100644
index c644486..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTMLlat1.ent
+++ /dev/null
@@ -1,194 +0,0 @@
-<!-- Portions (C) International Organization for Standardization 1986
- Permission to copy in any form is granted for use with
- conforming SGML systems and applications as defined in
- ISO 8879, provided this notice is included in all copies.
--->
-<!-- Character entity set. Typical invocation:
- <!ENTITY % HTMLlat1 PUBLIC
- "-//W3C//ENTITIES Latin 1//EN//HTML">
- %HTMLlat1;
--->
-
-<!ENTITY nbsp CDATA " " -- no-break space = non-breaking space,
- U+00A0 ISOnum -->
-<!ENTITY iexcl CDATA "¡" -- inverted exclamation mark, U+00A1 ISOnum -->
-<!ENTITY cent CDATA "¢" -- cent sign, U+00A2 ISOnum -->
-<!ENTITY pound CDATA "£" -- pound sign, U+00A3 ISOnum -->
-<!ENTITY curren CDATA "¤" -- currency sign, U+00A4 ISOnum -->
-<!ENTITY yen CDATA "¥" -- yen sign = yuan sign, U+00A5 ISOnum -->
-<!ENTITY brvbar CDATA "¦" -- broken bar = broken vertical bar,
- U+00A6 ISOnum -->
-<!ENTITY sect CDATA "§" -- section sign, U+00A7 ISOnum -->
-<!ENTITY uml CDATA "¨" -- diaeresis = spacing diaeresis,
- U+00A8 ISOdia -->
-<!ENTITY copy CDATA "©" -- copyright sign, U+00A9 ISOnum -->
-<!ENTITY ordf CDATA "ª" -- feminine ordinal indicator, U+00AA ISOnum -->
-<!ENTITY laquo CDATA "«" -- left-pointing double angle quotation mark
- = left pointing guillemet, U+00AB ISOnum -->
-<!ENTITY not CDATA "¬" -- not sign, U+00AC ISOnum -->
-<!ENTITY shy CDATA "­" -- soft hyphen = discretionary hyphen,
- U+00AD ISOnum -->
-<!ENTITY reg CDATA "®" -- registered sign = registered trade mark sign,
- U+00AE ISOnum -->
-<!ENTITY macr CDATA "¯" -- macron = spacing macron = overline
- = APL overbar, U+00AF ISOdia -->
-<!ENTITY deg CDATA "°" -- degree sign, U+00B0 ISOnum -->
-<!ENTITY plusmn CDATA "±" -- plus-minus sign = plus-or-minus sign,
- U+00B1 ISOnum -->
-<!ENTITY sup2 CDATA "²" -- superscript two = superscript digit two
- = squared, U+00B2 ISOnum -->
-<!ENTITY sup3 CDATA "³" -- superscript three = superscript digit three
- = cubed, U+00B3 ISOnum -->
-<!ENTITY acute CDATA "´" -- acute accent = spacing acute,
- U+00B4 ISOdia -->
-<!ENTITY micro CDATA "µ" -- micro sign, U+00B5 ISOnum -->
-<!ENTITY para CDATA "¶" -- pilcrow sign = paragraph sign,
- U+00B6 ISOnum -->
-<!ENTITY middot CDATA "·" -- middle dot = Georgian comma
- = Greek middle dot, U+00B7 ISOnum -->
-<!ENTITY cedil CDATA "¸" -- cedilla = spacing cedilla, U+00B8 ISOdia -->
-<!ENTITY sup1 CDATA "¹" -- superscript one = superscript digit one,
- U+00B9 ISOnum -->
-<!ENTITY ordm CDATA "º" -- masculine ordinal indicator,
- U+00BA ISOnum -->
-<!ENTITY raquo CDATA "»" -- right-pointing double angle quotation mark
- = right pointing guillemet, U+00BB ISOnum -->
-<!ENTITY frac14 CDATA "¼" -- vulgar fraction one quarter
- = fraction one quarter, U+00BC ISOnum -->
-<!ENTITY frac12 CDATA "½" -- vulgar fraction one half
- = fraction one half, U+00BD ISOnum -->
-<!ENTITY frac34 CDATA "¾" -- vulgar fraction three quarters
- = fraction three quarters, U+00BE ISOnum -->
-<!ENTITY iquest CDATA "¿" -- inverted question mark
- = turned question mark, U+00BF ISOnum -->
-<!ENTITY Agrave CDATA "À" -- latin capital letter A with grave
- = latin capital letter A grave,
- U+00C0 ISOlat1 -->
-<!ENTITY Aacute CDATA "Á" -- latin capital letter A with acute,
- U+00C1 ISOlat1 -->
-<!ENTITY Acirc CDATA "Â" -- latin capital letter A with circumflex,
- U+00C2 ISOlat1 -->
-<!ENTITY Atilde CDATA "Ã" -- latin capital letter A with tilde,
- U+00C3 ISOlat1 -->
-<!ENTITY Auml CDATA "Ä" -- latin capital letter A with diaeresis,
- U+00C4 ISOlat1 -->
-<!ENTITY Aring CDATA "Å" -- latin capital letter A with ring above
- = latin capital letter A ring,
- U+00C5 ISOlat1 -->
-<!ENTITY AElig CDATA "Æ" -- latin capital letter AE
- = latin capital ligature AE,
- U+00C6 ISOlat1 -->
-<!ENTITY Ccedil CDATA "Ç" -- latin capital letter C with cedilla,
- U+00C7 ISOlat1 -->
-<!ENTITY Egrave CDATA "È" -- latin capital letter E with grave,
- U+00C8 ISOlat1 -->
-<!ENTITY Eacute CDATA "É" -- latin capital letter E with acute,
- U+00C9 ISOlat1 -->
-<!ENTITY Ecirc CDATA "Ê" -- latin capital letter E with circumflex,
- U+00CA ISOlat1 -->
-<!ENTITY Euml CDATA "Ë" -- latin capital letter E with diaeresis,
- U+00CB ISOlat1 -->
-<!ENTITY Igrave CDATA "Ì" -- latin capital letter I with grave,
- U+00CC ISOlat1 -->
-<!ENTITY Iacute CDATA "Í" -- latin capital letter I with acute,
- U+00CD ISOlat1 -->
-<!ENTITY Icirc CDATA "Î" -- latin capital letter I with circumflex,
- U+00CE ISOlat1 -->
-<!ENTITY Iuml CDATA "Ï" -- latin capital letter I with diaeresis,
- U+00CF ISOlat1 -->
-<!ENTITY ETH CDATA "Ð" -- latin capital letter ETH, U+00D0 ISOlat1 -->
-<!ENTITY Ntilde CDATA "Ñ" -- latin capital letter N with tilde,
- U+00D1 ISOlat1 -->
-<!ENTITY Ograve CDATA "Ò" -- latin capital letter O with grave,
- U+00D2 ISOlat1 -->
-<!ENTITY Oacute CDATA "Ó" -- latin capital letter O with acute,
- U+00D3 ISOlat1 -->
-<!ENTITY Ocirc CDATA "Ô" -- latin capital letter O with circumflex,
- U+00D4 ISOlat1 -->
-<!ENTITY Otilde CDATA "Õ" -- latin capital letter O with tilde,
- U+00D5 ISOlat1 -->
-<!ENTITY Ouml CDATA "Ö" -- latin capital letter O with diaeresis,
- U+00D6 ISOlat1 -->
-<!ENTITY times CDATA "×" -- multiplication sign, U+00D7 ISOnum -->
-<!ENTITY Oslash CDATA "Ø" -- latin capital letter O with stroke
- = latin capital letter O slash,
- U+00D8 ISOlat1 -->
-<!ENTITY Ugrave CDATA "Ù" -- latin capital letter U with grave,
- U+00D9 ISOlat1 -->
-<!ENTITY Uacute CDATA "Ú" -- latin capital letter U with acute,
- U+00DA ISOlat1 -->
-<!ENTITY Ucirc CDATA "Û" -- latin capital letter U with circumflex,
- U+00DB ISOlat1 -->
-<!ENTITY Uuml CDATA "Ü" -- latin capital letter U with diaeresis,
- U+00DC ISOlat1 -->
-<!ENTITY Yacute CDATA "Ý" -- latin capital letter Y with acute,
- U+00DD ISOlat1 -->
-<!ENTITY THORN CDATA "Þ" -- latin capital letter THORN,
- U+00DE ISOlat1 -->
-<!ENTITY szlig CDATA "ß" -- latin small letter sharp s = ess-zed,
- U+00DF ISOlat1 -->
-<!ENTITY agrave CDATA "à" -- latin small letter a with grave
- = latin small letter a grave,
- U+00E0 ISOlat1 -->
-<!ENTITY aacute CDATA "á" -- latin small letter a with acute,
- U+00E1 ISOlat1 -->
-<!ENTITY acirc CDATA "â" -- latin small letter a with circumflex,
- U+00E2 ISOlat1 -->
-<!ENTITY atilde CDATA "ã" -- latin small letter a with tilde,
- U+00E3 ISOlat1 -->
-<!ENTITY auml CDATA "ä" -- latin small letter a with diaeresis,
- U+00E4 ISOlat1 -->
-<!ENTITY aring CDATA "å" -- latin small letter a with ring above
- = latin small letter a ring,
- U+00E5 ISOlat1 -->
-<!ENTITY aelig CDATA "æ" -- latin small letter ae
- = latin small ligature ae, U+00E6 ISOlat1 -->
-<!ENTITY ccedil CDATA "ç" -- latin small letter c with cedilla,
- U+00E7 ISOlat1 -->
-<!ENTITY egrave CDATA "è" -- latin small letter e with grave,
- U+00E8 ISOlat1 -->
-<!ENTITY eacute CDATA "é" -- latin small letter e with acute,
- U+00E9 ISOlat1 -->
-<!ENTITY ecirc CDATA "ê" -- latin small letter e with circumflex,
- U+00EA ISOlat1 -->
-<!ENTITY euml CDATA "ë" -- latin small letter e with diaeresis,
- U+00EB ISOlat1 -->
-<!ENTITY igrave CDATA "ì" -- latin small letter i with grave,
- U+00EC ISOlat1 -->
-<!ENTITY iacute CDATA "í" -- latin small letter i with acute,
- U+00ED ISOlat1 -->
-<!ENTITY icirc CDATA "î" -- latin small letter i with circumflex,
- U+00EE ISOlat1 -->
-<!ENTITY iuml CDATA "ï" -- latin small letter i with diaeresis,
- U+00EF ISOlat1 -->
-<!ENTITY eth CDATA "ð" -- latin small letter eth, U+00F0 ISOlat1 -->
-<!ENTITY ntilde CDATA "ñ" -- latin small letter n with tilde,
- U+00F1 ISOlat1 -->
-<!ENTITY ograve CDATA "ò" -- latin small letter o with grave,
- U+00F2 ISOlat1 -->
-<!ENTITY oacute CDATA "ó" -- latin small letter o with acute,
- U+00F3 ISOlat1 -->
-<!ENTITY ocirc CDATA "ô" -- latin small letter o with circumflex,
- U+00F4 ISOlat1 -->
-<!ENTITY otilde CDATA "õ" -- latin small letter o with tilde,
- U+00F5 ISOlat1 -->
-<!ENTITY ouml CDATA "ö" -- latin small letter o with diaeresis,
- U+00F6 ISOlat1 -->
-<!ENTITY divide CDATA "÷" -- division sign, U+00F7 ISOnum -->
-<!ENTITY oslash CDATA "ø" -- latin small letter o with stroke,
- = latin small letter o slash,
- U+00F8 ISOlat1 -->
-<!ENTITY ugrave CDATA "ù" -- latin small letter u with grave,
- U+00F9 ISOlat1 -->
-<!ENTITY uacute CDATA "ú" -- latin small letter u with acute,
- U+00FA ISOlat1 -->
-<!ENTITY ucirc CDATA "û" -- latin small letter u with circumflex,
- U+00FB ISOlat1 -->
-<!ENTITY uuml CDATA "ü" -- latin small letter u with diaeresis,
- U+00FC ISOlat1 -->
-<!ENTITY yacute CDATA "ý" -- latin small letter y with acute,
- U+00FD ISOlat1 -->
-<!ENTITY thorn CDATA "þ" -- latin small letter thorn,
- U+00FE ISOlat1 -->
-<!ENTITY yuml CDATA "ÿ" -- latin small letter y with diaeresis,
- U+00FF ISOlat1 -->
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTMLspecial.ent b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTMLspecial.ent
deleted file mode 100644
index 5ce5c6a..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTMLspecial.ent
+++ /dev/null
@@ -1,77 +0,0 @@
-<!-- Special characters for HTML -->
-
-<!-- Character entity set. Typical invocation:
- <!ENTITY % HTMLspecial PUBLIC
- "-//W3C//ENTITIES Special//EN//HTML">
- %HTMLspecial; -->
-
-<!-- Portions (C) International Organization for Standardization 1986:
- Permission to copy in any form is granted for use with
- conforming SGML systems and applications as defined in
- ISO 8879, provided this notice is included in all copies.
--->
-
-<!-- Relevant ISO entity set is given unless names are newly introduced.
- New names (i.e., not in ISO 8879 list) do not clash with any
- existing ISO 8879 entity names. ISO 10646 character numbers
- are given for each character, in hex. CDATA values are decimal
- conversions of the ISO 10646 values and refer to the document
- character set. Names are ISO 10646 names.
-
--->
-
-<!-- C0 Controls and Basic Latin -->
-<!ENTITY quot CDATA """ -- quotation mark = APL quote,
- U+0022 ISOnum -->
-<!ENTITY amp CDATA "&" -- ampersand, U+0026 ISOnum -->
-<!ENTITY lt CDATA "<" -- less-than sign, U+003C ISOnum -->
-<!ENTITY gt CDATA ">" -- greater-than sign, U+003E ISOnum -->
-
-<!-- Latin Extended-A -->
-<!ENTITY OElig CDATA "Œ" -- latin capital ligature OE,
- U+0152 ISOlat2 -->
-<!ENTITY oelig CDATA "œ" -- latin small ligature oe, U+0153 ISOlat2 -->
-<!-- ligature is a misnomer, this is a separate character in some languages -->
-<!ENTITY Scaron CDATA "Š" -- latin capital letter S with caron,
- U+0160 ISOlat2 -->
-<!ENTITY scaron CDATA "š" -- latin small letter s with caron,
- U+0161 ISOlat2 -->
-<!ENTITY Yuml CDATA "Ÿ" -- latin capital letter Y with diaeresis,
- U+0178 ISOlat2 -->
-
-<!-- Spacing Modifier Letters -->
-<!ENTITY circ CDATA "ˆ" -- modifier letter circumflex accent,
- U+02C6 ISOpub -->
-<!ENTITY tilde CDATA "˜" -- small tilde, U+02DC ISOdia -->
-
-<!-- General Punctuation -->
-<!ENTITY ensp CDATA " " -- en space, U+2002 ISOpub -->
-<!ENTITY emsp CDATA " " -- em space, U+2003 ISOpub -->
-<!ENTITY thinsp CDATA " " -- thin space, U+2009 ISOpub -->
-<!ENTITY zwnj CDATA "‌" -- zero width non-joiner,
- U+200C NEW RFC 2070 -->
-<!ENTITY zwj CDATA "‍" -- zero width joiner, U+200D NEW RFC 2070 -->
-<!ENTITY lrm CDATA "‎" -- left-to-right mark, U+200E NEW RFC 2070 -->
-<!ENTITY rlm CDATA "‏" -- right-to-left mark, U+200F NEW RFC 2070 -->
-<!ENTITY ndash CDATA "–" -- en dash, U+2013 ISOpub -->
-<!ENTITY mdash CDATA "—" -- em dash, U+2014 ISOpub -->
-<!ENTITY lsquo CDATA "‘" -- left single quotation mark,
- U+2018 ISOnum -->
-<!ENTITY rsquo CDATA "’" -- right single quotation mark,
- U+2019 ISOnum -->
-<!ENTITY sbquo CDATA "‚" -- single low-9 quotation mark, U+201A NEW -->
-<!ENTITY ldquo CDATA "“" -- left double quotation mark,
- U+201C ISOnum -->
-<!ENTITY rdquo CDATA "”" -- right double quotation mark,
- U+201D ISOnum -->
-<!ENTITY bdquo CDATA "„" -- double low-9 quotation mark, U+201E NEW -->
-<!ENTITY dagger CDATA "†" -- dagger, U+2020 ISOpub -->
-<!ENTITY Dagger CDATA "‡" -- double dagger, U+2021 ISOpub -->
-<!ENTITY permil CDATA "‰" -- per mille sign, U+2030 ISOtech -->
-<!ENTITY lsaquo CDATA "‹" -- single left-pointing angle quotation mark,
- U+2039 ISO proposed -->
-<!-- lsaquo is proposed but not yet ISO standardized -->
-<!ENTITY rsaquo CDATA "›" -- single right-pointing angle quotation mark,
- U+203A ISO proposed -->
-<!-- rsaquo is proposed but not yet ISO standardized -->
-<!ENTITY euro CDATA "€" -- euro sign, U+20AC NEW -->
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTMLsymbol.ent b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTMLsymbol.ent
deleted file mode 100644
index 524bfe1..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/HTMLsymbol.ent
+++ /dev/null
@@ -1,241 +0,0 @@
-<!-- Mathematical, Greek and Symbolic characters for HTML -->
-
-<!-- Character entity set. Typical invocation:
- <!ENTITY % HTMLsymbol PUBLIC
- "-//W3C//ENTITIES Symbols//EN//HTML">
- %HTMLsymbol; -->
-
-<!-- Portions (C) International Organization for Standardization 1986:
- Permission to copy in any form is granted for use with
- conforming SGML systems and applications as defined in
- ISO 8879, provided this notice is included in all copies.
--->
-
-<!-- Relevant ISO entity set is given unless names are newly introduced.
- New names (i.e., not in ISO 8879 list) do not clash with any
- existing ISO 8879 entity names. ISO 10646 character numbers
- are given for each character, in hex. CDATA values are decimal
- conversions of the ISO 10646 values and refer to the document
- character set. Names are ISO 10646 names.
-
--->
-
-<!-- Latin Extended-B -->
-<!ENTITY fnof CDATA "ƒ" -- latin small f with hook = function
- = florin, U+0192 ISOtech -->
-
-<!-- Greek -->
-<!ENTITY Alpha CDATA "Α" -- greek capital letter alpha, U+0391 -->
-<!ENTITY Beta CDATA "Β" -- greek capital letter beta, U+0392 -->
-<!ENTITY Gamma CDATA "Γ" -- greek capital letter gamma,
- U+0393 ISOgrk3 -->
-<!ENTITY Delta CDATA "Δ" -- greek capital letter delta,
- U+0394 ISOgrk3 -->
-<!ENTITY Epsilon CDATA "Ε" -- greek capital letter epsilon, U+0395 -->
-<!ENTITY Zeta CDATA "Ζ" -- greek capital letter zeta, U+0396 -->
-<!ENTITY Eta CDATA "Η" -- greek capital letter eta, U+0397 -->
-<!ENTITY Theta CDATA "Θ" -- greek capital letter theta,
- U+0398 ISOgrk3 -->
-<!ENTITY Iota CDATA "Ι" -- greek capital letter iota, U+0399 -->
-<!ENTITY Kappa CDATA "Κ" -- greek capital letter kappa, U+039A -->
-<!ENTITY Lambda CDATA "Λ" -- greek capital letter lambda,
- U+039B ISOgrk3 -->
-<!ENTITY Mu CDATA "Μ" -- greek capital letter mu, U+039C -->
-<!ENTITY Nu CDATA "Ν" -- greek capital letter nu, U+039D -->
-<!ENTITY Xi CDATA "Ξ" -- greek capital letter xi, U+039E ISOgrk3 -->
-<!ENTITY Omicron CDATA "Ο" -- greek capital letter omicron, U+039F -->
-<!ENTITY Pi CDATA "Π" -- greek capital letter pi, U+03A0 ISOgrk3 -->
-<!ENTITY Rho CDATA "Ρ" -- greek capital letter rho, U+03A1 -->
-<!-- there is no Sigmaf, and no U+03A2 character either -->
-<!ENTITY Sigma CDATA "Σ" -- greek capital letter sigma,
- U+03A3 ISOgrk3 -->
-<!ENTITY Tau CDATA "Τ" -- greek capital letter tau, U+03A4 -->
-<!ENTITY Upsilon CDATA "Υ" -- greek capital letter upsilon,
- U+03A5 ISOgrk3 -->
-<!ENTITY Phi CDATA "Φ" -- greek capital letter phi,
- U+03A6 ISOgrk3 -->
-<!ENTITY Chi CDATA "Χ" -- greek capital letter chi, U+03A7 -->
-<!ENTITY Psi CDATA "Ψ" -- greek capital letter psi,
- U+03A8 ISOgrk3 -->
-<!ENTITY Omega CDATA "Ω" -- greek capital letter omega,
- U+03A9 ISOgrk3 -->
-
-<!ENTITY alpha CDATA "α" -- greek small letter alpha,
- U+03B1 ISOgrk3 -->
-<!ENTITY beta CDATA "β" -- greek small letter beta, U+03B2 ISOgrk3 -->
-<!ENTITY gamma CDATA "γ" -- greek small letter gamma,
- U+03B3 ISOgrk3 -->
-<!ENTITY delta CDATA "δ" -- greek small letter delta,
- U+03B4 ISOgrk3 -->
-<!ENTITY epsilon CDATA "ε" -- greek small letter epsilon,
- U+03B5 ISOgrk3 -->
-<!ENTITY zeta CDATA "ζ" -- greek small letter zeta, U+03B6 ISOgrk3 -->
-<!ENTITY eta CDATA "η" -- greek small letter eta, U+03B7 ISOgrk3 -->
-<!ENTITY theta CDATA "θ" -- greek small letter theta,
- U+03B8 ISOgrk3 -->
-<!ENTITY iota CDATA "ι" -- greek small letter iota, U+03B9 ISOgrk3 -->
-<!ENTITY kappa CDATA "κ" -- greek small letter kappa,
- U+03BA ISOgrk3 -->
-<!ENTITY lambda CDATA "λ" -- greek small letter lambda,
- U+03BB ISOgrk3 -->
-<!ENTITY mu CDATA "μ" -- greek small letter mu, U+03BC ISOgrk3 -->
-<!ENTITY nu CDATA "ν" -- greek small letter nu, U+03BD ISOgrk3 -->
-<!ENTITY xi CDATA "ξ" -- greek small letter xi, U+03BE ISOgrk3 -->
-<!ENTITY omicron CDATA "ο" -- greek small letter omicron, U+03BF NEW -->
-<!ENTITY pi CDATA "π" -- greek small letter pi, U+03C0 ISOgrk3 -->
-<!ENTITY rho CDATA "ρ" -- greek small letter rho, U+03C1 ISOgrk3 -->
-<!ENTITY sigmaf CDATA "ς" -- greek small letter final sigma,
- U+03C2 ISOgrk3 -->
-<!ENTITY sigma CDATA "σ" -- greek small letter sigma,
- U+03C3 ISOgrk3 -->
-<!ENTITY tau CDATA "τ" -- greek small letter tau, U+03C4 ISOgrk3 -->
-<!ENTITY upsilon CDATA "υ" -- greek small letter upsilon,
- U+03C5 ISOgrk3 -->
-<!ENTITY phi CDATA "φ" -- greek small letter phi, U+03C6 ISOgrk3 -->
-<!ENTITY chi CDATA "χ" -- greek small letter chi, U+03C7 ISOgrk3 -->
-<!ENTITY psi CDATA "ψ" -- greek small letter psi, U+03C8 ISOgrk3 -->
-<!ENTITY omega CDATA "ω" -- greek small letter omega,
- U+03C9 ISOgrk3 -->
-<!ENTITY thetasym CDATA "ϑ" -- greek small letter theta symbol,
- U+03D1 NEW -->
-<!ENTITY upsih CDATA "ϒ" -- greek upsilon with hook symbol,
- U+03D2 NEW -->
-<!ENTITY piv CDATA "ϖ" -- greek pi symbol, U+03D6 ISOgrk3 -->
-
-<!-- General Punctuation -->
-<!ENTITY bull CDATA "•" -- bullet = black small circle,
- U+2022 ISOpub -->
-<!-- bullet is NOT the same as bullet operator, U+2219 -->
-<!ENTITY hellip CDATA "…" -- horizontal ellipsis = three dot leader,
- U+2026 ISOpub -->
-<!ENTITY prime CDATA "′" -- prime = minutes = feet, U+2032 ISOtech -->
-<!ENTITY Prime CDATA "″" -- double prime = seconds = inches,
- U+2033 ISOtech -->
-<!ENTITY oline CDATA "‾" -- overline = spacing overscore,
- U+203E NEW -->
-<!ENTITY frasl CDATA "⁄" -- fraction slash, U+2044 NEW -->
-
-<!-- Letterlike Symbols -->
-<!ENTITY weierp CDATA "℘" -- script capital P = power set
- = Weierstrass p, U+2118 ISOamso -->
-<!ENTITY image CDATA "ℑ" -- blackletter capital I = imaginary part,
- U+2111 ISOamso -->
-<!ENTITY real CDATA "ℜ" -- blackletter capital R = real part symbol,
- U+211C ISOamso -->
-<!ENTITY trade CDATA "™" -- trade mark sign, U+2122 ISOnum -->
-<!ENTITY alefsym CDATA "ℵ" -- alef symbol = first transfinite cardinal,
- U+2135 NEW -->
-<!-- alef symbol is NOT the same as hebrew letter alef,
- U+05D0 although the same glyph could be used to depict both characters -->
-
-<!-- Arrows -->
-<!ENTITY larr CDATA "←" -- leftwards arrow, U+2190 ISOnum -->
-<!ENTITY uarr CDATA "↑" -- upwards arrow, U+2191 ISOnum-->
-<!ENTITY rarr CDATA "→" -- rightwards arrow, U+2192 ISOnum -->
-<!ENTITY darr CDATA "↓" -- downwards arrow, U+2193 ISOnum -->
-<!ENTITY harr CDATA "↔" -- left right arrow, U+2194 ISOamsa -->
-<!ENTITY crarr CDATA "↵" -- downwards arrow with corner leftwards
- = carriage return, U+21B5 NEW -->
-<!ENTITY lArr CDATA "⇐" -- leftwards double arrow, U+21D0 ISOtech -->
-<!-- ISO 10646 does not say that lArr is the same as the 'is implied by' arrow
- but also does not have any other character for that function. So ? lArr can
- be used for 'is implied by' as ISOtech suggests -->
-<!ENTITY uArr CDATA "⇑" -- upwards double arrow, U+21D1 ISOamsa -->
-<!ENTITY rArr CDATA "⇒" -- rightwards double arrow,
- U+21D2 ISOtech -->
-<!-- ISO 10646 does not say this is the 'implies' character but does not have
- another character with this function so ?
- rArr can be used for 'implies' as ISOtech suggests -->
-<!ENTITY dArr CDATA "⇓" -- downwards double arrow, U+21D3 ISOamsa -->
-<!ENTITY hArr CDATA "⇔" -- left right double arrow,
- U+21D4 ISOamsa -->
-
-<!-- Mathematical Operators -->
-<!ENTITY forall CDATA "∀" -- for all, U+2200 ISOtech -->
-<!ENTITY part CDATA "∂" -- partial differential, U+2202 ISOtech -->
-<!ENTITY exist CDATA "∃" -- there exists, U+2203 ISOtech -->
-<!ENTITY empty CDATA "∅" -- empty set = null set = diameter,
- U+2205 ISOamso -->
-<!ENTITY nabla CDATA "∇" -- nabla = backward difference,
- U+2207 ISOtech -->
-<!ENTITY isin CDATA "∈" -- element of, U+2208 ISOtech -->
-<!ENTITY notin CDATA "∉" -- not an element of, U+2209 ISOtech -->
-<!ENTITY ni CDATA "∋" -- contains as member, U+220B ISOtech -->
-<!-- should there be a more memorable name than 'ni'? -->
-<!ENTITY prod CDATA "∏" -- n-ary product = product sign,
- U+220F ISOamsb -->
-<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
- the same glyph might be used for both -->
-<!ENTITY sum CDATA "∑" -- n-ary sumation, U+2211 ISOamsb -->
-<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
- though the same glyph might be used for both -->
-<!ENTITY minus CDATA "−" -- minus sign, U+2212 ISOtech -->
-<!ENTITY lowast CDATA "∗" -- asterisk operator, U+2217 ISOtech -->
-<!ENTITY radic CDATA "√" -- square root = radical sign,
- U+221A ISOtech -->
-<!ENTITY prop CDATA "∝" -- proportional to, U+221D ISOtech -->
-<!ENTITY infin CDATA "∞" -- infinity, U+221E ISOtech -->
-<!ENTITY ang CDATA "∠" -- angle, U+2220 ISOamso -->
-<!ENTITY and CDATA "∧" -- logical and = wedge, U+2227 ISOtech -->
-<!ENTITY or CDATA "∨" -- logical or = vee, U+2228 ISOtech -->
-<!ENTITY cap CDATA "∩" -- intersection = cap, U+2229 ISOtech -->
-<!ENTITY cup CDATA "∪" -- union = cup, U+222A ISOtech -->
-<!ENTITY int CDATA "∫" -- integral, U+222B ISOtech -->
-<!ENTITY there4 CDATA "∴" -- therefore, U+2234 ISOtech -->
-<!ENTITY sim CDATA "∼" -- tilde operator = varies with = similar to,
- U+223C ISOtech -->
-<!-- tilde operator is NOT the same character as the tilde, U+007E,
- although the same glyph might be used to represent both -->
-<!ENTITY cong CDATA "≅" -- approximately equal to, U+2245 ISOtech -->
-<!ENTITY asymp CDATA "≈" -- almost equal to = asymptotic to,
- U+2248 ISOamsr -->
-<!ENTITY ne CDATA "≠" -- not equal to, U+2260 ISOtech -->
-<!ENTITY equiv CDATA "≡" -- identical to, U+2261 ISOtech -->
-<!ENTITY le CDATA "≤" -- less-than or equal to, U+2264 ISOtech -->
-<!ENTITY ge CDATA "≥" -- greater-than or equal to,
- U+2265 ISOtech -->
-<!ENTITY sub CDATA "⊂" -- subset of, U+2282 ISOtech -->
-<!ENTITY sup CDATA "⊃" -- superset of, U+2283 ISOtech -->
-<!-- note that nsup, 'not a superset of, U+2283' is not covered by the Symbol
- font encoding and is not included. Should it be, for symmetry?
- It is in ISOamsn -->
-<!ENTITY nsub CDATA "⊄" -- not a subset of, U+2284 ISOamsn -->
-<!ENTITY sube CDATA "⊆" -- subset of or equal to, U+2286 ISOtech -->
-<!ENTITY supe CDATA "⊇" -- superset of or equal to,
- U+2287 ISOtech -->
-<!ENTITY oplus CDATA "⊕" -- circled plus = direct sum,
- U+2295 ISOamsb -->
-<!ENTITY otimes CDATA "⊗" -- circled times = vector product,
- U+2297 ISOamsb -->
-<!ENTITY perp CDATA "⊥" -- up tack = orthogonal to = perpendicular,
- U+22A5 ISOtech -->
-<!ENTITY sdot CDATA "⋅" -- dot operator, U+22C5 ISOamsb -->
-<!-- dot operator is NOT the same character as U+00B7 middle dot -->
-
-<!-- Miscellaneous Technical -->
-<!ENTITY lceil CDATA "⌈" -- left ceiling = apl upstile,
- U+2308 ISOamsc -->
-<!ENTITY rceil CDATA "⌉" -- right ceiling, U+2309 ISOamsc -->
-<!ENTITY lfloor CDATA "⌊" -- left floor = apl downstile,
- U+230A ISOamsc -->
-<!ENTITY rfloor CDATA "⌋" -- right floor, U+230B ISOamsc -->
-<!ENTITY lang CDATA "〈" -- left-pointing angle bracket = bra,
- U+2329 ISOtech -->
-<!-- lang is NOT the same character as U+003C 'less than'
- or U+2039 'single left-pointing angle quotation mark' -->
-<!ENTITY rang CDATA "〉" -- right-pointing angle bracket = ket,
- U+232A ISOtech -->
-<!-- rang is NOT the same character as U+003E 'greater than'
- or U+203A 'single right-pointing angle quotation mark' -->
-
-<!-- Geometric Shapes -->
-<!ENTITY loz CDATA "◊" -- lozenge, U+25CA ISOpub -->
-
-<!-- Miscellaneous Symbols -->
-<!ENTITY spades CDATA "♠" -- black spade suit, U+2660 ISOpub -->
-<!-- black here seems to mean filled as opposed to hollow -->
-<!ENTITY clubs CDATA "♣" -- black club suit = shamrock,
- U+2663 ISOpub -->
-<!ENTITY hearts CDATA "♥" -- black heart suit = valentine,
- U+2665 ISOpub -->
-<!ENTITY diams CDATA "♦" -- black diamond suit, U+2666 ISOpub -->
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/ISOlat1.ent b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/ISOlat1.ent
deleted file mode 100644
index 7225899..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/ISOlat1.ent
+++ /dev/null
@@ -1,108 +0,0 @@
-<!-- (C) International Organization for Standardization 1986
- Permission to copy in any form is granted for use with
- conforming SGML systems and applications as defined in
- ISO 8879, provided this notice is included in all copies.
- This has been extended for use with HTML to cover the full
- set of codes in the range 160-255 decimal.
--->
-<!-- Character entity set. Typical invocation:
- <!ENTITY % ISOlat1 PUBLIC
- "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
- %ISOlat1;
--->
-<!ENTITY nbsp CDATA " " -- no-break space -->
-<!ENTITY iexcl CDATA "¡" -- inverted exclamation mark -->
-<!ENTITY cent CDATA "¢" -- cent sign -->
-<!ENTITY pound CDATA "£" -- pound sterling sign -->
-<!ENTITY curren CDATA "¤" -- general currency sign -->
-<!ENTITY yen CDATA "¥" -- yen sign -->
-<!ENTITY brvbar CDATA "¦" -- broken (vertical) bar -->
-<!ENTITY sect CDATA "§" -- section sign -->
-<!ENTITY uml CDATA "¨" -- umlaut (dieresis) -->
-<!ENTITY copy CDATA "©" -- copyright sign -->
-<!ENTITY ordf CDATA "ª" -- ordinal indicator, feminine -->
-<!ENTITY laquo CDATA "«" -- angle quotation mark, left -->
-<!ENTITY not CDATA "¬" -- not sign -->
-<!ENTITY shy CDATA "­" -- soft hyphen -->
-<!ENTITY reg CDATA "®" -- registered sign -->
-<!ENTITY macr CDATA "¯" -- macron -->
-<!ENTITY deg CDATA "°" -- degree sign -->
-<!ENTITY plusmn CDATA "±" -- plus-or-minus sign -->
-<!ENTITY sup2 CDATA "²" -- superscript two -->
-<!ENTITY sup3 CDATA "³" -- superscript three -->
-<!ENTITY acute CDATA "´" -- acute accent -->
-<!ENTITY micro CDATA "µ" -- micro sign -->
-<!ENTITY para CDATA "¶" -- pilcrow (paragraph sign) -->
-<!ENTITY middot CDATA "·" -- middle dot -->
-<!ENTITY cedil CDATA "¸" -- cedilla -->
-<!ENTITY sup1 CDATA "¹" -- superscript one -->
-<!ENTITY ordm CDATA "º" -- ordinal indicator, masculine -->
-<!ENTITY raquo CDATA "»" -- angle quotation mark, right -->
-<!ENTITY frac14 CDATA "¼" -- fraction one-quarter -->
-<!ENTITY frac12 CDATA "½" -- fraction one-half -->
-<!ENTITY frac34 CDATA "¾" -- fraction three-quarters -->
-<!ENTITY iquest CDATA "¿" -- inverted question mark -->
-<!ENTITY Agrave CDATA "À" -- capital A, grave accent -->
-<!ENTITY Aacute CDATA "Á" -- capital A, acute accent -->
-<!ENTITY Acirc CDATA "Â" -- capital A, circumflex accent -->
-<!ENTITY Atilde CDATA "Ã" -- capital A, tilde -->
-<!ENTITY Auml CDATA "Ä" -- capital A, dieresis or umlaut mark -->
-<!ENTITY Aring CDATA "Å" -- capital A, ring -->
-<!ENTITY AElig CDATA "Æ" -- capital AE diphthong (ligature) -->
-<!ENTITY Ccedil CDATA "Ç" -- capital C, cedilla -->
-<!ENTITY Egrave CDATA "È" -- capital E, grave accent -->
-<!ENTITY Eacute CDATA "É" -- capital E, acute accent -->
-<!ENTITY Ecirc CDATA "Ê" -- capital E, circumflex accent -->
-<!ENTITY Euml CDATA "Ë" -- capital E, dieresis or umlaut mark -->
-<!ENTITY Igrave CDATA "Ì" -- capital I, grave accent -->
-<!ENTITY Iacute CDATA "Í" -- capital I, acute accent -->
-<!ENTITY Icirc CDATA "Î" -- capital I, circumflex accent -->
-<!ENTITY Iuml CDATA "Ï" -- capital I, dieresis or umlaut mark -->
-<!ENTITY ETH CDATA "Ð" -- capital Eth, Icelandic -->
-<!ENTITY Ntilde CDATA "Ñ" -- capital N, tilde -->
-<!ENTITY Ograve CDATA "Ò" -- capital O, grave accent -->
-<!ENTITY Oacute CDATA "Ó" -- capital O, acute accent -->
-<!ENTITY Ocirc CDATA "Ô" -- capital O, circumflex accent -->
-<!ENTITY Otilde CDATA "Õ" -- capital O, tilde -->
-<!ENTITY Ouml CDATA "Ö" -- capital O, dieresis or umlaut mark -->
-<!ENTITY times CDATA "×" -- multiply sign -->
-<!ENTITY Oslash CDATA "Ø" -- capital O, slash -->
-<!ENTITY Ugrave CDATA "Ù" -- capital U, grave accent -->
-<!ENTITY Uacute CDATA "Ú" -- capital U, acute accent -->
-<!ENTITY Ucirc CDATA "Û" -- capital U, circumflex accent -->
-<!ENTITY Uuml CDATA "Ü" -- capital U, dieresis or umlaut mark -->
-<!ENTITY Yacute CDATA "Ý" -- capital Y, acute accent -->
-<!ENTITY THORN CDATA "Þ" -- capital THORN, Icelandic -->
-<!ENTITY szlig CDATA "ß" -- small sharp s, German (sz ligature) -->
-<!ENTITY agrave CDATA "à" -- small a, grave accent -->
-<!ENTITY aacute CDATA "á" -- small a, acute accent -->
-<!ENTITY acirc CDATA "â" -- small a, circumflex accent -->
-<!ENTITY atilde CDATA "ã" -- small a, tilde -->
-<!ENTITY auml CDATA "ä" -- small a, dieresis or umlaut mark -->
-<!ENTITY aring CDATA "å" -- small a, ring -->
-<!ENTITY aelig CDATA "æ" -- small ae diphthong (ligature) -->
-<!ENTITY ccedil CDATA "ç" -- small c, cedilla -->
-<!ENTITY egrave CDATA "è" -- small e, grave accent -->
-<!ENTITY eacute CDATA "é" -- small e, acute accent -->
-<!ENTITY ecirc CDATA "ê" -- small e, circumflex accent -->
-<!ENTITY euml CDATA "ë" -- small e, dieresis or umlaut mark -->
-<!ENTITY igrave CDATA "ì" -- small i, grave accent -->
-<!ENTITY iacute CDATA "í" -- small i, acute accent -->
-<!ENTITY icirc CDATA "î" -- small i, circumflex accent -->
-<!ENTITY iuml CDATA "ï" -- small i, dieresis or umlaut mark -->
-<!ENTITY eth CDATA "ð" -- small eth, Icelandic -->
-<!ENTITY ntilde CDATA "ñ" -- small n, tilde -->
-<!ENTITY ograve CDATA "ò" -- small o, grave accent -->
-<!ENTITY oacute CDATA "ó" -- small o, acute accent -->
-<!ENTITY ocirc CDATA "ô" -- small o, circumflex accent -->
-<!ENTITY otilde CDATA "õ" -- small o, tilde -->
-<!ENTITY ouml CDATA "ö" -- small o, dieresis or umlaut mark -->
-<!ENTITY divide CDATA "÷" -- divide sign -->
-<!ENTITY oslash CDATA "ø" -- small o, slash -->
-<!ENTITY ugrave CDATA "ù" -- small u, grave accent -->
-<!ENTITY uacute CDATA "ú" -- small u, acute accent -->
-<!ENTITY ucirc CDATA "û" -- small u, circumflex accent -->
-<!ENTITY uuml CDATA "ü" -- small u, dieresis or umlaut mark -->
-<!ENTITY yacute CDATA "ý" -- small y, acute accent -->
-<!ENTITY thorn CDATA "þ" -- small thorn, Icelandic -->
-<!ENTITY yuml CDATA "ÿ" -- small y, dieresis or umlaut mark -->
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/ISOlat1.sgml b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/ISOlat1.sgml
deleted file mode 100644
index 7673828..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/ISOlat1.sgml
+++ /dev/null
@@ -1,74 +0,0 @@
-<!-- (C) International Organization for Standardization 1986
- Permission to copy in any form is granted for use with
- conforming SGML systems and applications as defined in
- ISO 8879, provided this notice is included in all copies.
--->
-<!-- Character entity set. Typical invocation:
- <!ENTITY % ISOlat1 PUBLIC
- "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
- %ISOlat1;
--->
-<!-- Modified for use in HTML
-$Id: ISOlat1.sgml,v 1.2 1994/11/30 23:45:12 connolly Exp $ -->
-<!ENTITY AElig CDATA "Æ" -- capital AE diphthong (ligature) -->
-<!ENTITY Aacute CDATA "Á" -- capital A, acute accent -->
-<!ENTITY Acirc CDATA "Â" -- capital A, circumflex accent -->
-<!ENTITY Agrave CDATA "À" -- capital A, grave accent -->
-<!ENTITY Aring CDATA "Å" -- capital A, ring -->
-<!ENTITY Atilde CDATA "Ã" -- capital A, tilde -->
-<!ENTITY Auml CDATA "Ä" -- capital A, dieresis or umlaut mark -->
-<!ENTITY Ccedil CDATA "Ç" -- capital C, cedilla -->
-<!ENTITY ETH CDATA "Ð" -- capital Eth, Icelandic -->
-<!ENTITY Eacute CDATA "É" -- capital E, acute accent -->
-<!ENTITY Ecirc CDATA "Ê" -- capital E, circumflex accent -->
-<!ENTITY Egrave CDATA "È" -- capital E, grave accent -->
-<!ENTITY Euml CDATA "Ë" -- capital E, dieresis or umlaut mark -->
-<!ENTITY Iacute CDATA "Í" -- capital I, acute accent -->
-<!ENTITY Icirc CDATA "Î" -- capital I, circumflex accent -->
-<!ENTITY Igrave CDATA "Ì" -- capital I, grave accent -->
-<!ENTITY Iuml CDATA "Ï" -- capital I, dieresis or umlaut mark -->
-<!ENTITY Ntilde CDATA "Ñ" -- capital N, tilde -->
-<!ENTITY Oacute CDATA "Ó" -- capital O, acute accent -->
-<!ENTITY Ocirc CDATA "Ô" -- capital O, circumflex accent -->
-<!ENTITY Ograve CDATA "Ò" -- capital O, grave accent -->
-<!ENTITY Oslash CDATA "Ø" -- capital O, slash -->
-<!ENTITY Otilde CDATA "Õ" -- capital O, tilde -->
-<!ENTITY Ouml CDATA "Ö" -- capital O, dieresis or umlaut mark -->
-<!ENTITY THORN CDATA "Þ" -- capital THORN, Icelandic -->
-<!ENTITY Uacute CDATA "Ú" -- capital U, acute accent -->
-<!ENTITY Ucirc CDATA "Û" -- capital U, circumflex accent -->
-<!ENTITY Ugrave CDATA "Ù" -- capital U, grave accent -->
-<!ENTITY Uuml CDATA "Ü" -- capital U, dieresis or umlaut mark -->
-<!ENTITY Yacute CDATA "Ý" -- capital Y, acute accent -->
-<!ENTITY aacute CDATA "á" -- small a, acute accent -->
-<!ENTITY acirc CDATA "â" -- small a, circumflex accent -->
-<!ENTITY aelig CDATA "æ" -- small ae diphthong (ligature) -->
-<!ENTITY agrave CDATA "à" -- small a, grave accent -->
-<!ENTITY aring CDATA "å" -- small a, ring -->
-<!ENTITY atilde CDATA "ã" -- small a, tilde -->
-<!ENTITY auml CDATA "ä" -- small a, dieresis or umlaut mark -->
-<!ENTITY ccedil CDATA "ç" -- small c, cedilla -->
-<!ENTITY eacute CDATA "é" -- small e, acute accent -->
-<!ENTITY ecirc CDATA "ê" -- small e, circumflex accent -->
-<!ENTITY egrave CDATA "è" -- small e, grave accent -->
-<!ENTITY eth CDATA "ð" -- small eth, Icelandic -->
-<!ENTITY euml CDATA "ë" -- small e, dieresis or umlaut mark -->
-<!ENTITY iacute CDATA "í" -- small i, acute accent -->
-<!ENTITY icirc CDATA "î" -- small i, circumflex accent -->
-<!ENTITY igrave CDATA "ì" -- small i, grave accent -->
-<!ENTITY iuml CDATA "ï" -- small i, dieresis or umlaut mark -->
-<!ENTITY ntilde CDATA "ñ" -- small n, tilde -->
-<!ENTITY oacute CDATA "ó" -- small o, acute accent -->
-<!ENTITY ocirc CDATA "ô" -- small o, circumflex accent -->
-<!ENTITY ograve CDATA "ò" -- small o, grave accent -->
-<!ENTITY oslash CDATA "ø" -- small o, slash -->
-<!ENTITY otilde CDATA "õ" -- small o, tilde -->
-<!ENTITY ouml CDATA "ö" -- small o, dieresis or umlaut mark -->
-<!ENTITY szlig CDATA "ß" -- small sharp s, German (sz ligature) -->
-<!ENTITY thorn CDATA "þ" -- small thorn, Icelandic -->
-<!ENTITY uacute CDATA "ú" -- small u, acute accent -->
-<!ENTITY ucirc CDATA "û" -- small u, circumflex accent -->
-<!ENTITY ugrave CDATA "ù" -- small u, grave accent -->
-<!ENTITY uuml CDATA "ü" -- small u, dieresis or umlaut mark -->
-<!ENTITY yacute CDATA "ý" -- small y, acute accent -->
-<!ENTITY yuml CDATA "ÿ" -- small y, dieresis or umlaut mark -->
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/compact.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/compact.dtd
deleted file mode 100644
index 392b514..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/compact.dtd
+++ /dev/null
@@ -1,230 +0,0 @@
-<!-- Compact HTML Document Type Definition -->
-
-<!--
- Date: Tuesday November 25th 1997
- Author: Tomihisa Kamada <tomy@access.co.jp>
--->
-
-<!ENTITY % HTML.Version
- "-//W3C//DTD Compact HTML 1.0 Draft//EN"
- >
-
-<!--================== Deprecated Features Switch =========================-->
-
-<!ENTITY % HTML.Deprecated "INCLUDE">
-
-<!--================== Imported Names =====================================-->
-
-<!ENTITY % Content-Type "CDATA">
-
-<!ENTITY % HTTP-Method "GET | POST">
-
-<!ENTITY % URL "CDATA">
-
-<!-- Parameter Entities -->
-
-<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
-
-<!ENTITY % list "UL | OL | DIR | MENU">
-
-<!ENTITY % preformatted "PRE">
-
-<!--================ Character mnemonic entities ==========================-->
-
-<!ENTITY % ISOlat1 PUBLIC
- "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
-
-%ISOlat1;
-
-<!--================ Entities for special symbols =========================-->
-
-<!ENTITY amp CDATA "&" -- ampersand -->
-<!ENTITY gt CDATA ">" -- greater than -->
-<!ENTITY lt CDATA "<" -- less than -->
-
-<!--=================== Text Markup =======================================-->
-
-<!ENTITY % phrase "DFN">
-
-<!ENTITY % special "A | IMG | BR ">
-
-<!ENTITY % form "INPUT | SELECT | TEXTAREA">
-
-<!ENTITY % text "#PCDATA | %phrase | %special | %form">
-
-<!ELEMENT (%phrase) - - (%text)*>
-
-<!ELEMENT BR - O EMPTY>
-<!ATTLIST BR
- clear (left|all|right|none) none
- >
-
-<!--================== HTML content models ================================-->
-
-<!ENTITY % block
- "P | %list | %preformatted | DL | DIV | CENTER |
- BLOCKQUOTE | FORM | HR ">
-
-<!ENTITY % flow "(%text | %block)*">
-
-<!--=================== Document Body =====================================-->
-
-<!ENTITY % body.content "(%heading | %text | %block )*">
-
-<!ELEMENT BODY O O %body.content>
-
-<!ELEMENT DIV - - %body.content>
-<!ATTLIST DIV
- align (left|center|right) #IMPLIED
- >
-
-<!ELEMENT center - - %body.content>
-
-<!--================== The Anchor Element =================================-->
-
-<!ELEMENT A - - (%text)* -(A)>
-<!ATTLIST A
- name CDATA #IMPLIED
- href %URL #IMPLIED
- >
-
-<!--=================== Images ============================================-->
-
-<!ENTITY % Length "CDATA">
-<!ENTITY % Pixels "NUMBER">
-
-<!ENTITY % IAlign "(top|middle|bottom|left|right)">
-
-<!ELEMENT IMG - O EMPTY>
-<!ATTLIST IMG
- src %URL #REQUIRED
- align %IAlign #IMPLIED
- width %Pixels #IMPLIED
- height %Pixels #IMPLIED
- hspace %Pixels #IMPLIED
- vspace %Pixels #IMPLIED
- alt CDATA #IMPLIED
- border %Pixels #IMPLIED
- >
-
-<!--=================== Horizontal Rule ===================================-->
-
-<!ELEMENT HR - O EMPTY>
-<!ATTLIST HR
- align (left|right|center) #IMPLIED
- size %Pixels #IMPLIED
- width %Length #IMPLIED
- noshade (noshade) #IMPLIED
- >
-
-<!--=================== Paragraphs=========================================-->
-
-<!ELEMENT P - O (%text)*>
-<!ATTLIST P
- align (left|center|right) #IMPLIED
- >
-
-<!--=================== Headings ==========================================-->
-
-<!ELEMENT ( %heading ) - - (%text;)*>
-<!ATTLIST ( %heading )
- align (left|center|right) #IMPLIED
- >
-
-<!--=================== Preformatted Text =================================-->
-
-<!ENTITY % pre.exclusion "IMG">
-
-<!ELEMENT PRE - - (%text)* -(%pre.exclusion)>
-
-<!--=================== Block-like Quotes =================================-->
-
-<!ELEMENT BLOCKQUOTE - - %body.content>
-
-<!--=================== Lists =============================================-->
-
-<!ELEMENT DL - - (DT|DD)+>
-<!ELEMENT DT - O (%text)*>
-<!ELEMENT DD - O %flow;>
-
-<!ELEMENT (OL|UL) - - (LI)+>
-
-<!ELEMENT (DIR|MENU) - - (LI)+ -(%block)>
-
-<!ELEMENT LI - O %flow>
-
-<!--================ Forms ===============================================-->
-
-<!ELEMENT FORM - - %body.content -(FORM)>
-<!ATTLIST FORM
- action %URL #IMPLIED
- method (%HTTP-Method) GET
- enctype %Content-Type; "application/x-www-form-urlencoded"
- >
-
-<!ENTITY % InputType
- "(TEXT | PASSWORD | CHECKBOX | RADIO | HIDDEN
- | IMAGE | SUBMIT | RESET )">
-
-<!ELEMENT INPUT - O EMPTY>
-<!ATTLIST INPUT
- type %InputType TEXT
- name CDATA #IMPLIED
- value CDATA #IMPLIED
- checked (checked) #IMPLIED
- size CDATA #IMPLIED
- maxlength NUMBER #IMPLIED
- src %URL #IMPLIED
- align %IAlign #IMPLIED
- >
-
-<!ELEMENT SELECT - - (OPTION+)>
-<!ATTLIST SELECT
- name CDATA #REQUIRED
- size NUMBER #IMPLIED
- multiple (multiple) #IMPLIED
- >
-
-<!ELEMENT OPTION - O (#PCDATA)*>
-<!ATTLIST OPTION
- selected (selected) #IMPLIED
- value CDATA #IMPLIED
- >
-
-<!ELEMENT TEXTAREA - - (#PCDATA)*>
-<!ATTLIST TEXTAREA
- name CDATA #REQUIRED
- rows NUMBER #REQUIRED
- cols NUMBER #REQUIRED
- >
-
-<!--================ Document Head ========================================-->
-
-<!ENTITY % head.content "TITLE & ISINDEX? & BASE?">
-
-<!ELEMENT HEAD O O (%head.content)>
-
-<!ELEMENT TITLE - - (#PCDATA)*>
-
-<!ELEMENT BASE - O EMPTY>
-<!ATTLIST BASE
- href %URL #REQUIRED
- >
-
-<!ELEMENT META - O EMPTY>
-<!ATTLIST META
- http-equiv NAME #IMPLIED
- >
-
-<!--================ Document Structure ===================================-->
-
-<!ENTITY % version.attr "VERSION CDATA #FIXED '%HTML.Version;'">
-
-<!ENTITY % html.content "HEAD, BODY">
-
-<!ELEMENT HTML O O (%html.content)>
-<!ATTLIST HTML
- %version.attr;
- >
-
-<!--================ End of DTD ===========================================-->
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/frameset.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/frameset.dtd
deleted file mode 100644
index 2fd3141..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/frameset.dtd
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
- This is the HTML 4.01 Frameset DTD, which should be
- used for documents with frames. This DTD is identical
- to the HTML 4.01 Transitional DTD except for the
- content model of the "HTML" element: in frameset
- documents, the "FRAMESET" element replaces the "BODY"
- element.
-
- Draft: $Date: 1999/12/24 23:20:08 $
-
- Authors:
- Dave Raggett <dsr@w3.org>
- Arnaud Le Hors <lehors@w3.org>
- Ian Jacobs <ij@w3.org>
-
- Further information about HTML 4.01 is available at:
-
- http://www.w3.org/TR/1999/REC-html401-19991224.
--->
-<!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01 Frameset//EN"
- -- Typical usage:
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
- "http://www.w3.org/TR/html4/frameset.dtd">
- <html>
- <head>
- ...
- </head>
- <frameset>
- ...
- </frameset>
- </html>
--->
-
-<!ENTITY % HTML.Frameset "INCLUDE">
-<!ENTITY % HTML4.dtd PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-%HTML4.dtd;
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/frameset400.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/frameset400.dtd
deleted file mode 100644
index 916d966..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/frameset400.dtd
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
- This is the HTML 4.0 Frameset DTD, which should be
- used for documents with frames. This DTD is identical
- to the HTML 4.0 Transitional DTD except for the
- content model of the "HTML" element: in frameset
- documents, the "FRAMESET" element replaces the "BODY"
- element.
-
- Draft: $Date: 1997/12/11 15:31:11 $
-
- Authors:
- Dave Raggett <dsr@w3.org>
- Arnaud Le Hors <lehors@w3.org>
- Ian Jacobs <ij@w3.org>
-
- Further information about HTML 4.0 is available at:
-
- http://www.w3.org/TR/REC-html40.
--->
-<!ENTITY % HTML.Version "-//W3C//DTD HTML 4.0 Frameset//EN"
- -- Typical usage:
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"
- "http://www.w3.org/TR/REC-html40/frameset.dtd">
- <html>
- <head>
- ...
- </head>
- <frameset>
- ...
- </frameset>
- </html>
--->
-
-<!ENTITY % HTML.Frameset "INCLUDE">
-<!ENTITY % HTML4.dtd PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-%HTML4.dtd;
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html-1.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html-1.dtd
deleted file mode 100644
index bb5ea4d..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html-1.dtd
+++ /dev/null
@@ -1,21 +0,0 @@
-<!-- html-1.dtd
- Document Type Definition for the HyperText Markup Language
-with Level 1 Extensions (HTML Level 1 DTD).
-$Id: html-1.dtd,v 1.2 1995/03/29 18:53:10 connolly Exp $
-Author: Daniel W. Connolly <connolly@w3.org>
-See Also: http://info.cern.ch/hypertext/WWW/MarkUp/MarkUp.html
--->
-<!ENTITY % HTML.Version
-"-//IETF//DTD HTML 2.0 Level 1//EN"
- -- Typical usage:
- <!DOCTYPE HTML PUBLIC
-"-//IETF//DTD HTML Level 1//EN">
- <html>
- ...
- </html>
---
->
-<!-- Feature Test Entities -->
-<!ENTITY % HTML.Forms "IGNORE">
-<!ENTITY % html PUBLIC "-//IETF//DTD HTML 2.0//EN">
-%html;
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html-1s.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html-1s.dtd
deleted file mode 100644
index 4ce53a3..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html-1s.dtd
+++ /dev/null
@@ -1,21 +0,0 @@
-<!-- html-1s.dtd
- Document Type Definition for the HyperText Markup Language
-Struct Level 1
-$Id: html-1s.dtd,v 1.3 1995/06/02 18:55:43 connolly Exp $
-Author: Daniel W. Connolly <connolly@w3.org>
-See Also: http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html
--->
-<!ENTITY % HTML.Version
-"-//IETF//DTD HTML 2.0 Strict Level 1//EN"
- -- Typical usage:
- <!DOCTYPE HTML PUBLIC
-"-//IETF//DTD HTML Strict Level 1//EN">
- <html>
- ...
- </html>
---
->
-<!-- Feature Test Entities -->
-<!ENTITY % HTML.Recommended "INCLUDE">
-<!ENTITY % html-1 PUBLIC "-//IETF//DTD HTML 2.0 Level 1//EN">
-%html-1;
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html-s.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html-s.dtd
deleted file mode 100644
index 3b14540..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html-s.dtd
+++ /dev/null
@@ -1,21 +0,0 @@
-<!-- html-s.dtd
- Document Type Definition for the HyperText Markup Language
-with strict validation (HTML Strict DTD).
-$Id: html-s.dtd,v 1.3 1995/06/02 18:55:46 connolly Exp $
-Author: Daniel W. Connolly <connolly@w3.org>
-See Also: http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html
--->
-<!ENTITY % HTML.Version
-"-//IETF//DTD HTML 2.0 Strict//EN"
- -- Typical usage:
- <!DOCTYPE HTML PUBLIC
-"-//IETF//DTD HTML Strict//EN">
- <html>
- ...
- </html>
---
->
-<!-- Feature Test Entities -->
-<!ENTITY % HTML.Recommended "INCLUDE">
-<!ENTITY % html PUBLIC "-//IETF//DTD HTML 2.0//EN">
-%html;
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html.dtd
deleted file mode 100644
index 0c7f7e6..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/html.dtd
+++ /dev/null
@@ -1,464 +0,0 @@
-<!-- html.dtd
- Document Type Definition for the HyperText Markup Language
- (HTML DTD)
-$Id: html.dtd,v 1.30 1995/09/21 23:30:19 connolly Exp $
-Author: Daniel W. Connolly <connolly@w3.org>
-See Also: html.decl, html-1.dtd
- http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html
--->
-<!ENTITY % HTML.Version
- "-//IETF//DTD HTML 2.0//EN"
- -- Typical usage:
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
- <html>
- ...
- </html>
- --
- >
-<!--============ Feature Test Entities ========================-->
-<!ENTITY % HTML.Recommended "IGNORE"
--- Certain features of the language are necessary for
- compatibility with widespread usage, but they may
- compromise the structural integrity of a document.
- This feature test entity enables a more prescriptive
- document type definition that eliminates
- those features.
--->
-<![ %HTML.Recommended [
- <!ENTITY % HTML.Deprecated "IGNORE">
-]]>
-<!ENTITY % HTML.Deprecated "INCLUDE"
--- Certain features of the language are necessary for
- compatibility with earlier versions of the specification,
- but they tend to be used and implemented inconsistently,
- and their use is deprecated. This feature test entity
- enables a document type definition that eliminates
- these features.
--->
-<!ENTITY % HTML.Highlighting "INCLUDE"
--- Use this feature test entity to validate that a
- document uses no highlighting tags, which may be
- ignored on minimal implementations.
--->
-<!ENTITY % HTML.Forms "INCLUDE"
- -- Use this feature test entity to validate that a document
- contains no forms, which may not be supported in minimal
- implementations
- -->
-<!--============== Imported Names ==============================-->
-<!ENTITY % Content-Type "CDATA"
- -- meaning an internet media type
- (aka MIME content type, as per RFC1521)
- -->
-<!ENTITY % HTTP-Method "GET | POST"
- -- as per HTTP specification, in progress
- -->
-<!--========= DTD "Macros" =====================-->
-<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
-<!ENTITY % list " UL | OL | DIR | MENU " >
-<!--======= Character mnemonic entities =================-->
-<!ENTITY % ISOlat1 PUBLIC
- "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
-%ISOlat1;
-<!ENTITY amp CDATA "&" -- ampersand -->
-<!ENTITY gt CDATA ">" -- greater than -->
-<!ENTITY lt CDATA "<" -- less than -->
-<!ENTITY quot CDATA """ -- double quote -->
-<!--========= SGML Document Access (SDA) Parameter Entities =====-->
-<!-- HTML 2.0 contains SGML Document Access (SDA) fixed attributes
-in support of easy transformation to the International Committee
-for Accessible Document Design (ICADD) DTD
- "-//EC-USA-CDA/ICADD//DTD ICADD22//EN".
-ICADD applications are designed to support usable access to
-structured information by print-impaired individuals through
-Braille, large print and voice synthesis. For more information on
-SDA & ICADD:
- - ISO 12083:1993, Annex A.8, Facilities for Braille,
- large print and computer voice
- - ICADD ListServ
- <ICADD%ASUACAD.BITNET@ARIZVM1.ccit.arizona.edu>
- - Usenet news group bit.listserv.easi
- - Recording for the Blind, +1 800 221 4792
--->
-<!ENTITY % SDAFORM "SDAFORM CDATA #FIXED"
- -- one to one mapping -->
-<!ENTITY % SDARULE "SDARULE CDATA #FIXED"
- -- context-sensitive mapping -->
-<!ENTITY % SDAPREF "SDAPREF CDATA #FIXED"
- -- generated text prefix -->
-<!ENTITY % SDASUFF "SDASUFF CDATA #FIXED"
- -- generated text suffix -->
-<!ENTITY % SDASUSP "SDASUSP NAME #FIXED"
- -- suspend transform process -->
-<!--========== Text Markup =====================-->
-<![ %HTML.Highlighting [
-<!ENTITY % font " TT | B | I ">
-<!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | VAR | CITE ">
-<!ENTITY % text "#PCDATA | A | IMG | BR | %phrase | %font">
-<!ELEMENT (%font;|%phrase) - - (%text)*>
-<!ATTLIST ( TT | CODE | SAMP | KBD | VAR )
- %SDAFORM; "Lit"
- >
-<!ATTLIST ( B | STRONG )
- %SDAFORM; "B"
- >
-<!ATTLIST ( I | EM | CITE )
- %SDAFORM; "It"
- >
-<!-- <TT> Typewriter text -->
-<!-- <B> Bold text -->
-<!-- <I> Italic text -->
-<!-- <EM> Emphasized phrase -->
-<!-- <STRONG> Strong emphasis -->
-<!-- <CODE> Source code phrase -->
-<!-- <SAMP> Sample text or characters -->
-<!-- <KBD> Keyboard phrase, e.g. user input -->
-<!-- <VAR> Variable phrase or substitutable -->
-<!-- <CITE> Name or title of cited work -->
-<!ENTITY % pre.content "#PCDATA | A | HR | BR | %font | %phrase">
-]]>
-<!ENTITY % text "#PCDATA | A | IMG | BR">
-<!ELEMENT BR - O EMPTY>
-<!ATTLIST BR
- %SDAPREF; "&#RE;"
- >
-<!-- <BR> Line break -->
-<!--========= Link Markup ======================-->
-<!ENTITY % linkType "NAMES">
-<!ENTITY % linkExtraAttributes
- "REL %linkType #IMPLIED
- REV %linkType #IMPLIED
- URN CDATA #IMPLIED
- TITLE CDATA #IMPLIED
- METHODS NAMES #IMPLIED
- ">
-<![ %HTML.Recommended [
- <!ENTITY % A.content "(%text)*"
- -- <H1><a name="xxx">Heading</a></H1>
- is preferred to
- <a name="xxx"><H1>Heading</H1></a>
- -->
-]]>
-<!ENTITY % A.content "(%heading|%text)*">
-<!ELEMENT A - - %A.content -(A)>
-<!ATTLIST A
- HREF CDATA #IMPLIED
- NAME CDATA #IMPLIED
- %linkExtraAttributes;
- %SDAPREF; "<Anchor: #AttList>"
- >
-<!-- <A> Anchor; source/destination of link -->
-<!-- <A NAME="..."> Name of this anchor -->
-<!-- <A HREF="..."> Address of link destination -->
-<!-- <A URN="..."> Permanent address of destination -->
-<!-- <A REL=...> Relationship to destination -->
-<!-- <A REV=...> Relationship of destination to this -->
-<!-- <A TITLE="..."> Title of destination (advisory) -->
-<!-- <A METHODS="..."> Operations on destination (advisory) -->
-<!--========== Images ==========================-->
-<!ELEMENT IMG - O EMPTY>
-<!ATTLIST IMG
- SRC CDATA #REQUIRED
- ALT CDATA #IMPLIED
- ALIGN (top|middle|bottom) #IMPLIED
- ISMAP (ISMAP) #IMPLIED
- %SDAPREF; "<Fig><?SDATrans Img: #AttList>#AttVal(Alt)</Fig>"
- >
-<!-- <IMG> Image; icon, glyph or illustration -->
-<!-- <IMG SRC="..."> Address of image object -->
-<!-- <IMG ALT="..."> Textual alternative -->
-<!-- <IMG ALIGN=...> Position relative to text -->
-<!-- <IMG ISMAP> Each pixel can be a link -->
-<!--========== Paragraphs=======================-->
-<!ELEMENT P - O (%text)*>
-<!ATTLIST P
- %SDAFORM; "Para"
- >
-<!-- <P> Paragraph -->
-<!--========== Headings, Titles, Sections ===============-->
-<!ELEMENT HR - O EMPTY>
-<!ATTLIST HR
- %SDAPREF; "&#RE;&#RE;"
- >
-<!-- <HR> Horizontal rule -->
-<!ELEMENT ( %heading ) - - (%text;)*>
-<!ATTLIST H1
- %SDAFORM; "H1"
- >
-<!ATTLIST H2
- %SDAFORM; "H2"
- >
-<!ATTLIST H3
- %SDAFORM; "H3"
- >
-<!ATTLIST H4
- %SDAFORM; "H4"
- >
-<!ATTLIST H5
- %SDAFORM; "H5"
- >
-<!ATTLIST H6
- %SDAFORM; "H6"
- >
-<!-- <H1> Heading, level 1 -->
-<!-- <H2> Heading, level 2 -->
-<!-- <H3> Heading, level 3 -->
-<!-- <H4> Heading, level 4 -->
-<!-- <H5> Heading, level 5 -->
-<!-- <H6> Heading, level 6 -->
-<!--========== Text Flows ======================-->
-<![ %HTML.Forms [
- <!ENTITY % block.forms "BLOCKQUOTE | FORM | ISINDEX">
-]]>
-<!ENTITY % block.forms "BLOCKQUOTE">
-<![ %HTML.Deprecated [
- <!ENTITY % preformatted "PRE | XMP | LISTING">
-]]>
-<!ENTITY % preformatted "PRE">
-<!ENTITY % block "P | %list | DL
- | %preformatted
- | %block.forms">
-<!ENTITY % flow "(%text|%block)*">
-<!ENTITY % pre.content "#PCDATA | A | HR | BR">
-<!ELEMENT PRE - - (%pre.content)*>
-<!ATTLIST PRE
- WIDTH NUMBER #implied
- %SDAFORM; "Lit"
- >
-<!-- <PRE> Preformatted text -->
-<!-- <PRE WIDTH=...> Maximum characters per line -->
-<![ %HTML.Deprecated [
-<!ENTITY % literal "CDATA"
- -- historical, non-conforming parsing mode where
- the only markup signal is the end tag
- in full
- -->
-<!ELEMENT (XMP|LISTING) - - %literal>
-<!ATTLIST XMP
- %SDAFORM; "Lit"
- %SDAPREF; "Example:&#RE;"
- >
-<!ATTLIST LISTING
- %SDAFORM; "Lit"
- %SDAPREF; "Listing:&#RE;"
- >
-<!-- <XMP> Example section -->
-<!-- <LISTING> Computer listing -->
-<!ELEMENT PLAINTEXT - O %literal>
-<!-- <PLAINTEXT> Plain text passage -->
-<!ATTLIST PLAINTEXT
- %SDAFORM; "Lit"
- >
-]]>
-<!--========== Lists ==================-->
-<!ELEMENT DL - - (DT | DD)+>
-<!ATTLIST DL
- COMPACT (COMPACT) #IMPLIED
- %SDAFORM; "List"
- %SDAPREF; "Definition List:"
- >
-<!ELEMENT DT - O (%text)*>
-<!ATTLIST DT
- %SDAFORM; "Term"
- >
-<!ELEMENT DD - O %flow>
-<!ATTLIST DD
- %SDAFORM; "LItem"
- >
-<!-- <DL> Definition list, or glossary -->
-<!-- <DL COMPACT> Compact style list -->
-<!-- <DT> Term in definition list -->
-<!-- <DD> Definition of term -->
-<!ELEMENT (OL|UL) - - (LI)+>
-<!ATTLIST OL
- COMPACT (COMPACT) #IMPLIED
- %SDAFORM; "List"
- >
-<!ATTLIST UL
- COMPACT (COMPACT) #IMPLIED
- %SDAFORM; "List"
- >
-<!-- <UL> Unordered list -->
-<!-- <UL COMPACT> Compact list style -->
-<!-- <OL> Ordered, or numbered list -->
-<!-- <OL COMPACT> Compact list style -->
-<!ELEMENT (DIR|MENU) - - (LI)+ -(%block)>
-<!ATTLIST DIR
- COMPACT (COMPACT) #IMPLIED
- %SDAFORM; "List"
- %SDAPREF; "<LHead>Directory</LHead>"
- >
-<!ATTLIST MENU
- COMPACT (COMPACT) #IMPLIED
- %SDAFORM; "List"
- %SDAPREF; "<LHead>Menu</LHead>"
- >
-<!-- <DIR> Directory list -->
-<!-- <DIR COMPACT> Compact list style -->
-<!-- <MENU> Menu list -->
-<!-- <MENU COMPACT> Compact list style -->
-<!ELEMENT LI - O %flow>
-<!ATTLIST LI
- %SDAFORM; "LItem"
- >
-<!-- <LI> List item -->
-<!--========== Document Body ===================-->
-<![ %HTML.Recommended [
-<!ENTITY % body.content "(%heading|%block|HR|ADDRESS|IMG)*"
--- <h1>Heading</h1>
- <p>Text ...
-is preferred to
- <h1>Heading</h1>
- Text ...
--->
-]]>
-<!ENTITY % body.content "(%heading | %text | %block |
- HR | ADDRESS)*">
-<!ELEMENT BODY O O %body.content>
-<!-- <BODY> Document body -->
-<!ELEMENT BLOCKQUOTE - - %body.content>
-<!ATTLIST BLOCKQUOTE
- %SDAFORM; "BQ"
- >
-<!-- <BLOCKQUOTE> Quoted passage -->
-<!ELEMENT ADDRESS - - (%text|P)*>
-<!ATTLIST ADDRESS
- %SDAFORM; "Lit"
- %SDAPREF; "Address:&#RE;"
- >
-<!-- <ADDRESS> Address, signature, or byline -->
-<!--======= Forms ====================-->
-<![ %HTML.Forms [
-<!ELEMENT FORM - - %body.content -(FORM) +(INPUT|SELECT|TEXTAREA)>
-<!ATTLIST FORM
- ACTION CDATA #IMPLIED
- METHOD (%HTTP-Method) GET
- ENCTYPE %Content-Type; "application/x-www-form-urlencoded"
- %SDAPREF; "<Para>Form:</Para>"
- %SDASUFF; "<Para>Form End.</Para>"
- >
-<!-- <FORM> Fill-out or data-entry form -->
-<!-- <FORM ACTION="..."> Address for completed form -->
-<!-- <FORM METHOD=...> Method of submitting form -->
-<!-- <FORM ENCTYPE="..."> Representation of form data -->
-<!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX |
- RADIO | SUBMIT | RESET |
- IMAGE | HIDDEN )">
-<!ELEMENT INPUT - O EMPTY>
-<!ATTLIST INPUT
-TYPE %InputType TEXT
-NAME CDATA #IMPLIED
-VALUE CDATA #IMPLIED
-SRC CDATA #IMPLIED
-CHECKED (CHECKED) #IMPLIED
-SIZE CDATA #IMPLIED
-MAXLENGTH NUMBER #IMPLIED
-ALIGN (top|middle|bottom) #IMPLIED
- %SDAPREF; "Input: "
->
-<!-- <INPUT> Form input datum -->
-<!-- <INPUT TYPE=...> Type of input interaction -->
-<!-- <INPUT NAME=...> Name of form datum -->
-<!-- <INPUT VALUE="..."> Default/initial/selected value -->
-<!-- <INPUT SRC="..."> Address of image -->
-<!-- <INPUT CHECKED> Initial state is "on" -->
-<!-- <INPUT SIZE=...> Field size hint -->
-<!-- <INPUT MAXLENGTH=...> Data length maximum -->
-<!-- <INPUT ALIGN=...> Image alignment -->
-<!ELEMENT SELECT - - (OPTION+) -(INPUT|SELECT|TEXTAREA)>
-<!ATTLIST SELECT
- NAME CDATA #REQUIRED
- SIZE NUMBER #IMPLIED
- MULTIPLE (MULTIPLE) #IMPLIED
- %SDAFORM; "List"
- %SDAPREF;
- "<LHead>Select #AttVal(Multiple)</LHead>"
->
-<!-- <SELECT> Selection of option(s) -->
-<!-- <SELECT NAME=...> Name of form datum -->
-<!-- <SELECT SIZE=...> Options displayed at a time -->
-<!-- <SELECT MULTIPLE> Multiple selections allowed -->
-<!ELEMENT OPTION - O (#PCDATA)*>
-<!ATTLIST OPTION
- SELECTED (SELECTED) #IMPLIED
- VALUE CDATA #IMPLIED
- %SDAFORM; "LItem"
- %SDAPREF;
- "Option: #AttVal(Value) #AttVal(Selected)"
->
-<!-- <OPTION> A selection option -->
-<!-- <OPTION SELECTED> Initial state -->
-<!-- <OPTION VALUE="..."> Form datum value for this option-->
-<!ELEMENT TEXTAREA - - (#PCDATA)* -(INPUT|SELECT|TEXTAREA)>
-<!ATTLIST TEXTAREA
- NAME CDATA #REQUIRED
- ROWS NUMBER #REQUIRED
- COLS NUMBER #REQUIRED
- %SDAFORM; "Para"
- %SDAPREF; "Input Text -- #AttVal(Name): "
- >
-<!-- <TEXTAREA> An area for text input -->
-<!-- <TEXTAREA NAME=...> Name of form datum -->
-<!-- <TEXTAREA ROWS=...> Height of area -->
-<!-- <TEXTAREA COLS=...> Width of area -->
-]]>
-<!--======= Document Head ======================-->
-<![ %HTML.Recommended [
-<!ENTITY % head.extra "">
-]]>
-<!ENTITY % head.extra "& NEXTID?">
-<!ENTITY % head.content "TITLE & ISINDEX? & BASE? %head.extra">
-<!ELEMENT HEAD O O (%head.content) +(META|LINK)>
-<!-- <HEAD> Document head -->
-<!ELEMENT TITLE - - (#PCDATA)* -(META|LINK)>
-<!ATTLIST TITLE
- %SDAFORM; "Ti" >
-<!-- <TITLE> Title of document -->
-<!ELEMENT LINK - O EMPTY>
-<!ATTLIST LINK
- HREF CDATA #REQUIRED
- %linkExtraAttributes;
- %SDAPREF; "Linked to : #AttVal (TITLE) (URN) (HREF)>" >
-<!-- <LINK> Link from this document -->
-<!-- <LINK HREF="..."> Address of link destination -->
-<!-- <LINK URN="..."> Lasting name of destination -->
-<!-- <LINK REL=...> Relationship to destination -->
-<!-- <LINK REV=...> Relationship of destination to this -->
-<!-- <LINK TITLE="..."> Title of destination (advisory) -->
-<!-- <LINK METHODS="..."> Operations allowed (advisory) -->
-<!ELEMENT ISINDEX - O EMPTY>
-<!ATTLIST ISINDEX
- %SDAPREF;
- "<Para>[Document is indexed/searchable.]</Para>">
-<!-- <ISINDEX> Document is a searchable index -->
-<!ELEMENT BASE - O EMPTY>
-<!ATTLIST BASE
- HREF CDATA #REQUIRED >
-<!-- <BASE> Base context document -->
-<!-- <BASE HREF="..."> Address for this document -->
-<!ELEMENT NEXTID - O EMPTY>
-<!ATTLIST NEXTID
- N CDATA #REQUIRED >
-<!-- <NEXTID> Next ID to use for link name -->
-<!-- <NEXTID N=...> Next ID to use for link name -->
-<!ELEMENT META - O EMPTY>
-<!ATTLIST META
- HTTP-EQUIV NAME #IMPLIED
- NAME NAME #IMPLIED
- CONTENT CDATA #REQUIRED >
-<!-- <META> Generic Meta-information -->
-<!-- <META HTTP-EQUIV=...> HTTP response header name -->
-<!-- <META NAME=...> Meta-information name -->
-<!-- <META CONTENT="..."> Associated information -->
-<!--======= Document Structure =================-->
-<![ %HTML.Deprecated [
- <!ENTITY % html.content "HEAD, BODY, PLAINTEXT?">
-]]>
-<!ENTITY % html.content "HEAD, BODY">
-<!ELEMENT HTML O O (%html.content)>
-<!ENTITY % version.attr "VERSION CDATA #FIXED '%HTML.Version;'">
-<!ATTLIST HTML
- %version.attr;
- %SDAFORM; "Book"
- >
-<!-- <HTML> HTML Document -->
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/loose.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/loose.dtd
deleted file mode 100644
index 9039bbb..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/loose.dtd
+++ /dev/null
@@ -1,1093 +0,0 @@
-<!--
- This is the HTML 4.01 Transitional DTD, which includes
- presentation attributes and elements that W3C expects to phase out
- as support for style sheets matures. Authors should use the Strict
- DTD when possible, but may use the Transitional DTD when support
- for presentation attribute and elements is required.
-
- HTML 4 includes mechanisms for style sheets, scripting,
- embedding objects, improved support for right to left and mixed
- direction text, and enhancements to forms for improved
- accessibility for people with disabilities.
-
- Draft: $Date: 1999/12/24 22:40:35 $
-
- Authors:
- Dave Raggett <dsr@w3.org>
- Arnaud Le Hors <lehors@w3.org>
- Ian Jacobs <ij@w3.org>
-
- Further information about HTML 4.01 is available at:
-
- http://www.w3.org/TR/1999/REC-html401-19991224
-
-
- The HTML 4.01 specification includes additional
- syntactic constraints that cannot be expressed within
- the DTDs.
-
--->
-<!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01 Transitional//EN"
- -- Typical usage:
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- ...
- </head>
- <body>
- ...
- </body>
- </html>
-
- The URI used as a system identifier with the public identifier allows
- the user agent to download the DTD and entity sets as needed.
-
- The FPI for the Strict HTML 4.01 DTD is:
-
- "-//W3C//DTD HTML 4.01//EN"
-
- This version of the strict DTD is:
-
- http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd
-
- Authors should use the Strict DTD unless they need the
- presentation control for user agents that don't (adequately)
- support style sheets.
-
- If you are writing a document that includes frames, use
- the following FPI:
-
- "-//W3C//DTD HTML 4.01 Frameset//EN"
-
- This version of the frameset DTD is:
-
- http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd
-
- Use the following (relative) URIs to refer to
- the DTDs and entity definitions of this specification:
-
- "strict.dtd"
- "loose.dtd"
- "frameset.dtd"
- "HTMLlat1.ent"
- "HTMLsymbol.ent"
- "HTMLspecial.ent"
-
--->
-
-<!--================== Imported Names ====================================-->
-<!-- Feature Switch for frameset documents -->
-<!ENTITY % HTML.Frameset "IGNORE">
-
-<!ENTITY % ContentType "CDATA"
- -- media type, as per [RFC2045]
- -->
-
-<!ENTITY % ContentTypes "CDATA"
- -- comma-separated list of media types, as per [RFC2045]
- -->
-
-<!ENTITY % Charset "CDATA"
- -- a character encoding, as per [RFC2045]
- -->
-
-<!ENTITY % Charsets "CDATA"
- -- a space-separated list of character encodings, as per [RFC2045]
- -->
-
-<!ENTITY % LanguageCode "NAME"
- -- a language code, as per [RFC1766]
- -->
-
-<!ENTITY % Character "CDATA"
- -- a single character from [ISO10646]
- -->
-
-<!ENTITY % LinkTypes "CDATA"
- -- space-separated list of link types
- -->
-
-<!ENTITY % MediaDesc "CDATA"
- -- single or comma-separated list of media descriptors
- -->
-
-<!ENTITY % URI "CDATA"
- -- a Uniform Resource Identifier,
- see [URI]
- -->
-
-<!ENTITY % Datetime "CDATA" -- date and time information. ISO date format -->
-
-
-<!ENTITY % Script "CDATA" -- script expression -->
-
-<!ENTITY % StyleSheet "CDATA" -- style sheet data -->
-
-<!ENTITY % FrameTarget "CDATA" -- render in this frame -->
-
-
-<!ENTITY % Text "CDATA">
-
-
-<!-- Parameter Entities -->
-
-<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements -->
-
-<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
-
-<!ENTITY % list "UL | OL | DIR | MENU">
-
-<!ENTITY % preformatted "PRE">
-
-<!ENTITY % Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values -->
-
-<!-- There are also 16 widely known color names with their sRGB values:
-
- Black = #000000 Green = #008000
- Silver = #C0C0C0 Lime = #00FF00
- Gray = #808080 Olive = #808000
- White = #FFFFFF Yellow = #FFFF00
- Maroon = #800000 Navy = #000080
- Red = #FF0000 Blue = #0000FF
- Purple = #800080 Teal = #008080
- Fuchsia= #FF00FF Aqua = #00FFFF
- -->
-
-<!ENTITY % bodycolors "
- bgcolor %Color; #IMPLIED -- document background color --
- text %Color; #IMPLIED -- document text color --
- link %Color; #IMPLIED -- color of links --
- vlink %Color; #IMPLIED -- color of visited links --
- alink %Color; #IMPLIED -- color of selected links --
- ">
-
-<!--================ Character mnemonic entities =========================-->
-
-<!ENTITY % HTMLlat1 PUBLIC
- "-//W3C//ENTITIES Latin1//EN//HTML"
- "HTMLlat1.ent">
-%HTMLlat1;
-
-<!ENTITY % HTMLsymbol PUBLIC
- "-//W3C//ENTITIES Symbols//EN//HTML"
- "HTMLsymbol.ent">
-%HTMLsymbol;
-
-<!ENTITY % HTMLspecial PUBLIC
- "-//W3C//ENTITIES Special//EN//HTML"
- "HTMLspecial.ent">
-%HTMLspecial;
-<!--=================== Generic Attributes ===============================-->
-
-<!ENTITY % coreattrs
- "id ID #IMPLIED -- document-wide unique id --
- class CDATA #IMPLIED -- space-separated list of classes --
- style %StyleSheet; #IMPLIED -- associated style info --
- title %Text; #IMPLIED -- advisory title --"
- >
-
-<!ENTITY % i18n
- "lang %LanguageCode; #IMPLIED -- language code --
- dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --"
- >
-
-<!ENTITY % events
- "onclick %Script; #IMPLIED -- a pointer button was clicked --
- ondblclick %Script; #IMPLIED -- a pointer button was double clicked--
- onmousedown %Script; #IMPLIED -- a pointer button was pressed down --
- onmouseup %Script; #IMPLIED -- a pointer button was released --
- onmouseover %Script; #IMPLIED -- a pointer was moved onto --
- onmousemove %Script; #IMPLIED -- a pointer was moved within --
- onmouseout %Script; #IMPLIED -- a pointer was moved away --
- onkeypress %Script; #IMPLIED -- a key was pressed and released --
- onkeydown %Script; #IMPLIED -- a key was pressed down --
- onkeyup %Script; #IMPLIED -- a key was released --"
- >
-
-<!-- Reserved Feature Switch -->
-<!ENTITY % HTML.Reserved "IGNORE">
-
-<!-- The following attributes are reserved for possible future use -->
-<![ %HTML.Reserved; [
-<!ENTITY % reserved
- "datasrc %URI; #IMPLIED -- a single or tabular Data Source --
- datafld CDATA #IMPLIED -- the property or column name --
- dataformatas (plaintext|html) plaintext -- text or html --"
- >
-]]>
-
-<!ENTITY % reserved "">
-
-<!ENTITY % attrs "%coreattrs; %i18n; %events;">
-
-<!ENTITY % align "align (left|center|right|justify) #IMPLIED"
- -- default is left for ltr paragraphs, right for rtl --
- >
-
-<!--=================== Text Markup ======================================-->
-
-<!ENTITY % fontstyle
- "TT | I | B | U | S | STRIKE | BIG | SMALL">
-
-<!ENTITY % phrase "EM | STRONG | DFN | CODE |
- SAMP | KBD | VAR | CITE | ABBR | ACRONYM" >
-
-<!ENTITY % special
- "A | IMG | APPLET | OBJECT | FONT | BASEFONT | BR | SCRIPT |
- MAP | Q | SUB | SUP | SPAN | BDO | IFRAME">
-
-<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">
-
-<!-- %inline; covers inline or "text-level" elements -->
-<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
-
-<!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*>
-<!ATTLIST (%fontstyle;|%phrase;)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript -->
-<!ATTLIST (SUB|SUP)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT SPAN - - (%inline;)* -- generic language/style container -->
-<!ATTLIST SPAN
- %attrs; -- %coreattrs, %i18n, %events --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT BDO - - (%inline;)* -- I18N BiDi over-ride -->
-<!ATTLIST BDO
- %coreattrs; -- id, class, style, title --
- lang %LanguageCode; #IMPLIED -- language code --
- dir (ltr|rtl) #REQUIRED -- directionality --
- >
-
-<!ELEMENT BASEFONT - O EMPTY -- base font size -->
-<!ATTLIST BASEFONT
- id ID #IMPLIED -- document-wide unique id --
- size CDATA #REQUIRED -- base font size for FONT elements --
- color %Color; #IMPLIED -- text color --
- face CDATA #IMPLIED -- comma-separated list of font names --
- >
-
-<!ELEMENT FONT - - (%inline;)* -- local change to font -->
-<!ATTLIST FONT
- %coreattrs; -- id, class, style, title --
- %i18n; -- lang, dir --
- size CDATA #IMPLIED -- [+|-]nn e.g. size="+1", size="4" --
- color %Color; #IMPLIED -- text color --
- face CDATA #IMPLIED -- comma-separated list of font names --
- >
-
-<!ELEMENT BR - O EMPTY -- forced line break -->
-<!ATTLIST BR
- %coreattrs; -- id, class, style, title --
- clear (left|all|right|none) none -- control of text flow --
- >
-
-<!--================== HTML content models ===============================-->
-
-<!--
- HTML has two basic content models:
-
- %inline; character level elements and text strings
- %block; block-like elements e.g. paragraphs and lists
--->
-
-<!ENTITY % block
- "P | %heading; | %list; | %preformatted; | DL | DIV | CENTER |
- NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR |
- TABLE | FIELDSET | ADDRESS">
-
-<!ENTITY % flow "%block; | %inline;">
-
-<!--=================== Document Body ====================================-->
-
-<!ELEMENT BODY O O (%flow;)* +(INS|DEL) -- document body -->
-<!ATTLIST BODY
- %attrs; -- %coreattrs, %i18n, %events --
- onload %Script; #IMPLIED -- the document has been loaded --
- onunload %Script; #IMPLIED -- the document has been removed --
- background %URI; #IMPLIED -- texture tile for document
- background --
- %bodycolors; -- bgcolor, text, link, vlink, alink --
- >
-
-<!ELEMENT ADDRESS - - ((%inline;)|P)* -- information on author -->
-<!ATTLIST ADDRESS
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT DIV - - (%flow;)* -- generic language/style container -->
-<!ATTLIST DIV
- %attrs; -- %coreattrs, %i18n, %events --
- %align; -- align, text alignment --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT CENTER - - (%flow;)* -- shorthand for DIV align=center -->
-<!ATTLIST CENTER
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--================== The Anchor Element ================================-->
-
-<!ENTITY % Shape "(rect|circle|poly|default)">
-<!ENTITY % Coords "CDATA" -- comma-separated list of lengths -->
-
-<!ELEMENT A - - (%inline;)* -(A) -- anchor -->
-<!ATTLIST A
- %attrs; -- %coreattrs, %i18n, %events --
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- type %ContentType; #IMPLIED -- advisory content type --
- name CDATA #IMPLIED -- named link end --
- href %URI; #IMPLIED -- URI for linked resource --
- hreflang %LanguageCode; #IMPLIED -- language code --
- target %FrameTarget; #IMPLIED -- render in this frame --
- rel %LinkTypes; #IMPLIED -- forward link types --
- rev %LinkTypes; #IMPLIED -- reverse link types --
- accesskey %Character; #IMPLIED -- accessibility key character --
- shape %Shape; rect -- for use with client-side image maps --
- coords %Coords; #IMPLIED -- for use with client-side image maps --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!--================== Client-side image maps ============================-->
-
-<!-- These can be placed in the same document or grouped in a
- separate document although this isn't yet widely supported -->
-
-<!ELEMENT MAP - - ((%block;) | AREA)+ -- client-side image map -->
-<!ATTLIST MAP
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #REQUIRED -- for reference by usemap --
- >
-
-<!ELEMENT AREA - O EMPTY -- client-side image map area -->
-<!ATTLIST AREA
- %attrs; -- %coreattrs, %i18n, %events --
- shape %Shape; rect -- controls interpretation of coords --
- coords %Coords; #IMPLIED -- comma-separated list of lengths --
- href %URI; #IMPLIED -- URI for linked resource --
- target %FrameTarget; #IMPLIED -- render in this frame --
- nohref (nohref) #IMPLIED -- this region has no action --
- alt %Text; #REQUIRED -- short description --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!--================== The LINK Element ==================================-->
-
-<!--
- Relationship values can be used in principle:
-
- a) for document specific toolbars/menus when used
- with the LINK element in document head e.g.
- start, contents, previous, next, index, end, help
- b) to link to a separate style sheet (rel=stylesheet)
- c) to make a link to a script (rel=script)
- d) by stylesheets to control how collections of
- html nodes are rendered into printed documents
- e) to make a link to a printable version of this document
- e.g. a postscript or pdf version (rel=alternate media=print)
--->
-
-<!ELEMENT LINK - O EMPTY -- a media-independent link -->
-<!ATTLIST LINK
- %attrs; -- %coreattrs, %i18n, %events --
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- href %URI; #IMPLIED -- URI for linked resource --
- hreflang %LanguageCode; #IMPLIED -- language code --
- type %ContentType; #IMPLIED -- advisory content type --
- rel %LinkTypes; #IMPLIED -- forward link types --
- rev %LinkTypes; #IMPLIED -- reverse link types --
- media %MediaDesc; #IMPLIED -- for rendering on these media --
- target %FrameTarget; #IMPLIED -- render in this frame --
- >
-
-<!--=================== Images ===========================================-->
-
-<!-- Length defined in strict DTD for cellpadding/cellspacing -->
-<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
-<!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative -->
-
-<![ %HTML.Frameset; [
-<!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength -->
-]]>
-
-<!ENTITY % Pixels "CDATA" -- integer representing length in pixels -->
-
-<!ENTITY % IAlign "(top|middle|bottom|left|right)" -- center? -->
-
-<!-- To avoid problems with text-only UAs as well as
- to make image content understandable and navigable
- to users of non-visual UAs, you need to provide
- a description with ALT, and avoid server-side image maps -->
-<!ELEMENT IMG - O EMPTY -- Embedded image -->
-<!ATTLIST IMG
- %attrs; -- %coreattrs, %i18n, %events --
- src %URI; #REQUIRED -- URI of image to embed --
- alt %Text; #REQUIRED -- short description --
- longdesc %URI; #IMPLIED -- link to long description
- (complements alt) --
- name CDATA #IMPLIED -- name of image for scripting --
- height %Length; #IMPLIED -- override height --
- width %Length; #IMPLIED -- override width --
- usemap %URI; #IMPLIED -- use client-side image map --
- ismap (ismap) #IMPLIED -- use server-side image map --
- align %IAlign; #IMPLIED -- vertical or horizontal alignment --
- border %Pixels; #IMPLIED -- link border width --
- hspace %Pixels; #IMPLIED -- horizontal gutter --
- vspace %Pixels; #IMPLIED -- vertical gutter --
- >
-
-<!-- USEMAP points to a MAP element which may be in this document
- or an external document, although the latter is not widely supported -->
-
-<!--==================== OBJECT ======================================-->
-<!--
- OBJECT is used to embed objects as part of HTML pages
- PARAM elements should precede other content. SGML mixed content
- model technicality precludes specifying this formally ...
--->
-
-<!ELEMENT OBJECT - - (PARAM | %flow;)*
- -- generic embedded object -->
-<!ATTLIST OBJECT
- %attrs; -- %coreattrs, %i18n, %events --
- declare (declare) #IMPLIED -- declare but don't instantiate flag --
- classid %URI; #IMPLIED -- identifies an implementation --
- codebase %URI; #IMPLIED -- base URI for classid, data, archive--
- data %URI; #IMPLIED -- reference to object's data --
- type %ContentType; #IMPLIED -- content type for data --
- codetype %ContentType; #IMPLIED -- content type for code --
- archive CDATA #IMPLIED -- space-separated list of URIs --
- standby %Text; #IMPLIED -- message to show while loading --
- height %Length; #IMPLIED -- override height --
- width %Length; #IMPLIED -- override width --
- usemap %URI; #IMPLIED -- use client-side image map --
- name CDATA #IMPLIED -- submit as part of form --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- align %IAlign; #IMPLIED -- vertical or horizontal alignment --
- border %Pixels; #IMPLIED -- link border width --
- hspace %Pixels; #IMPLIED -- horizontal gutter --
- vspace %Pixels; #IMPLIED -- vertical gutter --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT PARAM - O EMPTY -- named property value -->
-<!ATTLIST PARAM
- id ID #IMPLIED -- document-wide unique id --
- name CDATA #REQUIRED -- property name --
- value CDATA #IMPLIED -- property value --
- valuetype (DATA|REF|OBJECT) DATA -- How to interpret value --
- type %ContentType; #IMPLIED -- content type for value
- when valuetype=ref --
- >
-
-<!--=================== Java APPLET ==================================-->
-<!--
- One of code or object attributes must be present.
- Place PARAM elements before other content.
--->
-<!ELEMENT APPLET - - (PARAM | %flow;)* -- Java applet -->
-<!ATTLIST APPLET
- %coreattrs; -- id, class, style, title --
- codebase %URI; #IMPLIED -- optional base URI for applet --
- archive CDATA #IMPLIED -- comma-separated archive list --
- code CDATA #IMPLIED -- applet class file --
- object CDATA #IMPLIED -- serialized applet file --
- alt %Text; #IMPLIED -- short description --
- name CDATA #IMPLIED -- allows applets to find each other --
- width %Length; #REQUIRED -- initial width --
- height %Length; #REQUIRED -- initial height --
- align %IAlign; #IMPLIED -- vertical or horizontal alignment --
- hspace %Pixels; #IMPLIED -- horizontal gutter --
- vspace %Pixels; #IMPLIED -- vertical gutter --
- >
-
-<!--=================== Horizontal Rule ==================================-->
-
-<!ELEMENT HR - O EMPTY -- horizontal rule -->
-<!ATTLIST HR
- %attrs; -- %coreattrs, %i18n, %events --
- align (left|center|right) #IMPLIED
- noshade (noshade) #IMPLIED
- size %Pixels; #IMPLIED
- width %Length; #IMPLIED
- >
-
-<!--=================== Paragraphs =======================================-->
-
-<!ELEMENT P - O (%inline;)* -- paragraph -->
-<!ATTLIST P
- %attrs; -- %coreattrs, %i18n, %events --
- %align; -- align, text alignment --
- >
-
-<!--=================== Headings =========================================-->
-
-<!--
- There are six levels of headings from H1 (the most important)
- to H6 (the least important).
--->
-
-<!ELEMENT (%heading;) - - (%inline;)* -- heading -->
-<!ATTLIST (%heading;)
- %attrs; -- %coreattrs, %i18n, %events --
- %align; -- align, text alignment --
- >
-
-<!--=================== Preformatted Text ================================-->
-
-<!-- excludes markup for images and changes in font size -->
-<!ENTITY % pre.exclusion "IMG|OBJECT|APPLET|BIG|SMALL|SUB|SUP|FONT|BASEFONT">
-
-<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
-<!ATTLIST PRE
- %attrs; -- %coreattrs, %i18n, %events --
- width NUMBER #IMPLIED
- >
-
-<!--===================== Inline Quotes ==================================-->
-
-<!ELEMENT Q - - (%inline;)* -- short inline quotation -->
-<!ATTLIST Q
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- URI for source document or msg --
- >
-
-<!--=================== Block-like Quotes ================================-->
-
-<!ELEMENT BLOCKQUOTE - - (%flow;)* -- long quotation -->
-<!ATTLIST BLOCKQUOTE
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- URI for source document or msg --
- >
-
-<!--=================== Inserted/Deleted Text ============================-->
-
-
-<!-- INS/DEL are handled by inclusion on BODY -->
-<!ELEMENT (INS|DEL) - - (%flow;)* -- inserted text, deleted text -->
-<!ATTLIST (INS|DEL)
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- info on reason for change --
- datetime %Datetime; #IMPLIED -- date and time of change --
- >
-
-<!--=================== Lists ============================================-->
-
-<!-- definition lists - DT for term, DD for its definition -->
-
-<!ELEMENT DL - - (DT|DD)+ -- definition list -->
-<!ATTLIST DL
- %attrs; -- %coreattrs, %i18n, %events --
- compact (compact) #IMPLIED -- reduced interitem spacing --
- >
-
-<!ELEMENT DT - O (%inline;)* -- definition term -->
-<!ELEMENT DD - O (%flow;)* -- definition description -->
-<!ATTLIST (DT|DD)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!-- Ordered lists (OL) Numbering style
-
- 1 arablic numbers 1, 2, 3, ...
- a lower alpha a, b, c, ...
- A upper alpha A, B, C, ...
- i lower roman i, ii, iii, ...
- I upper roman I, II, III, ...
-
- The style is applied to the sequence number which by default
- is reset to 1 for the first list item in an ordered list.
-
- This can't be expressed directly in SGML due to case folding.
--->
-
-<!ENTITY % OLStyle "CDATA" -- constrained to: "(1|a|A|i|I)" -->
-
-<!ELEMENT OL - - (LI)+ -- ordered list -->
-<!ATTLIST OL
- %attrs; -- %coreattrs, %i18n, %events --
- type %OLStyle; #IMPLIED -- numbering style --
- compact (compact) #IMPLIED -- reduced interitem spacing --
- start NUMBER #IMPLIED -- starting sequence number --
- >
-
-<!-- Unordered Lists (UL) bullet styles -->
-<!ENTITY % ULStyle "(disc|square|circle)">
-
-<!ELEMENT UL - - (LI)+ -- unordered list -->
-<!ATTLIST UL
- %attrs; -- %coreattrs, %i18n, %events --
- type %ULStyle; #IMPLIED -- bullet style --
- compact (compact) #IMPLIED -- reduced interitem spacing --
- >
-
-<!ELEMENT (DIR|MENU) - - (LI)+ -(%block;) -- directory list, menu list -->
-<!ATTLIST DIR
- %attrs; -- %coreattrs, %i18n, %events --
- compact (compact) #IMPLIED -- reduced interitem spacing --
- >
-<!ATTLIST MENU
- %attrs; -- %coreattrs, %i18n, %events --
- compact (compact) #IMPLIED -- reduced interitem spacing --
- >
-
-<!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle;|%OLStyle;)" -->
-
-<!ELEMENT LI - O (%flow;)* -- list item -->
-<!ATTLIST LI
- %attrs; -- %coreattrs, %i18n, %events --
- type %LIStyle; #IMPLIED -- list item style --
- value NUMBER #IMPLIED -- reset sequence number --
- >
-
-<!--================ Forms ===============================================-->
-<!ELEMENT FORM - - (%flow;)* -(FORM) -- interactive form -->
-<!ATTLIST FORM
- %attrs; -- %coreattrs, %i18n, %events --
- action %URI; #REQUIRED -- server-side form handler --
- method (GET|POST) GET -- HTTP method used to submit the form--
- enctype %ContentType; "application/x-www-form-urlencoded"
- accept %ContentTypes; #IMPLIED -- list of MIME types for file upload --
- name CDATA #IMPLIED -- name of form for scripting --
- onsubmit %Script; #IMPLIED -- the form was submitted --
- onreset %Script; #IMPLIED -- the form was reset --
- target %FrameTarget; #IMPLIED -- render in this frame --
- accept-charset %Charsets; #IMPLIED -- list of supported charsets --
- >
-
-<!-- Each label must not contain more than ONE field -->
-<!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text -->
-<!ATTLIST LABEL
- %attrs; -- %coreattrs, %i18n, %events --
- for IDREF #IMPLIED -- matches field ID value --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!ENTITY % InputType
- "(TEXT | PASSWORD | CHECKBOX |
- RADIO | SUBMIT | RESET |
- FILE | HIDDEN | IMAGE | BUTTON)"
- >
-
-<!-- attribute name required for all but submit and reset -->
-<!ELEMENT INPUT - O EMPTY -- form control -->
-<!ATTLIST INPUT
- %attrs; -- %coreattrs, %i18n, %events --
- type %InputType; TEXT -- what kind of widget is needed --
- name CDATA #IMPLIED -- submit as part of form --
- value CDATA #IMPLIED -- Specify for radio buttons and checkboxes --
- checked (checked) #IMPLIED -- for radio buttons and check boxes --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- readonly (readonly) #IMPLIED -- for text and passwd --
- size CDATA #IMPLIED -- specific to each type of field --
- maxlength NUMBER #IMPLIED -- max chars for text fields --
- src %URI; #IMPLIED -- for fields with images --
- alt CDATA #IMPLIED -- short description --
- usemap %URI; #IMPLIED -- use client-side image map --
- ismap (ismap) #IMPLIED -- use server-side image map --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onselect %Script; #IMPLIED -- some text was selected --
- onchange %Script; #IMPLIED -- the element value was changed --
- accept %ContentTypes; #IMPLIED -- list of MIME types for file upload --
- align %IAlign; #IMPLIED -- vertical or horizontal alignment --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector -->
-<!ATTLIST SELECT
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED -- field name --
- size NUMBER #IMPLIED -- rows visible --
- multiple (multiple) #IMPLIED -- default is single selection --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onchange %Script; #IMPLIED -- the element value was changed --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT OPTGROUP - - (OPTION)+ -- option group -->
-<!ATTLIST OPTGROUP
- %attrs; -- %coreattrs, %i18n, %events --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- label %Text; #REQUIRED -- for use in hierarchical menus --
- >
-
-<!ELEMENT OPTION - O (#PCDATA) -- selectable choice -->
-<!ATTLIST OPTION
- %attrs; -- %coreattrs, %i18n, %events --
- selected (selected) #IMPLIED
- disabled (disabled) #IMPLIED -- unavailable in this context --
- label %Text; #IMPLIED -- for use in hierarchical menus --
- value CDATA #IMPLIED -- defaults to element content --
- >
-
-<!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field -->
-<!ATTLIST TEXTAREA
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED
- rows NUMBER #REQUIRED
- cols NUMBER #REQUIRED
- disabled (disabled) #IMPLIED -- unavailable in this context --
- readonly (readonly) #IMPLIED
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onselect %Script; #IMPLIED -- some text was selected --
- onchange %Script; #IMPLIED -- the element value was changed --
- %reserved; -- reserved for possible future use --
- >
-
-<!--
- #PCDATA is to solve the mixed content problem,
- per specification only whitespace is allowed there!
- -->
-<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
-<!ATTLIST FIELDSET
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT LEGEND - - (%inline;)* -- fieldset legend -->
-<!ENTITY % LAlign "(top|bottom|left|right)">
-
-<!ATTLIST LEGEND
- %attrs; -- %coreattrs, %i18n, %events --
- accesskey %Character; #IMPLIED -- accessibility key character --
- align %LAlign; #IMPLIED -- relative to fieldset --
- >
-
-<!ELEMENT BUTTON - -
- (%flow;)* -(A|%formctrl;|FORM|ISINDEX|FIELDSET|IFRAME)
- -- push button -->
-<!ATTLIST BUTTON
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED
- value CDATA #IMPLIED -- sent to server when submitted --
- type (button|submit|reset) submit -- for use as form button --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- %reserved; -- reserved for possible future use --
- >
-
-<!--======================= Tables =======================================-->
-
-<!-- IETF HTML table standard, see [RFC1942] -->
-
-<!--
- The BORDER attribute sets the thickness of the frame around the
- table. The default units are screen pixels.
-
- The FRAME attribute specifies which parts of the frame around
- the table should be rendered. The values are not the same as
- CALS to avoid a name clash with the VALIGN attribute.
-
- The value "border" is included for backwards compatibility with
- <TABLE BORDER> which yields frame=border and border=implied
- For <TABLE BORDER=1> you get border=1 and frame=implied. In this
- case, it is appropriate to treat this as frame=border for backwards
- compatibility with deployed browsers.
--->
-<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
-
-<!--
- The RULES attribute defines which rules to draw between cells:
-
- If RULES is absent then assume:
- "none" if BORDER is absent or BORDER=0 otherwise "all"
--->
-
-<!ENTITY % TRules "(none | groups | rows | cols | all)">
-
-<!-- horizontal placement of table relative to document -->
-<!ENTITY % TAlign "(left|center|right)">
-
-<!-- horizontal alignment attributes for cell contents -->
-<!ENTITY % cellhalign
- "align (left|center|right|justify|char) #IMPLIED
- char %Character; #IMPLIED -- alignment char, e.g. char=':' --
- charoff %Length; #IMPLIED -- offset for alignment char --"
- >
-
-<!-- vertical alignment attributes for cell contents -->
-<!ENTITY % cellvalign
- "valign (top|middle|bottom|baseline) #IMPLIED"
- >
-
-<!ELEMENT TABLE - -
- (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
-<!ELEMENT CAPTION - - (%inline;)* -- table caption -->
-<!ELEMENT THEAD - O (TR)+ -- table header -->
-<!ELEMENT TFOOT - O (TR)+ -- table footer -->
-<!ELEMENT TBODY O O (TR)+ -- table body -->
-<!ELEMENT COLGROUP - O (COL)* -- table column group -->
-<!ELEMENT COL - O EMPTY -- table column -->
-<!ELEMENT TR - O (TH|TD)+ -- table row -->
-<!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell-->
-
-<!ATTLIST TABLE -- table element --
- %attrs; -- %coreattrs, %i18n, %events --
- summary %Text; #IMPLIED -- purpose/structure for speech output--
- width %Length; #IMPLIED -- table width --
- border %Pixels; #IMPLIED -- controls frame width around table --
- frame %TFrame; #IMPLIED -- which parts of frame to render --
- rules %TRules; #IMPLIED -- rulings between rows and cols --
- cellspacing %Length; #IMPLIED -- spacing between cells --
- cellpadding %Length; #IMPLIED -- spacing within cells --
- align %TAlign; #IMPLIED -- table position relative to window --
- bgcolor %Color; #IMPLIED -- background color for cells --
- %reserved; -- reserved for possible future use --
- datapagesize CDATA #IMPLIED -- reserved for possible future use --
- >
-
-<!ENTITY % CAlign "(top|bottom|left|right)">
-
-<!ATTLIST CAPTION
- %attrs; -- %coreattrs, %i18n, %events --
- align %CAlign; #IMPLIED -- relative to table --
- >
-
-<!--
-COLGROUP groups a set of COL elements. It allows you to group
-several semantically related columns together.
--->
-<!ATTLIST COLGROUP
- %attrs; -- %coreattrs, %i18n, %events --
- span NUMBER 1 -- default number of columns in group --
- width %MultiLength; #IMPLIED -- default width for enclosed COLs --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!--
- COL elements define the alignment properties for cells in
- one or more columns.
-
- The WIDTH attribute specifies the width of the columns, e.g.
-
- width=64 width in screen pixels
- width=0.5* relative width of 0.5
-
- The SPAN attribute causes the attributes of one
- COL element to apply to more than one column.
--->
-<!ATTLIST COL -- column groups and properties --
- %attrs; -- %coreattrs, %i18n, %events --
- span NUMBER 1 -- COL attributes affect N columns --
- width %MultiLength; #IMPLIED -- column width specification --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!--
- Use THEAD to duplicate headers when breaking table
- across page boundaries, or for static headers when
- TBODY sections are rendered in scrolling panel.
-
- Use TFOOT to duplicate footers when breaking table
- across page boundaries, or for static footers when
- TBODY sections are rendered in scrolling panel.
-
- Use multiple TBODY sections when rules are needed
- between groups of table rows.
--->
-<!ATTLIST (THEAD|TBODY|TFOOT) -- table section --
- %attrs; -- %coreattrs, %i18n, %events --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!ATTLIST TR -- table row --
- %attrs; -- %coreattrs, %i18n, %events --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- bgcolor %Color; #IMPLIED -- background color for row --
- >
-
-
-<!-- Scope is simpler than headers attribute for common tables -->
-<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
-
-<!-- TH is for headers, TD for data, but for cells acting as both use TD -->
-<!ATTLIST (TH|TD) -- header or data cell --
- %attrs; -- %coreattrs, %i18n, %events --
- abbr %Text; #IMPLIED -- abbreviation for header cell --
- axis CDATA #IMPLIED -- comma-separated list of related headers--
- headers IDREFS #IMPLIED -- list of id's for header cells --
- scope %Scope; #IMPLIED -- scope covered by header cells --
- rowspan NUMBER 1 -- number of rows spanned by cell --
- colspan NUMBER 1 -- number of cols spanned by cell --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- nowrap (nowrap) #IMPLIED -- suppress word wrap --
- bgcolor %Color; #IMPLIED -- cell background color --
- width %Length; #IMPLIED -- width for cell --
- height %Length; #IMPLIED -- height for cell --
- >
-
-<!--================== Document Frames ===================================-->
-
-<!--
- The content model for HTML documents depends on whether the HEAD is
- followed by a FRAMESET or BODY element. The widespread omission of
- the BODY start tag makes it impractical to define the content model
- without the use of a marked section.
--->
-
-<![ %HTML.Frameset; [
-<!ELEMENT FRAMESET - - ((FRAMESET|FRAME)+ & NOFRAMES?) -- window subdivision-->
-<!ATTLIST FRAMESET
- %coreattrs; -- id, class, style, title --
- rows %MultiLengths; #IMPLIED -- list of lengths,
- default: 100% (1 row) --
- cols %MultiLengths; #IMPLIED -- list of lengths,
- default: 100% (1 col) --
- onload %Script; #IMPLIED -- all the frames have been loaded --
- onunload %Script; #IMPLIED -- all the frames have been removed --
- >
-]]>
-
-<![ %HTML.Frameset; [
-<!-- reserved frame names start with "_" otherwise starts with letter -->
-<!ELEMENT FRAME - O EMPTY -- subwindow -->
-<!ATTLIST FRAME
- %coreattrs; -- id, class, style, title --
- longdesc %URI; #IMPLIED -- link to long description
- (complements title) --
- name CDATA #IMPLIED -- name of frame for targetting --
- src %URI; #IMPLIED -- source of frame content --
- frameborder (1|0) 1 -- request frame borders? --
- marginwidth %Pixels; #IMPLIED -- margin widths in pixels --
- marginheight %Pixels; #IMPLIED -- margin height in pixels --
- noresize (noresize) #IMPLIED -- allow users to resize frames? --
- scrolling (yes|no|auto) auto -- scrollbar or none --
- >
-]]>
-
-<!ELEMENT IFRAME - - (%flow;)* -- inline subwindow -->
-<!ATTLIST IFRAME
- %coreattrs; -- id, class, style, title --
- longdesc %URI; #IMPLIED -- link to long description
- (complements title) --
- name CDATA #IMPLIED -- name of frame for targetting --
- src %URI; #IMPLIED -- source of frame content --
- frameborder (1|0) 1 -- request frame borders? --
- marginwidth %Pixels; #IMPLIED -- margin widths in pixels --
- marginheight %Pixels; #IMPLIED -- margin height in pixels --
- scrolling (yes|no|auto) auto -- scrollbar or none --
- align %IAlign; #IMPLIED -- vertical or horizontal alignment --
- height %Length; #IMPLIED -- frame height --
- width %Length; #IMPLIED -- frame width --
- >
-
-<![ %HTML.Frameset; [
-<!ENTITY % noframes.content "(BODY) -(NOFRAMES)">
-]]>
-
-<!ENTITY % noframes.content "(%flow;)*">
-
-<!ELEMENT NOFRAMES - - %noframes.content;
- -- alternate content container for non frame-based rendering -->
-<!ATTLIST NOFRAMES
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--================ Document Head =======================================-->
-<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
-<!ENTITY % head.content "TITLE & ISINDEX? & BASE?">
-
-<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->
-<!ATTLIST HEAD
- %i18n; -- lang, dir --
- profile %URI; #IMPLIED -- named dictionary of meta info --
- >
-
-<!-- The TITLE element is not considered part of the flow of text.
- It should be displayed, for example as the page header or
- window title. Exactly one title is required per document.
- -->
-<!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -->
-<!ATTLIST TITLE %i18n>
-
-<!ELEMENT ISINDEX - O EMPTY -- single line prompt -->
-<!ATTLIST ISINDEX
- %coreattrs; -- id, class, style, title --
- %i18n; -- lang, dir --
- prompt %Text; #IMPLIED -- prompt message -->
-
-<!ELEMENT BASE - O EMPTY -- document base URI -->
-<!ATTLIST BASE
- href %URI; #IMPLIED -- URI that acts as base URI --
- target %FrameTarget; #IMPLIED -- render in this frame --
- >
-
-<!ELEMENT META - O EMPTY -- generic metainformation -->
-<!ATTLIST META
- %i18n; -- lang, dir, for use with content --
- http-equiv NAME #IMPLIED -- HTTP response header name --
- name NAME #IMPLIED -- metainformation name --
- content CDATA #REQUIRED -- associated information --
- scheme CDATA #IMPLIED -- select form of content --
- >
-
-<!ELEMENT STYLE - - %StyleSheet -- style info -->
-<!ATTLIST STYLE
- %i18n; -- lang, dir, for use with title --
- type %ContentType; #REQUIRED -- content type of style language --
- media %MediaDesc; #IMPLIED -- designed for use with these media --
- title %Text; #IMPLIED -- advisory title --
- >
-
-<!ELEMENT SCRIPT - - %Script; -- script statements -->
-<!ATTLIST SCRIPT
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- type %ContentType; #REQUIRED -- content type of script language --
- language CDATA #IMPLIED -- predefined script language name --
- src %URI; #IMPLIED -- URI for an external script --
- defer (defer) #IMPLIED -- UA may defer execution of script --
- event CDATA #IMPLIED -- reserved for possible future use --
- for %URI; #IMPLIED -- reserved for possible future use --
- >
-
-<!ELEMENT NOSCRIPT - - (%flow;)*
- -- alternate content container for non script-based rendering -->
-<!ATTLIST NOSCRIPT
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--================ Document Structure ==================================-->
-<!ENTITY % version "version CDATA #FIXED '%HTML.Version;'">
-
-<![ %HTML.Frameset; [
-<!ENTITY % html.content "HEAD, FRAMESET">
-]]>
-
-<!ENTITY % html.content "HEAD, BODY">
-
-<!ELEMENT HTML O O (%html.content;) -- document root element -->
-<!ATTLIST HTML
- %i18n; -- lang, dir --
- %version;
- >
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/loose400.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/loose400.dtd
deleted file mode 100644
index f96d845..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/loose400.dtd
+++ /dev/null
@@ -1,1092 +0,0 @@
-<!--
- This is the HTML 4.0 Transitional DTD, which includes
- presentation attributes and elements that W3C expects to phase out
- as support for style sheets matures. Authors should use the Strict
- DTD when possible, but may use the Transitional DTD when support
- for presentation attribute and elements is required.
-
- HTML 4.0 includes mechanisms for style sheets, scripting,
- embedding objects, improved support for right to left and mixed
- direction text, and enhancements to forms for improved
- accessibility for people with disabilities.
-
- Draft: $Date: 1998/04/02 00:17:00 $
-
- Authors:
- Dave Raggett <dsr@w3.org>
- Arnaud Le Hors <lehors@w3.org>
- Ian Jacobs <ij@w3.org>
-
- Further information about HTML 4.0 is available at:
-
- http://www.w3.org/TR/REC-html40
--->
-<!ENTITY % HTML.Version "-//W3C//DTD HTML 4.0 Transitional//EN"
- -- Typical usage:
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
- "http://www.w3.org/TR/REC-html40/loose.dtd">
- <html>
- <head>
- ...
- </head>
- <body>
- ...
- </body>
- </html>
-
- The URI used as a system identifier with the public identifier allows
- the user agent to download the DTD and entity sets as needed.
-
- The FPI for the Strict HTML 4.0 DTD is:
-
- "-//W3C//DTD HTML 4.0//EN"
-
- and its URI is:
-
- http://www.w3.org/TR/REC-html40/strict.dtd
-
- Authors should use the Strict DTD unless they need the
- presentation control for user agents that don't (adequately)
- support style sheets.
-
- If you are writing a document that includes frames, use
- the following FPI:
-
- "-//W3C//DTD HTML 4.0 Frameset//EN"
-
- with the URI:
-
- http://www.w3.org/TR/REC-html40/frameset.dtd
-
- The following URIs are supported in relation to HTML 4.0
-
- "http://www.w3.org/TR/REC-html40/strict.dtd" (Strict DTD)
- "http://www.w3.org/TR/REC-html40/loose.dtd" (Loose DTD)
- "http://www.w3.org/TR/REC-html40/frameset.dtd" (Frameset DTD)
- "http://www.w3.org/TR/REC-html40/HTMLlat1.ent" (Latin-1 entities)
- "http://www.w3.org/TR/REC-html40/HTMLsymbol.ent" (Symbol entities)
- "http://www.w3.org/TR/REC-html40/HTMLspecial.ent" (Special entities)
-
- These URIs point to the latest version of each file. To reference
- this specific revision use the following URIs:
-
- "http://www.w3.org/TR/1998/REC-html40-19980424/strict.dtd"
- "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd"
- "http://www.w3.org/TR/1998/REC-html40-19980424/frameset.dtd"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLlat1.ent"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLsymbol.ent"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLspecial.ent"
-
--->
-
-<!--================== Imported Names ====================================-->
-
-<!ENTITY % ContentType "CDATA"
- -- media type, as per [RFC2045]
- -->
-
-<!ENTITY % ContentTypes "CDATA"
- -- comma-separated list of media types, as per [RFC2045]
- -->
-
-<!ENTITY % Charset "CDATA"
- -- a character encoding, as per [RFC2045]
- -->
-
-<!ENTITY % Charsets "CDATA"
- -- a space separated list of character encodings, as per [RFC2045]
- -->
-
-<!ENTITY % LanguageCode "NAME"
- -- a language code, as per [RFC1766]
- -->
-
-<!ENTITY % Character "CDATA"
- -- a single character from [ISO10646]
- -->
-
-<!ENTITY % LinkTypes "CDATA"
- -- space-separated list of link types
- -->
-
-<!ENTITY % MediaDesc "CDATA"
- -- single or comma-separated list of media descriptors
- -->
-
-<!ENTITY % URI "CDATA"
- -- a Uniform Resource Identifier,
- see [URI]
- -->
-
-<!ENTITY % Datetime "CDATA" -- date and time information. ISO date format -->
-
-
-<!ENTITY % Script "CDATA" -- script expression -->
-
-<!ENTITY % StyleSheet "CDATA" -- style sheet data -->
-
-<!ENTITY % FrameTarget "CDATA" -- render in this frame -->
-
-
-<!ENTITY % Text "CDATA">
-
-
-<!-- Parameter Entities -->
-
-<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements -->
-
-<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
-
-<!ENTITY % list "UL | OL | DIR | MENU">
-
-<!ENTITY % preformatted "PRE">
-
-<!ENTITY % Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values -->
-
-<!-- There are also 16 widely known color names with their sRGB values:
-
- Black = #000000 Green = #008000
- Silver = #C0C0C0 Lime = #00FF00
- Gray = #808080 Olive = #808000
- White = #FFFFFF Yellow = #FFFF00
- Maroon = #800000 Navy = #000080
- Red = #FF0000 Blue = #0000FF
- Purple = #800080 Teal = #008080
- Fuchsia= #FF00FF Aqua = #00FFFF
- -->
-
-<!ENTITY % bodycolors "
- bgcolor %Color; #IMPLIED -- document background color --
- text %Color; #IMPLIED -- document text color --
- link %Color; #IMPLIED -- color of links --
- vlink %Color; #IMPLIED -- color of visited links --
- alink %Color; #IMPLIED -- color of selected links --
- ">
-
-<!--================ Character mnemonic entities =========================-->
-
-<!ENTITY % HTMLlat1 PUBLIC
- "-//W3C//ENTITIES Latin1//EN//HTML"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLlat1.ent">
-%HTMLlat1;
-
-<!ENTITY % HTMLsymbol PUBLIC
- "-//W3C//ENTITIES Symbols//EN//HTML"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLsymbol.ent">
-%HTMLsymbol;
-
-<!ENTITY % HTMLspecial PUBLIC
- "-//W3C//ENTITIES Special//EN//HTML"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLspecial.ent">
-%HTMLspecial;
-<!--=================== Generic Attributes ===============================-->
-
-<!ENTITY % coreattrs
- "id ID #IMPLIED -- document-wide unique id --
- class CDATA #IMPLIED -- space separated list of classes --
- style %StyleSheet; #IMPLIED -- associated style info --
- title %Text; #IMPLIED -- advisory title/amplification --"
- >
-
-<!ENTITY % i18n
- "lang %LanguageCode; #IMPLIED -- language code --
- dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --"
- >
-
-<!ENTITY % events
- "onclick %Script; #IMPLIED -- a pointer button was clicked --
- ondblclick %Script; #IMPLIED -- a pointer button was double clicked--
- onmousedown %Script; #IMPLIED -- a pointer button was pressed down --
- onmouseup %Script; #IMPLIED -- a pointer button was released --
- onmouseover %Script; #IMPLIED -- a pointer was moved onto --
- onmousemove %Script; #IMPLIED -- a pointer was moved within --
- onmouseout %Script; #IMPLIED -- a pointer was moved away --
- onkeypress %Script; #IMPLIED -- a key was pressed and released --
- onkeydown %Script; #IMPLIED -- a key was pressed down --
- onkeyup %Script; #IMPLIED -- a key was released --"
- >
-
-<!-- Reserved Feature Switch -->
-<!ENTITY % HTML.Reserved "IGNORE">
-
-<!-- The following attributes are reserved for possible future use -->
-<![ %HTML.Reserved; [
-<!ENTITY % reserved
- "datasrc %URI; #IMPLIED -- a single or tabular Data Source --
- datafld CDATA #IMPLIED -- the property or column name --
- dataformatas (plaintext|html) plaintext -- text or html --"
- >
-]]>
-
-<!ENTITY % reserved "">
-
-<!ENTITY % attrs "%coreattrs; %i18n; %events;">
-
-<!ENTITY % align "align (left|center|right|justify) #IMPLIED"
- -- default is left for ltr paragraphs, right for rtl --
- >
-
-<!--=================== Text Markup ======================================-->
-
-<!ENTITY % fontstyle
- "TT | I | B | U | S | STRIKE | BIG | SMALL">
-
-<!ENTITY % phrase "EM | STRONG | DFN | CODE |
- SAMP | KBD | VAR | CITE | ABBR | ACRONYM" >
-
-<!ENTITY % special
- "A | IMG | APPLET | OBJECT | FONT | BASEFONT | BR | SCRIPT |
- MAP | Q | SUB | SUP | SPAN | BDO | IFRAME">
-
-<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">
-
-<!-- %inline; covers inline or "text-level" elements -->
-<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
-
-<!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*>
-<!ATTLIST (%fontstyle;|%phrase;)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript -->
-<!ATTLIST (SUB|SUP)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT SPAN - - (%inline;)* -- generic language/style container -->
-<!ATTLIST SPAN
- %attrs; -- %coreattrs, %i18n, %events --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT BDO - - (%inline;)* -- I18N BiDi over-ride -->
-<!ATTLIST BDO
- %coreattrs; -- id, class, style, title --
- lang %LanguageCode; #IMPLIED -- language code --
- dir (ltr|rtl) #REQUIRED -- directionality --
- >
-
-<!ELEMENT BASEFONT - O EMPTY -- base font size -->
-<!ATTLIST BASEFONT
- id ID #IMPLIED -- document-wide unique id --
- size CDATA #REQUIRED -- base font size for FONT elements --
- color %Color; #IMPLIED -- text color --
- face CDATA #IMPLIED -- comma separated list of font names --
- >
-
-<!ELEMENT FONT - - (%inline;)* -- local change to font -->
-<!ATTLIST FONT
- %coreattrs; -- id, class, style, title --
- %i18n; -- lang, dir --
- size CDATA #IMPLIED -- [+|-]nn e.g. size="+1", size="4" --
- color %Color; #IMPLIED -- text color --
- face CDATA #IMPLIED -- comma separated list of font names --
- >
-
-<!ELEMENT BR - O EMPTY -- forced line break -->
-<!ATTLIST BR
- %coreattrs; -- id, class, style, title --
- clear (left|all|right|none) none -- control of text flow --
- >
-
-<!--================== HTML content models ===============================-->
-
-<!--
- HTML has two basic content models:
-
- %inline; character level elements and text strings
- %block; block-like elements e.g. paragraphs and lists
--->
-
-<!ENTITY % block
- "P | %heading; | %list; | %preformatted; | DL | DIV | CENTER |
- NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR |
- TABLE | FIELDSET | ADDRESS">
-
-<!ENTITY % flow "%block; | %inline;">
-
-<!--=================== Document Body ====================================-->
-
-<!ELEMENT BODY O O (%flow;)* +(INS|DEL) -- document body -->
-<!ATTLIST BODY
- %attrs; -- %coreattrs, %i18n, %events --
- onload %Script; #IMPLIED -- the document has been loaded --
- onunload %Script; #IMPLIED -- the document has been removed --
- background %URI; #IMPLIED -- texture tile for document
- background --
- %bodycolors; -- bgcolor, text, link, vlink, alink --
- >
-
-<!ELEMENT ADDRESS - - ((%inline;)|P)* -- information on author -->
-<!ATTLIST ADDRESS
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT DIV - - (%flow;)* -- generic language/style container -->
-<!ATTLIST DIV
- %attrs; -- %coreattrs, %i18n, %events --
- %align; -- align, text alignment --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT CENTER - - (%flow;)* -- shorthand for DIV align=center -->
-<!ATTLIST CENTER
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--================== The Anchor Element ================================-->
-
-<!ENTITY % Shape "(rect|circle|poly|default)">
-<!ENTITY % Coords "CDATA" -- comma separated list of lengths -->
-
-<!ELEMENT A - - (%inline;)* -(A) -- anchor -->
-<!ATTLIST A
- %attrs; -- %coreattrs, %i18n, %events --
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- type %ContentType; #IMPLIED -- advisory content type --
- name CDATA #IMPLIED -- named link end --
- href %URI; #IMPLIED -- URI for linked resource --
- hreflang %LanguageCode; #IMPLIED -- language code --
- target %FrameTarget; #IMPLIED -- render in this frame --
- rel %LinkTypes; #IMPLIED -- forward link types --
- rev %LinkTypes; #IMPLIED -- reverse link types --
- accesskey %Character; #IMPLIED -- accessibility key character --
- shape %Shape; rect -- for use with client-side image maps --
- coords %Coords; #IMPLIED -- for use with client-side image maps --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!--================== Client-side image maps ============================-->
-
-<!-- These can be placed in the same document or grouped in a
- separate document although this isn't yet widely supported -->
-
-<!ELEMENT MAP - - ((%block;)+ | AREA+) -- client-side image map -->
-<!ATTLIST MAP
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #REQUIRED -- for reference by usemap --
- >
-
-<!ELEMENT AREA - O EMPTY -- client-side image map area -->
-<!ATTLIST AREA
- %attrs; -- %coreattrs, %i18n, %events --
- shape %Shape; rect -- controls interpretation of coords --
- coords %Coords; #IMPLIED -- comma separated list of lengths --
- href %URI; #IMPLIED -- URI for linked resource --
- target %FrameTarget; #IMPLIED -- render in this frame --
- nohref (nohref) #IMPLIED -- this region has no action --
- alt %Text; #REQUIRED -- short description --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!--================== The LINK Element ==================================-->
-
-<!--
- Relationship values can be used in principle:
-
- a) for document specific toolbars/menus when used
- with the LINK element in document head e.g.
- start, contents, previous, next, index, end, help
- b) to link to a separate style sheet (rel=stylesheet)
- c) to make a link to a script (rel=script)
- d) by stylesheets to control how collections of
- html nodes are rendered into printed documents
- e) to make a link to a printable version of this document
- e.g. a postscript or pdf version (rel=alternate media=print)
--->
-
-<!ELEMENT LINK - O EMPTY -- a media-independent link -->
-<!ATTLIST LINK
- %attrs; -- %coreattrs, %i18n, %events --
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- href %URI; #IMPLIED -- URI for linked resource --
- hreflang %LanguageCode; #IMPLIED -- language code --
- type %ContentType; #IMPLIED -- advisory content type --
- rel %LinkTypes; #IMPLIED -- forward link types --
- rev %LinkTypes; #IMPLIED -- reverse link types --
- media %MediaDesc; #IMPLIED -- for rendering on these media --
- target %FrameTarget; #IMPLIED -- render in this frame --
- >
-
-<!--=================== Images ===========================================-->
-
-<!-- Length defined in strict DTD for cellpadding/cellspacing -->
-<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
-<!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative -->
-
-<!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength -->
-
-<!ENTITY % Pixels "CDATA" -- integer representing length in pixels -->
-
-<!ENTITY % IAlign "(top|middle|bottom|left|right)" -- center? -->
-
-<!-- To avoid problems with text-only UAs as well as
- to make image content understandable and navigable
- to users of non-visual UAs, you need to provide
- a description with ALT, and avoid server-side image maps -->
-<!ELEMENT IMG - O EMPTY -- Embedded image -->
-<!ATTLIST IMG
- %attrs; -- %coreattrs, %i18n, %events --
- src %URI; #REQUIRED -- URI of image to embed --
- alt %Text; #REQUIRED -- short description --
- longdesc %URI; #IMPLIED -- link to long description
- (complements alt) --
- height %Length; #IMPLIED -- override height --
- width %Length; #IMPLIED -- override width --
- usemap %URI; #IMPLIED -- use client-side image map --
- ismap (ismap) #IMPLIED -- use server-side image map --
- align %IAlign; #IMPLIED -- vertical or horizontal alignment --
- border %Length; #IMPLIED -- link border width --
- hspace %Pixels; #IMPLIED -- horizontal gutter --
- vspace %Pixels; #IMPLIED -- vertical gutter --
- >
-
-<!-- USEMAP points to a MAP element which may be in this document
- or an external document, although the latter is not widely supported -->
-
-<!--==================== OBJECT ======================================-->
-<!--
- OBJECT is used to embed objects as part of HTML pages
- PARAM elements should precede other content. SGML mixed content
- model technicality precludes specifying this formally ...
--->
-
-<!ELEMENT OBJECT - - (PARAM | %flow;)*
- -- generic embedded object -->
-<!ATTLIST OBJECT
- %attrs; -- %coreattrs, %i18n, %events --
- declare (declare) #IMPLIED -- declare but don't instantiate flag --
- classid %URI; #IMPLIED -- identifies an implementation --
- codebase %URI; #IMPLIED -- base URI for classid, data, archive--
- data %URI; #IMPLIED -- reference to object's data --
- type %ContentType; #IMPLIED -- content type for data --
- codetype %ContentType; #IMPLIED -- content type for code --
- archive %URI; #IMPLIED -- space separated archive list --
- standby %Text; #IMPLIED -- message to show while loading --
- height %Length; #IMPLIED -- override height --
- width %Length; #IMPLIED -- override width --
- usemap %URI; #IMPLIED -- use client-side image map --
- name CDATA #IMPLIED -- submit as part of form --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- align %IAlign; #IMPLIED -- vertical or horizontal alignment --
- border %Length; #IMPLIED -- link border width --
- hspace %Pixels; #IMPLIED -- horizontal gutter --
- vspace %Pixels; #IMPLIED -- vertical gutter --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT PARAM - O EMPTY -- named property value -->
-<!ATTLIST PARAM
- id ID #IMPLIED -- document-wide unique id --
- name CDATA #REQUIRED -- property name --
- value CDATA #IMPLIED -- property value --
- valuetype (DATA|REF|OBJECT) DATA -- How to interpret value --
- type %ContentType; #IMPLIED -- content type for value
- when valuetype=ref --
- >
-
-<!--=================== Java APPLET ==================================-->
-<!--
- One of code or object attributes must be present.
- Place PARAM elements before other content.
--->
-<!ELEMENT APPLET - - (PARAM | %flow;)* -- Java applet -->
-<!ATTLIST APPLET
- %coreattrs; -- id, class, style, title --
- codebase %URI; #IMPLIED -- optional base URI for applet --
- archive CDATA #IMPLIED -- comma separated archive list --
- code CDATA #IMPLIED -- applet class file --
- object CDATA #IMPLIED -- serialized applet file --
- alt %Text; #IMPLIED -- short description --
- name CDATA #IMPLIED -- allows applets to find each other --
- width %Length; #REQUIRED -- initial width --
- height %Length; #REQUIRED -- initial height --
- align %IAlign; #IMPLIED -- vertical or horizontal alignment --
- hspace %Pixels; #IMPLIED -- horizontal gutter --
- vspace %Pixels; #IMPLIED -- vertical gutter --
- >
-
-<!--=================== Horizontal Rule ==================================-->
-
-<!ELEMENT HR - O EMPTY -- horizontal rule -->
-<!ATTLIST HR
- %coreattrs; -- id, class, style, title --
- %events;
- align (left|center|right) #IMPLIED
- noshade (noshade) #IMPLIED
- size %Pixels; #IMPLIED
- width %Length; #IMPLIED
- >
-
-<!--=================== Paragraphs =======================================-->
-
-<!ELEMENT P - O (%inline;)* -- paragraph -->
-<!ATTLIST P
- %attrs; -- %coreattrs, %i18n, %events --
- %align; -- align, text alignment --
- >
-
-<!--=================== Headings =========================================-->
-
-<!--
- There are six levels of headings from H1 (the most important)
- to H6 (the least important).
--->
-
-<!ELEMENT (%heading;) - - (%inline;)* -- heading -->
-<!ATTLIST (%heading;)
- %attrs; -- %coreattrs, %i18n, %events --
- %align; -- align, text alignment --
- >
-
-<!--=================== Preformatted Text ================================-->
-
-<!-- excludes markup for images and changes in font size -->
-<!ENTITY % pre.exclusion "IMG|OBJECT|APPLET|BIG|SMALL|SUB|SUP|FONT|BASEFONT">
-
-<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
-<!ATTLIST PRE
- %attrs; -- %coreattrs, %i18n, %events --
- width NUMBER #IMPLIED
- >
-
-<!--===================== Inline Quotes ==================================-->
-
-<!ELEMENT Q - - (%inline;)* -- short inline quotation -->
-<!ATTLIST Q
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- URI for source document or msg --
- >
-
-<!--=================== Block-like Quotes ================================-->
-
-<!ELEMENT BLOCKQUOTE - - (%flow;)* -- long quotation -->
-<!ATTLIST BLOCKQUOTE
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- URI for source document or msg --
- >
-
-<!--=================== Inserted/Deleted Text ============================-->
-
-
-<!-- INS/DEL are handled by inclusion on BODY -->
-<!ELEMENT (INS|DEL) - - (%flow;)* -- inserted text, deleted text -->
-<!ATTLIST (INS|DEL)
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- info on reason for change --
- datetime %Datetime; #IMPLIED -- date and time of change --
- >
-
-<!--=================== Lists ============================================-->
-
-<!-- definition lists - DT for term, DD for its definition -->
-
-<!ELEMENT DL - - (DT|DD)+ -- definition list -->
-<!ATTLIST DL
- %attrs; -- %coreattrs, %i18n, %events --
- compact (compact) #IMPLIED -- reduced interitem spacing --
- >
-
-<!ELEMENT DT - O (%inline;)* -- definition term -->
-<!ELEMENT DD - O (%flow;)* -- definition description -->
-<!ATTLIST (DT|DD)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!-- Ordered lists (OL) Numbering style
-
- 1 arablic numbers 1, 2, 3, ...
- a lower alpha a, b, c, ...
- A upper alpha A, B, C, ...
- i lower roman i, ii, iii, ...
- I upper roman I, II, III, ...
-
- The style is applied to the sequence number which by default
- is reset to 1 for the first list item in an ordered list.
-
- This can't be expressed directly in SGML due to case folding.
--->
-
-<!ENTITY % OLStyle "CDATA" -- constrained to: "(1|a|A|i|I)" -->
-
-<!ELEMENT OL - - (LI)+ -- ordered list -->
-<!ATTLIST OL
- %attrs; -- %coreattrs, %i18n, %events --
- type %OLStyle; #IMPLIED -- numbering style --
- compact (compact) #IMPLIED -- reduced interitem spacing --
- start NUMBER #IMPLIED -- starting sequence number --
- >
-
-<!-- Unordered Lists (UL) bullet styles -->
-<!ENTITY % ULStyle "(disc|square|circle)">
-
-<!ELEMENT UL - - (LI)+ -- unordered list -->
-<!ATTLIST UL
- %attrs; -- %coreattrs, %i18n, %events --
- type %ULStyle; #IMPLIED -- bullet style --
- compact (compact) #IMPLIED -- reduced interitem spacing --
- >
-
-<!ELEMENT (DIR|MENU) - - (LI)+ -(%block;) -- directory list, menu list -->
-<!ATTLIST DIR
- %attrs; -- %coreattrs, %i18n, %events --
- compact (compact) #IMPLIED
- >
-<!ATTLIST MENU
- %attrs; -- %coreattrs, %i18n, %events --
- compact (compact) #IMPLIED
- >
-
-<!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle;|%OLStyle;)" -->
-
-<!ELEMENT LI - O (%flow;)* -- list item -->
-<!ATTLIST LI
- %attrs; -- %coreattrs, %i18n, %events --
- type %LIStyle; #IMPLIED -- list item style --
- value NUMBER #IMPLIED -- reset sequence number --
- >
-
-<!--================ Forms ===============================================-->
-<!ELEMENT FORM - - (%flow;)* -(FORM) -- interactive form -->
-<!ATTLIST FORM
- %attrs; -- %coreattrs, %i18n, %events --
- action %URI; #REQUIRED -- server-side form handler --
- method (GET|POST) GET -- HTTP method used to submit the form--
- enctype %ContentType; "application/x-www-form-urlencoded"
- onsubmit %Script; #IMPLIED -- the form was submitted --
- onreset %Script; #IMPLIED -- the form was reset --
- target %FrameTarget; #IMPLIED -- render in this frame --
- accept-charset %Charsets; #IMPLIED -- list of supported charsets --
- >
-
-<!-- Each label must not contain more than ONE field -->
-<!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text -->
-<!ATTLIST LABEL
- %attrs; -- %coreattrs, %i18n, %events --
- for IDREF #IMPLIED -- matches field ID value --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!ENTITY % InputType
- "(TEXT | PASSWORD | CHECKBOX |
- RADIO | SUBMIT | RESET |
- FILE | HIDDEN | IMAGE | BUTTON)"
- >
-
-<!-- attribute name required for all but submit & reset -->
-<!ELEMENT INPUT - O EMPTY -- form control -->
-<!ATTLIST INPUT
- %attrs; -- %coreattrs, %i18n, %events --
- type %InputType; TEXT -- what kind of widget is needed --
- name CDATA #IMPLIED -- submit as part of form --
- value CDATA #IMPLIED -- required for radio and checkboxes --
- checked (checked) #IMPLIED -- for radio buttons and check boxes --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- readonly (readonly) #IMPLIED -- for text and passwd --
- size CDATA #IMPLIED -- specific to each type of field --
- maxlength NUMBER #IMPLIED -- max chars for text fields --
- src %URI; #IMPLIED -- for fields with images --
- alt CDATA #IMPLIED -- short description --
- usemap %URI; #IMPLIED -- use client-side image map --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onselect %Script; #IMPLIED -- some text was selected --
- onchange %Script; #IMPLIED -- the element value was changed --
- accept %ContentTypes; #IMPLIED -- list of MIME types for file upload --
- align %IAlign; #IMPLIED -- vertical or horizontal alignment --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector -->
-<!ATTLIST SELECT
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED -- field name --
- size NUMBER #IMPLIED -- rows visible --
- multiple (multiple) #IMPLIED -- default is single selection --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onchange %Script; #IMPLIED -- the element value was changed --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT OPTGROUP - - (OPTION)+ -- option group -->
-<!ATTLIST OPTGROUP
- %attrs; -- %coreattrs, %i18n, %events --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- label %Text; #REQUIRED -- for use in hierarchical menus --
- >
-
-<!ELEMENT OPTION - O (#PCDATA) -- selectable choice -->
-<!ATTLIST OPTION
- %attrs; -- %coreattrs, %i18n, %events --
- selected (selected) #IMPLIED
- disabled (disabled) #IMPLIED -- unavailable in this context --
- label %Text; #IMPLIED -- for use in hierarchical menus --
- value CDATA #IMPLIED -- defaults to element content --
- >
-
-<!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field -->
-<!ATTLIST TEXTAREA
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED
- rows NUMBER #REQUIRED
- cols NUMBER #REQUIRED
- disabled (disabled) #IMPLIED -- unavailable in this context --
- readonly (readonly) #IMPLIED
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onselect %Script; #IMPLIED -- some text was selected --
- onchange %Script; #IMPLIED -- the element value was changed --
- %reserved; -- reserved for possible future use --
- >
-
-<!--
- #PCDATA is to solve the mixed content problem,
- per specification only whitespace is allowed there!
- -->
-<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
-<!ATTLIST FIELDSET
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT LEGEND - - (%inline;)* -- fieldset legend -->
-<!ENTITY % LAlign "(top|bottom|left|right)">
-
-<!ATTLIST LEGEND
- %attrs; -- %coreattrs, %i18n, %events --
- accesskey %Character; #IMPLIED -- accessibility key character --
- align %LAlign; #IMPLIED -- relative to fieldset --
- >
-
-<!ELEMENT BUTTON - -
- (%flow;)* -(A|%formctrl;|FORM|ISINDEX|FIELDSET|IFRAME)
- -- push button -->
-<!ATTLIST BUTTON
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED
- value CDATA #IMPLIED -- sent to server when submitted --
- type (button|submit|reset) submit -- for use as form button --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- %reserved; -- reserved for possible future use --
- >
-
-<!--======================= Tables =======================================-->
-
-<!-- IETF HTML table standard, see [RFC1942] -->
-
-<!--
- The BORDER attribute sets the thickness of the frame around the
- table. The default units are screen pixels.
-
- The FRAME attribute specifies which parts of the frame around
- the table should be rendered. The values are not the same as
- CALS to avoid a name clash with the VALIGN attribute.
-
- The value "border" is included for backwards compatibility with
- <TABLE BORDER> which yields frame=border and border=implied
- For <TABLE BORDER=1> you get border=1 and frame=implied. In this
- case, it is appropriate to treat this as frame=border for backwards
- compatibility with deployed browsers.
--->
-<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
-
-<!--
- The RULES attribute defines which rules to draw between cells:
-
- If RULES is absent then assume:
- "none" if BORDER is absent or BORDER=0 otherwise "all"
--->
-
-<!ENTITY % TRules "(none | groups | rows | cols | all)">
-
-<!-- horizontal placement of table relative to document -->
-<!ENTITY % TAlign "(left|center|right)">
-
-<!-- horizontal alignment attributes for cell contents -->
-<!ENTITY % cellhalign
- "align (left|center|right|justify|char) #IMPLIED
- char %Character; #IMPLIED -- alignment char, e.g. char=':' --
- charoff %Length; #IMPLIED -- offset for alignment char --"
- >
-
-<!-- vertical alignment attributes for cell contents -->
-<!ENTITY % cellvalign
- "valign (top|middle|bottom|baseline) #IMPLIED"
- >
-
-<!ELEMENT TABLE - -
- (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
-<!ELEMENT CAPTION - - (%inline;)* -- table caption -->
-<!ELEMENT THEAD - O (TR)+ -- table header -->
-<!ELEMENT TFOOT - O (TR)+ -- table footer -->
-<!ELEMENT TBODY O O (TR)+ -- table body -->
-<!ELEMENT COLGROUP - O (col)* -- table column group -->
-<!ELEMENT COL - O EMPTY -- table column -->
-<!ELEMENT TR - O (TH|TD)+ -- table row -->
-<!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell-->
-
-<!ATTLIST TABLE -- table element --
- %attrs; -- %coreattrs, %i18n, %events --
- summary %Text; #IMPLIED -- purpose/structure for speech output--
- width %Length; #IMPLIED -- table width --
- border %Pixels; #IMPLIED -- controls frame width around table --
- frame %TFrame; #IMPLIED -- which parts of frame to render --
- rules %TRules; #IMPLIED -- rulings between rows and cols --
- cellspacing %Length; #IMPLIED -- spacing between cells --
- cellpadding %Length; #IMPLIED -- spacing within cells --
- align %TAlign; #IMPLIED -- table position relative to window --
- bgcolor %Color; #IMPLIED -- background color for cells --
- %reserved; -- reserved for possible future use --
- datapagesize CDATA #IMPLIED -- reserved for possible future use --
- >
-
-<!ENTITY % CAlign "(top|bottom|left|right)">
-
-<!ATTLIST CAPTION
- %attrs; -- %coreattrs, %i18n, %events --
- align %CAlign; #IMPLIED -- relative to table --
- >
-
-<!--
-COLGROUP groups a set of COL elements. It allows you to group
-several semantically related columns together.
--->
-<!ATTLIST COLGROUP
- %attrs; -- %coreattrs, %i18n, %events --
- span NUMBER 1 -- default number of columns in group --
- width %MultiLength; #IMPLIED -- default width for enclosed COLs --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!--
- COL elements define the alignment properties for cells in
- one or more columns.
-
- The WIDTH attribute specifies the width of the columns, e.g.
-
- width=64 width in screen pixels
- width=0.5* relative width of 0.5
-
- The SPAN attribute causes the attributes of one
- COL element to apply to more than one column.
--->
-<!ATTLIST COL -- column groups and properties --
- %attrs; -- %coreattrs, %i18n, %events --
- span NUMBER 1 -- COL attributes affect N columns --
- width %MultiLength; #IMPLIED -- column width specification --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!--
- Use THEAD to duplicate headers when breaking table
- across page boundaries, or for static headers when
- TBODY sections are rendered in scrolling panel.
-
- Use TFOOT to duplicate footers when breaking table
- across page boundaries, or for static footers when
- TBODY sections are rendered in scrolling panel.
-
- Use multiple TBODY sections when rules are needed
- between groups of table rows.
--->
-<!ATTLIST (THEAD|TBODY|TFOOT) -- table section --
- %attrs; -- %coreattrs, %i18n, %events --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!ATTLIST TR -- table row --
- %attrs; -- %coreattrs, %i18n, %events --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- bgcolor %Color; #IMPLIED -- background color for row --
- >
-
-
-<!-- Scope is simpler than axes attribute for common tables -->
-<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
-
-<!-- TH is for headers, TD for data, but for cells acting as both use TD -->
-<!ATTLIST (TH|TD) -- header or data cell --
- %attrs; -- %coreattrs, %i18n, %events --
- abbr %Text; #IMPLIED -- abbreviation for header cell --
- axis CDATA #IMPLIED -- names groups of related headers--
- headers IDREFS #IMPLIED -- list of id's for header cells --
- scope %Scope; #IMPLIED -- scope covered by header cells --
- rowspan NUMBER 1 -- number of rows spanned by cell --
- colspan NUMBER 1 -- number of cols spanned by cell --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- nowrap (nowrap) #IMPLIED -- suppress word wrap --
- bgcolor %Color; #IMPLIED -- cell background color --
- width %Pixels; #IMPLIED -- width for cell --
- height %Pixels; #IMPLIED -- height for cell --
- >
-
-<!--================== Document Frames ===================================-->
-
-<!--
- The content model for HTML documents depends on whether the HEAD is
- followed by a FRAMESET or BODY element. The widespread omission of
- the BODY start tag makes it impractical to define the content model
- without the use of a marked section.
--->
-
-<!-- Feature Switch for frameset documents -->
-<!ENTITY % HTML.Frameset "IGNORE">
-
-<![ %HTML.Frameset; [
-<!ELEMENT FRAMESET - - ((FRAMESET|FRAME)+ & NOFRAMES?) -- window subdivision-->
-<!ATTLIST FRAMESET
- %coreattrs; -- id, class, style, title --
- rows %MultiLengths; #IMPLIED -- list of lengths,
- default: 100% (1 row) --
- cols %MultiLengths; #IMPLIED -- list of lengths,
- default: 100% (1 col) --
- onload %Script; #IMPLIED -- all the frames have been loaded --
- onunload %Script; #IMPLIED -- all the frames have been removed --
- >
-]]>
-
-<![ %HTML.Frameset; [
-<!-- reserved frame names start with "_" otherwise starts with letter -->
-<!ELEMENT FRAME - O EMPTY -- subwindow -->
-<!ATTLIST FRAME
- %coreattrs; -- id, class, style, title --
- longdesc %URI; #IMPLIED -- link to long description
- (complements title) --
- name CDATA #IMPLIED -- name of frame for targetting --
- src %URI; #IMPLIED -- source of frame content --
- frameborder (1|0) 1 -- request frame borders? --
- marginwidth %Pixels; #IMPLIED -- margin widths in pixels --
- marginheight %Pixels; #IMPLIED -- margin height in pixels --
- noresize (noresize) #IMPLIED -- allow users to resize frames? --
- scrolling (yes|no|auto) auto -- scrollbar or none --
- >
-]]>
-
-<!ELEMENT IFRAME - - (%flow;)* -- inline subwindow -->
-<!ATTLIST IFRAME
- %coreattrs; -- id, class, style, title --
- longdesc %URI; #IMPLIED -- link to long description
- (complements title) --
- name CDATA #IMPLIED -- name of frame for targetting --
- src %URI; #IMPLIED -- source of frame content --
- frameborder (1|0) 1 -- request frame borders? --
- marginwidth %Pixels; #IMPLIED -- margin widths in pixels --
- marginheight %Pixels; #IMPLIED -- margin height in pixels --
- scrolling (yes|no|auto) auto -- scrollbar or none --
- align %IAlign; #IMPLIED -- vertical or horizontal alignment --
- height %Length; #IMPLIED -- frame height --
- width %Length; #IMPLIED -- frame width --
- >
-
-<![ %HTML.Frameset; [
-<!ENTITY % noframes.content "(BODY) -(NOFRAMES)">
-]]>
-
-<!ENTITY % noframes.content "(%flow;)*">
-
-<!ELEMENT NOFRAMES - - %noframes.content;
- -- alternate content container for non frame-based rendering -->
-<!ATTLIST NOFRAMES
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--================ Document Head =======================================-->
-<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
-<!ENTITY % head.content "TITLE & ISINDEX? & BASE?">
-
-<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->
-<!ATTLIST HEAD
- %i18n; -- lang, dir --
- profile %URI; #IMPLIED -- named dictionary of meta info --
- >
-
-<!-- The TITLE element is not considered part of the flow of text.
- It should be displayed, for example as the page header or
- window title. Exactly one title is required per document.
- -->
-<!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -->
-<!ATTLIST TITLE %i18n>
-
-<!ELEMENT ISINDEX - O EMPTY -- single line prompt -->
-<!ATTLIST ISINDEX
- %coreattrs; -- id, class, style, title --
- %i18n; -- lang, dir --
- prompt %Text; #IMPLIED -- prompt message -->
-
-<!ELEMENT BASE - O EMPTY -- document base URI -->
-<!ATTLIST BASE
- href %URI; #IMPLIED -- URI that acts as base URI --
- target %FrameTarget; #IMPLIED -- render in this frame --
- >
-
-<!ELEMENT META - O EMPTY -- generic metainformation -->
-<!ATTLIST META
- %i18n; -- lang, dir, for use with content --
- http-equiv NAME #IMPLIED -- HTTP response header name --
- name NAME #IMPLIED -- metainformation name --
- content CDATA #REQUIRED -- associated information --
- scheme CDATA #IMPLIED -- select form of content --
- >
-
-<!ELEMENT STYLE - - %StyleSheet -- style info -->
-<!ATTLIST STYLE
- %i18n; -- lang, dir, for use with title --
- type %ContentType; #REQUIRED -- content type of style language --
- media %MediaDesc; #IMPLIED -- designed for use with these media --
- title %Text; #IMPLIED -- advisory title --
- >
-
-<!ELEMENT SCRIPT - - %Script; -- script statements -->
-<!ATTLIST SCRIPT
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- type %ContentType; #REQUIRED -- content type of script language --
- language CDATA #IMPLIED -- predefined script language name --
- src %URI; #IMPLIED -- URI for an external script --
- defer (defer) #IMPLIED -- UA may defer execution of script --
- event CDATA #IMPLIED -- reserved for possible future use --
- for %URI; #IMPLIED -- reserved for possible future use --
- >
-
-<!ELEMENT NOSCRIPT - - (%flow;)*
- -- alternate content container for non script-based rendering -->
-<!ATTLIST NOSCRIPT
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--================ Document Structure ==================================-->
-<!ENTITY % version "version CDATA #FIXED '%HTML.Version;'">
-
-<![ %HTML.Frameset; [
-<!ENTITY % html.content "HEAD, FRAMESET">
-]]>
-
-<!ENTITY % html.content "HEAD, BODY">
-
-<!ELEMENT HTML O O (%html.content;) -- document root element -->
-<!ATTLIST HTML
- %i18n; -- lang, dir --
- %version;
- >
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/strict.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/strict.dtd
deleted file mode 100644
index b43437b..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/strict.dtd
+++ /dev/null
@@ -1,870 +0,0 @@
-<!--
- This is HTML 4.01 Strict DTD, which excludes the presentation
- attributes and elements that W3C expects to phase out as
- support for style sheets matures. Authors should use the Strict
- DTD when possible, but may use the Transitional DTD when support
- for presentation attribute and elements is required.
-
- HTML 4 includes mechanisms for style sheets, scripting,
- embedding objects, improved support for right to left and mixed
- direction text, and enhancements to forms for improved
- accessibility for people with disabilities.
-
- Draft: $Date: 1999/12/24 22:40:35 $
-
- Authors:
- Dave Raggett <dsr@w3.org>
- Arnaud Le Hors <lehors@w3.org>
- Ian Jacobs <ij@w3.org>
-
- Further information about HTML 4.01 is available at:
-
- http://www.w3.org/TR/1999/REC-html401-19991224
-
-
- The HTML 4.01 specification includes additional
- syntactic constraints that cannot be expressed within
- the DTDs.
-
--->
-<!--
- Typical usage:
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
- <html>
- <head>
- ...
- </head>
- <body>
- ...
- </body>
- </html>
-
- The URI used as a system identifier with the public identifier allows
- the user agent to download the DTD and entity sets as needed.
-
- The FPI for the Transitional HTML 4.01 DTD is:
-
- "-//W3C//DTD HTML 4.01 Transitional//EN"
-
- This version of the transitional DTD is:
-
- http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd
-
- If you are writing a document that includes frames, use
- the following FPI:
-
- "-//W3C//DTD HTML 4.01 Frameset//EN"
-
- This version of the frameset DTD is:
-
- http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd
-
- Use the following (relative) URIs to refer to
- the DTDs and entity definitions of this specification:
-
- "strict.dtd"
- "loose.dtd"
- "frameset.dtd"
- "HTMLlat1.ent"
- "HTMLsymbol.ent"
- "HTMLspecial.ent"
-
--->
-
-<!--================== Imported Names ====================================-->
-<!-- Feature Switch for frameset documents -->
-<!ENTITY % HTML.Frameset "IGNORE">
-
-<!ENTITY % ContentType "CDATA"
- -- media type, as per [RFC2045]
- -->
-
-<!ENTITY % ContentTypes "CDATA"
- -- comma-separated list of media types, as per [RFC2045]
- -->
-
-<!ENTITY % Charset "CDATA"
- -- a character encoding, as per [RFC2045]
- -->
-
-<!ENTITY % Charsets "CDATA"
- -- a space-separated list of character encodings, as per [RFC2045]
- -->
-
-<!ENTITY % LanguageCode "NAME"
- -- a language code, as per [RFC1766]
- -->
-
-<!ENTITY % Character "CDATA"
- -- a single character from [ISO10646]
- -->
-
-<!ENTITY % LinkTypes "CDATA"
- -- space-separated list of link types
- -->
-
-<!ENTITY % MediaDesc "CDATA"
- -- single or comma-separated list of media descriptors
- -->
-
-<!ENTITY % URI "CDATA"
- -- a Uniform Resource Identifier,
- see [URI]
- -->
-
-<!ENTITY % Datetime "CDATA" -- date and time information. ISO date format -->
-
-
-<!ENTITY % Script "CDATA" -- script expression -->
-
-<!ENTITY % StyleSheet "CDATA" -- style sheet data -->
-
-
-
-<!ENTITY % Text "CDATA">
-
-
-<!-- Parameter Entities -->
-
-<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements -->
-
-<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
-
-<!ENTITY % list "UL | OL">
-
-<!ENTITY % preformatted "PRE">
-
-
-<!--================ Character mnemonic entities =========================-->
-
-<!ENTITY % HTMLlat1 PUBLIC
- "-//W3C//ENTITIES Latin1//EN//HTML"
- "HTMLlat1.ent">
-%HTMLlat1;
-
-<!ENTITY % HTMLsymbol PUBLIC
- "-//W3C//ENTITIES Symbols//EN//HTML"
- "HTMLsymbol.ent">
-%HTMLsymbol;
-
-<!ENTITY % HTMLspecial PUBLIC
- "-//W3C//ENTITIES Special//EN//HTML"
- "HTMLspecial.ent">
-%HTMLspecial;
-<!--=================== Generic Attributes ===============================-->
-
-<!ENTITY % coreattrs
- "id ID #IMPLIED -- document-wide unique id --
- class CDATA #IMPLIED -- space-separated list of classes --
- style %StyleSheet; #IMPLIED -- associated style info --
- title %Text; #IMPLIED -- advisory title --"
- >
-
-<!ENTITY % i18n
- "lang %LanguageCode; #IMPLIED -- language code --
- dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --"
- >
-
-<!ENTITY % events
- "onclick %Script; #IMPLIED -- a pointer button was clicked --
- ondblclick %Script; #IMPLIED -- a pointer button was double clicked--
- onmousedown %Script; #IMPLIED -- a pointer button was pressed down --
- onmouseup %Script; #IMPLIED -- a pointer button was released --
- onmouseover %Script; #IMPLIED -- a pointer was moved onto --
- onmousemove %Script; #IMPLIED -- a pointer was moved within --
- onmouseout %Script; #IMPLIED -- a pointer was moved away --
- onkeypress %Script; #IMPLIED -- a key was pressed and released --
- onkeydown %Script; #IMPLIED -- a key was pressed down --
- onkeyup %Script; #IMPLIED -- a key was released --"
- >
-
-<!-- Reserved Feature Switch -->
-<!ENTITY % HTML.Reserved "IGNORE">
-
-<!-- The following attributes are reserved for possible future use -->
-<![ %HTML.Reserved; [
-<!ENTITY % reserved
- "datasrc %URI; #IMPLIED -- a single or tabular Data Source --
- datafld CDATA #IMPLIED -- the property or column name --
- dataformatas (plaintext|html) plaintext -- text or html --"
- >
-]]>
-
-<!ENTITY % reserved "">
-
-<!ENTITY % attrs "%coreattrs; %i18n; %events;">
-
-
-<!--=================== Text Markup ======================================-->
-
-<!ENTITY % fontstyle
- "TT | I | B | BIG | SMALL">
-
-<!ENTITY % phrase "EM | STRONG | DFN | CODE |
- SAMP | KBD | VAR | CITE | ABBR | ACRONYM" >
-
-<!ENTITY % special
- "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO">
-
-<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">
-
-<!-- %inline; covers inline or "text-level" elements -->
-<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
-
-<!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*>
-<!ATTLIST (%fontstyle;|%phrase;)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript -->
-<!ATTLIST (SUB|SUP)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT SPAN - - (%inline;)* -- generic language/style container -->
-<!ATTLIST SPAN
- %attrs; -- %coreattrs, %i18n, %events --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT BDO - - (%inline;)* -- I18N BiDi over-ride -->
-<!ATTLIST BDO
- %coreattrs; -- id, class, style, title --
- lang %LanguageCode; #IMPLIED -- language code --
- dir (ltr|rtl) #REQUIRED -- directionality --
- >
-
-
-<!ELEMENT BR - O EMPTY -- forced line break -->
-<!ATTLIST BR
- %coreattrs; -- id, class, style, title --
- >
-
-<!--================== HTML content models ===============================-->
-
-<!--
- HTML has two basic content models:
-
- %inline; character level elements and text strings
- %block; block-like elements e.g. paragraphs and lists
--->
-
-<!ENTITY % block
- "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
- BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
-
-<!ENTITY % flow "%block; | %inline;">
-
-<!--=================== Document Body ====================================-->
-
-<!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body -->
-<!ATTLIST BODY
- %attrs; -- %coreattrs, %i18n, %events --
- onload %Script; #IMPLIED -- the document has been loaded --
- onunload %Script; #IMPLIED -- the document has been removed --
- >
-
-<!ELEMENT ADDRESS - - (%inline;)* -- information on author -->
-<!ATTLIST ADDRESS
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT DIV - - (%flow;)* -- generic language/style container -->
-<!ATTLIST DIV
- %attrs; -- %coreattrs, %i18n, %events --
- %reserved; -- reserved for possible future use --
- >
-
-
-<!--================== The Anchor Element ================================-->
-
-<!ENTITY % Shape "(rect|circle|poly|default)">
-<!ENTITY % Coords "CDATA" -- comma-separated list of lengths -->
-
-<!ELEMENT A - - (%inline;)* -(A) -- anchor -->
-<!ATTLIST A
- %attrs; -- %coreattrs, %i18n, %events --
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- type %ContentType; #IMPLIED -- advisory content type --
- name CDATA #IMPLIED -- named link end --
- href %URI; #IMPLIED -- URI for linked resource --
- hreflang %LanguageCode; #IMPLIED -- language code --
- rel %LinkTypes; #IMPLIED -- forward link types --
- rev %LinkTypes; #IMPLIED -- reverse link types --
- accesskey %Character; #IMPLIED -- accessibility key character --
- shape %Shape; rect -- for use with client-side image maps --
- coords %Coords; #IMPLIED -- for use with client-side image maps --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!--================== Client-side image maps ============================-->
-
-<!-- These can be placed in the same document or grouped in a
- separate document although this isn't yet widely supported -->
-
-<!ELEMENT MAP - - ((%block;) | AREA)+ -- client-side image map -->
-<!ATTLIST MAP
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #REQUIRED -- for reference by usemap --
- >
-
-<!ELEMENT AREA - O EMPTY -- client-side image map area -->
-<!ATTLIST AREA
- %attrs; -- %coreattrs, %i18n, %events --
- shape %Shape; rect -- controls interpretation of coords --
- coords %Coords; #IMPLIED -- comma-separated list of lengths --
- href %URI; #IMPLIED -- URI for linked resource --
- nohref (nohref) #IMPLIED -- this region has no action --
- alt %Text; #REQUIRED -- short description --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!--================== The LINK Element ==================================-->
-
-<!--
- Relationship values can be used in principle:
-
- a) for document specific toolbars/menus when used
- with the LINK element in document head e.g.
- start, contents, previous, next, index, end, help
- b) to link to a separate style sheet (rel=stylesheet)
- c) to make a link to a script (rel=script)
- d) by stylesheets to control how collections of
- html nodes are rendered into printed documents
- e) to make a link to a printable version of this document
- e.g. a postscript or pdf version (rel=alternate media=print)
--->
-
-<!ELEMENT LINK - O EMPTY -- a media-independent link -->
-<!ATTLIST LINK
- %attrs; -- %coreattrs, %i18n, %events --
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- href %URI; #IMPLIED -- URI for linked resource --
- hreflang %LanguageCode; #IMPLIED -- language code --
- type %ContentType; #IMPLIED -- advisory content type --
- rel %LinkTypes; #IMPLIED -- forward link types --
- rev %LinkTypes; #IMPLIED -- reverse link types --
- media %MediaDesc; #IMPLIED -- for rendering on these media --
- >
-
-<!--=================== Images ===========================================-->
-
-<!-- Length defined in strict DTD for cellpadding/cellspacing -->
-<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
-<!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative -->
-
-<![ %HTML.Frameset; [
-<!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength -->
-]]>
-
-<!ENTITY % Pixels "CDATA" -- integer representing length in pixels -->
-
-
-<!-- To avoid problems with text-only UAs as well as
- to make image content understandable and navigable
- to users of non-visual UAs, you need to provide
- a description with ALT, and avoid server-side image maps -->
-<!ELEMENT IMG - O EMPTY -- Embedded image -->
-<!ATTLIST IMG
- %attrs; -- %coreattrs, %i18n, %events --
- src %URI; #REQUIRED -- URI of image to embed --
- alt %Text; #REQUIRED -- short description --
- longdesc %URI; #IMPLIED -- link to long description
- (complements alt) --
- name CDATA #IMPLIED -- name of image for scripting --
- height %Length; #IMPLIED -- override height --
- width %Length; #IMPLIED -- override width --
- usemap %URI; #IMPLIED -- use client-side image map --
- ismap (ismap) #IMPLIED -- use server-side image map --
- >
-
-<!-- USEMAP points to a MAP element which may be in this document
- or an external document, although the latter is not widely supported -->
-
-<!--==================== OBJECT ======================================-->
-<!--
- OBJECT is used to embed objects as part of HTML pages
- PARAM elements should precede other content. SGML mixed content
- model technicality precludes specifying this formally ...
--->
-
-<!ELEMENT OBJECT - - (PARAM | %flow;)*
- -- generic embedded object -->
-<!ATTLIST OBJECT
- %attrs; -- %coreattrs, %i18n, %events --
- declare (declare) #IMPLIED -- declare but don't instantiate flag --
- classid %URI; #IMPLIED -- identifies an implementation --
- codebase %URI; #IMPLIED -- base URI for classid, data, archive--
- data %URI; #IMPLIED -- reference to object's data --
- type %ContentType; #IMPLIED -- content type for data --
- codetype %ContentType; #IMPLIED -- content type for code --
- archive CDATA #IMPLIED -- space-separated list of URIs --
- standby %Text; #IMPLIED -- message to show while loading --
- height %Length; #IMPLIED -- override height --
- width %Length; #IMPLIED -- override width --
- usemap %URI; #IMPLIED -- use client-side image map --
- name CDATA #IMPLIED -- submit as part of form --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT PARAM - O EMPTY -- named property value -->
-<!ATTLIST PARAM
- id ID #IMPLIED -- document-wide unique id --
- name CDATA #REQUIRED -- property name --
- value CDATA #IMPLIED -- property value --
- valuetype (DATA|REF|OBJECT) DATA -- How to interpret value --
- type %ContentType; #IMPLIED -- content type for value
- when valuetype=ref --
- >
-
-
-<!--=================== Horizontal Rule ==================================-->
-
-<!ELEMENT HR - O EMPTY -- horizontal rule -->
-<!ATTLIST HR
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--=================== Paragraphs =======================================-->
-
-<!ELEMENT P - O (%inline;)* -- paragraph -->
-<!ATTLIST P
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--=================== Headings =========================================-->
-
-<!--
- There are six levels of headings from H1 (the most important)
- to H6 (the least important).
--->
-
-<!ELEMENT (%heading;) - - (%inline;)* -- heading -->
-<!ATTLIST (%heading;)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--=================== Preformatted Text ================================-->
-
-<!-- excludes markup for images and changes in font size -->
-<!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP">
-
-<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
-<!ATTLIST PRE
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--===================== Inline Quotes ==================================-->
-
-<!ELEMENT Q - - (%inline;)* -- short inline quotation -->
-<!ATTLIST Q
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- URI for source document or msg --
- >
-
-<!--=================== Block-like Quotes ================================-->
-
-<!ELEMENT BLOCKQUOTE - - (%block;|SCRIPT)+ -- long quotation -->
-<!ATTLIST BLOCKQUOTE
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- URI for source document or msg --
- >
-
-<!--=================== Inserted/Deleted Text ============================-->
-
-
-<!-- INS/DEL are handled by inclusion on BODY -->
-<!ELEMENT (INS|DEL) - - (%flow;)* -- inserted text, deleted text -->
-<!ATTLIST (INS|DEL)
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- info on reason for change --
- datetime %Datetime; #IMPLIED -- date and time of change --
- >
-
-<!--=================== Lists ============================================-->
-
-<!-- definition lists - DT for term, DD for its definition -->
-
-<!ELEMENT DL - - (DT|DD)+ -- definition list -->
-<!ATTLIST DL
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT DT - O (%inline;)* -- definition term -->
-<!ELEMENT DD - O (%flow;)* -- definition description -->
-<!ATTLIST (DT|DD)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-
-<!ELEMENT OL - - (LI)+ -- ordered list -->
-<!ATTLIST OL
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!-- Unordered Lists (UL) bullet styles -->
-<!ELEMENT UL - - (LI)+ -- unordered list -->
-<!ATTLIST UL
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-
-
-<!ELEMENT LI - O (%flow;)* -- list item -->
-<!ATTLIST LI
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--================ Forms ===============================================-->
-<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form -->
-<!ATTLIST FORM
- %attrs; -- %coreattrs, %i18n, %events --
- action %URI; #REQUIRED -- server-side form handler --
- method (GET|POST) GET -- HTTP method used to submit the form--
- enctype %ContentType; "application/x-www-form-urlencoded"
- accept %ContentTypes; #IMPLIED -- list of MIME types for file upload --
- name CDATA #IMPLIED -- name of form for scripting --
- onsubmit %Script; #IMPLIED -- the form was submitted --
- onreset %Script; #IMPLIED -- the form was reset --
- accept-charset %Charsets; #IMPLIED -- list of supported charsets --
- >
-
-<!-- Each label must not contain more than ONE field -->
-<!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text -->
-<!ATTLIST LABEL
- %attrs; -- %coreattrs, %i18n, %events --
- for IDREF #IMPLIED -- matches field ID value --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!ENTITY % InputType
- "(TEXT | PASSWORD | CHECKBOX |
- RADIO | SUBMIT | RESET |
- FILE | HIDDEN | IMAGE | BUTTON)"
- >
-
-<!-- attribute name required for all but submit and reset -->
-<!ELEMENT INPUT - O EMPTY -- form control -->
-<!ATTLIST INPUT
- %attrs; -- %coreattrs, %i18n, %events --
- type %InputType; TEXT -- what kind of widget is needed --
- name CDATA #IMPLIED -- submit as part of form --
- value CDATA #IMPLIED -- Specify for radio buttons and checkboxes --
- checked (checked) #IMPLIED -- for radio buttons and check boxes --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- readonly (readonly) #IMPLIED -- for text and passwd --
- size CDATA #IMPLIED -- specific to each type of field --
- maxlength NUMBER #IMPLIED -- max chars for text fields --
- src %URI; #IMPLIED -- for fields with images --
- alt CDATA #IMPLIED -- short description --
- usemap %URI; #IMPLIED -- use client-side image map --
- ismap (ismap) #IMPLIED -- use server-side image map --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onselect %Script; #IMPLIED -- some text was selected --
- onchange %Script; #IMPLIED -- the element value was changed --
- accept %ContentTypes; #IMPLIED -- list of MIME types for file upload --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector -->
-<!ATTLIST SELECT
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED -- field name --
- size NUMBER #IMPLIED -- rows visible --
- multiple (multiple) #IMPLIED -- default is single selection --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onchange %Script; #IMPLIED -- the element value was changed --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT OPTGROUP - - (OPTION)+ -- option group -->
-<!ATTLIST OPTGROUP
- %attrs; -- %coreattrs, %i18n, %events --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- label %Text; #REQUIRED -- for use in hierarchical menus --
- >
-
-<!ELEMENT OPTION - O (#PCDATA) -- selectable choice -->
-<!ATTLIST OPTION
- %attrs; -- %coreattrs, %i18n, %events --
- selected (selected) #IMPLIED
- disabled (disabled) #IMPLIED -- unavailable in this context --
- label %Text; #IMPLIED -- for use in hierarchical menus --
- value CDATA #IMPLIED -- defaults to element content --
- >
-
-<!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field -->
-<!ATTLIST TEXTAREA
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED
- rows NUMBER #REQUIRED
- cols NUMBER #REQUIRED
- disabled (disabled) #IMPLIED -- unavailable in this context --
- readonly (readonly) #IMPLIED
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onselect %Script; #IMPLIED -- some text was selected --
- onchange %Script; #IMPLIED -- the element value was changed --
- %reserved; -- reserved for possible future use --
- >
-
-<!--
- #PCDATA is to solve the mixed content problem,
- per specification only whitespace is allowed there!
- -->
-<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
-<!ATTLIST FIELDSET
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT LEGEND - - (%inline;)* -- fieldset legend -->
-
-<!ATTLIST LEGEND
- %attrs; -- %coreattrs, %i18n, %events --
- accesskey %Character; #IMPLIED -- accessibility key character --
- >
-
-<!ELEMENT BUTTON - -
- (%flow;)* -(A|%formctrl;|FORM|FIELDSET)
- -- push button -->
-<!ATTLIST BUTTON
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED
- value CDATA #IMPLIED -- sent to server when submitted --
- type (button|submit|reset) submit -- for use as form button --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- %reserved; -- reserved for possible future use --
- >
-
-<!--======================= Tables =======================================-->
-
-<!-- IETF HTML table standard, see [RFC1942] -->
-
-<!--
- The BORDER attribute sets the thickness of the frame around the
- table. The default units are screen pixels.
-
- The FRAME attribute specifies which parts of the frame around
- the table should be rendered. The values are not the same as
- CALS to avoid a name clash with the VALIGN attribute.
-
- The value "border" is included for backwards compatibility with
- <TABLE BORDER> which yields frame=border and border=implied
- For <TABLE BORDER=1> you get border=1 and frame=implied. In this
- case, it is appropriate to treat this as frame=border for backwards
- compatibility with deployed browsers.
--->
-<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
-
-<!--
- The RULES attribute defines which rules to draw between cells:
-
- If RULES is absent then assume:
- "none" if BORDER is absent or BORDER=0 otherwise "all"
--->
-
-<!ENTITY % TRules "(none | groups | rows | cols | all)">
-
-<!-- horizontal placement of table relative to document -->
-<!ENTITY % TAlign "(left|center|right)">
-
-<!-- horizontal alignment attributes for cell contents -->
-<!ENTITY % cellhalign
- "align (left|center|right|justify|char) #IMPLIED
- char %Character; #IMPLIED -- alignment char, e.g. char=':' --
- charoff %Length; #IMPLIED -- offset for alignment char --"
- >
-
-<!-- vertical alignment attributes for cell contents -->
-<!ENTITY % cellvalign
- "valign (top|middle|bottom|baseline) #IMPLIED"
- >
-
-<!ELEMENT TABLE - -
- (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
-<!ELEMENT CAPTION - - (%inline;)* -- table caption -->
-<!ELEMENT THEAD - O (TR)+ -- table header -->
-<!ELEMENT TFOOT - O (TR)+ -- table footer -->
-<!ELEMENT TBODY O O (TR)+ -- table body -->
-<!ELEMENT COLGROUP - O (COL)* -- table column group -->
-<!ELEMENT COL - O EMPTY -- table column -->
-<!ELEMENT TR - O (TH|TD)+ -- table row -->
-<!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell-->
-
-<!ATTLIST TABLE -- table element --
- %attrs; -- %coreattrs, %i18n, %events --
- summary %Text; #IMPLIED -- purpose/structure for speech output--
- width %Length; #IMPLIED -- table width --
- border %Pixels; #IMPLIED -- controls frame width around table --
- frame %TFrame; #IMPLIED -- which parts of frame to render --
- rules %TRules; #IMPLIED -- rulings between rows and cols --
- cellspacing %Length; #IMPLIED -- spacing between cells --
- cellpadding %Length; #IMPLIED -- spacing within cells --
- %reserved; -- reserved for possible future use --
- datapagesize CDATA #IMPLIED -- reserved for possible future use --
- >
-
-
-<!ATTLIST CAPTION
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--
-COLGROUP groups a set of COL elements. It allows you to group
-several semantically related columns together.
--->
-<!ATTLIST COLGROUP
- %attrs; -- %coreattrs, %i18n, %events --
- span NUMBER 1 -- default number of columns in group --
- width %MultiLength; #IMPLIED -- default width for enclosed COLs --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!--
- COL elements define the alignment properties for cells in
- one or more columns.
-
- The WIDTH attribute specifies the width of the columns, e.g.
-
- width=64 width in screen pixels
- width=0.5* relative width of 0.5
-
- The SPAN attribute causes the attributes of one
- COL element to apply to more than one column.
--->
-<!ATTLIST COL -- column groups and properties --
- %attrs; -- %coreattrs, %i18n, %events --
- span NUMBER 1 -- COL attributes affect N columns --
- width %MultiLength; #IMPLIED -- column width specification --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!--
- Use THEAD to duplicate headers when breaking table
- across page boundaries, or for static headers when
- TBODY sections are rendered in scrolling panel.
-
- Use TFOOT to duplicate footers when breaking table
- across page boundaries, or for static footers when
- TBODY sections are rendered in scrolling panel.
-
- Use multiple TBODY sections when rules are needed
- between groups of table rows.
--->
-<!ATTLIST (THEAD|TBODY|TFOOT) -- table section --
- %attrs; -- %coreattrs, %i18n, %events --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!ATTLIST TR -- table row --
- %attrs; -- %coreattrs, %i18n, %events --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-
-<!-- Scope is simpler than headers attribute for common tables -->
-<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
-
-<!-- TH is for headers, TD for data, but for cells acting as both use TD -->
-<!ATTLIST (TH|TD) -- header or data cell --
- %attrs; -- %coreattrs, %i18n, %events --
- abbr %Text; #IMPLIED -- abbreviation for header cell --
- axis CDATA #IMPLIED -- comma-separated list of related headers--
- headers IDREFS #IMPLIED -- list of id's for header cells --
- scope %Scope; #IMPLIED -- scope covered by header cells --
- rowspan NUMBER 1 -- number of rows spanned by cell --
- colspan NUMBER 1 -- number of cols spanned by cell --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-
-<!--================ Document Head =======================================-->
-<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
-<!ENTITY % head.content "TITLE & BASE?">
-
-<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->
-<!ATTLIST HEAD
- %i18n; -- lang, dir --
- profile %URI; #IMPLIED -- named dictionary of meta info --
- >
-
-<!-- The TITLE element is not considered part of the flow of text.
- It should be displayed, for example as the page header or
- window title. Exactly one title is required per document.
- -->
-<!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -->
-<!ATTLIST TITLE %i18n>
-
-
-<!ELEMENT BASE - O EMPTY -- document base URI -->
-<!ATTLIST BASE
- href %URI; #REQUIRED -- URI that acts as base URI --
- >
-
-<!ELEMENT META - O EMPTY -- generic metainformation -->
-<!ATTLIST META
- %i18n; -- lang, dir, for use with content --
- http-equiv NAME #IMPLIED -- HTTP response header name --
- name NAME #IMPLIED -- metainformation name --
- content CDATA #REQUIRED -- associated information --
- scheme CDATA #IMPLIED -- select form of content --
- >
-
-<!ELEMENT STYLE - - %StyleSheet -- style info -->
-<!ATTLIST STYLE
- %i18n; -- lang, dir, for use with title --
- type %ContentType; #REQUIRED -- content type of style language --
- media %MediaDesc; #IMPLIED -- designed for use with these media --
- title %Text; #IMPLIED -- advisory title --
- >
-
-<!ELEMENT SCRIPT - - %Script; -- script statements -->
-<!ATTLIST SCRIPT
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- type %ContentType; #REQUIRED -- content type of script language --
- src %URI; #IMPLIED -- URI for an external script --
- defer (defer) #IMPLIED -- UA may defer execution of script --
- event CDATA #IMPLIED -- reserved for possible future use --
- for %URI; #IMPLIED -- reserved for possible future use --
- >
-
-<!ELEMENT NOSCRIPT - - (%block;)+
- -- alternate content container for non script-based rendering -->
-<!ATTLIST NOSCRIPT
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--================ Document Structure ==================================-->
-<!ENTITY % html.content "HEAD, BODY">
-
-<!ELEMENT HTML O O (%html.content;) -- document root element -->
-<!ATTLIST HTML
- %i18n; -- lang, dir --
- >
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/strict400.dtd b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/strict400.dtd
deleted file mode 100644
index a38ed5b..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/dtd/strict400.dtd
+++ /dev/null
@@ -1,868 +0,0 @@
-<!--
- This is HTML 4.0 Strict DTD, which excludes the presentation
- attributes and elements that W3C expects to phase out as
- support for style sheets matures. Authors should use the Strict
- DTD when possible, but may use the Transitional DTD when support
- for presentation attribute and elements is required.
-
- HTML 4.0 includes mechanisms for style sheets, scripting,
- embedding objects, improved support for right to left and mixed
- direction text, and enhancements to forms for improved
- accessibility for people with disabilities.
-
- Draft: $Date: 1998/04/02 00:17:00 $
-
- Authors:
- Dave Raggett <dsr@w3.org>
- Arnaud Le Hors <lehors@w3.org>
- Ian Jacobs <ij@w3.org>
-
- Further information about HTML 4.0 is available at:
-
- http://www.w3.org/TR/REC-html40
--->
-<!--
- Typical usage:
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
- "http://www.w3.org/TR/REC-html40/strict.dtd">
- <html>
- <head>
- ...
- </head>
- <body>
- ...
- </body>
- </html>
-
- The URI used as a system identifier with the public identifier allows
- the user agent to download the DTD and entity sets as needed.
-
- The FPI for the Transitional HTML 4.0 DTD is:
-
- "-//W3C//DTD HTML 4.0 Transitional//EN"
-
- and its URI is:
-
- http://www.w3.org/TR/REC-html40/loose.dtd
-
- If you are writing a document that includes frames, use
- the following FPI:
-
- "-//W3C//DTD HTML 4.0 Frameset//EN"
-
- with the URI:
-
- http://www.w3.org/TR/REC-html40/frameset.dtd
-
- The following URIs are supported in relation to HTML 4.0
-
- "http://www.w3.org/TR/REC-html40/strict.dtd" (Strict DTD)
- "http://www.w3.org/TR/REC-html40/loose.dtd" (Loose DTD)
- "http://www.w3.org/TR/REC-html40/frameset.dtd" (Frameset DTD)
- "http://www.w3.org/TR/REC-html40/HTMLlat1.ent" (Latin-1 entities)
- "http://www.w3.org/TR/REC-html40/HTMLsymbol.ent" (Symbol entities)
- "http://www.w3.org/TR/REC-html40/HTMLspecial.ent" (Special entities)
-
- These URIs point to the latest version of each file. To reference
- this specific revision use the following URIs:
-
- "http://www.w3.org/TR/1998/REC-html40-19980424/strict.dtd"
- "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd"
- "http://www.w3.org/TR/1998/REC-html40-19980424/frameset.dtd"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLlat1.ent"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLsymbol.ent"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLspecial.ent"
-
--->
-
-<!--================== Imported Names ====================================-->
-
-<!ENTITY % ContentType "CDATA"
- -- media type, as per [RFC2045]
- -->
-
-<!ENTITY % ContentTypes "CDATA"
- -- comma-separated list of media types, as per [RFC2045]
- -->
-
-<!ENTITY % Charset "CDATA"
- -- a character encoding, as per [RFC2045]
- -->
-
-<!ENTITY % Charsets "CDATA"
- -- a space separated list of character encodings, as per [RFC2045]
- -->
-
-<!ENTITY % LanguageCode "NAME"
- -- a language code, as per [RFC1766]
- -->
-
-<!ENTITY % Character "CDATA"
- -- a single character from [ISO10646]
- -->
-
-<!ENTITY % LinkTypes "CDATA"
- -- space-separated list of link types
- -->
-
-<!ENTITY % MediaDesc "CDATA"
- -- single or comma-separated list of media descriptors
- -->
-
-<!ENTITY % URI "CDATA"
- -- a Uniform Resource Identifier,
- see [URI]
- -->
-
-<!ENTITY % Datetime "CDATA" -- date and time information. ISO date format -->
-
-
-<!ENTITY % Script "CDATA" -- script expression -->
-
-<!ENTITY % StyleSheet "CDATA" -- style sheet data -->
-
-
-
-<!ENTITY % Text "CDATA">
-
-
-<!-- Parameter Entities -->
-
-<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements -->
-
-<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
-
-<!ENTITY % list "UL | OL">
-
-<!ENTITY % preformatted "PRE">
-
-
-<!--================ Character mnemonic entities =========================-->
-
-<!ENTITY % HTMLlat1 PUBLIC
- "-//W3C//ENTITIES Latin1//EN//HTML"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLlat1.ent">
-%HTMLlat1;
-
-<!ENTITY % HTMLsymbol PUBLIC
- "-//W3C//ENTITIES Symbols//EN//HTML"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLsymbol.ent">
-%HTMLsymbol;
-
-<!ENTITY % HTMLspecial PUBLIC
- "-//W3C//ENTITIES Special//EN//HTML"
- "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLspecial.ent">
-%HTMLspecial;
-<!--=================== Generic Attributes ===============================-->
-
-<!ENTITY % coreattrs
- "id ID #IMPLIED -- document-wide unique id --
- class CDATA #IMPLIED -- space separated list of classes --
- style %StyleSheet; #IMPLIED -- associated style info --
- title %Text; #IMPLIED -- advisory title/amplification --"
- >
-
-<!ENTITY % i18n
- "lang %LanguageCode; #IMPLIED -- language code --
- dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --"
- >
-
-<!ENTITY % events
- "onclick %Script; #IMPLIED -- a pointer button was clicked --
- ondblclick %Script; #IMPLIED -- a pointer button was double clicked--
- onmousedown %Script; #IMPLIED -- a pointer button was pressed down --
- onmouseup %Script; #IMPLIED -- a pointer button was released --
- onmouseover %Script; #IMPLIED -- a pointer was moved onto --
- onmousemove %Script; #IMPLIED -- a pointer was moved within --
- onmouseout %Script; #IMPLIED -- a pointer was moved away --
- onkeypress %Script; #IMPLIED -- a key was pressed and released --
- onkeydown %Script; #IMPLIED -- a key was pressed down --
- onkeyup %Script; #IMPLIED -- a key was released --"
- >
-
-<!-- Reserved Feature Switch -->
-<!ENTITY % HTML.Reserved "IGNORE">
-
-<!-- The following attributes are reserved for possible future use -->
-<![ %HTML.Reserved; [
-<!ENTITY % reserved
- "datasrc %URI; #IMPLIED -- a single or tabular Data Source --
- datafld CDATA #IMPLIED -- the property or column name --
- dataformatas (plaintext|html) plaintext -- text or html --"
- >
-]]>
-
-<!ENTITY % reserved "">
-
-<!ENTITY % attrs "%coreattrs; %i18n; %events;">
-
-
-<!--=================== Text Markup ======================================-->
-
-<!ENTITY % fontstyle
- "TT | I | B | BIG | SMALL">
-
-<!ENTITY % phrase "EM | STRONG | DFN | CODE |
- SAMP | KBD | VAR | CITE | ABBR | ACRONYM" >
-
-<!ENTITY % special
- "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO">
-
-<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">
-
-<!-- %inline; covers inline or "text-level" elements -->
-<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
-
-<!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*>
-<!ATTLIST (%fontstyle;|%phrase;)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript -->
-<!ATTLIST (SUB|SUP)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT SPAN - - (%inline;)* -- generic language/style container -->
-<!ATTLIST SPAN
- %attrs; -- %coreattrs, %i18n, %events --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT BDO - - (%inline;)* -- I18N BiDi over-ride -->
-<!ATTLIST BDO
- %coreattrs; -- id, class, style, title --
- lang %LanguageCode; #IMPLIED -- language code --
- dir (ltr|rtl) #REQUIRED -- directionality --
- >
-
-
-<!ELEMENT BR - O EMPTY -- forced line break -->
-<!ATTLIST BR
- %coreattrs; -- id, class, style, title --
- >
-
-<!--================== HTML content models ===============================-->
-
-<!--
- HTML has two basic content models:
-
- %inline; character level elements and text strings
- %block; block-like elements e.g. paragraphs and lists
--->
-
-<!ENTITY % block
- "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
- BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
-
-<!ENTITY % flow "%block; | %inline;">
-
-<!--=================== Document Body ====================================-->
-
-<!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body -->
-<!ATTLIST BODY
- %attrs; -- %coreattrs, %i18n, %events --
- onload %Script; #IMPLIED -- the document has been loaded --
- onunload %Script; #IMPLIED -- the document has been removed --
- >
-
-<!ELEMENT ADDRESS - - (%inline;)* -- information on author -->
-<!ATTLIST ADDRESS
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT DIV - - (%flow;)* -- generic language/style container -->
-<!ATTLIST DIV
- %attrs; -- %coreattrs, %i18n, %events --
- %reserved; -- reserved for possible future use --
- >
-
-
-<!--================== The Anchor Element ================================-->
-
-<!ENTITY % Shape "(rect|circle|poly|default)">
-<!ENTITY % Coords "CDATA" -- comma separated list of lengths -->
-
-<!ELEMENT A - - (%inline;)* -(A) -- anchor -->
-<!ATTLIST A
- %attrs; -- %coreattrs, %i18n, %events --
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- type %ContentType; #IMPLIED -- advisory content type --
- name CDATA #IMPLIED -- named link end --
- href %URI; #IMPLIED -- URI for linked resource --
- hreflang %LanguageCode; #IMPLIED -- language code --
- rel %LinkTypes; #IMPLIED -- forward link types --
- rev %LinkTypes; #IMPLIED -- reverse link types --
- accesskey %Character; #IMPLIED -- accessibility key character --
- shape %Shape; rect -- for use with client-side image maps --
- coords %Coords; #IMPLIED -- for use with client-side image maps --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!--================== Client-side image maps ============================-->
-
-<!-- These can be placed in the same document or grouped in a
- separate document although this isn't yet widely supported -->
-
-<!ELEMENT MAP - - ((%block;)+ | AREA+) -- client-side image map -->
-<!ATTLIST MAP
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #REQUIRED -- for reference by usemap --
- >
-
-<!ELEMENT AREA - O EMPTY -- client-side image map area -->
-<!ATTLIST AREA
- %attrs; -- %coreattrs, %i18n, %events --
- shape %Shape; rect -- controls interpretation of coords --
- coords %Coords; #IMPLIED -- comma separated list of lengths --
- href %URI; #IMPLIED -- URI for linked resource --
- nohref (nohref) #IMPLIED -- this region has no action --
- alt %Text; #REQUIRED -- short description --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!--================== The LINK Element ==================================-->
-
-<!--
- Relationship values can be used in principle:
-
- a) for document specific toolbars/menus when used
- with the LINK element in document head e.g.
- start, contents, previous, next, index, end, help
- b) to link to a separate style sheet (rel=stylesheet)
- c) to make a link to a script (rel=script)
- d) by stylesheets to control how collections of
- html nodes are rendered into printed documents
- e) to make a link to a printable version of this document
- e.g. a postscript or pdf version (rel=alternate media=print)
--->
-
-<!ELEMENT LINK - O EMPTY -- a media-independent link -->
-<!ATTLIST LINK
- %attrs; -- %coreattrs, %i18n, %events --
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- href %URI; #IMPLIED -- URI for linked resource --
- hreflang %LanguageCode; #IMPLIED -- language code --
- type %ContentType; #IMPLIED -- advisory content type --
- rel %LinkTypes; #IMPLIED -- forward link types --
- rev %LinkTypes; #IMPLIED -- reverse link types --
- media %MediaDesc; #IMPLIED -- for rendering on these media --
- >
-
-<!--=================== Images ===========================================-->
-
-<!-- Length defined in strict DTD for cellpadding/cellspacing -->
-<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
-<!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative -->
-
-<!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength -->
-
-<!ENTITY % Pixels "CDATA" -- integer representing length in pixels -->
-
-
-<!-- To avoid problems with text-only UAs as well as
- to make image content understandable and navigable
- to users of non-visual UAs, you need to provide
- a description with ALT, and avoid server-side image maps -->
-<!ELEMENT IMG - O EMPTY -- Embedded image -->
-<!ATTLIST IMG
- %attrs; -- %coreattrs, %i18n, %events --
- src %URI; #REQUIRED -- URI of image to embed --
- alt %Text; #REQUIRED -- short description --
- longdesc %URI; #IMPLIED -- link to long description
- (complements alt) --
- height %Length; #IMPLIED -- override height --
- width %Length; #IMPLIED -- override width --
- usemap %URI; #IMPLIED -- use client-side image map --
- ismap (ismap) #IMPLIED -- use server-side image map --
- >
-
-<!-- USEMAP points to a MAP element which may be in this document
- or an external document, although the latter is not widely supported -->
-
-<!--==================== OBJECT ======================================-->
-<!--
- OBJECT is used to embed objects as part of HTML pages
- PARAM elements should precede other content. SGML mixed content
- model technicality precludes specifying this formally ...
--->
-
-<!ELEMENT OBJECT - - (PARAM | %flow;)*
- -- generic embedded object -->
-<!ATTLIST OBJECT
- %attrs; -- %coreattrs, %i18n, %events --
- declare (declare) #IMPLIED -- declare but don't instantiate flag --
- classid %URI; #IMPLIED -- identifies an implementation --
- codebase %URI; #IMPLIED -- base URI for classid, data, archive--
- data %URI; #IMPLIED -- reference to object's data --
- type %ContentType; #IMPLIED -- content type for data --
- codetype %ContentType; #IMPLIED -- content type for code --
- archive %URI; #IMPLIED -- space separated archive list --
- standby %Text; #IMPLIED -- message to show while loading --
- height %Length; #IMPLIED -- override height --
- width %Length; #IMPLIED -- override width --
- usemap %URI; #IMPLIED -- use client-side image map --
- name CDATA #IMPLIED -- submit as part of form --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT PARAM - O EMPTY -- named property value -->
-<!ATTLIST PARAM
- id ID #IMPLIED -- document-wide unique id --
- name CDATA #REQUIRED -- property name --
- value CDATA #IMPLIED -- property value --
- valuetype (DATA|REF|OBJECT) DATA -- How to interpret value --
- type %ContentType; #IMPLIED -- content type for value
- when valuetype=ref --
- >
-
-
-<!--=================== Horizontal Rule ==================================-->
-
-<!ELEMENT HR - O EMPTY -- horizontal rule -->
-<!ATTLIST HR
- %coreattrs; -- id, class, style, title --
- %events;
- >
-
-<!--=================== Paragraphs =======================================-->
-
-<!ELEMENT P - O (%inline;)* -- paragraph -->
-<!ATTLIST P
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--=================== Headings =========================================-->
-
-<!--
- There are six levels of headings from H1 (the most important)
- to H6 (the least important).
--->
-
-<!ELEMENT (%heading;) - - (%inline;)* -- heading -->
-<!ATTLIST (%heading;)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--=================== Preformatted Text ================================-->
-
-<!-- excludes markup for images and changes in font size -->
-<!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP">
-
-<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
-<!ATTLIST PRE
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--===================== Inline Quotes ==================================-->
-
-<!ELEMENT Q - - (%inline;)* -- short inline quotation -->
-<!ATTLIST Q
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- URI for source document or msg --
- >
-
-<!--=================== Block-like Quotes ================================-->
-
-<!ELEMENT BLOCKQUOTE - - (%block;|SCRIPT)+ -- long quotation -->
-<!ATTLIST BLOCKQUOTE
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- URI for source document or msg --
- >
-
-<!--=================== Inserted/Deleted Text ============================-->
-
-
-<!-- INS/DEL are handled by inclusion on BODY -->
-<!ELEMENT (INS|DEL) - - (%flow;)* -- inserted text, deleted text -->
-<!ATTLIST (INS|DEL)
- %attrs; -- %coreattrs, %i18n, %events --
- cite %URI; #IMPLIED -- info on reason for change --
- datetime %Datetime; #IMPLIED -- date and time of change --
- >
-
-<!--=================== Lists ============================================-->
-
-<!-- definition lists - DT for term, DD for its definition -->
-
-<!ELEMENT DL - - (DT|DD)+ -- definition list -->
-<!ATTLIST DL
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT DT - O (%inline;)* -- definition term -->
-<!ELEMENT DD - O (%flow;)* -- definition description -->
-<!ATTLIST (DT|DD)
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-
-<!ELEMENT OL - - (LI)+ -- ordered list -->
-<!ATTLIST OL
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!-- Unordered Lists (UL) bullet styles -->
-<!ELEMENT UL - - (LI)+ -- unordered list -->
-<!ATTLIST UL
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-
-
-<!ELEMENT LI - O (%flow;)* -- list item -->
-<!ATTLIST LI
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--================ Forms ===============================================-->
-<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form -->
-<!ATTLIST FORM
- %attrs; -- %coreattrs, %i18n, %events --
- action %URI; #REQUIRED -- server-side form handler --
- method (GET|POST) GET -- HTTP method used to submit the form--
- enctype %ContentType; "application/x-www-form-urlencoded"
- onsubmit %Script; #IMPLIED -- the form was submitted --
- onreset %Script; #IMPLIED -- the form was reset --
- accept-charset %Charsets; #IMPLIED -- list of supported charsets --
- >
-
-<!-- Each label must not contain more than ONE field -->
-<!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text -->
-<!ATTLIST LABEL
- %attrs; -- %coreattrs, %i18n, %events --
- for IDREF #IMPLIED -- matches field ID value --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- >
-
-<!ENTITY % InputType
- "(TEXT | PASSWORD | CHECKBOX |
- RADIO | SUBMIT | RESET |
- FILE | HIDDEN | IMAGE | BUTTON)"
- >
-
-<!-- attribute name required for all but submit & reset -->
-<!ELEMENT INPUT - O EMPTY -- form control -->
-<!ATTLIST INPUT
- %attrs; -- %coreattrs, %i18n, %events --
- type %InputType; TEXT -- what kind of widget is needed --
- name CDATA #IMPLIED -- submit as part of form --
- value CDATA #IMPLIED -- required for radio and checkboxes --
- checked (checked) #IMPLIED -- for radio buttons and check boxes --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- readonly (readonly) #IMPLIED -- for text and passwd --
- size CDATA #IMPLIED -- specific to each type of field --
- maxlength NUMBER #IMPLIED -- max chars for text fields --
- src %URI; #IMPLIED -- for fields with images --
- alt CDATA #IMPLIED -- short description --
- usemap %URI; #IMPLIED -- use client-side image map --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onselect %Script; #IMPLIED -- some text was selected --
- onchange %Script; #IMPLIED -- the element value was changed --
- accept %ContentTypes; #IMPLIED -- list of MIME types for file upload --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector -->
-<!ATTLIST SELECT
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED -- field name --
- size NUMBER #IMPLIED -- rows visible --
- multiple (multiple) #IMPLIED -- default is single selection --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onchange %Script; #IMPLIED -- the element value was changed --
- %reserved; -- reserved for possible future use --
- >
-
-<!ELEMENT OPTGROUP - - (OPTION)+ -- option group -->
-<!ATTLIST OPTGROUP
- %attrs; -- %coreattrs, %i18n, %events --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- label %Text; #REQUIRED -- for use in hierarchical menus --
- >
-
-<!ELEMENT OPTION - O (#PCDATA) -- selectable choice -->
-<!ATTLIST OPTION
- %attrs; -- %coreattrs, %i18n, %events --
- selected (selected) #IMPLIED
- disabled (disabled) #IMPLIED -- unavailable in this context --
- label %Text; #IMPLIED -- for use in hierarchical menus --
- value CDATA #IMPLIED -- defaults to element content --
- >
-
-<!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field -->
-<!ATTLIST TEXTAREA
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED
- rows NUMBER #REQUIRED
- cols NUMBER #REQUIRED
- disabled (disabled) #IMPLIED -- unavailable in this context --
- readonly (readonly) #IMPLIED
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- onselect %Script; #IMPLIED -- some text was selected --
- onchange %Script; #IMPLIED -- the element value was changed --
- %reserved; -- reserved for possible future use --
- >
-
-<!--
- #PCDATA is to solve the mixed content problem,
- per specification only whitespace is allowed there!
- -->
-<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
-<!ATTLIST FIELDSET
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!ELEMENT LEGEND - - (%inline;)* -- fieldset legend -->
-<!ENTITY % LAlign "(top|bottom|left|right)">
-
-<!ATTLIST LEGEND
- %attrs; -- %coreattrs, %i18n, %events --
- accesskey %Character; #IMPLIED -- accessibility key character --
- >
-
-<!ELEMENT BUTTON - -
- (%flow;)* -(A|%formctrl;|FORM|FIELDSET)
- -- push button -->
-<!ATTLIST BUTTON
- %attrs; -- %coreattrs, %i18n, %events --
- name CDATA #IMPLIED
- value CDATA #IMPLIED -- sent to server when submitted --
- type (button|submit|reset) submit -- for use as form button --
- disabled (disabled) #IMPLIED -- unavailable in this context --
- tabindex NUMBER #IMPLIED -- position in tabbing order --
- accesskey %Character; #IMPLIED -- accessibility key character --
- onfocus %Script; #IMPLIED -- the element got the focus --
- onblur %Script; #IMPLIED -- the element lost the focus --
- %reserved; -- reserved for possible future use --
- >
-
-<!--======================= Tables =======================================-->
-
-<!-- IETF HTML table standard, see [RFC1942] -->
-
-<!--
- The BORDER attribute sets the thickness of the frame around the
- table. The default units are screen pixels.
-
- The FRAME attribute specifies which parts of the frame around
- the table should be rendered. The values are not the same as
- CALS to avoid a name clash with the VALIGN attribute.
-
- The value "border" is included for backwards compatibility with
- <TABLE BORDER> which yields frame=border and border=implied
- For <TABLE BORDER=1> you get border=1 and frame=implied. In this
- case, it is appropriate to treat this as frame=border for backwards
- compatibility with deployed browsers.
--->
-<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
-
-<!--
- The RULES attribute defines which rules to draw between cells:
-
- If RULES is absent then assume:
- "none" if BORDER is absent or BORDER=0 otherwise "all"
--->
-
-<!ENTITY % TRules "(none | groups | rows | cols | all)">
-
-<!-- horizontal placement of table relative to document -->
-<!ENTITY % TAlign "(left|center|right)">
-
-<!-- horizontal alignment attributes for cell contents -->
-<!ENTITY % cellhalign
- "align (left|center|right|justify|char) #IMPLIED
- char %Character; #IMPLIED -- alignment char, e.g. char=':' --
- charoff %Length; #IMPLIED -- offset for alignment char --"
- >
-
-<!-- vertical alignment attributes for cell contents -->
-<!ENTITY % cellvalign
- "valign (top|middle|bottom|baseline) #IMPLIED"
- >
-
-<!ELEMENT TABLE - -
- (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
-<!ELEMENT CAPTION - - (%inline;)* -- table caption -->
-<!ELEMENT THEAD - O (TR)+ -- table header -->
-<!ELEMENT TFOOT - O (TR)+ -- table footer -->
-<!ELEMENT TBODY O O (TR)+ -- table body -->
-<!ELEMENT COLGROUP - O (col)* -- table column group -->
-<!ELEMENT COL - O EMPTY -- table column -->
-<!ELEMENT TR - O (TH|TD)+ -- table row -->
-<!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell-->
-
-<!ATTLIST TABLE -- table element --
- %attrs; -- %coreattrs, %i18n, %events --
- summary %Text; #IMPLIED -- purpose/structure for speech output--
- width %Length; #IMPLIED -- table width --
- border %Pixels; #IMPLIED -- controls frame width around table --
- frame %TFrame; #IMPLIED -- which parts of frame to render --
- rules %TRules; #IMPLIED -- rulings between rows and cols --
- cellspacing %Length; #IMPLIED -- spacing between cells --
- cellpadding %Length; #IMPLIED -- spacing within cells --
- %reserved; -- reserved for possible future use --
- datapagesize CDATA #IMPLIED -- reserved for possible future use --
- >
-
-<!ENTITY % CAlign "(top|bottom|left|right)">
-
-<!ATTLIST CAPTION
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--
-COLGROUP groups a set of COL elements. It allows you to group
-several semantically related columns together.
--->
-<!ATTLIST COLGROUP
- %attrs; -- %coreattrs, %i18n, %events --
- span NUMBER 1 -- default number of columns in group --
- width %MultiLength; #IMPLIED -- default width for enclosed COLs --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!--
- COL elements define the alignment properties for cells in
- one or more columns.
-
- The WIDTH attribute specifies the width of the columns, e.g.
-
- width=64 width in screen pixels
- width=0.5* relative width of 0.5
-
- The SPAN attribute causes the attributes of one
- COL element to apply to more than one column.
--->
-<!ATTLIST COL -- column groups and properties --
- %attrs; -- %coreattrs, %i18n, %events --
- span NUMBER 1 -- COL attributes affect N columns --
- width %MultiLength; #IMPLIED -- column width specification --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!--
- Use THEAD to duplicate headers when breaking table
- across page boundaries, or for static headers when
- TBODY sections are rendered in scrolling panel.
-
- Use TFOOT to duplicate footers when breaking table
- across page boundaries, or for static footers when
- TBODY sections are rendered in scrolling panel.
-
- Use multiple TBODY sections when rules are needed
- between groups of table rows.
--->
-<!ATTLIST (THEAD|TBODY|TFOOT) -- table section --
- %attrs; -- %coreattrs, %i18n, %events --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-<!ATTLIST TR -- table row --
- %attrs; -- %coreattrs, %i18n, %events --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-
-<!-- Scope is simpler than axes attribute for common tables -->
-<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
-
-<!-- TH is for headers, TD for data, but for cells acting as both use TD -->
-<!ATTLIST (TH|TD) -- header or data cell --
- %attrs; -- %coreattrs, %i18n, %events --
- abbr %Text; #IMPLIED -- abbreviation for header cell --
- axis CDATA #IMPLIED -- names groups of related headers--
- headers IDREFS #IMPLIED -- list of id's for header cells --
- scope %Scope; #IMPLIED -- scope covered by header cells --
- rowspan NUMBER 1 -- number of rows spanned by cell --
- colspan NUMBER 1 -- number of cols spanned by cell --
- %cellhalign; -- horizontal alignment in cells --
- %cellvalign; -- vertical alignment in cells --
- >
-
-
-<!--================ Document Head =======================================-->
-<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
-<!ENTITY % head.content "TITLE & BASE?">
-
-<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->
-<!ATTLIST HEAD
- %i18n; -- lang, dir --
- profile %URI; #IMPLIED -- named dictionary of meta info --
- >
-
-<!-- The TITLE element is not considered part of the flow of text.
- It should be displayed, for example as the page header or
- window title. Exactly one title is required per document.
- -->
-<!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -->
-<!ATTLIST TITLE %i18n>
-
-
-<!ELEMENT BASE - O EMPTY -- document base URI -->
-<!ATTLIST BASE
- href %URI; #REQUIRED -- URI that acts as base URI --
- >
-
-<!ELEMENT META - O EMPTY -- generic metainformation -->
-<!ATTLIST META
- %i18n; -- lang, dir, for use with content --
- http-equiv NAME #IMPLIED -- HTTP response header name --
- name NAME #IMPLIED -- metainformation name --
- content CDATA #REQUIRED -- associated information --
- scheme CDATA #IMPLIED -- select form of content --
- >
-
-<!ELEMENT STYLE - - %StyleSheet -- style info -->
-<!ATTLIST STYLE
- %i18n; -- lang, dir, for use with title --
- type %ContentType; #REQUIRED -- content type of style language --
- media %MediaDesc; #IMPLIED -- designed for use with these media --
- title %Text; #IMPLIED -- advisory title --
- >
-
-<!ELEMENT SCRIPT - - %Script; -- script statements -->
-<!ATTLIST SCRIPT
- charset %Charset; #IMPLIED -- char encoding of linked resource --
- type %ContentType; #REQUIRED -- content type of script language --
- src %URI; #IMPLIED -- URI for an external script --
- defer (defer) #IMPLIED -- UA may defer execution of script --
- event CDATA #IMPLIED -- reserved for possible future use --
- for %URI; #IMPLIED -- reserved for possible future use --
- >
-
-<!ELEMENT NOSCRIPT - - (%block;)+
- -- alternate content container for non script-based rendering -->
-<!ATTLIST NOSCRIPT
- %attrs; -- %coreattrs, %i18n, %events --
- >
-
-<!--================ Document Structure ==================================-->
-<!ENTITY % html.content "HEAD, BODY">
-
-<!ELEMENT HTML O O (%html.content;) -- document root element -->
-<!ATTLIST HTML
- %i18n; -- lang, dir --
- >
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/AnchorUnderAnchorHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/AnchorUnderAnchorHandler.java
deleted file mode 100644
index 9445d67..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/AnchorUnderAnchorHandler.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.errorhandler;
-
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLAnchorElement;
-import org.xml.sax.SAXException;
-
-
-/**
- * A sample implementation of ErrorHandler.
- */
-public class AnchorUnderAnchorHandler implements IErrorHandler {
- private boolean isAnchor(Node node) {
- return node instanceof HTMLAnchorElement
- || (node instanceof Element && node.getNodeName()
- .equalsIgnoreCase("A"));
- }
-
- public boolean handleError(int code, SGMLParser parser, Node errorNode)
- throws ParseException, IOException, SAXException {
- if (code == ILLEGAL_CHILD && isAnchor(errorNode)) {
- for (Node node = parser.getContext(); node instanceof Element; node = node
- .getParentNode()) {
- if (isAnchor(node)) {
- Node parent = node.getParentNode();
- parent.insertBefore(errorNode, null);
- parser.setContext((Element) errorNode);
- return true;
- }
- }
- }
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/FormExpander.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/FormExpander.java
deleted file mode 100644
index 9f9056d..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/FormExpander.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.errorhandler;
-
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.html.HTMLParser;
-import org.eclipse.actf.model.dom.sgml.EndTag;
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler;
-import org.eclipse.actf.model.dom.sgml.util.SgmlUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-
-/**
- * ErrorHandler implementation for illegally closed form context. Usually to add
- * an error handler, you uses {@link
- * org.eclipse.actf.model.dom.sgml.SGMLParser#addErrorHandler(org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler)}.
- * However, this error handler conflicts with {@link HTMLErrorHandler} installed
- * to parsers by default. Thus, instead of that method use {@link
- * #addTo(HTMLParser)}. And to remove this, use {@link #remove()}. Note: This
- * error handler is <em>experimental</em>.
- *
- */
-public class FormExpander implements IErrorHandler {
- private HTMLErrorHandler htmlErrorHandler;
-
- private HTMLParser parser;
-
- /**
- * Add this error handler to <code>parser</code>
- *
- * @see org.eclipse.actf.model.dom.sgml.SGMLParser#addErrorHandler(org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler)
- */
- public void addTo(HTMLParser parser) {
- IErrorHandler errorHandlers[] = parser.getErrorHandlers();
- for (int i = 0; i < errorHandlers.length; i++) {
- if (errorHandlers[i] instanceof HTMLErrorHandler) {
- htmlErrorHandler = (HTMLErrorHandler) errorHandlers[i];
- htmlErrorHandler.setKeepForm(false);
- break;
- }
- }
- parser.addErrorHandler(this);
- }
-
- /**
- * Remove this error handler from the parser.
- */
- public void remove() {
- if (htmlErrorHandler != null) {
- htmlErrorHandler.setKeepForm(true);
- parser.removeErrorHandler(this);
- }
- }
-
- /**
- * Find the last <code>FORM</code> element and relink it to the lowest
- * position whereas it covers its start and end tag.
- */
- public boolean handleError(int code, SGMLParser parser, Node errorNode)
- throws ParseException, IOException, SAXException {
- String nodeName = errorNode.getNodeName();
- if (code == FLOATING_ENDTAG && errorNode instanceof EndTag
- && nodeName.equalsIgnoreCase("FORM")) {
- // Element context = parser.getContext();
- NodeList forms = parser.getDocument().getElementsByTagName("FORM");
- Element targetForm = (Element) forms.item(forms.getLength() - 1);
- if (targetForm == null || parser.hasEndTag(targetForm))
- return false;
- // Checks if target form is under the context.
- Element targetFirstNode = targetForm;
- Element contexts[] = parser.getContextElements();
- outer: while (targetFirstNode.getParentNode() instanceof Element) {
- Element parent = (Element) targetFirstNode.getParentNode();
- if (targetFirstNode.getElementsByTagName("FORM").getLength() > 1)
- break;
- for (int c = contexts.length - 1; c >= 0; c--) {
- if (contexts[c] == parent) {
- for (Node child = targetFirstNode.getNextSibling(); child != null; child = child
- .getNextSibling()) {
- if (child instanceof Element
- && ((Element) child).getElementsByTagName(
- "FORM").getLength() > 0) {
- break outer;
- }
- }
- SgmlUtil.remove(targetForm);
- SgmlUtil.add(parent, targetForm, targetFirstNode, parent
- .getLastChild());
- if (c != contexts.length - 1)
- parser.setContext(parent);
- ((EndTag) errorNode).setElement(targetForm);
- parser.setHasEndTag(targetForm);
- parser.error(code, "Expanded " + targetForm);
- return true;
- }
- }
- targetFirstNode = parent;
- }
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/FormInserter.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/FormInserter.java
deleted file mode 100644
index 447a0dc..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/FormInserter.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.errorhandler;
-
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.sgml.EndTag;
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-
-/**
- * ErrorHandler implementation for illegally closed form context.
- *
- */
-public class FormInserter implements IErrorHandler {
- public boolean handleError(int code, SGMLParser parser, Node errorNode)
- throws ParseException, IOException, SAXException {
- if (code != FLOATING_ENDTAG)
- return false;
- if (errorNode instanceof EndTag
- && errorNode.getNodeName().equalsIgnoreCase("FORM")) {
- Element context = parser.getContext();
- Vector<Node> nodes = new Vector<Node>();
- boolean includeFormCtrl = false;
- for (Node node = context.getLastChild(); node != null; node = node
- .getPreviousSibling()) {
- if (node instanceof Element) {
- Element element = (Element) node;
- if (hasElement(element, formName)) {
- break;
- } else if (hasFormCtrl(element)) {
- includeFormCtrl = true;
- }
- }
- nodes.insertElementAt(node, 0);
- }
- if (!includeFormCtrl)
- return false;
- Element form = parser.getDocument().createElement(
- parser.changeDefaultTagCase("FORM"));
- for (Enumeration e = nodes.elements(); e.hasMoreElements();) {
- Node node = (Node) e.nextElement();
- context.removeChild(node);
- form.insertBefore(node, null);
- }
- context.insertBefore(form, null);
- return true;
- }
- return false;
- }
-
- private String formName[] = { "FORM" };
-
- private String formCtrls[] = { "INPUT", "SELECT", "TEXTAREA", "LABEL",
- "BUTTON" };
-
- private boolean hasFormCtrl(Element top) {
- return hasElement(top, formCtrls);
- }
-
- private boolean hasElement(Element top, String elementNames[]) {
- Node tmp1, tmp2;
- tmp1 = top;
- while (tmp1 != null) {
- if (tmp1 instanceof Element) {
- for (int i = 0; i < elementNames.length; i++) {
- if (tmp1.getNodeName().equalsIgnoreCase(elementNames[i])) {
- return true;
- }
- }
- }
- if ((tmp2 = tmp1.getFirstChild()) == null) {
- if (tmp1 != top) {
- tmp2 = tmp1.getNextSibling();
- } else {
- return false;
- }
- }
- while (tmp2 == null && tmp1 != null) {
- tmp1 = tmp2 = tmp1.getParentNode();
- if (tmp1 != top) {
- tmp2 = tmp1.getNextSibling();
- } else {
- return false;
- }
- }
- tmp1 = tmp2;
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/FramesetErrorHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/FramesetErrorHandler.java
deleted file mode 100644
index 5a8f887..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/FramesetErrorHandler.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.errorhandler;
-
-
-/**
- * If a parser using Strict or some DTD which does not define FRAMESET, this
- * error handler make the parser use FRAMESET while parsing.
- */
-public class FramesetErrorHandler extends UnknownElementErrorHandler {
- public FramesetErrorHandler() {
- super("FRAMESET", "-//W3C//DTD HTML 4.01 Frameset//EN");
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/HTMLErrorHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/HTMLErrorHandler.java
deleted file mode 100644
index eefc0d4..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/HTMLErrorHandler.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.errorhandler;
-
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.sgml.ElementDefinition;
-import org.eclipse.actf.model.dom.sgml.EndTag;
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.eclipse.actf.model.dom.sgml.SGMLText;
-import org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler;
-import org.w3c.dom.Comment;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-import org.xml.sax.SAXException;
-
-
-public class HTMLErrorHandler implements IErrorHandler {
- /**
- * Searches proper a parent node of node. Behavier is described as follows.
- * <ol>
- * <li> If <code>node</code> is LINK, STYLE BASE, ISINDEX or META element,
- * add it to last HEAD element.
- * <li> If context and <code>node</code> are equal nodes, Changes Context
- * to its parent and append <code>node</code> to context. <!--
- * <li> If context is HTML element,
- * <ol>
- * <li>If <code>node<code> is BODY
- * element, append <code>node</code> to context and change it to
- * <code>node</code> (This strange case occurs when frameset dtd is used).
- * <li> If context has only a HEAD element, makes BODY element as
- * a next sibling of the HEAD and appends <code>node</code> and changes
- * context to it.
- * </ol>
- * -->
- * </ol>
- * @param node illegal child node.
- * @return true if found. Otherwise false.
- * @see org.eclipse.actf.model.dom.sgml.SGMLParser#getContext()
- * @see org.eclipse.actf.model.dom.sgml.SGMLParser#setContext(org.w3c.dom.Element)
- */
- public boolean handleError(int code, SGMLParser parser, Node errorNode)
- throws ParseException, IOException, SAXException {
- if (code == ILLEGAL_ATTRIBUTE) {
- return false;
- }
- String nodeName = errorNode.getNodeName();
- Element context = parser.getContext();
- Node contextParent = context.getParentNode();
- String contextName = context.getNodeName();
- NodeList bodies;
- if (errorNode instanceof Element) {
- ElementDefinition ed = parser.getDTD().getElementDefinition(
- nodeName);
- if (ed == null) {
- return false;
- }
- if (nodeName.equalsIgnoreCase("LINK")
- || nodeName.equalsIgnoreCase("STYLE")
- || nodeName.equalsIgnoreCase("META")
- || nodeName.equalsIgnoreCase("BASE")
- || nodeName.equalsIgnoreCase("ISINDEX")) {
- Element html = parser.getDocument().getDocumentElement();
- for (Node child = html.getLastChild(); child != null; child = child
- .getPreviousSibling()) {
-
- // System.out.println("ErrorHandler: "+child.getNodeName());
-
- if (child instanceof Element
- && child.getNodeName().equalsIgnoreCase("HEAD")) {
- child.insertBefore(errorNode, null);
- parser.error(code, errorNode + " must be under "
- + child);
- return true;
- }
- }
- } else if (nodeName.equalsIgnoreCase("BODY")) {
- Element top = parser.getDocument().getDocumentElement();
- for (Node child = top.getFirstChild(); child != null; child = child
- .getNextSibling()) {
- if (child instanceof Element
- && (child.getNodeName().equalsIgnoreCase("BODY") || child
- .getNodeName().equalsIgnoreCase("FRAMESET"))) {
- return false;
- }
- }
- top.insertBefore(errorNode, null);
- parser.setContext((Element) errorNode);
- parser.error(code, errorNode + " must be under " + top);
- return true;
- } else if (nodeName.equalsIgnoreCase("HEAD")) {
- Document doc = parser.getDocument();
- if (context.getElementsByTagName("HEAD").getLength() == 0
- && ((bodies = doc.getElementsByTagName("BODY"))
- .getLength() > 0 || (bodies = doc
- .getElementsByTagName("FRAMESET")).getLength() > 0)) {
- Element body = (Element) bodies.item(0);
- body.getParentNode().insertBefore(errorNode, body);
- parser.setContext((Element) errorNode);
- parser.error(code, errorNode + " must be before " + body);
- return true;
- } else {
- if (doc.getElementsByTagName("BODY").getLength() > 0
- || doc.getElementsByTagName("FRAMESET").getLength() > 0) {
- parser.error(code,
- "HTMLErrorHandler makes parser ignore "
- + errorNode);
- return true;
- }
- }
- } else if (contextName.equalsIgnoreCase("HTML")) {
- for (Node child = context.getLastChild(); child != null; child = child
- .getPreviousSibling()) {
- if (child instanceof Element
- && child.getNodeName().equalsIgnoreCase("BODY")) {
- parser.error(code,
- "BODY context is already closed. Reopen it.");
- parser.reopenContext(1);
- parser.getContext().insertBefore(errorNode, null);
- parser.setContext((Element) errorNode);
- return true;
- } else if (child instanceof Comment
- || child instanceof ProcessingInstruction
- || child instanceof Text
- && whitespaceText((Text) child)) {
- continue;
- } else {
- break;
- }
- }
- } else if (nodeName.equalsIgnoreCase(contextName)
- && ed.endTagOmittable() && contextParent instanceof Element) {
- // parser.setContext((Element)contextParent);
- contextParent.insertBefore(errorNode, null);
- parser.setContext((Element) errorNode);
- return true;
- }
- } else if (code == SUDDEN_ENDTAG) {
- try {
- java.util.Vector missedEndtags = (java.util.Vector) parser
- .getExtraErrInfo();
- for (java.util.Enumeration e = missedEndtags.elements(); e
- .hasMoreElements();) {
- EndTag missedEtag = (EndTag) e.nextElement();
- String missedEtagName = missedEtag.getNodeName();
- if (missedEtagName.equalsIgnoreCase("TABLE")) {
- // ignore the endtag
- return true;
- } else if (keepForm
- && missedEtagName.equalsIgnoreCase("FORM")
- && (nodeName.equalsIgnoreCase("TD") || nodeName
- .equalsIgnoreCase("TR"))) {
- // TD is not able to close FORM
- return true;
- }
- }
- } catch (ClassCastException e) {
- }
- }
- return false;
- }
-
- private boolean keepForm = true;
-
- void setKeepForm(boolean keep) {
- this.keepForm = keep;
- }
-
- private boolean whitespaceText(Text text) {
- if (text instanceof SGMLText) {
- return ((SGMLText) text).getIsWhitespaceInElementContent();
- }
- char str[] = text.getData().toCharArray();
- for (int i = 0; i < str.length; i++) {
- if (!Character.isWhitespace(str[i]))
- return false;
- }
- return true;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/IgnoreFont.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/IgnoreFont.java
deleted file mode 100644
index 84f9c65..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/IgnoreFont.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.errorhandler;
-
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- * If a parser using Strict or some DTD which does not define FRAMESET, this
- * error handler makes the parser use FRAMESET while parsing.
- */
-public class IgnoreFont implements IErrorHandler {
- public boolean handleError(int code, SGMLParser parser, Node errorNode) {
- if (code == ILLEGAL_CHILD && errorNode instanceof Element
- && errorNode.getNodeName().equalsIgnoreCase("FONT")) {
- parser.error(code, errorNode + " is illegal under "
- + parser.getContext() + ". So ignore it.");
- return true; // ignore the errorNode.
- } else {
- return false;
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/TRErrorHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/TRErrorHandler.java
deleted file mode 100644
index fb29917..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/TRErrorHandler.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.errorhandler;
-
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.sgml.ElementDefinition;
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-
-/**
- * If start tag of TR is missed and only its end tag exists, provide start tag.
- */
-public class TRErrorHandler implements IErrorHandler {
- public boolean handleError(int code, SGMLParser parser, Node errorNode)
- throws ParseException, IOException, SAXException {
- Element context;
- String contextName;
- if (code == ILLEGAL_CHILD && errorNode instanceof Element
- && errorNode.getNodeName().equalsIgnoreCase("TD")) {
- context = parser.getContext();
- contextName = context.getNodeName();
- if (contextName.equalsIgnoreCase("TBODY")
- || contextName.equalsIgnoreCase("TABLE")) {
- Element tr = parser.getDocument().createElement(
- parser.changeDefaultTagCase("TR"));
- ElementDefinition ed = parser.getDTD().getElementDefinition(
- contextName);
- if (ed.contentMatch(parser, context, tr)) {
- tr.insertBefore(errorNode, null);
- parser.setContext((Element) errorNode);
- return true;
- }
- }
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/UnknownElementErrorHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/UnknownElementErrorHandler.java
deleted file mode 100644
index 3636c75..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/errorhandler/UnknownElementErrorHandler.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.errorhandler;
-
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- * If a parser using a DTD which does not define some element. this error
- * handler make the parser use specified dtd which defines it.
- */
-public class UnknownElementErrorHandler implements IErrorHandler {
- private String unknownElements[];
-
- private String publicID;
-
- /**
- * @param unknownElement
- * @param DTD's
- * public ID which defines <code>unknownElement</code>
- */
- public UnknownElementErrorHandler(String unknownElement, String publicID) {
- this.unknownElements = new String[1];
- unknownElements[0] = unknownElement;
- this.publicID = publicID;
- }
-
- public UnknownElementErrorHandler(String unknownElements[], String publicID) {
- this.unknownElements = unknownElements;
- this.publicID = publicID;
- }
-
- public boolean handleError(int code, SGMLParser parser, Node errorNode)
- throws ParseException, IOException {
- if (code == UNKNOWN_ELEMENT && errorNode instanceof Element) {
- for (int i = 0; i < unknownElements.length; i++) {
- if (errorNode.getNodeName()
- .equalsIgnoreCase(unknownElements[i])) {
- parser.error(UNKNOWN_ELEMENT, parser.getDTD()
- + " does not define FRAMESET. "
- + " Try to change DTD to " + publicID);
- parser.setupDTD(publicID);
- parser.pushBackNode(errorNode);
- return true;
- }
- }
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/Constructor.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/Constructor.java
deleted file mode 100644
index 12e681e..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/Constructor.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-
-public abstract class Constructor {
- abstract SHElement newInstance(String tagName, SHDocument doc);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHALinkElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHALinkElement.java
deleted file mode 100644
index a78e885..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHALinkElement.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-abstract class SHALinkElement extends SHElement {
- SHALinkElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public String getAccessKey() {
- return getAttribute("accesskey");
- }
-
- public void setAccessKey(String accessKey) {
- setAttribute("accesskey", accessKey);
- }
-
- public String getCoords() {
- return getAttribute("coords");
- }
-
- public void setCoords(String coords) {
- setAttribute("coords", coords);
- }
-
- public String getHref() {
- return getAttribute("href");
- }
-
- public void setHref(String href) {
- setAttribute("href", href);
- }
-
- public String getShape() {
- return getAttribute("shape");
- }
-
- public void setShape(String shape) {
- setAttribute("shape", shape);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getTabIndex() {
- return Integer.parseInt(getAttribute("tabindex"));
- }
-
- public void setTabIndex(int tabIndex) {
- setAttribute("tabindex", Integer.toString(tabIndex));
- }
-
- public String getTarget() {
- return getAttribute("target");
- }
-
- public void setTarget(String target) {
- setAttribute("target", target);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHAnchorElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHAnchorElement.java
deleted file mode 100644
index f4bba3f..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHAnchorElement.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLAnchorElement;
-
-public class SHAnchorElement extends SHALinkElement implements
- HTMLAnchorElement {
- protected SHAnchorElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getCharset() {
- return getAttribute("charset");
- }
-
- public void setCharset(String charset) {
- setAttribute("charset", charset);
- }
-
- public String getHreflang() {
- return getAttribute("hreflang");
- }
-
- public void setHreflang(String hreflang) {
- setAttribute("hreflang", hreflang);
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- public String getRel() {
- return getAttribute("rel");
- }
-
- public void setRel(String rel) {
- setAttribute("rel", rel);
- }
-
- public String getRev() {
- return getAttribute("rev");
- }
-
- public void setRev(String rev) {
- setAttribute("rev", rev);
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public void setType(String type) {
- setAttribute("type", type);
- }
-
- public void blur() {
- }
-
- public void focus() {
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHAppletElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHAppletElement.java
deleted file mode 100644
index edeeb33..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHAppletElement.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLAppletElement;
-
-public class SHAppletElement extends SHElement implements HTMLAppletElement {
- protected SHAppletElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-
- public String getAlt() {
- return getAttribute("alt");
- }
-
- public void setAlt(String alt) {
- setAttribute("alt", alt);
- }
-
- public String getArchive() {
- return getAttribute("archive");
- }
-
- public void setArchive(String archive) {
- setAttribute("archive", archive);
- }
-
- public String getCode() {
- return getAttribute("code");
- }
-
- public void setCode(String code) {
- setAttribute("code", code);
- }
-
- public String getCodeBase() {
- return getAttribute("codebase");
- }
-
- public void setCodeBase(String codeBase) {
- setAttribute("codebase", codeBase);
- }
-
- public String getHeight() {
- return getAttribute("height");
- }
-
- public void setHeight(String height) {
- setAttribute("height", height);
- }
-
- public String getHspace() {
- return getAttribute("hspace");
- }
-
- public void setHspace(String hspace) {
- setAttribute("hspace", hspace);
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- public String getObject() {
- return getAttribute("object");
- }
-
- public void setObject(String object) {
- setAttribute("object", object);
- }
-
- public String getVspace() {
- return getAttribute("vspace");
- }
-
- public void setVspace(String vspace) {
- setAttribute("vspace", vspace);
- }
-
- public String getWidth() {
- return getAttribute("width");
- }
-
- public void setWidth(String width) {
- setAttribute("width", width);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHAreaElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHAreaElement.java
deleted file mode 100644
index 0fba56f..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHAreaElement.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLAreaElement;
-
-public class SHAreaElement extends SHALinkElement implements HTMLAreaElement {
- protected SHAreaElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getAlt() {
- return getAttribute("alt");
- }
-
- public void setAlt(String alt) {
- setAttribute("alt", alt);
- }
-
- public boolean getNoHref() {
- String nohref = getAttribute("nohref");
- return nohref != null && nohref.equals("nohref");
- }
-
- public void setNoHref(boolean noHref) {
- setAttribute("nohref", (noHref ? "nohref" : null));
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBRElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBRElement.java
deleted file mode 100644
index d60fcc3..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBRElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLBRElement;
-
-public class SHBRElement extends SHElement implements HTMLBRElement {
- protected SHBRElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getClear() {
- return getAttribute("clear");
- }
-
- public void setClear(String clear) {
- setAttribute("clear", clear);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBaseElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBaseElement.java
deleted file mode 100644
index 1df2bc8..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBaseElement.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLBaseElement;
-
-public class SHBaseElement extends SHElement implements HTMLBaseElement {
- protected SHBaseElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getHref() {
- return getAttribute("href");
- }
-
- public void setHref(String href) {
- setAttribute("href", href);
- }
-
- public String getTarget() {
- return getAttribute("target");
- }
-
- public void setTarget(String target) {
- setAttribute("target", target);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBaseFontElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBaseFontElement.java
deleted file mode 100644
index 10ab4cf..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBaseFontElement.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLBaseFontElement;
-
-public class SHBaseFontElement extends SHElement implements HTMLBaseFontElement {
- protected SHBaseFontElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getColor() {
- return getAttribute("color");
- }
-
- public void setColor(String color) {
- setAttribute("color", color);
- }
-
- public String getFace() {
- return getAttribute("face");
- }
-
- public void setFace(String face) {
- setAttribute("face", face);
- }
-
- public String getSize() {
- return getAttribute("size");
- }
-
- public void setSize(String size) {
- setAttribute("size", size);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBodyElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBodyElement.java
deleted file mode 100644
index 5ef18dd..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHBodyElement.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLBodyElement;
-
-public class SHBodyElement extends SHElement implements HTMLBodyElement {
- protected SHBodyElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getALink() {
- return getAttribute("alink");
- }
-
- public String getBackground() {
- return getAttribute("background");
- }
-
- public String getBgColor() {
- return getAttribute("bgcolor");
- }
-
- public String getLink() {
- return getAttribute("link");
- }
-
- public String getText() {
- return getAttribute("text");
- }
-
- public String getVLink() {
- return getAttribute("vlink");
- }
-
- public void setALink(String aLink) {
- setAttribute("alink", aLink);
- }
-
- public void setBackground(String background) {
- setAttribute("background", background);
- }
-
- public void setBgColor(String bgColor) {
- setAttribute("bgcolor", bgColor);
- }
-
- public void setLink(String link) {
- setAttribute("link", link);
- }
-
- public void setText(String text) {
- setAttribute("text", text);
- }
-
- public void setVLink(String vLink) {
- setAttribute("vlink", vLink);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHButtonElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHButtonElement.java
deleted file mode 100644
index 59fe21a..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHButtonElement.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLButtonElement;
-import org.w3c.dom.html.HTMLFormElement;
-
-public class SHButtonElement extends SHElement implements HTMLButtonElement {
- protected SHButtonElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public HTMLFormElement getForm() {
- for (Node ret = getParentNode(); ret != null; ret = ret.getParentNode()) {
- if (ret instanceof HTMLFormElement)
- return (HTMLFormElement) ret;
- }
- return null;
- }
-
- public String getAccessKey() {
- return getAttribute("accesskey");
- }
-
- public void setAccessKey(String accessKey) {
- setAttribute("accesskey", accessKey);
- }
-
- public boolean getDisabled() {
- String val = getAttribute("disabled");
- return val != null && val.length() != 0;
- }
-
- public void setDisabled(boolean disabled) {
- setAttribute("disabled", disabled ? "disabled" : null);
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getTabIndex() {
- return Integer.parseInt(getAttribute("tabindex"));
- }
-
- public void setTabIndex(int tabIndex) {
- setAttribute("tabIndex", Integer.toString(tabIndex));
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public String getValue() {
- return getAttribute("value");
- }
-
- public void setValue(String value) {
- setAttribute("value", value);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDListElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDListElement.java
deleted file mode 100644
index aa75126..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDListElement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLDListElement;
-
-public class SHDListElement extends SHElement implements HTMLDListElement {
- protected SHDListElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public boolean getCompact() {
- String val = getAttribute("compact");
- return val != null && val.length() != 0;
- }
-
- public void setCompact(boolean compact) {
- setAttribute("compact", compact ? "compact" : null);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDOMImpl.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDOMImpl.java
deleted file mode 100644
index 1f89ef2..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDOMImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.eclipse.actf.model.dom.sgml.SGMLDOMImpl;
-import org.eclipse.actf.model.dom.sgml.SGMLDocType;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.html.HTMLDocument;
-
-
-public class SHDOMImpl extends SGMLDOMImpl {
- /**
- * @param title
- * always ignored.
- */
- public HTMLDocument createHTMLDocument(String title) {
- return new SHDocument(this);
- }
-
- /**
- * @param namespaceURI
- * always ignored.
- * @param qualifiedName
- * always ignored.
- */
- public Document createDocument(String namespaceURI, String qualifiedName,
- DocumentType doctype) throws DOMException {
- if (doctype == null) {
- return new SHDocument(this);
- } else if (doctype.getOwnerDocument() != null
- || !(doctype instanceof SGMLDocType)) {
- throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, doctype
- + " has been already owned.") {
- };
- } else {
- Document ret = createHTMLDocument(null);
- if (doctype != null) {
- ret.insertBefore(doctype, null);
- }
- return ret;
- }
- }
-
- protected SHDOMImpl() {
- }
-
- private static SHDOMImpl instance = new SHDOMImpl();
-
- public static DOMImplementation getDOMImplementation() {
- return instance;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDirectoryElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDirectoryElement.java
deleted file mode 100644
index 2cb4937..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDirectoryElement.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLDirectoryElement;
-
-public class SHDirectoryElement extends SHElement implements
- HTMLDirectoryElement {
- protected SHDirectoryElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public boolean getCompact() {
- String val = getAttribute("compact");
- return val != null && val.length() != 0;
- }
-
- public void setCompact(boolean compact) {
- setAttribute("compact", compact ? "compact" : null);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDivElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDivElement.java
deleted file mode 100644
index b8f03b7..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDivElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLDivElement;
-
-public class SHDivElement extends SHElement implements HTMLDivElement {
- protected SHDivElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDocument.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDocument.java
deleted file mode 100644
index 59ca234..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHDocument.java
+++ /dev/null
@@ -1,672 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URL;
-
-import org.eclipse.actf.model.dom.html.internal.util.UnsynchronizedHashtable;
-import org.eclipse.actf.model.dom.sgml.ElementDefinition;
-import org.eclipse.actf.model.dom.sgml.SGMLDocument;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-import org.w3c.dom.html.HTMLCollection;
-import org.w3c.dom.html.HTMLDocument;
-import org.w3c.dom.html.HTMLElement;
-import org.w3c.dom.html.HTMLTitleElement;
-
-
-
-public class SHDocument extends SGMLDocument implements HTMLDocument {
- /**
- * @deprecated
- * @see SHDOMImpl#createDocument(java.lang.String,java.lang.String,org.w3c.dom.DocumentType)
- */
- public SHDocument() {
- this((SHDOMImpl) SHDOMImpl.getDOMImplementation());
- }
-
- SHDocument(SHDOMImpl imple) {
- super(imple);
- }
-
- /**
- * @serial
- */
- private String cookie;
-
- public void close() { /* do not support */
- }
-
- HTMLCollection createCollection(final NodeList list) {
- return new HTMLCollection() {
- public int getLength() {
- return list.getLength();
- }
-
- public Node item(int index) {
- return list.item(index);
- }
-
- public Node namedItem(String name) {
- for (int i = 0; i < list.getLength(); i++) {
- Node node = list.item(i);
- if (!(node instanceof Element))
- continue;
- if (name.equalsIgnoreCase(((Element) node)
- .getAttribute("id"))) {
- return node;
- }
- }
- for (int i = 0; i < list.getLength(); i++) {
- Node node = list.item(i);
- if (!(node instanceof Element))
- continue;
- if (name.equalsIgnoreCase(((Element) node)
- .getAttribute("name"))) {
- ElementDefinition def = getDTD().getElementDefinition(
- node.getNodeName());
- if (def != null && def.getAttributeDef("name") != null) {
- return node;
- }
- }
- }
- return null;
- }
-
- public String toString() {
- return list.toString();
- }
- };
- }
-
- HTMLCollection createCollection(final Node nodes[], final int len) {
- return new HTMLCollection() {
- public int getLength() {
- return len;
- }
-
- public Node item(int index) {
- return 0 <= index && index < len ? nodes[index] : null;
- }
-
- public Node namedItem(String name) {
- for (int i = 0; i < len; i++) {
- Node node = nodes[i];
- if (!(node instanceof Element))
- continue;
- if (name.equalsIgnoreCase(((Element) node)
- .getAttribute("id"))) {
- return node;
- }
- }
- for (int i = 0; i < len; i++) {
- Node node = nodes[i];
- if (!(node instanceof Element))
- continue;
- if (name.equalsIgnoreCase(((Element) node)
- .getAttribute("name"))) {
- ElementDefinition def = getDTD().getElementDefinition(
- node.getNodeName());
- if (def != null && def.getAttributeDef("name") != null) {
- return node;
- }
- }
- }
- return null;
- }
- };
- }
-
- private static UnsynchronizedHashtable constructors;
- static {
- constructors = new UnsynchronizedHashtable();
- constructors.put("COL", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHTableColElement(tagName, doc);
- }
- });
- constructors.put("COLGROUP", constructors.get("COL"));
- constructors.put("THEAD", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHTableSectionElement(tagName, doc);
- }
- });
- constructors.put("TFOOT", constructors.get("THEAD"));
- constructors.put("CAPTION", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHTableCaptionElement(tagName, doc);
- }
- });
- constructors.put("TH", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHTableCellElement(tagName, doc);
- }
- });
- constructors.put("HTML", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHHtmlElement(tagName, doc);
- }
- });
- constructors.put("BASE", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHBaseElement(tagName, doc);
- }
- });
- constructors.put("STYLE", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHStyleElement(tagName, doc);
- }
- });
- constructors.put("TITLE", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHTitleElement(tagName, doc);
- }
- });
- constructors.put("BODY", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHBodyElement(tagName, doc);
- }
- });
- constructors.put("H6", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHHeadingElement(tagName, doc);
- }
- });
- constructors.put("HEAD", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHHeadElement(tagName, doc);
- }
- });
- constructors.put("SCRIPT", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHScriptElement(tagName, doc);
- }
- });
- constructors.put("LINK", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHLinkElement(tagName, doc);
- }
- });
- constructors.put("FRAMESET", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHFrameSetElement(tagName, doc);
- }
- });
- constructors.put("BASEFONT", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHBaseFontElement(tagName, doc);
- }
- });
- constructors.put("INS", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHModElement(tagName, doc);
- }
- });
- constructors.put("DEL", constructors.get("INS"));
- constructors.put("IFRAME", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHIFrameElement(tagName, doc);
- }
- });
- constructors.put("FIELDSET", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHFieldSetElement(tagName, doc);
- }
- });
- constructors.put("DIR", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHDirectoryElement(tagName, doc);
- }
- });
- constructors.put("META", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHMetaElement(tagName, doc);
- }
- });
- constructors.put("HR", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHHRElement(tagName, doc);
- }
- });
- constructors.put("MENU", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHMenuElement(tagName, doc);
- }
- });
- constructors.put("OBJECT", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHObjectElement(tagName, doc);
- }
- });
- constructors.put("APPLET", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHAppletElement(tagName, doc);
- }
- });
- constructors.put("PARAM", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHParamElement(tagName, doc);
- }
- });
- constructors.put("MAP", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHMapElement(tagName, doc);
- }
- });
- constructors.put("AREA", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHAreaElement(tagName, doc);
- }
- });
- constructors.put("LEGEND", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHLegendElement(tagName, doc);
- }
- });
- constructors.put("ISINDEX", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHIsIndexElement(tagName, doc);
- }
- });
- constructors.put("OPTGROUP", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHOptGroupElement(tagName, doc);
- }
- });
- constructors.put("TEXTAREA", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHTextAreaElement(tagName, doc);
- }
- });
- constructors.put("FORM", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHFormElement(tagName, doc);
- }
- });
- constructors.put("SELECT", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHSelectElement(tagName, doc);
- }
- });
- constructors.put("LABEL", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHLabelElement(tagName, doc);
- }
- });
- constructors.put("H5", constructors.get("H6"));
- constructors.put("BUTTON", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHButtonElement(tagName, doc);
- }
- });
- constructors.put("INPUT", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHInputElement(tagName, doc);
- }
- });
- constructors.put("OPTION", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHOptionElement(tagName, doc);
- }
- });
- constructors.put("QUOTE", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHQuoteElement(tagName, doc);
- }
- });
- constructors.put("H4", constructors.get("H6"));
- constructors.put("PRE", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHPreElement(tagName, doc);
- }
- });
- constructors.put("H3", constructors.get("H6"));
- constructors.put("BR", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHBRElement(tagName, doc);
- }
- });
- constructors.put("TABLE", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHTableElement(tagName, doc);
- }
- });
- constructors.put("TBODY", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHTableSectionElement(tagName, doc);
- }
- });
- constructors.put("DL", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHDListElement(tagName, doc);
- }
- });
- constructors.put("H2", constructors.get("H6"));
- constructors.put("UL", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHUListElement(tagName, doc);
- }
- });
- constructors.put("OL", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHOListElement(tagName, doc);
- }
- });
- constructors.put("TR", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHTableRowElement(tagName, doc);
- }
- });
- constructors.put("LI", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHLIElement(tagName, doc);
- }
- });
- constructors.put("IMG", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHImageElement(tagName, doc);
- }
- });
-
- constructors.put("DIV", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHDivElement(tagName, doc);
- }
- });
- constructors.put("H1", constructors.get("H6"));
- constructors.put("P", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHParagraphElement(tagName, doc);
- }
- });
- constructors.put("FONT", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHFontElement(tagName, doc);
- }
- });
- constructors.put("A", new Constructor() {
- public SHElement newInstance(String tagName, SHDocument doc) {
- return new SHAnchorElement(tagName, doc);
- }
- });
- constructors.put("TD", constructors.get("TH"));
- }
-
- public Element createElement(String tagName) {
- Constructor constructor = constructors.get(tagName);
- return constructor != null ? constructor.newInstance(tagName, this)
- : new SHElement(tagName, this);
- }
-
- public HTMLCollection getLinks() {
- int len = 0;
- Node links[] = new Node[32];
- Node tmp1, tmp2;
- Node root = getDocumentElement();
- tmp1 = root;
- outer: while (tmp1 != null) {
- if (tmp1 instanceof Element) {
- String name = tmp1.getNodeName();
- if (name.equalsIgnoreCase("AREA")
- || (name.equalsIgnoreCase("A") && ((Element) tmp1)
- .getAttributeNode("href") != null)) {
- if (len == links.length) {
- Node buf[] = new Node[len * 2];
- System.arraycopy(links, 0, buf, 0, len);
- links = buf;
- }
- links[len++] = tmp1;
- }
- }
- if ((tmp2 = tmp1.getFirstChild()) == null) {
- if (tmp1 == root) {
- break outer;
- } else {
- tmp2 = tmp1.getNextSibling();
- }
- }
- while (tmp2 == null && tmp1 != null) {
- tmp1 = tmp2 = tmp1.getParentNode();
- if (tmp1 != root) {
- tmp2 = tmp1.getNextSibling();
- } else {
- break outer;
- }
- }
- tmp1 = tmp2;
- }
- return createCollection(links, len);
- }
-
- public HTMLCollection getApplets() {
- return createCollection(getElementsByTagName("APPLET"));
- }
-
- public String getCookie() {
- return cookie;
- }
-
- public String getDomain() {
- return null;
- }
-
- public Element getElementById(String elementId) {
- Node tmp1, tmp2;
- Node root = getDocumentElement();
- tmp1 = root;
- while (tmp1 != null) {
- if (tmp1 instanceof Element
- && elementId.equals(((Element) tmp1).getAttribute("id"))) {
- return (Element) tmp1;
- }
- if ((tmp2 = tmp1.getFirstChild()) == null) {
- if (tmp1 == root) {
- return null;
- } else {
- tmp2 = tmp1.getNextSibling();
- }
- }
- while (tmp2 == null && tmp1 != null) {
- tmp1 = tmp2 = tmp1.getParentNode();
- if (tmp1 != root) {
- tmp2 = tmp1.getNextSibling();
- } else {
- return null;
- }
- }
- tmp1 = tmp2;
- }
- return null;
- }
-
- public NodeList getElementsByName(String elementName) {
- if (elementName.equals("*")) {
- return new NodeList() {
- public int getLength() {
- return 0;
- }
-
- public Node item(int index) {
- return null;
- }
- };
- } else {
- return getElementsByTagName(elementName);
- }
- }
-
- public HTMLCollection getForms() {
- return createCollection(getElementsByName("FORM"));
- }
-
- public HTMLCollection getImages() {
- return createCollection(getElementsByName("IMG"));
- }
-
- public HTMLCollection getAnchors() {
- int len = 0;
- Node links[] = new Node[32];
- Node tmp1, tmp2;
- Node root = getDocumentElement();
- tmp1 = root;
- outer: while (tmp1 != null) {
- if (tmp1 instanceof Element) {
- String name = tmp1.getNodeName();
- if ((name.equalsIgnoreCase("A") && ((Element) tmp1)
- .getAttributeNode("name") != null)) {
- if (len == links.length) {
- Node buf[] = new Node[len * 2];
- System.arraycopy(links, 0, buf, 0, len);
- links = buf;
- }
- links[len++] = tmp1;
- }
- }
- if ((tmp2 = tmp1.getFirstChild()) == null) {
- if (tmp1 == root) {
- break outer;
- } else {
- tmp2 = tmp1.getNextSibling();
- }
- }
- while (tmp2 == null && tmp1 != null) {
- tmp1 = tmp2 = tmp1.getParentNode();
- if (tmp1 != root) {
- tmp2 = tmp1.getNextSibling();
- } else {
- break outer;
- }
- }
- tmp1 = tmp2;
- }
- return createCollection(links, len);
- }
-
- public String getReferrer() {
- return null;
- }
-
- public String getTitle() {
- if (null == getDocumentElement())
- return null;
- NodeList titles = getElementsByTagName("TITLE");
- if (titles.getLength() == 0)
- return null;
- HTMLTitleElement te = (HTMLTitleElement) titles.item(0);
- Node title = te.getFirstChild();
- if (title == null || !(title instanceof Text))
- return null;
- return title.getNodeValue();
- }
-
- private URL url;
-
- public String getURL() {
- return url != null ? url.toString() : null;
- }
-
- /**
- * @param url
- * URL of this document.
- */
- public void setURL(URL url) {
- this.url = url;
- }
-
- public void open() { /* do not support */
- }
-
- /**
- * @return if this document does not have <code>BODY</code> or
- * <code>FRAMESET
- * </code>, null.
- */
- public HTMLElement getBody() {
- if (getDocumentElement() == null)
- return null;
- NodeList bodies = getElementsByTagName("FRAMESET");
- if (bodies.getLength() == 0) {
- bodies = getElementsByTagName("BODY");
- }
- if (bodies.getLength() == 0)
- return null;
- return (HTMLElement) bodies.item(0);
- }
-
- public void setBody(HTMLElement body) {
- HTMLElement oldBody = getBody();
- if (oldBody == null) {
- getDocumentElement().insertBefore(body, null);
- } else {
- oldBody.getParentNode().replaceChild(body, oldBody);
- }
- }
-
- public void setCookie(String cookie) {
- this.cookie = cookie;
- }
-
- public void setTitle(String title) {
- NodeList titles = getElementsByTagName("TITLE");
- if (titles.getLength() == 0)
- return;
- HTMLTitleElement te = (HTMLTitleElement) titles.item(0);
- te.setText(title);
- }
-
- public void write(String text) { /* do not support */
- }
-
- public void writeln(String text) { /* do not support */
- }
-
- /**
- * Prints this document as XHTML format. At the beginning of the document
- * this method generates is a DOCTYPE declaration. Its contents is
- * determined as follows.
- * <ul>
- * <li> if this document's doctype is "-//W3C//DTD HTML 4.0 Frameset//EN",
- * then "-//W3C//DTD XHTML 1.0 Frameset//EN"
- * <li> else if "-//W3C//DTD HTML 4.0//EN" then "-//W3C//DTD XHTML 1.0
- * Strict//EN"
- * <li> Otherwise, "-//W3C//DTD XHTML 1.0 Transitional//EN"
- * </ul>
- *
- * @param pw
- * PrintWriter to write
- * @param indent
- * if <code>true</code>, indents
- * @param enc
- * encoding of output
- */
- public void printAsXHTML(PrintWriter pw, boolean indent, String enc)
- throws IOException {
- String dtdID = getDTD().toString();
- if (dtdID.equals("-//W3C//DTD HTML 4.0 Frameset//EN")) {
- printAsXML("-//W3C//DTD XHTML 1.0 Frameset//EN", new URL(
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"), pw,
- indent, enc);
- } else if (dtdID.equals("-//W3C//DTD HTML 4.0//EN")) {
- printAsXML("-//W3C//DTD XHTML 1.0 Strict//EN", new URL(
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"), pw,
- indent, enc);
- } else {
- printAsXML("-//W3C//DTD XHTML 1.0 Transitional//EN", new URL(
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"),
- pw, indent, enc);
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHElement.java
deleted file mode 100644
index 68dbf53..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHElement.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.eclipse.actf.model.dom.sgml.SGMLElement;
-import org.w3c.dom.Document;
-import org.w3c.dom.html.HTMLElement;
-
-
-public class SHElement extends SGMLElement implements HTMLElement {
- protected SHElement(String name, Document doc) {
- super(name, doc);
- }
-
- public String getClassName() {
- return getAttribute("class");
- }
-
- public String getDir() {
- return getAttribute("dir");
- }
-
- public String getId() {
- return getAttribute("id");
- }
-
- public String getLang() {
- return getAttribute("lang");
- }
-
- public String getTitle() {
- return getAttribute("title");
- }
-
- public void setClassName(String className) {
- setAttribute("class", className);
- }
-
- public void setDir(String dir) {
- setAttribute("dir", dir);
- }
-
- public void setId(String id) {
- setAttribute("id", id);
- }
-
- public void setLang(String lang) {
- setAttribute("lang", lang);
- }
-
- public void setTitle(String title) {
- setAttribute("title", title);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFieldSetElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFieldSetElement.java
deleted file mode 100644
index 9195981..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFieldSetElement.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLFieldSetElement;
-import org.w3c.dom.html.HTMLFormElement;
-
-public class SHFieldSetElement extends SHElement implements HTMLFieldSetElement {
- protected SHFieldSetElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public HTMLFormElement getForm() {
- for (Node ret = getParentNode(); ret != null; ret = ret.getParentNode()) {
- if (ret instanceof HTMLFormElement)
- return (HTMLFormElement) ret;
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFontElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFontElement.java
deleted file mode 100644
index ee0b6b2..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFontElement.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLFontElement;
-
-public class SHFontElement extends SHElement implements HTMLFontElement {
- protected SHFontElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getColor() {
- return getAttribute("color");
- }
-
- public void setColor(String color) {
- setAttribute("color", color);
- }
-
- public String getFace() {
- return getAttribute("face");
- }
-
- public void setFace(String face) {
- setAttribute("face", face);
- }
-
- public String getSize() {
- return getAttribute("size");
- }
-
- public void setSize(String size) {
- setAttribute("size", size);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFormCtrlElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFormCtrlElement.java
deleted file mode 100644
index 407587c..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFormCtrlElement.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLFormElement;
-
-abstract class SHFormCtrlElement extends SHElement {
- SHFormCtrlElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public HTMLFormElement getForm() {
- for (Node ret = getParentNode(); ret != null; ret = ret.getParentNode()) {
- if (ret instanceof HTMLFormElement)
- return (HTMLFormElement) ret;
- }
- return null;
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- public boolean getDisabled() {
- String val = getAttribute("disabled");
- return val != null && val.length() != 0;
- }
-
- public void setDisabled(boolean disabled) {
- setAttribute("disabled", disabled ? "disabled" : null);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getTabIndex() {
- return Integer.parseInt(getAttribute("tabindex"));
- }
-
- public void setTabIndex(int tabIndex) {
- setAttribute("tabindex", Integer.toString(tabIndex));
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFormElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFormElement.java
deleted file mode 100644
index 18d85c4..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFormElement.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLCollection;
-import org.w3c.dom.html.HTMLElement;
-import org.w3c.dom.html.HTMLFormElement;
-
-public class SHFormElement extends SHElement implements HTMLFormElement {
- protected SHFormElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public HTMLCollection getElements() {
- int len = 0;
- HTMLElement elements[] = new HTMLElement[8];
- Node tmp1, tmp2;
- tmp1 = this;
- outer: while (tmp1 != null) {
- if (tmp1 instanceof Element) {
- String name = tmp1.getNodeName();
- if (name.equalsIgnoreCase("INPUT")
- || name.equalsIgnoreCase("SELECT")
- || name.equalsIgnoreCase("TEXTAREA")
- || name.equalsIgnoreCase("LABEL")
- || name.equalsIgnoreCase("BUTTON")) {
- if (len == elements.length) {
- HTMLElement buf[] = new HTMLElement[len * 2];
- System.arraycopy(elements, 0, buf, 0, len);
- elements = buf;
- }
- elements[len++] = (HTMLElement) tmp1;
- }
- }
- if ((tmp2 = tmp1.getFirstChild()) == null) {
- if (tmp1 == this) {
- break outer;
- } else {
- tmp2 = tmp1.getNextSibling();
- }
- }
- while (tmp2 == null && tmp1 != null) {
- tmp1 = tmp2 = tmp1.getParentNode();
- if (tmp1 != this) {
- tmp2 = tmp1.getNextSibling();
- } else {
- break outer;
- }
- }
- tmp1 = tmp2;
- }
- return ((SHDocument) getOwnerDocument())
- .createCollection(elements, len);
- }
-
- public int getLength() {
- return getElements().getLength();
- };
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- public String getAcceptCharset() {
- return getAttribute("accept-charset");
- }
-
- public void setAcceptCharset(String acceptCharset) {
- setAttribute("accept-charset", acceptCharset);
- }
-
- public String getAction() {
- return getAttribute("action");
- }
-
- public void setAction(String action) {
- setAttribute("action", action);
- }
-
- public String getEnctype() {
- return getAttribute("enctype");
- }
-
- public void setEnctype(String enctype) {
- setAttribute("enctype", enctype);
- }
-
- public String getMethod() {
- return getAttribute("method");
- }
-
- public void setMethod(String method) {
- setAttribute("method", method);
- }
-
- public String getTarget() {
- return getAttribute("target");
- }
-
- public void setTarget(String target) {
- setAttribute("target", target);
- }
-
- /**
- * do nothing
- */
- public void submit() { /* do nothing; */
- }
-
- /**
- * do nothing
- */
- public void reset() { /* do nothing; */
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFrameElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFrameElement.java
deleted file mode 100644
index 675cf99..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFrameElement.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.html.HTMLFrameElement;
-
-public class SHFrameElement extends SHElement implements HTMLFrameElement {
- protected SHFrameElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getFrameBorder() {
- return getAttribute("frameborder");
- }
-
- public void setFrameBorder(String frameBorder) {
- setAttribute("frameborder", frameBorder);
- }
-
- public String getLongDesc() {
- return getAttribute("longdesc");
- }
-
- public void setLongDesc(String longDesc) {
- setAttribute("longdesc", longDesc);
- }
-
- public String getMarginHeight() {
- return getAttribute("marginheight");
- }
-
- public void setMarginHeight(String marginHeight) {
- setAttribute("marginheight", marginHeight);
- }
-
- public String getMarginWidth() {
- return getAttribute("marginwidth");
- }
-
- public void setMarginWidth(String marginWidth) {
- setAttribute("marginwidth", marginWidth);
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- public boolean getNoResize() {
- String val = getAttribute("noresize");
- return val != null && val.length() != 0;
- }
-
- public void setNoResize(boolean noResize) {
- setAttribute("noresize", noResize ? "noresize" : null);
- }
-
- public String getScrolling() {
- return getAttribute("scrolling");
- }
-
- public void setScrolling(String scrolling) {
- setAttribute("scrolling", scrolling);
- }
-
- public String getSrc() {
- return getAttribute("src");
- }
-
- public void setSrc(String src) {
- setAttribute("src", src);
- }
-
- private Document contentDoc;
-
- public Document getContentDocument() {
- return contentDoc;
- }
-
- /**
- * Sets the content document this frame contains.
- */
- public void setContentDocument(Document contentDoc) {
- this.contentDoc = contentDoc;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFrameSetElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFrameSetElement.java
deleted file mode 100644
index 33577ed..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHFrameSetElement.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLFrameSetElement;
-
-public class SHFrameSetElement extends SHElement implements HTMLFrameSetElement {
- protected SHFrameSetElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getCols() {
- return getAttribute("cols");
- }
-
- public String getRows() {
- return getAttribute("rows");
- }
-
- public void setCols(String cols) {
- setAttribute("cols", cols);
- }
-
- public void setRows(String rows) {
- setAttribute("rows", rows);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHRElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHRElement.java
deleted file mode 100644
index db30f3b..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHRElement.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLHRElement;
-
-public class SHHRElement extends SHElement implements HTMLHRElement {
- protected SHHRElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-
- public boolean getNoShade() {
- String val = getAttribute("noshade");
- return val != null && val.length() != 0;
- }
-
- public void setNoShade(boolean noShade) {
- setAttribute("noshade", noShade ? "noshade" : null);
- }
-
- public String getSize() {
- return getAttribute("size");
- }
-
- public void setSize(String size) {
- setAttribute("size", size);
- }
-
- public String getWidth() {
- return getAttribute("width");
- }
-
- public void setWidth(String width) {
- setAttribute("width", width);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHeadElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHeadElement.java
deleted file mode 100644
index ffba1da..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHeadElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLHeadElement;
-
-public class SHHeadElement extends SHElement implements HTMLHeadElement {
- protected SHHeadElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getProfile() {
- return getAttribute("profile");
- }
-
- public void setProfile(String profile) {
- setAttribute("profile", profile);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHeadingElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHeadingElement.java
deleted file mode 100644
index c661cdb..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHeadingElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLHeadingElement;
-
-public class SHHeadingElement extends SHElement implements HTMLHeadingElement {
- protected SHHeadingElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHtmlElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHtmlElement.java
deleted file mode 100644
index a2533e7..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHHtmlElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLHtmlElement;
-
-public class SHHtmlElement extends SHElement implements HTMLHtmlElement {
- protected SHHtmlElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getVersion() {
- return getAttribute("version");
- }
-
- public void setVersion(String version) {
- setAttribute("version", version);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHIFrameElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHIFrameElement.java
deleted file mode 100644
index 2bead08..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHIFrameElement.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.html.HTMLIFrameElement;
-
-public class SHIFrameElement extends SHElement implements HTMLIFrameElement {
- protected SHIFrameElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-
- public String getFrameBorder() {
- return getAttribute("frameborfer");
- }
-
- public void setFrameBorder(String frameBorder) {
- setAttribute("frameborder", frameBorder);
- }
-
- public String getHeight() {
- return getAttribute("height");
- }
-
- public void setHeight(String height) {
- setAttribute("height", height);
- }
-
- public String getLongDesc() {
- return getAttribute("longdesc");
- }
-
- public void setLongDesc(String longDesc) {
- setAttribute("longDesc", longDesc);
- }
-
- public String getMarginHeight() {
- return getAttribute("marginheight");
- }
-
- public void setMarginHeight(String marginHeight) {
- setAttribute("marginheight", marginHeight);
- }
-
- public String getMarginWidth() {
- return getAttribute("marginwidth");
- }
-
- public void setMarginWidth(String marginWidth) {
- setAttribute("marginwidth", marginWidth);
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- public String getScrolling() {
- return getAttribute("scrolling");
- }
-
- public void setScrolling(String scrolling) {
- setAttribute("scrolling", scrolling);
- }
-
- public String getSrc() {
- return getAttribute("src");
- }
-
- public void setSrc(String src) {
- setAttribute("src", src);
- }
-
- public String getWidth() {
- return getAttribute("src");
- }
-
- public void setWidth(String width) {
- setAttribute("width", width);
- }
-
- private Document contentDoc;
-
- public Document getContentDocument() {
- return contentDoc;
- }
-
- /**
- * Sets the content document this internal frame contains.
- */
- public void setContentDocument(Document contentDoc) {
- this.contentDoc = contentDoc;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHImageElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHImageElement.java
deleted file mode 100644
index cd5e104..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHImageElement.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLImageElement;
-
-public class SHImageElement extends SHElement implements HTMLImageElement {
- protected SHImageElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getLowSrc() {
- return getAttribute("lowsrc");
- }
-
- public void setLowSrc(String lowSrc) {
- setAttribute("lowsrc", lowSrc);
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-
- public String getAlt() {
- return getAttribute("alt");
- }
-
- public void setAlt(String alt) {
- setAttribute("alt", alt);
- }
-
- public String getBorder() {
- return getAttribute("border");
- }
-
- public void setBorder(String border) {
- setAttribute("border", border);
- }
-
- public String getHeight() {
- return getAttribute("height");
- }
-
- public void setHeight(String height) {
- setAttribute("height", height);
- }
-
- public String getHspace() {
- return getAttribute("hspace");
- }
-
- public void setHspace(String hspace) {
- setAttribute("hspace", hspace);
- }
-
- public boolean getIsMap() {
- String val = getAttribute("ismap");
- return val != null && val.length() != 0;
- }
-
- public void setIsMap(boolean isMap) {
- setAttribute("ismap", isMap ? "ismap" : null);
- }
-
- public String getLongDesc() {
- return getAttribute("longdesc");
- }
-
- public void setLongDesc(String longDesc) {
- setAttribute("longdesc", longDesc);
- }
-
- public String getSrc() {
- return getAttribute("src");
- }
-
- public void setSrc(String src) {
- setAttribute("src", src);
- }
-
- public String getUseMap() {
- return getAttribute("usemap");
- }
-
- public void setUseMap(String useMap) {
- setAttribute("usemap", useMap);
- }
-
- public String getVspace() {
- return getAttribute("vsapce");
- }
-
- public void setVspace(String vspace) {
- setAttribute("vspace", vspace);
- }
-
- public String getWidth() {
- return getAttribute("width");
- }
-
- public void setWidth(String width) {
- setAttribute("width", width);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHInputElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHInputElement.java
deleted file mode 100644
index caa6642..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHInputElement.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLInputElement;
-
-public class SHInputElement extends SHFormCtrlElement implements
- HTMLInputElement {
- protected SHInputElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- private String defaultValue;
-
- public String getDefaultValue() {
- return this.defaultValue;
- }
-
- public void setDefaultValue(String defaultValue) {
- this.defaultValue = defaultValue;
- }
-
- private boolean defaultChecked;
-
- public boolean getDefaultChecked() {
- return this.defaultChecked;
- }
-
- public void setDefaultChecked(boolean defaultChecked) {
- this.defaultChecked = defaultChecked;
- }
-
- public String getAccept() {
- return getAttribute("accept");
- }
-
- public void setAccept(String accept) {
- setAttribute("accept", accept);
- }
-
- public String getAccessKey() {
- return getAttribute("accesskey");
- }
-
- public void setAccessKey(String accessKey) {
- setAttribute("accesskey", accessKey);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-
- public String getAlt() {
- return getAttribute("alt");
- }
-
- public void setAlt(String alt) {
- setAttribute("alt", alt);
- }
-
- public boolean getChecked() {
- String val = getAttribute("checked");
- return val != null && val.length() != 0;
- }
-
- public void setChecked(boolean checked) {
- setAttribute("checked", checked ? "checked" : null);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getMaxLength() {
- return Integer.parseInt(getAttribute("maxlength"));
- }
-
- public void setMaxLength(int maxLength) {
- setAttribute("maxlength", Integer.toString(maxLength));
- }
-
- public boolean getReadOnly() {
- String val = getAttribute("readonly");
- return val != null && val.length() != 0;
- }
-
- public void setReadOnly(boolean readOnly) {
- setAttribute("readonly", readOnly ? "readonly" : null);
- }
-
- public String getSize() {
- return getAttribute("size");
- }
-
- public void setSize(String size) {
- setAttribute("size", size);
- }
-
- public String getSrc() {
- return getAttribute("src");
- }
-
- public void setSrc(String src) {
- setAttribute("src", src);
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public void setType(String type) {
- setAttribute("type", type);
- }
-
- public String getUseMap() {
- return getAttribute("usemap");
- }
-
- public void setUseMap(String useMap) {
- setAttribute("usemap", useMap);
- }
-
- public String getValue() {
- return getAttribute("value");
- }
-
- public void setValue(String value) {
- setAttribute("value", value);
- }
-
- /**
- * does nothing.
- */
- public void blur() {
- }
-
- /**
- * does nothing.
- */
- public void focus() {
- }
-
- /**
- * does nothing.
- */
- public void select() {
- }
-
- /**
- * does nothing.
- */
- public void click() {
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHIsIndexElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHIsIndexElement.java
deleted file mode 100644
index 92855fd..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHIsIndexElement.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLFormElement;
-import org.w3c.dom.html.HTMLIsIndexElement;
-
-public class SHIsIndexElement extends SHElement implements HTMLIsIndexElement {
- protected SHIsIndexElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public HTMLFormElement getForm() {
- for (Node ret = getParentNode(); ret != null; ret = ret.getParentNode()) {
- if (ret instanceof HTMLFormElement)
- return (HTMLFormElement) ret;
- }
- return null;
- }
-
- public String getPrompt() {
- return getAttribute("prompt");
- }
-
- public void setPrompt(String prompt) {
- setAttribute("prompt", prompt);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLIElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLIElement.java
deleted file mode 100644
index cdd0126..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLIElement.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLLIElement;
-
-public class SHLIElement extends SHElement implements HTMLLIElement {
- protected SHLIElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public void setType(String type) {
- setAttribute("type", type);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getValue() {
- return Integer.parseInt(getAttribute("value"));
- }
-
- public void setValue(int value) {
- setAttribute("value", Integer.toString(value));
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLabelElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLabelElement.java
deleted file mode 100644
index 1cf242b..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLabelElement.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLFormElement;
-import org.w3c.dom.html.HTMLLabelElement;
-
-public class SHLabelElement extends SHElement implements HTMLLabelElement {
- protected SHLabelElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public HTMLFormElement getForm() {
- for (Node ret = getParentNode(); ret != null; ret = ret.getParentNode()) {
- if (ret instanceof HTMLFormElement)
- return (HTMLFormElement) ret;
- }
- return null;
- }
-
- public String getAccessKey() {
- return getAttribute("accesskey");
- }
-
- public void setAccessKey(String accessKey) {
- setAttribute("accesskey", accessKey);
- }
-
- public String getHtmlFor() {
- return getAttribute("for");
- }
-
- public void setHtmlFor(String htmlFor) {
- setAttribute("for", htmlFor);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLegendElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLegendElement.java
deleted file mode 100644
index bc2825f..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLegendElement.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLFormElement;
-import org.w3c.dom.html.HTMLLegendElement;
-
-public class SHLegendElement extends SHElement implements HTMLLegendElement {
- protected SHLegendElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public HTMLFormElement getForm() {
- for (Node ret = getParentNode(); ret != null; ret = ret.getParentNode()) {
- if (ret instanceof HTMLFormElement)
- return (HTMLFormElement) ret;
- }
- return null;
- }
-
- public String getAccessKey() {
- return getAttribute("accesskey");
- }
-
- public void setAccessKey(String accessKey) {
- setAttribute("accesskey", accessKey);
- }
-
- public String getAlign() {
- return getAttribute("aling");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLinkElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLinkElement.java
deleted file mode 100644
index fa28cef..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHLinkElement.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLLinkElement;
-
-public class SHLinkElement extends SHElement implements HTMLLinkElement {
- protected SHLinkElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- private boolean disabled;
-
- public boolean getDisabled() {
- return this.disabled;
- }
-
- public void setDisabled(boolean disabled) {
- this.disabled = disabled;
- }
-
- public String getCharset() {
- return getAttribute("charset");
- }
-
- public void setCharset(String charset) {
- setAttribute("charset", charset);
- }
-
- public String getHref() {
- return getAttribute("href");
- }
-
- public void setHref(String href) {
- setAttribute("href", href);
- }
-
- public String getHreflang() {
- return getAttribute("hreflang");
- }
-
- public void setHreflang(String hreflang) {
- setAttribute("hreflang", hreflang);
- }
-
- public String getMedia() {
- return getAttribute("media");
- }
-
- public void setMedia(String media) {
- setAttribute("media", media);
- }
-
- public String getRel() {
- return getAttribute("rel");
- }
-
- public void setRel(String rel) {
- setAttribute("rel", rel);
- }
-
- public String getRev() {
- return getAttribute("rev");
- }
-
- public void setRev(String rev) {
- setAttribute("rev", rev);
- }
-
- public String getTarget() {
- return getAttribute("target");
- }
-
- public void setTarget(String target) {
- setAttribute("target", target);
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public void setType(String type) {
- setAttribute("type", type);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHMapElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHMapElement.java
deleted file mode 100644
index 4e1a63e..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHMapElement.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLCollection;
-import org.w3c.dom.html.HTMLMapElement;
-
-public class SHMapElement extends SHElement implements HTMLMapElement {
- protected SHMapElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public HTMLCollection getAreas() {
- return ((SHDocument) getOwnerDocument())
- .createCollection(getElementsByTagName("AREA"));
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHMenuElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHMenuElement.java
deleted file mode 100644
index 5653c16..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHMenuElement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLMenuElement;
-
-public class SHMenuElement extends SHElement implements HTMLMenuElement {
- protected SHMenuElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public boolean getCompact() {
- String val = getAttribute("compact");
- return val != null && val.length() != 0;
- }
-
- public void setCompact(boolean compact) {
- setAttribute("compact", compact ? "compact" : null);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHMetaElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHMetaElement.java
deleted file mode 100644
index 1b07102..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHMetaElement.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLMetaElement;
-
-public class SHMetaElement extends SHElement implements HTMLMetaElement {
- protected SHMetaElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getContent() {
- return getAttribute("content");
- }
-
- public String getHttpEquiv() {
- return getAttribute("http-equiv");
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public String getScheme() {
- return getAttribute("scheme");
- }
-
- public void setContent(String content) {
- setAttribute("content", content);
- }
-
- public void setHttpEquiv(String httpEquiv) {
- setAttribute("http-equiv", httpEquiv);
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- public void setScheme(String scheme) {
- setAttribute("scheme", scheme);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHModElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHModElement.java
deleted file mode 100644
index 4cbaadb..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHModElement.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLModElement;
-
-public class SHModElement extends SHElement implements HTMLModElement {
- protected SHModElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getCite() {
- return getAttribute("cite");
- }
-
- public void setCite(String cite) {
- setAttribute("cite", cite);
- }
-
- public String getDateTime() {
- return getAttribute("datetime");
- }
-
- public void setDateTime(String dateTime) {
- setAttribute("datetime", dateTime);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHOListElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHOListElement.java
deleted file mode 100644
index 23d7c78..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHOListElement.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLOListElement;
-
-public class SHOListElement extends SHElement implements HTMLOListElement {
- protected SHOListElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public boolean getCompact() {
- String val = getAttribute("compact");
- return val != null && val.length() != 0;
- }
-
- public void setCompact(boolean compact) {
- setAttribute("compact", compact ? "compact" : null);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getStart() {
- return Integer.parseInt(getAttribute("start"));
- }
-
- public void setStart(int start) {
- setAttribute("start", Integer.toString(start));
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public void setType(String type) {
- setAttribute("type", type);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHObjectElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHObjectElement.java
deleted file mode 100644
index 99db9e2..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHObjectElement.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLFormElement;
-import org.w3c.dom.html.HTMLObjectElement;
-
-public class SHObjectElement extends SHElement implements HTMLObjectElement {
- protected SHObjectElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public HTMLFormElement getForm() {
- for (Node ret = getParentNode(); ret != null; ret = ret.getParentNode()) {
- if (ret instanceof HTMLFormElement)
- return (HTMLFormElement) ret;
- }
- return null;
- }
-
- public String getCode() {
- return getAttribute("code");
- }
-
- public void setCode(String code) {
- setAttribute("code", code);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-
- public String getArchive() {
- return getAttribute("archive");
- }
-
- public void setArchive(String archive) {
- setAttribute("archive", archive);
- }
-
- public String getBorder() {
- return getAttribute("border");
- }
-
- public void setBorder(String border) {
- setAttribute("border", border);
- }
-
- public String getCodeBase() {
- return getAttribute("codebase");
- }
-
- public void setCodeBase(String codeBase) {
- setAttribute("codebase", codeBase);
- }
-
- public String getCodeType() {
- return getAttribute("codetype");
- }
-
- public void setCodeType(String codeType) {
- setAttribute("codetype", codeType);
- }
-
- public String getData() {
- return getAttribute("data");
- }
-
- public void setData(String data) {
- setAttribute("data", data);
- }
-
- public boolean getDeclare() {
- String val = getAttribute("declare");
- return val != null && val.length() != 0;
- }
-
- public void setDeclare(boolean declare) {
- setAttribute("declare", declare ? "declare" : null);
- }
-
- public String getHeight() {
- return getAttribute("height");
- }
-
- public void setHeight(String height) {
- setAttribute("height", height);
- }
-
- public String getHspace() {
- return getAttribute("hspace");
- }
-
- public void setHspace(String hspace) {
- setAttribute("hspace", hspace);
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- public String getStandby() {
- return getAttribute("standby");
- }
-
- public void setStandby(String standby) {
- setAttribute("standby", standby);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getTabIndex() {
- return Integer.parseInt(getAttribute("tabindex"));
- }
-
- public void setTabIndex(int tabIndex) {
- setAttribute("tabindex", Integer.toString(tabIndex));
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public void setType(String type) {
- setAttribute("type", type);
- }
-
- public String getUseMap() {
- return getAttribute("usemap");
- }
-
- public void setUseMap(String useMap) {
- setAttribute("usemap", useMap);
- }
-
- public String getVspace() {
- return getAttribute("vsapce");
- }
-
- public void setVspace(String vspace) {
- setAttribute("vsapce", vspace);
- }
-
- public String getWidth() {
- return getAttribute("width");
- }
-
- public void setWidth(String width) {
- setAttribute("width", width);
- }
-
- private Document contentDoc;
-
- public Document getContentDocument() {
- return contentDoc;
- }
-
- /**
- * Sets the content document this object contains.
- */
- public void setContentDocument(Document contentDoc) {
- this.contentDoc = contentDoc;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHOptGroupElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHOptGroupElement.java
deleted file mode 100644
index 0c1f960..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHOptGroupElement.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLOptGroupElement;
-
-public class SHOptGroupElement extends SHElement implements HTMLOptGroupElement {
- protected SHOptGroupElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public boolean getDisabled() {
- String val = getAttribute("disabled");
- return val != null && val.length() != 0;
- }
-
- public void setDisabled(boolean disabled) {
- setAttribute("disabled", disabled ? "disabled" : null);
- }
-
- public String getLabel() {
- return getAttribute("label");
- }
-
- public void setLabel(String label) {
- setAttribute("label", label);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHOptionElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHOptionElement.java
deleted file mode 100644
index e1538f5..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHOptionElement.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLCollection;
-import org.w3c.dom.html.HTMLFormElement;
-import org.w3c.dom.html.HTMLOptionElement;
-
-public class SHOptionElement extends SHElement implements HTMLOptionElement {
- protected SHOptionElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public HTMLFormElement getForm() {
- for (Node ret = getParentNode(); ret != null; ret = ret.getParentNode()) {
- if (ret instanceof HTMLFormElement)
- return (HTMLFormElement) ret;
- }
- return null;
- }
-
- private boolean defaultSelected;
-
- public boolean getDefaultSelected() {
- return defaultSelected;
- }
-
- public void setDefaultSelected(boolean defaultSelected) {
- this.defaultSelected = defaultSelected;
- }
-
- public String getText() {
- Node child = getFirstChild();
- return child == null ? null : child.getNodeValue();
- }
-
- /**
- * @return if a SELECT node is not found in ancester, -1.
- */
- public int getIndex() {
- SHSelectElement sel;
- for (Node anc = getParentNode(); anc != null; anc = anc.getParentNode()) {
- if (anc instanceof SHSelectElement) {
- sel = (SHSelectElement) anc;
- HTMLCollection options = sel.getOptions();
- for (int i = 0; i < options.getLength(); i++) {
- if (options.item(i) == this) {
- return i;
- }
- }
- return -1;
- }
- }
- return -1;
- }
-
- public void setIndex(int index) {
- SHSelectElement sel;
- for (Node anc = getParentNode(); anc != null; anc = anc.getParentNode()) {
- if (anc instanceof SHSelectElement) {
- sel = (SHSelectElement) anc;
- HTMLCollection options = sel.getOptions();
- if (index < 0 || options.getLength() <= index)
- return;
- SHOptionElement nextSibling = (SHOptionElement) options
- .item(index);
- Node newParent = nextSibling.getParentNode();
- getParentNode().removeChild(this);
- newParent.insertBefore(this, nextSibling);
- }
- }
- }
-
- public boolean getSelected() {
- String val = getAttribute("selected");
- return val != null && val.length() != 0;
- }
-
- public void setSelected(boolean selected) {
- setAttribute("selected", selected ? "selected" : null);
- }
-
- public boolean getDisabled() {
- String val = getAttribute("disabled");
- return val != null && val.length() != 0;
- }
-
- public void setDisabled(boolean disabled) {
- setAttribute("disabled", disabled ? "disabled" : null);
- }
-
- public String getLabel() {
- return getAttribute("label");
- }
-
- public void setLabel(String label) {
- setAttribute("label", label);
- }
-
- public String getValue() {
- return getAttribute("value");
- }
-
- public void setValue(String value) {
- setAttribute("value", value);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHParagraphElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHParagraphElement.java
deleted file mode 100644
index 9000366..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHParagraphElement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLParagraphElement;
-
-public class SHParagraphElement extends SHElement implements
- HTMLParagraphElement {
- protected SHParagraphElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHParamElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHParamElement.java
deleted file mode 100644
index 0b0aa11..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHParamElement.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLParamElement;
-
-public class SHParamElement extends SHElement implements HTMLParamElement {
- protected SHParamElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public String getName() {
- return getAttribute("name");
- }
-
- public void setName(String name) {
- setAttribute("name", name);
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public void setType(String type) {
- setAttribute("type", type);
- }
-
- public String getValue() {
- return getAttribute("value");
- }
-
- public void setValue(String value) {
- setAttribute("value", value);
- }
-
- public String getValueType() {
- return getAttribute("valuetype");
- }
-
- public void setValueType(String valueType) {
- setAttribute("valuetype", valueType);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHPreElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHPreElement.java
deleted file mode 100644
index 509f9b7..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHPreElement.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLPreElement;
-
-public class SHPreElement extends SHElement implements HTMLPreElement {
- protected SHPreElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getWidth() {
- return Integer.parseInt(getAttribute("width"));
- }
-
- public void setWidth(int width) {
- setAttribute("width", Integer.toString(width));
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHQuoteElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHQuoteElement.java
deleted file mode 100644
index a357fb4..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHQuoteElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLQuoteElement;
-
-public class SHQuoteElement extends SHElement implements HTMLQuoteElement {
- protected SHQuoteElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- public String getCite() {
- return getAttribute("cite");
- }
-
- public void setCite(String cite) {
- setAttribute("cite", cite);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHScriptElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHScriptElement.java
deleted file mode 100644
index 7a73358..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHScriptElement.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLScriptElement;
-
-public class SHScriptElement extends SHElement implements HTMLScriptElement {
- protected SHScriptElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public String getText() {
- Node child = getFirstChild();
- return child == null ? null : child.getNodeValue();
- }
-
- public void setText(String text) {
- Node child = getFirstChild();
- if (child == null) {
- appendChild(getOwnerDocument().createCDATASection(text));
- } else if (child instanceof CharacterData) {
- ((CharacterData) child).setData(text);
- } else {
- insertBefore(getOwnerDocument().createCDATASection(text), child);
- }
- }
-
- public String getHtmlFor() {
- return getAttribute("for");
- }
-
- public void setHtmlFor(String htmlFor) {
- setAttribute("for", htmlFor);
- }
-
- public String getEvent() {
- return getAttribute("event");
- }
-
- public void setEvent(String event) {
- setAttribute("event", event);
- }
-
- public String getCharset() {
- return getAttribute("charset");
- }
-
- public void setCharset(String charset) {
- setAttribute("charset", charset);
- }
-
- public boolean getDefer() {
- String val = getAttribute("defer");
- return val != null && val.length() != 0;
- }
-
- public void setDefer(boolean defer) {
- setAttribute("defer", defer ? "defer" : null);
- }
-
- public String getSrc() {
- return getAttribute("src");
- }
-
- public void setSrc(String src) {
- setAttribute("src", src);
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public void setType(String type) {
- setAttribute("type", type);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHSelectElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHSelectElement.java
deleted file mode 100644
index 9908307..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHSelectElement.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.NodeList;
-import org.w3c.dom.html.HTMLCollection;
-import org.w3c.dom.html.HTMLElement;
-import org.w3c.dom.html.HTMLOptionElement;
-import org.w3c.dom.html.HTMLSelectElement;
-
-public class SHSelectElement extends SHFormCtrlElement implements
- HTMLSelectElement {
- protected SHSelectElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public int getSelectedIndex() {
- NodeList options = getElementsByTagName("OPTION");
- for (int i = 0; i < options.getLength(); i++) {
- if (((SHOptionElement) options.item(i)).getSelected())
- return i;
- }
- return -1;
- }
-
- public void setSelectedIndex(int selectedIndex) {
- NodeList options = getElementsByTagName("OPTION");
- if (selectedIndex < 0 || options.getLength() <= selectedIndex)
- return;
- ((SHOptionElement) options.item(selectedIndex)).setAttribute(
- "selected", "selected");
- }
-
- public String getValue() {
- NodeList options = getElementsByTagName("OPTION");
- for (int i = 0; i < options.getLength(); i++) {
- SHOptionElement opt = (SHOptionElement) options.item(i);
- if (opt.getSelected()) {
- return opt.getValue();
- }
- }
- return null;
- }
-
- public void setValue(String value) {
- NodeList options = getElementsByTagName("OPTION");
- for (int i = 0; i < options.getLength(); i++) {
- SHOptionElement opt = (SHOptionElement) options.item(i);
- if (opt.getValue().equals(value)) {
- opt.setAttribute("selected", "selected");
- }
- }
- }
-
- public int getLength() {
- return getElementsByTagName("OPTION").getLength();
- }
-
- public HTMLCollection getOptions() {
- NodeList options = getElementsByTagName("OPTION");
- return ((SHDocument) getOwnerDocument()).createCollection(options);
- }
-
- public boolean getMultiple() {
- String mul = getAttribute("multiple");
- return mul != null && mul.length() != 0;
- }
-
- public void setMultiple(boolean multiple) {
- setAttribute("multiple", multiple ? "multiple" : null);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getSize() {
- String size = getAttribute("size");
- if (size != null && size.length() > 0) {
- return Integer.parseInt(size);
- } else {
- return -1;
- }
- }
-
- public void setSize(int size) {
- setAttribute("size", Integer.toString(size));
- }
-
- public void add(HTMLElement element, HTMLElement before) {
- if (before == null) {
- insertBefore(element, getFirstChild());
- } else {
- insertBefore(element, before);
- }
- }
-
- public void remove(int index) {
- NodeList options = getElementsByTagName("OPTION");
- if (index < 0 || options.getLength() <= index)
- return;
- HTMLOptionElement opt = (HTMLOptionElement) options.item(index);
- opt.getParentNode().removeChild(opt);
- }
-
- /**
- * Does nothing.
- */
- public void blur() {
- }
-
- /**
- * does nothing.
- */
- public void focus() {
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHStyleElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHStyleElement.java
deleted file mode 100644
index 03c97f3..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHStyleElement.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLStyleElement;
-
-public class SHStyleElement extends SHElement implements HTMLStyleElement {
- protected SHStyleElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- /**
- * @return always false (For an application, override this method).
- */
- public boolean getDisabled() {
- return false;
- }
-
- /**
- * Does nothing.
- */
- public void setDisabled(boolean disabled) {
- }
-
- public String getMedia() {
- return getAttribute("media");
- }
-
- public void setMedia(String media) {
- setAttribute("media", media);
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public void setType(String type) {
- setAttribute("type", type);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableCaptionElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableCaptionElement.java
deleted file mode 100644
index 680dc64..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableCaptionElement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLTableCaptionElement;
-
-public class SHTableCaptionElement extends SHElement implements
- HTMLTableCaptionElement {
- protected SHTableCaptionElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableCellElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableCellElement.java
deleted file mode 100644
index 85b8f94..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableCellElement.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.html.HTMLTableCellElement;
-import org.w3c.dom.html.HTMLTableRowElement;
-
-public class SHTableCellElement extends SHElement implements
- HTMLTableCellElement {
- protected SHTableCellElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public int getCellIndex() {
- Node parent = getParentNode();
- if (parent instanceof HTMLTableRowElement) {
- int ret = 0;
- for (Node prev = getPreviousSibling(); prev != null; prev = prev
- .getPreviousSibling())
- ret++;
- return ret;
- } else { // error.
- int ret = 0;
- for (Node prev = getPreviousSibling(); prev != null
- && !(prev instanceof HTMLTableRowElement); prev = prev
- .getPreviousSibling())
- ret++;
- return ret;
- }
- }
-
- public void setCellIndex(int cellIndex) {
- if (cellIndex < 0)
- return;
- Node parent = getParentNode();
- if (parent instanceof HTMLTableRowElement) {
- parent.removeChild(this);
- NodeList siblings = parent.getChildNodes();
- if (siblings.getLength() <= cellIndex) {
- parent.insertBefore(this, null);
- } else {
- parent.insertBefore(this, siblings.item(cellIndex));
- }
- } else { // error.
- Node leftMost = this;
- int currentIndex = 0;
- for (Node prev = getPreviousSibling(); prev != null
- && !(prev instanceof HTMLTableRowElement); prev = prev
- .getPreviousSibling()) {
- leftMost = prev;
- currentIndex++;
- }
- parent.removeChild(this);
- Node before = leftMost;
- for (int i = 0; i < cellIndex; i++) {
- Node next = before.getNextSibling();
- if (next == null || next instanceof HTMLTableRowElement) { // out
- // of
- // bounds
- parent.insertBefore(this, null);
- return;
- } else {
- before = before.getNextSibling();
- }
- }
- parent.insertBefore(this, before);
- }
- }
-
- public String getAbbr() {
- return getAttribute("abbr");
- }
-
- public void setAbbr(String abbr) {
- setAttribute("abbr", abbr);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("aling", align);
- }
-
- public String getAxis() {
- return getAttribute("axis");
- }
-
- public void setAxis(String axis) {
- setAttribute("axis", axis);
- }
-
- public String getBgColor() {
- return getAttribute("bgcolor");
- }
-
- public void setBgColor(String bgColor) {
- setAttribute("bgcolor", bgColor);
- }
-
- public String getCh() {
- return getAttribute("char");
- }
-
- public void setCh(String ch) {
- setAttribute("char", ch);
- }
-
- public String getChOff() {
- return getAttribute("charoff");
- }
-
- public void setChOff(String chOff) {
- setAttribute("charoff", chOff);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getColSpan() {
- return Integer.parseInt(getAttribute("colspan"));
- }
-
- public void setColSpan(int colSpan) {
- setAttribute("colspan", Integer.toString(colSpan));
- }
-
- public String getHeaders() {
- return getAttribute("headers");
- }
-
- public void setHeaders(String headers) {
- setAttribute("headers", headers);
- }
-
- public String getHeight() {
- return getAttribute("height");
- }
-
- public void setHeight(String height) {
- setAttribute("height", height);
- }
-
- public boolean getNoWrap() {
- String val = getAttribute("nowrap");
- return val != null && val.length() != 0;
- }
-
- public void setNoWrap(boolean noWrap) {
- setAttribute("nowrap", noWrap ? "nowrap" : null);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getRowSpan() {
- return Integer.parseInt(getAttribute("rowspan"));
- }
-
- public void setRowSpan(int rowSpan) {
- setAttribute("rowspan", Integer.toString(rowSpan));
- }
-
- public String getScope() {
- return getAttribute("scope");
- }
-
- public void setScope(String scope) {
- setAttribute("scope", scope);
- }
-
- public String getVAlign() {
- return getAttribute("valign");
- }
-
- public void setVAlign(String vAlign) {
- setAttribute("valign", vAlign);
- }
-
- public String getWidth() {
- return getAttribute("width");
- }
-
- public void setWidth(String width) {
- setAttribute("width", width);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableColElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableColElement.java
deleted file mode 100644
index 8767e97..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableColElement.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLTableColElement;
-
-public class SHTableColElement extends SHElement implements HTMLTableColElement {
- protected SHTableColElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-
- public String getCh() {
- return getAttribute("char");
- }
-
- public void setCh(String ch) {
- setAttribute("char", ch);
- }
-
- public String getChOff() {
- return getAttribute("charoff");
- }
-
- public void setChOff(String chOff) {
- setAttribute("charoff", chOff);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getSpan() {
- return Integer.parseInt(getAttribute("span"));
- }
-
- public void setSpan(int span) {
- setAttribute("span", Integer.toString(span));
- }
-
- public String getVAlign() {
- return getAttribute("valign");
- }
-
- public void setVAlign(String vAlign) {
- setAttribute("valign", vAlign);
- }
-
- public String getWidth() {
- return getAttribute("width");
- }
-
- public void setWidth(String width) {
- setAttribute("width", width);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableElement.java
deleted file mode 100644
index 316ce2c..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableElement.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLCollection;
-import org.w3c.dom.html.HTMLElement;
-import org.w3c.dom.html.HTMLTableCaptionElement;
-import org.w3c.dom.html.HTMLTableElement;
-import org.w3c.dom.html.HTMLTableRowElement;
-import org.w3c.dom.html.HTMLTableSectionElement;
-
-public class SHTableElement extends SHElement implements HTMLTableElement {
- protected SHTableElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public HTMLTableCaptionElement getCaption() {
- for (Node ret = getFirstChild(); ret != null; ret = ret
- .getNextSibling()) {
- if (ret instanceof HTMLTableCaptionElement) {
- return (HTMLTableCaptionElement) ret;
- }
- }
- return null;
- }
-
- public void setCaption(HTMLTableCaptionElement caption) {
- insertBefore(caption, getFirstChild());
- }
-
- public HTMLTableSectionElement getTHead() {
- for (Node ret = getFirstChild(); ret != null; ret = ret
- .getNextSibling()) {
- if (ret instanceof HTMLTableSectionElement
- && ret.getNodeName().equalsIgnoreCase("THEAD")) {
- return (HTMLTableSectionElement) ret;
- }
- }
- return null;
- }
-
- public void setTHead(HTMLTableSectionElement tHead) {
- for (Node after = getFirstChild(); after != null; after = after
- .getNextSibling()) {
- if (after instanceof HTMLTableSectionElement) {
- insertBefore(tHead, after);
- }
- }
- insertBefore(tHead, getLastChild());
- }
-
- public HTMLTableSectionElement getTFoot() {
- for (Node ret = getFirstChild(); ret != null; ret = ret
- .getNextSibling()) {
- if (ret instanceof HTMLTableSectionElement
- && ret.getNodeName().equalsIgnoreCase("TFOOT")) {
- return (HTMLTableSectionElement) ret;
- }
- }
- return null;
- }
-
- public void setTFoot(HTMLTableSectionElement tFoot) {
- for (Node after = getFirstChild(); after != null; after = after
- .getNextSibling()) {
- if (after instanceof HTMLTableSectionElement
- && after.getNodeName().equalsIgnoreCase("TBODY")) {
- insertBefore(tFoot, after);
- }
- }
- insertBefore(tFoot, getLastChild());
- }
-
- public HTMLCollection getRows() {
- int len = 0;
- HTMLTableRowElement rows[] = new HTMLTableRowElement[16];
- for (Node child = getFirstChild(); child != null; child = child
- .getNextSibling()) {
- if (child instanceof HTMLTableSectionElement) {
- for (Node row = child.getFirstChild(); row != null; row = row
- .getNextSibling()) {
- if (row instanceof HTMLTableRowElement) {
- if (rows.length == len) {
- HTMLTableRowElement buf[] = new HTMLTableRowElement[len * 2];
- System.arraycopy(rows, 0, buf, 0, len);
- rows = buf;
- }
- rows[len++] = (HTMLTableRowElement) row;
- }
- }
- } else if (child instanceof HTMLTableRowElement) {
- if (rows.length == len) {
- HTMLTableRowElement buf[] = new HTMLTableRowElement[len * 2];
- System.arraycopy(rows, 0, buf, 0, len);
- rows = buf;
- }
- rows[len++] = (HTMLTableRowElement) child;
- }
- }
- return ((SHDocument) getOwnerDocument()).createCollection(rows, len);
- }
-
- public HTMLCollection getTBodies() {
- int len = 0;
- HTMLTableSectionElement tbodies[] = new HTMLTableSectionElement[16];
- for (Node child = getFirstChild(); child != null; child = child
- .getNextSibling()) {
- if (child instanceof HTMLTableSectionElement
- && child.getNodeName().equalsIgnoreCase("TBODY")) {
- if (tbodies.length == len) {
- HTMLTableSectionElement buf[] = new HTMLTableSectionElement[len * 2];
- System.arraycopy(tbodies, 0, buf, 0, len);
- tbodies = buf;
- }
- tbodies[len++] = (HTMLTableSectionElement) child;
- }
- }
- return ((SHDocument) getOwnerDocument()).createCollection(tbodies, len);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-
- public String getBgColor() {
- return getAttribute("bgcolor");
- }
-
- public void setBgColor(String bgColor) {
- setAttribute("bgcolor", bgColor);
- }
-
- public String getBorder() {
- return getAttribute("border");
- }
-
- public void setBorder(String border) {
- setAttribute("border", border);
- }
-
- public String getCellPadding() {
- return getAttribute("cellpadding");
- }
-
- public void setCellPadding(String cellPadding) {
- setAttribute("cellpadding", cellPadding);
- }
-
- public String getCellSpacing() {
- return getAttribute("cellspacing");
- }
-
- public void setCellSpacing(String cellSpacing) {
- setAttribute("cellspacing", cellSpacing);
- }
-
- public String getFrame() {
- return getAttribute("frame");
- }
-
- public void setFrame(String frame) {
- setAttribute("frame", frame);
- }
-
- public String getRules() {
- return getAttribute("rules");
- }
-
- public void setRules(String rules) {
- setAttribute("rules", rules);
- }
-
- public String getSummary() {
- return getAttribute("summary");
- }
-
- public void setSummary(String summary) {
- setAttribute("summary", summary);
- }
-
- public String getWidth() {
- return getAttribute("width");
- }
-
- public void setWidth(String width) {
- setAttribute("width", width);
- }
-
- /**
- * creates a THEAD element whose tagname is uppercased.
- */
- public HTMLElement createTHead() {
- return (HTMLElement) getOwnerDocument().createElement("THEAD");
- }
-
- public void deleteTHead() {
- for (Node tHead = getFirstChild(); tHead != null; tHead = tHead
- .getNextSibling()) {
- if (tHead instanceof HTMLTableSectionElement
- && tHead.getNodeName().equalsIgnoreCase("THEAD")) {
- removeChild(tHead);
- return;
- }
- }
- }
-
- /**
- * creates a TFOOT element whose tagname is uppercased.
- */
- public HTMLElement createTFoot() {
- return (HTMLElement) getOwnerDocument().createElement("TFOOT");
- }
-
- public void deleteTFoot() {
- for (Node tFoot = getFirstChild(); tFoot != null; tFoot = tFoot
- .getNextSibling()) {
- if (tFoot instanceof HTMLTableSectionElement
- && tFoot.getNodeName().equalsIgnoreCase("TFOOT")) {
- removeChild(tFoot);
- return;
- }
- }
- }
-
- /**
- * creates a CAPTION element whose tagname is uppercased.
- */
- public HTMLElement createCaption() {
- return (HTMLElement) getOwnerDocument().createElement("CAPTION");
- }
-
- public void deleteCaption() {
- for (Node caption = getFirstChild(); caption != null; caption = caption
- .getNextSibling()) {
- if (caption instanceof HTMLTableSectionElement
- && caption.getNodeName().equalsIgnoreCase("CAPTION")) {
- removeChild(caption);
- return;
- }
- }
- }
-
- /**
- * inserts a new empty row whose tagname is uppercased.
- */
- public HTMLElement insertRow(int index) {
- if (index < 0)
- return null;
- HTMLCollection rows = getRows();
- if (rows.getLength() <= index) {
- return null;
- } else {
- Node after = rows.item(index);
- Node parent = after.getParentNode();
- HTMLElement ret = (HTMLElement) getOwnerDocument().createElement(
- "TR");
- parent.insertBefore(ret, after);
- return ret;
- }
- }
-
- public void deleteRow(int index) {
- if (index < 0)
- return;
- HTMLCollection rows = getRows();
- if (rows.getLength() <= index)
- return;
- Node row = rows.item(index);
- row.getParentNode().removeChild(row);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableRowElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableRowElement.java
deleted file mode 100644
index bd4bf8d..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableRowElement.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLCollection;
-import org.w3c.dom.html.HTMLElement;
-import org.w3c.dom.html.HTMLTableCellElement;
-import org.w3c.dom.html.HTMLTableElement;
-import org.w3c.dom.html.HTMLTableRowElement;
-
-public class SHTableRowElement extends SHElement implements HTMLTableRowElement {
- protected SHTableRowElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public int getRowIndex() {
- Node table = getParentNode().getParentNode();
- if (table instanceof HTMLTableElement) {
- HTMLCollection rows = ((HTMLTableElement) table).getRows();
- for (int ret = 0; ret < rows.getLength(); ret++) {
- if (rows.item(ret) == this)
- return ret;
- }
- throw new RuntimeException("Internal DOM Implementation Error.");
- } else { // invalid dom structure.
- int ret = 0;
- for (Node prev = getPreviousSibling(); prev != null; prev = prev
- .getPreviousSibling()) {
- if (prev instanceof HTMLTableRowElement)
- ret++;
- }
- return ret;
- }
- }
-
- public void setRowIndex(int rowIndex) {
- if (rowIndex < 0)
- return;
- Node table = getParentNode().getParentNode();
- if (table instanceof HTMLTableElement) {
- getParentNode().removeChild(this);
- HTMLCollection rows = ((HTMLTableElement) table).getRows();
- if (rows.getLength() < rowIndex)
- return;
- Node after = rows.item(rowIndex);
- Node newParent = after.getParentNode();
- newParent.insertBefore(this, after);
- } else { // invalid dom structure.
- Node after = getParentNode().getFirstChild();
- int count = 0;
- while (count < rowIndex && after != null) {
- if (after instanceof HTMLTableRowElement) {
- count++;
- }
- after = after.getNextSibling();
- }
- if (after == null)
- return;
- getParentNode().removeChild(this);
- after.getParentNode().insertBefore(this, after);
- }
- }
-
- public int getSectionRowIndex() {
- int ret = 0;
- for (Node prev = getPreviousSibling(); prev != null; prev = prev
- .getPreviousSibling()) {
- if (prev instanceof HTMLTableRowElement) {
- ret++;
- }
- }
- return ret;
- }
-
- public void setSectionRowIndex(int sectionRowIndex) {
- if (sectionRowIndex < 0)
- return;
- Node after = getParentNode().getFirstChild();
- int count = 0;
- while (count < sectionRowIndex && after != null) {
- if (after instanceof HTMLTableRowElement) {
- count++;
- }
- after = after.getNextSibling();
- }
- if (after == null)
- return;
- getParentNode().removeChild(this);
- after.getParentNode().insertBefore(this, after);
- }
-
- public HTMLCollection getCells() {
- int len = 0;
- HTMLTableCellElement cells[] = new HTMLTableCellElement[8];
- for (Node child = getFirstChild(); child != null; child = child
- .getNextSibling()) {
- if (child instanceof HTMLTableCellElement) {
- if (cells.length == len) {
- HTMLTableCellElement buf[] = new HTMLTableCellElement[len * 2];
- System.arraycopy(cells, 0, buf, 0, len);
- cells = buf;
- }
- cells[len++] = (HTMLTableCellElement) child;
- }
- }
- return ((SHDocument) getOwnerDocument()).createCollection(cells, len);
- }
-
- public void setCells(HTMLCollection cells) {
- while (hasChildNodes())
- removeChild(getFirstChild());
- for (int i = 0; i < cells.getLength(); i++) {
- insertBefore(cells.item(i), null);
- }
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-
- public String getBgColor() {
- return getAttribute("bgcolor");
- }
-
- public void setBgColor(String bgColor) {
- setAttribute("bgcolor", bgColor);
- }
-
- public String getCh() {
- return getAttribute("char");
- }
-
- public void setCh(String ch) {
- setAttribute("char", ch);
- }
-
- public String getChOff() {
- return getAttribute("charoff");
- }
-
- public void setChOff(String chOff) {
- setAttribute("charoff", chOff);
- }
-
- public String getVAlign() {
- return getAttribute("valing");
- }
-
- public void setVAlign(String vAlign) {
- setAttribute("valing", vAlign);
- }
-
- /**
- * Insert an empty <code>TD</code> cell whose tagname is uppercased into
- * this row.
- */
- public HTMLElement insertCell(int index) {
- if (index < 0)
- return null;
- Node after = getFirstChild();
- int i = 0;
- while (i < index && after != null) {
- after = after.getNextSibling();
- i++;
- }
- if (after == null && i != 0)
- return null;
- HTMLElement ret = (HTMLElement) getOwnerDocument().createElement("TD");
- insertBefore(ret, after);
- return ret;
- }
-
- public void deleteCell(int index) {
- if (index < 0)
- return;
- Node target = getFirstChild();
- for (int i = 0; i < index; i++) {
- if (target == null)
- return;
- }
- removeChild(target);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableSectionElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableSectionElement.java
deleted file mode 100644
index 873d86d..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTableSectionElement.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLCollection;
-import org.w3c.dom.html.HTMLElement;
-import org.w3c.dom.html.HTMLTableRowElement;
-import org.w3c.dom.html.HTMLTableSectionElement;
-
-public class SHTableSectionElement extends SHElement implements
- HTMLTableSectionElement {
- protected SHTableSectionElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public String getAlign() {
- return getAttribute("align");
- }
-
- public void setAlign(String align) {
- setAttribute("align", align);
- }
-
- public String getCh() {
- return getAttribute("char");
- }
-
- public void setCh(String ch) {
- setAttribute("char", ch);
- }
-
- public String getChOff() {
- return getAttribute("charoff");
- }
-
- public void setChOff(String chOff) {
- setAttribute("charoff", chOff);
- }
-
- public String getVAlign() {
- return getAttribute("valign");
- }
-
- public void setVAlign(String vAlign) {
- setAttribute("valign", vAlign);
- }
-
- public HTMLCollection getRows() {
- int len = 0;
- HTMLTableRowElement rows[] = new HTMLTableRowElement[8];
- for (Node child = getFirstChild(); child != null; child = child
- .getNextSibling()) {
- if (child instanceof HTMLTableRowElement) {
- if (rows.length == len) {
- HTMLTableRowElement buf[] = new HTMLTableRowElement[len * 2];
- System.arraycopy(rows, 0, buf, 0, len);
- rows = buf;
- }
- rows[len++] = (HTMLTableRowElement) child;
- }
- }
- return ((SHDocument) getOwnerDocument()).createCollection(rows, len);
- }
-
- /**
- * inserts a new row element whose tag name is uppercased.
- */
- public HTMLElement insertRow(int index) {
- if (index < 0)
- return null;
- int i = 0;
- for (Node after = getFirstChild(); after != null; after = after
- .getNextSibling()) {
- if (i == index) {
- HTMLElement ret = (HTMLElement) getOwnerDocument()
- .createElement("TR");
- insertBefore(ret, after);
- return ret;
- } else {
- i++;
- }
- }
- if (i == 0) {
- HTMLElement ret = (HTMLElement) getOwnerDocument().createElement(
- "TR");
- insertBefore(ret, null);
- return ret;
- }
- return null;
- }
-
- public void deleteRow(int index) {
- if (index < 0)
- return;
- int i = 0;
- for (Node child = getFirstChild(); child != null; child = child
- .getNextSibling()) {
- if (i == index) {
- removeChild(child);
- return;
- } else {
- i++;
- }
- }
- return;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTextAreaElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTextAreaElement.java
deleted file mode 100644
index aa1056d..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTextAreaElement.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLTextAreaElement;
-
-public class SHTextAreaElement extends SHFormCtrlElement implements
- HTMLTextAreaElement {
- protected SHTextAreaElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-
- private String defaultValue;
-
- public String getDefaultValue() {
- return this.defaultValue;
- }
-
- public void setDefaultValue(String defaultValue) {
- this.defaultValue = defaultValue;
- }
-
- public String getAccessKey() {
- return getAttribute("accesskey");
- }
-
- public void setAccessKey(String accessKey) {
- setAttribute("accesskey", accessKey);
- }
-
- /**
- * @exception NumberFormatException
- */
- public int getCols() {
- return Integer.parseInt(getAttribute("cols"));
- }
-
- public void setCols(int cols) {
- setAttribute("cols", Integer.toString(cols));
- }
-
- public boolean getReadOnly() {
- String val = getAttribute("readonly");
- return val != null && val.length() != 0;
- }
-
- public void setReadOnly(boolean readOnly) {
- setAttribute("readonly", readOnly ? "readonly" : null);
- }
-
- public int getRows() {
- return Integer.parseInt(getAttribute("rows"));
- }
-
- public void setRows(int rows) {
- setAttribute("rows", Integer.toString(rows));
- }
-
- public String getType() {
- return "textarea";
- }
-
- private String value;
-
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- /**
- * Does nothing. Override this method.
- */
- public void blur() {
- }
-
- /**
- * Does nothing. Override this method.
- */
- public void focus() {
- }
-
- /**
- * Does nothing. Override this method.
- */
- public void select() {
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTitleElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTitleElement.java
deleted file mode 100644
index dcfa2ab..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHTitleElement.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLTitleElement;
-
-public class SHTitleElement extends SHElement implements HTMLTitleElement {
- public String getText() {
- String tmpS = "";
- if (hasChildNodes()) {
- Node firstChild = getFirstChild();
- if (firstChild.getNodeType() == Node.TEXT_NODE) {
- tmpS = getFirstChild().getNodeValue();
- }
- }
- return tmpS;
- }
-
- public void setText(String text) {
- boolean flag = false;
- if (hasChildNodes()) {
- Node firstChild = getFirstChild();
- if (firstChild.getNodeType() == Node.TEXT_NODE) {
- firstChild.setNodeValue(text);
- } else {
- flag = true;
- }
- } else {
- flag = true;
- }
- if (flag) {
- insertBefore(getOwnerDocument().createTextNode("text"),
- getFirstChild());
- }
- }
-
- protected SHTitleElement(String tagName, SHDocument doc) {
- super(tagName, doc);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHUListElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHUListElement.java
deleted file mode 100644
index 6b1886c..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/impl/SHUListElement.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.impl;
-
-import org.w3c.dom.html.HTMLUListElement;
-
-public class SHUListElement extends SHElement implements HTMLUListElement {
- protected SHUListElement(String name, SHDocument doc) {
- super(name, doc);
- }
-
- public boolean getCompact() {
- String val = getAttribute("compact");
- return val != null && val.length() != 0;
- }
-
- public void setCompact(boolean compact) {
- setAttribute("compact", compact ? "compact" : null);
- }
-
- public String getType() {
- return getAttribute("type");
- }
-
- public void setType(String type) {
- setAttribute("type", type);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/internal/util/JapaneseEncodingDetector.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/internal/util/JapaneseEncodingDetector.java
deleted file mode 100644
index 8febf03..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/internal/util/JapaneseEncodingDetector.java
+++ /dev/null
@@ -1,621 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.html.internal.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Vector;
-
-//
-// one-byte katakana
-// one-byte katakana with not EUC code -> mihgt be one-byte katakana
-//
-// EUC1st=0x8f -> two trailers (same code region)
-//
-// duplicated (org.eclipse.actf.util.JED)
-
-/*
- * information
- *
- * currently ignore vendor specific EUC chars currently ignore reserved word of
- * SJIS (0xF0-0xfc)
- *
- * Other JIS Escape sequence(start) "ESC $ @" 0x1b 0x24 0x40 "ESC & @ ESC $ B"
- * 0x1b 0x26 0x40 0x1b 0x24 0x42 "ESC $ ( D" 0x1b 0x24 0x28 0x44 etc.
- *
- * Escape sequence(fin) "ESC ( J" "ESC ( H" "ESC ( B" "ESC ( I" etc.
- */
-
-public class JapaneseEncodingDetector {
- public static final int J_SJIS = 0;
-
- public static final int J_EUC = 1;
-
- public static final int J_JIS = 2;
-
- public static final int J_MIX = 3;
-
- public static final int J_UTF8 = 4;
-
- public static final int LATIN1 = 5;
-
- // TODO SJIS, EUC_JP, ISO2022JP
- public static final String JIS = "ISO-2022-JP";
-
- public static final String EUC = "EUC-JP";
-
- public static final String SJIS = "Shift_JIS";
-
- public static final String UTF_8 = "UTF-8";
-
- public static final String ISO_8859_1 = "ISO-8859-1";
-
- // JIS escape sequence
- //
- // "Esc $ B"
- private static final byte JIS_ESCAPE = (byte) 0x1b;// Esc
-
- private static final byte JIS_DOUBLE = (byte) 0x24;// $ double-byte
-
- private static final byte JIS_SINGLE = (byte) 0x28;// ( single-byte
-
- private static final byte JIS_B = (byte) 0x42;// B new-JIS
-
- private static final byte JIS_AT = (byte) 0x40;// @ old-JIS
-
- private static final byte JIS_D = (byte) 0x44;// D JIS-sup
-
- private static final byte JIS_J = (byte) 0x4A;// J JIS-roma
-
- private static final byte JIS_I = (byte) 0x49;// I JIS-ASCII
-
- // private static final byte JIS_S_PAYLOAD_BEGIN = (byte)0x20;
- // private static final byte JIS_S_PAYLOAD_END = (byte)0x7e;
-
- private static final byte JIS_KANA_PAYLOAD_BEGIN = (byte) 0x21;
-
- private static final byte JIS_KANA_PAYLOAD_END = (byte) 0x5f;
-
- private static final byte JIS_D_PAYLOAD_BEGIN = (byte) 0x21;
-
- private static final byte JIS_D_PAYLOAD_END = (byte) 0x7E;
-
- // EUC
- private static final byte E_KANA_1ST = (byte) 0x8e; // 2nd a1-df
-
- private static final byte E_HOJO_1ST = (byte) 0x8f; // 2byte payload
-
- private static final byte E_KISYU_1ST = (byte) 0xa0; // 2nd, 3rd payload?
-
- private static final byte E_KANJI_BEGIN = (byte) 0xa1; // 2nd,3rd payload
-
- private static final byte E_KANJI_END = (byte) 0xfe;
-
- private static final byte E_KANA_BEGIN = (byte) 0xa1; // kana payload
-
- private static final byte E_KANA_END = (byte) 0xdf; // kana payload
-
- private static final byte E_PAYLOAD_BEGIN = (byte) 0xa0;
-
- private static final byte E_PAYLOAD_END = (byte) 0xff;
-
- // SJIS
- private static final byte S1st1begin = (byte) 0x81;
-
- private static final byte S1st1end = (byte) 0x9f;
-
- private static final byte S1st2begin = (byte) 0xe0;
-
- private static final byte S1st2end = (byte) 0xef;
-
- private static final byte S2nd1begin = (byte) 0x40;
-
- private static final byte S2nd1end = (byte) 0x7e;
-
- private static final byte S2nd2begin = (byte) 0x80;
-
- private static final byte S2nd2end = (byte) 0xfc;
-
- // SJIS kana
- private static final byte Skanabegin = (byte) 0xa1;
-
- private static final byte Skanaend = (byte) 0xdf;
-
- // UTF-8
- private static final byte ASCII_BEGIN = (byte) 0x00;
-
- private static final byte ASCII_END = (byte) 0x7F;
-
- private static final byte U_2BYTE_BEGIN = (byte) 0xc0;
-
- private static final byte U_2BYTE_END = (byte) 0xdf;
-
- private static final byte U_3BYTE_BEGIN = (byte) 0xe0;
-
- private static final byte U_3BYTE_END = (byte) 0xef;
-
- private static final byte U_4BYTE_BEGIN = (byte) 0xf0;
-
- private static final byte U_4BYTE_END = (byte) 0xf7;
-
- private static final byte U_PAYLOAD_BEGIN = (byte) 0x80;
-
- private static final byte U_PAYLOAD_END = (byte) 0xbf;
-
- // ISO-8859-1 (Latin1)
- private static final byte LATIN_BEGIN = (byte) 0xa0;
-
- private static final byte LATIN_END = (byte) 0xff;
-
- private byte buf[] = new byte[8192];
-
- private int length;
-
- private int errorJIS;
-
- private int errorUTF8;
-
- private int errorLATIN1;
-
- private int errorSJIS;
-
- private int errorEUC;
-
- private InputStream is;
-
- private Vector<Integer> eucRemoveV = new Vector<Integer>();
-
- public JapaneseEncodingDetector(InputStream is) {
- this.is = is;
- }
-
- private String toString(int ret) {
- switch (ret) {
- case J_UTF8:
- return (UTF_8);
- case J_JIS:
- return (JIS);
- case J_EUC:
- return (EUC);
- case LATIN1:
- return (ISO_8859_1);
- case J_SJIS:
- default:
- return (SJIS);
- }
- }
-
- public InputStream getInputStream() {
- return (new ByteArrayInputStream(buf, 0, length));
- }
-
- public int getLength() {
- return length;
- }
-
- public byte[] getByteBuf() {
- byte bytebuf[] = new byte[length];
- System.arraycopy(buf, 0, bytebuf, 0, length);
- return (bytebuf);
- }
-
- private void removeKisyuIzonEUC() {
- for (int i = eucRemoveV.size() - 1; i > -1; i--) {
- byte bytebuf[] = new byte[length - 2];
- int index = ((Integer) eucRemoveV.get(i)).intValue();
- System.arraycopy(buf, 0, bytebuf, 0, index);
- System
- .arraycopy(buf, index + 2, bytebuf, index, length - index
- - 2);
- buf = bytebuf;
- // length = index;
- length = length - 2;
- }
- }
-
- private boolean isJIS(byte[] target, int length) {
- int index = 0;
- byte b;
-
- boolean inSingle = true;
- boolean inKana = false;
- boolean inKanji = false;
- boolean hasEscape = false;
-
- for (b = buf[index]; index < length; b = buf[index]) {
- if (b == JIS_ESCAPE && index + 2 < length) {
- byte c = buf[index + 1];
- byte d = buf[index + 2];
- if (c == JIS_SINGLE) {
- switch (d) {
- case JIS_B:
- case JIS_J:
- inSingle = true;
- inKana = false;
- inKanji = false;
- index += 3;
- hasEscape = true;
- break;
- case JIS_I:
- inKana = true;
- inSingle = false;
- inKanji = false;
- index += 3;
- hasEscape = true;
- break;
- default:
- errorJIS++;
- index++;
- }
- } else if (c == JIS_DOUBLE) {
- switch (d) {
- case JIS_AT:
- case JIS_B:
- case JIS_D:
- inKanji = true;
- inSingle = false;
- inKana = false;
- index += 3;
- hasEscape = true;
- break;
- default:
- errorJIS++;
- index++;
- }
- } else {
- errorJIS++;
- index++;
- }
- } else {
- if (inKanji && index + 1 < length && isPayloadJISkanji(b)
- && isPayloadJISkanji(buf[index + 1])) {
- index += 2;
- } else if (inSingle && isASCII(b)) {
- index++;
- } else if (inKana && isPayloadJISkana(b)) {
- index++;
- } else {
- errorJIS++;
- index++;
- }
- }
- }
-
- // System.out.println("JIS : "+errorJIS+" "+hasEscape);
-
- return (errorJIS == 0 && hasEscape);
- // return true;
- }
-
- private boolean isUTF8(byte[] target, int length) {
- int index = 0;
- byte b;
- for (b = buf[index]; index < length; b = buf[index]) {
- if (isASCII(b)) {
- index++;
- } else if (is2byteUTF8(b) && index + 1 < length) {
- if (isPayloadUTF8(buf[index + 1])) {
- index += 2;
- } else {
- errorUTF8++;
- index++;
- // return (false);
- }
- } else if (is3byteUTF8(b) && index + 2 < length) {
- if (isPayloadUTF8(buf[index + 1])
- && isPayloadUTF8(buf[index + 2])) {
- index += 3;
- } else {
- errorUTF8++;
- index++;
- // return (false);
- }
- } else if (is4byteUTF8(b) && index + 3 < length) {
- if (isPayloadUTF8(buf[index + 1])
- && isPayloadUTF8(buf[index + 2])
- && isPayloadUTF8(buf[index + 3])) {
- index += 4;
- } else {
- errorUTF8++;
- index++;
- // return (false);
- }
- } else {
- errorUTF8++;
- index++;
- // return (false);
- }
- }
-
- return (errorUTF8 == 0);
- // return true;
- }
-
- private boolean isLATIN1(byte[] target, int length) {
- int index = 0;
- byte b;
- for (b = buf[index]; index < length; b = buf[index]) {
- if (isASCII(b) || isLATIN1(b)) {
- index++;
- } else {
- index++;
- errorLATIN1++;
- }
- }
-
- return (errorLATIN1 == 0);
- // return true;
- }
-
- private boolean isSJIS(byte[] target, int length) {
- int index = 0;
-
- byte b;
- for (b = buf[index]; index < length; b = buf[index]) {
- if (isASCII(b) || isSJISkana(b)) {
- index++;
- } else if (isSJIS1st(b) && index + 1 < length) {
- if (isSJIS2nd(buf[index + 1])) {
- index += 2;
- } else {
- index++;
- errorSJIS++;
- }
- } else {
- index++;
- errorSJIS++;
- }
- }
-
- return (errorSJIS == 0);
-
- }
-
- private boolean isEUC(byte[] target, int length) {
- int index = 0;
-
- byte b;
- for (b = buf[index]; index < length; b = buf[index]) {
- if (isASCII(b)) {
- index++;
- } else if (isEUCkanji(b) && index + 1 < length) {
- if (isPayloadEUC(buf[index + 1])) {
- index += 2;
- } else {
- index++;
-
- // System.out.println("a");
- errorEUC++;
- }
- } else if (isEUCkana(b) && index + 1 < length) {
- if (isKanaPayloadEUC(buf[index + 1])) {
- index += 2;
- } else {
- index++;
- // System.out.println("b");
- errorEUC++;
- }
- } else if (isEUChojo(b) && index + 2 < length) {
- if (isPayloadEUC(buf[index + 1])
- && isPayloadEUC(buf[index + 2])) {
- index += 3;
- } else {
- index++;
- // System.out.println("c");
- errorEUC++;
- }
- } else if (isEUCKisyu(b) && index + 1 < length) {
- if (isPayloadEUC(buf[index + 1])) {
- eucRemoveV.add(new Integer(index));
- index += 2;
- } else {
- index++;
- // System.out.println("d");
- errorEUC++;
- }
- } else {
- index++;
- // System.out.println("e:"+b+" "+buf[index]);
- errorEUC++;
- }
- }
-
- // System.out.println(errorEUC);
-
- return (errorEUC == 0);
-
- }
-
- public String detect() throws IOException {
- length = 0;
- errorJIS = 0;
- errorUTF8 = 0;
- errorLATIN1 = 0;
- errorSJIS = 0;
- errorEUC = 0;
-
- for (int len = is.read(buf, length, buf.length - length); len > 0;) {
- length += len;
- if (length == buf.length) {
- byte newBuf[] = new byte[length + 8192];
- System.arraycopy(buf, 0, newBuf, 0, length);
- buf = newBuf;
- }
- len = is.read(buf, length, buf.length - length);
- }
- // byte c, d, e;
- int ret = J_SJIS;
-
- // Check Kanji Character set SJIS/JIS/EUC
- // boolean isJis = false;
- int nSJisError = 0;
- int nEucError = 0;
-
- // int nSJis = 0;
- // int nEuc = 0;
- // int count = 0;
- //
- // int index = 0;
- // int tmp_length = length - 2;
- // System.out.println("AutoDetect: "+length);
-
- // TODO
- // for (c = buf[index++]; index < tmp_length; c = buf[index++]) {
- //
- // if ((c == JIS_ESCAPE)
- // && ((d = buf[index]) == JIS_DOUBLE)
- // && ((e = buf[index + 1]) == JIS_B)) {
- // isJis = true;
- // ret = J_JIS;
- // break;
- // }
- // }
-
- if (isJIS(buf, length)) {
- ret = J_JIS;
- return (toString(ret));
- }
-
- if (isUTF8(buf, length)) {
- ret = J_UTF8;
- return (toString(ret));
- }
-
- if (isSJIS(buf, length)) {
- ret = J_SJIS;
- return (toString(ret));
- } else if (isEUC(buf, length)) {
- ret = J_EUC;
-
- removeKisyuIzonEUC();
-
- return (toString(ret));
- } else if (isLATIN1(buf, length)) {
- ret = LATIN1;
- return (toString(ret));
- }
-
- System.out.println("SJIS: " + errorSJIS + "(" + nSJisError + ") EUC: "
- + errorEUC + "(" + nEucError + ") UTF-8: " + errorUTF8
- + " LATIN1: " + errorLATIN1 + " JIS: " + errorJIS);
-
- ret = J_UTF8;
- if (errorSJIS < 100 && errorSJIS < errorEUC && errorSJIS < errorUTF8
- && errorSJIS < errorLATIN1 && errorSJIS < errorJIS) {
- ret = J_SJIS;
- } else if (errorEUC < 100 && errorEUC < errorSJIS
- && errorEUC < errorUTF8 && errorEUC < errorLATIN1
- && errorEUC < errorJIS) {
-
- removeKisyuIzonEUC();
-
- ret = J_EUC;
- } else if (errorLATIN1 < 100 && errorLATIN1 < errorSJIS
- && errorLATIN1 < errorEUC && errorLATIN1 < errorUTF8
- && errorLATIN1 < errorJIS) {
- ret = LATIN1;
- } else if (errorJIS < 100 && errorJIS < errorSJIS
- && errorJIS < errorEUC && errorJIS < errorUTF8
- && errorJIS < errorLATIN1) {
- ret = J_JIS;
- }
- System.out.println("estimation: " + toString(ret));
- return (toString(ret));
- }
-
- private boolean isPayloadJISkanji(byte c) {
- return (JIS_D_PAYLOAD_BEGIN <= c && c <= JIS_D_PAYLOAD_END);
- }
-
- private boolean isPayloadJISkana(byte c) {
- return (JIS_KANA_PAYLOAD_BEGIN <= c && c <= JIS_KANA_PAYLOAD_END);
- }
-
- private boolean isEUCkana(byte c) {
- return (c == E_KANA_1ST);
- }
-
- private boolean isEUCkanji(byte c) {
- return (E_KANJI_BEGIN <= c && c <= E_KANJI_END);
- }
-
- private boolean isEUChojo(byte c) {
- return (c == E_HOJO_1ST);
- }
-
- private boolean isEUCKisyu(byte c) {
- return (c == E_KISYU_1ST);
- }
-
-// private boolean isEUC1st(byte c) {
-// return (c == E_KANA_1ST || c == E_HOJO_1ST || (E_KANJI_BEGIN <= c && c <= E_KANJI_END));
-// }
-
- private boolean isPayloadEUC(byte c) {
- return (E_PAYLOAD_BEGIN <= c && c <= E_PAYLOAD_END);
- }
-
- private boolean isKanaPayloadEUC(byte c) {
- return (E_KANA_BEGIN <= c && c <= E_KANA_END);
- }
-
- private boolean isSJIS1st(byte c) {
- return ((S1st1begin <= c && c <= S1st1end) || (S1st2begin <= c && c <= S1st2end));
- }
-
- private boolean isSJISkana(byte c) {
- return (Skanabegin <= c && c <= Skanaend);
- }
-
- private boolean isSJIS2nd(byte c) {
- return ((S2nd1begin <= c && c <= S2nd1end) || (S2nd2begin <= c && c <= S2nd2end));
- }
-
- private boolean isASCII(byte c) {
- return (ASCII_BEGIN <= c && c <= ASCII_END);
- }
-
- private boolean isLATIN1(byte c) {
- return (LATIN_BEGIN <= c && c <= LATIN_END);
- }
-
- private boolean is2byteUTF8(byte c) {
- return (U_2BYTE_BEGIN <= c && c <= U_2BYTE_END);
- }
-
- private boolean is3byteUTF8(byte c) {
- return (U_3BYTE_BEGIN <= c && c <= U_3BYTE_END);
- }
-
- private boolean is4byteUTF8(byte c) {
- return (U_4BYTE_BEGIN <= c && c <= U_4BYTE_END);
- }
-
- private boolean isPayloadUTF8(byte c) {
- return (U_PAYLOAD_BEGIN <= c && c <= U_PAYLOAD_END);
- }
-
- public static void main(String args[]) {
- String target = "tmp/jed.html";
-
- try {
- InputStream is = new FileInputStream(target);
- JapaneseEncodingDetector JED = new JapaneseEncodingDetector(is);
- System.out.println(JED.detect());
- // JED.detect2();
- } catch (Exception e2) {
- e2.printStackTrace();
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/internal/util/RereadableInputStream.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/internal/util/RereadableInputStream.java
deleted file mode 100644
index 14f5ade..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/internal/util/RereadableInputStream.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.internal.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-public class RereadableInputStream extends InputStream {
- private InputStream in;
-
- private byte buf[] = new byte[10000];
-
- private int bufSiz = 0, index = 0;
-
- private boolean buffering = true, normal = false;
-
- public RereadableInputStream(InputStream in) {
- this.in = in;
- }
-
- public void close() throws IOException {
- if (normal) {
- in.close();
- }
-
- }
-
- public int read() throws IOException {
- if (buffering) {
- int ret = in.read();
- if (bufSiz == buf.length) {
- buffering = false;
- normal = true;
- } else {
- buf[bufSiz++] = (byte) ret;
- }
- return ret;
- } else if (normal) {
- return in.read();
- } else {
- int ret = buf[index++];
- if (index == bufSiz) {
- normal = true;
- buf = null;
- }
- return ret;
- }
- }
-
- public int read(byte b[]) throws IOException {
- return read(b, 0, b.length);
- }
-
- public int read(byte b[], int off, int len) throws IOException {
- if (buffering) {
- int ret = in.read(b, off, len);
- if (bufSiz + ret < buf.length) {
- for (int i = 0; i < ret; i++)
- buf[bufSiz + i] = b[off + i];
- bufSiz += ret;
- } else {
- buffering = false;
- normal = true;
- }
- return ret;
- } else if (normal) {
- return in.read(b, off, len);
- } else {
- int ret;
- for (ret = 0; ret < b.length && index < bufSiz; ret++, index++) {
- b[ret] = buf[index];
- }
- if (index == bufSiz) {
- normal = true;
- buf = null;
- }
- return ret;
- }
- }
-
- public void reset() throws IOException {
- if (buffering == false) {
- throw new IOException("Cannot reset " + this);
- }
- buffering = false;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/internal/util/UnsynchronizedHashtable.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/internal/util/UnsynchronizedHashtable.java
deleted file mode 100644
index 9f8665a..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/internal/util/UnsynchronizedHashtable.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.internal.util;
-
-import org.eclipse.actf.model.dom.html.impl.Constructor;
-
-public class UnsynchronizedHashtable {
- class Entry {
- String key;
-
- Constructor val;
-
- Entry next;
- }
-
- private Entry table[] = new Entry[256];
-
- private int hashCode(char key[]) {
- int ret = 0;
- for (int i = key.length - 1; i >= 0; i--) {
- ret = 25 * ret + (key[i] & 0x1f) - 1;
- }
- return ret;
- }
-
- public final Constructor get(String key) {
- char str[] = key.toCharArray();
- for (Entry entry = table[0xff & hashCode(str)]; entry != null; entry = entry.next) {
- String entryKey = entry.key;
- if (entryKey.equalsIgnoreCase(key))
- return entry.val;
- }
- return null;
- }
-
- public final void put(String key, Constructor val) {
- char str[] = key.toCharArray();
- Entry entry = new Entry();
- entry.key = key;
- entry.val = val;
- int index = 0xff & hashCode(str);
- entry.next = table[index];
- table[index] = entry;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/public_entities.properties b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/public_entities.properties
deleted file mode 100644
index 1d6eb72..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/public_entities.properties
+++ /dev/null
@@ -1,48 +0,0 @@
-###############################################################################
-# Copyright (c) 1998, 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
-###############################################################################
-#
-# Map of public entities to its file
-# HTML4.01
--//W3C//DTD@HTML@4.01@Transitional//EN=loose.dtd
--//W3C//DTD@HTML@4.01@Frameset//EN=frameset.dtd
--//W3C//DTD@HTML@4.01//EN=strict.dtd
--//W3C//ENTITIES@Latin1//EN//HTML=HTMLlat1.ent
--//W3C//ENTITIES@Symbols//EN//HTML=HTMLsymbol.ent
--//W3C//ENTITIES@Special//EN//HTML=HTMLspecial.ent
-# HTML4.0
--//W3C//DTD@HTML@4.0@Transitional//EN=loose400.dtd
--//W3C//DTD@HTML@4.0@Frameset//EN=frameset400.dtd
--//W3C//DTD@HTML@4.0//EN=strict400.dtd
-# entities are exactly the same as that of 4.01
-
-# HTML3.2
--//W3C//DTD@HTML@3.2@Final//EN=HTML32.dtd
--//W3C//DTD@HTML@3.2//EN=HTML32.dtd
-ISO@8879-1986//ENTITIES@Added@Latin@1//EN//HTML=ISOlat1.ent
-
-# HTML2.0
--//IETF//DTD@HTML//EN=html.dtd
--//IETF//DTD@HTML@2.0//EN=html.dtd
--//IETF//DTD@HTML@Level@2//EN=html.dtd
--//IETF//DTD@HTML@2.0@Level@2//EN=html.dtd
--//IETF//DTD@HTML@Level@1//EN=html-1.dtd
--//IETF//DTD@HTML@2.0@Level@1//EN=html-1.dtd
--//IETF//DTD@HTML@Strict//EN=html-s.dtd
--//IETF//DTD@HTML@2.0@Strict//EN=html-s.dtd
--//IETF//DTD@HTML@Strict@Level@2//EN=html-s.dtd
--//IETF//DTD@HTML@2.0@Strict@Level@2//EN=html-s.dtd
--//IETF//DTD@HTML@Strict@Level@1//EN=html-1s.dtd
--//IETF//DTD@HTML@2.0@Strict@Level@1//EN=html-1s.dtd
-# from HTML2.0, it's overlapped
-# ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML=ISOlat1.sgml
-
-# Compact HTML
--//W3C//DTD@Compact@HTML@1.0@Draft//EN=compact.dtd
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/util/HTML2PlainText.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/util/HTML2PlainText.java
deleted file mode 100644
index 78c1fd4..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/util/HTML2PlainText.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.util;
-
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-
-import org.eclipse.actf.model.dom.html.HTMLParser;
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLBRElement;
-import org.w3c.dom.html.HTMLDListElement;
-import org.w3c.dom.html.HTMLDirectoryElement;
-import org.w3c.dom.html.HTMLDivElement;
-import org.w3c.dom.html.HTMLDocument;
-import org.w3c.dom.html.HTMLElement;
-import org.w3c.dom.html.HTMLFieldSetElement;
-import org.w3c.dom.html.HTMLFormElement;
-import org.w3c.dom.html.HTMLHRElement;
-import org.w3c.dom.html.HTMLHeadingElement;
-import org.w3c.dom.html.HTMLImageElement;
-import org.w3c.dom.html.HTMLIsIndexElement;
-import org.w3c.dom.html.HTMLLIElement;
-import org.w3c.dom.html.HTMLMenuElement;
-import org.w3c.dom.html.HTMLOListElement;
-import org.w3c.dom.html.HTMLParagraphElement;
-import org.w3c.dom.html.HTMLPreElement;
-import org.w3c.dom.html.HTMLTableElement;
-import org.w3c.dom.html.HTMLTableRowElement;
-import org.w3c.dom.html.HTMLUListElement;
-
-
-public class HTML2PlainText {
- private static final String lineSeparator = "\n";
-
- private HTMLDocument htdoc;
-
- private boolean image = false;
-
- public void includeImages(boolean b) {
- this.image = b;
- }
-
- public HTML2PlainText(HTMLDocument htdoc) {
- this.htdoc = htdoc;
- }
-
- private int stack[] = new int[256];
-
- private int sp = -1;
-
- private void pre(HTMLElement element, StringWriter writer) {
- if (element instanceof HTMLOListElement) {
- stack[++sp] = 1;
- } else if (element instanceof HTMLUListElement) {
- stack[++sp] = 0;
- } else if (element instanceof HTMLLIElement) {
- StringBuffer pre = new StringBuffer(lineSeparator);
- for (int i = sp; i > 0; i--)
- pre.append(' ');
- writer.write(pre.toString());
- if (element.getParentNode() instanceof HTMLOListElement) {
- writer.write(stack[sp] + ". ");
- stack[sp]++;
- } else {
- writer.write("- ");
- }
- } else if (element instanceof HTMLHRElement) {
- writer.write(lineSeparator
- + "----------------------------------------"
- + lineSeparator);
- } else if (element instanceof HTMLBRElement || isBlockElement(element)) {
- writer.write(lineSeparator);
- } else if (element instanceof HTMLImageElement) {
- if (image) {
- writer.write(element.toString());
- } else {
- String alt = ((HTMLImageElement) element).getAlt();
- if (alt != null && alt.length() > 0) {
- writer.write(alt);
- }
- }
- }
- }
-
- public static boolean isBlockElement(HTMLElement element) {
- return element instanceof HTMLParagraphElement
- || element instanceof HTMLHeadingElement
- || element instanceof HTMLUListElement
- || element instanceof HTMLOListElement
- || element instanceof HTMLDirectoryElement
- || element instanceof HTMLMenuElement
- || element instanceof HTMLPreElement
- || element instanceof HTMLDListElement
- || element instanceof HTMLDivElement
- || element.getTagName().equalsIgnoreCase("CENTER")
- || element.getTagName().equalsIgnoreCase("NOSCRIPT")
- || element.getTagName().equalsIgnoreCase("NOFRAMES")
- || element.getTagName().equalsIgnoreCase("BLOCKQUOTE")
- || element instanceof HTMLFormElement
- || element instanceof HTMLIsIndexElement
- || element instanceof HTMLHRElement
- || element instanceof HTMLTableElement
- || element instanceof HTMLFieldSetElement
- || element.getTagName().equalsIgnoreCase("ADDRESS");
- }
-
- private void post(HTMLElement element, StringWriter writer) {
- if (element instanceof HTMLUListElement
- || element instanceof HTMLOListElement) {
- sp--;
- } else if (element instanceof HTMLTableRowElement) {
- writer.write(lineSeparator);
- }
- }
-
- public Reader getPlainTextReader() {
- Node tmp1, tmp2;
- StringWriter writer = new StringWriter();
- tmp1 = htdoc.getDocumentElement();
- outer: while (tmp1 != null && tmp1 != htdoc) {
- if (tmp1 instanceof HTMLElement) {
- pre((HTMLElement) tmp1, writer);
- }
- if ((tmp2 = tmp1.getFirstChild()) == null) {
- if (tmp1.getNodeType() == Node.TEXT_NODE) {
- // writer.write(tmp1.getNodeValue());
- writer.write(tmp1.toString());
- }
- if (tmp1 != htdoc) {
- tmp2 = tmp1.getNextSibling();
- } else {
- break outer;
- }
- // post tmp1
- if (tmp2 != null && tmp1 instanceof HTMLElement) {
- post((HTMLElement) tmp1, writer);
- }
- }
- while (tmp2 == null && tmp1 != null) {
- tmp2 = tmp1.getParentNode();
- // post tmp1
- if (tmp2 != null && tmp1 instanceof HTMLElement) {
- post((HTMLElement) tmp1, writer);
- }
- tmp1 = tmp2;
- if (tmp1 != htdoc) {
- tmp2 = tmp1.getNextSibling();
- // post tmp1
- if (tmp2 != null && tmp1 instanceof HTMLElement) {
- post((HTMLElement) tmp1, writer);
- }
- } else {
- break outer;
- }
- }
- tmp1 = tmp2;
- }
- return new StringReader(writer.toString());
- }
-
- public static void main(String args[]) throws Exception {
- HTMLParser parser;
- for (int i = 0; i < args.length; i++) {
- parser = new HTMLParser();
- try {
- parser.parseSwitchEnc(new FileInputStream(args[i]));
- } catch (org.eclipse.actf.model.dom.sgml.ParseException e) {
- e.printStackTrace();
- continue;
- }
- HTML2PlainText h2t = new HTML2PlainText((HTMLDocument) parser
- .getDocument());
- Reader reader = h2t.getPlainTextReader();
- if (reader == null) {
- System.err.println("Null Text");
- System.exit(1);
- }
- BufferedReader br = new BufferedReader(reader);
- for (String str = br.readLine(); str != null; str = br.readLine()) {
- System.out.println(str);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/util/HtmlParserUtil.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/util/HtmlParserUtil.java
deleted file mode 100644
index 78109e6..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/util/HtmlParserUtil.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.html.util;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.html.HTMLParser;
-import org.eclipse.actf.model.dom.html.impl.SHDocument;
-import org.eclipse.actf.model.dom.html.internal.util.JapaneseEncodingDetector;
-import org.eclipse.actf.model.dom.sgml.IErrorLogListener;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-
-
-public class HtmlParserUtil {
-
- public static String DEFAULT_ENCODING = "MS932";
-
- ArrayList<IErrorLogListener> errorLogLisnterList = new ArrayList<IErrorLogListener>();
-
- SHDocument doc;
-
- String encoding;
-
- HTMLParser p1;
-
- public HtmlParserUtil() {
- doc = null;
- encoding = DEFAULT_ENCODING;
- }
-
- private HTMLParser setupHTMLParser() {
- HTMLParser p1 = new HTMLParser();
- p1.setTagCase(SGMLParser.LOWER_CASE);
- p1.setAttrNameCase(SGMLParser.LOWER_CASE);
- p1.setDefaultTagCase(SGMLParser.LOWER_CASE);
- p1.keepUnknownElements(true);
-
-
- // ErrorHandler[] ehs = p1.getErrorHandlers();
- //
- // for(int i=0;i<ehs.length;i++){
- // ErrorHandler eh = ehs[i];
- // //if(eh instanceof DefaultErrorHandler){
- // p1.removeErrorHandler(eh);
- // //}
- // }
- // ehs = p1.getErrorHandlers();
- //
- // for(int i=0;i<ehs.length;i++){
- // System.out.println(ehs[i].toString());
- // }
-
- p1.elementHandle(false); // to get line number
- for (Iterator i = errorLogLisnterList.iterator(); i.hasNext();) {
- p1.addErrorLogListener((IErrorLogListener) i.next());
- }
- p1.keepUnknownElements(true);
- return (p1);
- }
-
- public void addErrorLogListener(IErrorLogListener listener) {
- if (listener != null) {
- errorLogLisnterList.add(listener);
- }
- }
-
- public void parseWithoutEncoding(InputStream is) throws Exception {
- // parse
- p1 = setupHTMLParser();
-
- try {
- p1.parseSwitchEnc(is, "ISO-8859-1");
- doc = (SHDocument) p1.getDocument();
- encoding = p1.getEncoding();
- // System.out.println(encoding);
- } catch (Exception e2) {
- e2.printStackTrace();
- doc = null;
- encoding = DEFAULT_ENCODING;
- }
- }
-
- public void parse(InputStream is) throws Exception {
-
- encoding = DEFAULT_ENCODING;
- doc = null;
-
- JapaneseEncodingDetector JED = null;
-
- try {
- try {
- JED = new JapaneseEncodingDetector(is);
- encoding = JED.detect();
- // JED.detect2();
- } catch (Exception e2) {
- // e2.printStackTrace();
- throw (e2);
- }
-
- // System.out.println("Detect Encoding: "+encoding);
-
- // parse
- p1 = setupHTMLParser();
-
- try {
- p1.parse(JED.getInputStream(), encoding);
- } catch (Exception e2) {
- // System.out.println();
- System.err.println("HPU: Can't parse as " + encoding);
- p1 = setupHTMLParser();
- try {
- p1.parse(JED.getInputStream(), "MS932");
- } catch (Exception e3) {
- System.err.println("HPU: Can't parse as MS932");
- p1 = setupHTMLParser();
- p1.parseSwitchEnc(JED.getInputStream());
- }
-
- }
- doc = (SHDocument) p1.getDocument();
- encoding = p1.getEncoding();
-
- } catch (Exception e) {
- e.printStackTrace();
- throw (e);
- } finally {
- // System.out.println("close is");
- is.close();
- }
- }
-
- /**
- * @return
- */
- public SHDocument getSHDocument() {
- return doc;
- }
-
- /**
- * @return
- */
- public String getEncoding() {
- return encoding;
- }
-
- public static boolean saveHtmlDocumentAsUTF8(SHDocument result, String tmpFile, String targetFile) {
- return saveHtmlDocumentAsUTF8(result, new File(tmpFile), new File(targetFile));
- }
-
- public static boolean saveHtmlDocumentAsUTF8(SHDocument result, File tmpFile, File targetFile) {
- String tmpEncoding = "UTF8";
- try {
- FileOutputStream fos = new FileOutputStream(tmpFile);
- OutputStreamWriter osw = new OutputStreamWriter(fos, tmpEncoding); //$NON-NLS-1$
- PrintWriter pw = new PrintWriter(osw);
-
- result.printAsSGML(pw, true);
- fos.flush();
- fos.close();
-
- FileInputStream fis = new FileInputStream(tmpFile);
- BufferedReader tmpBR = new BufferedReader(new InputStreamReader(fis, tmpEncoding)); //$NON-NLS-1$
- fos = new FileOutputStream(targetFile);
- osw = new OutputStreamWriter(fos, tmpEncoding); //$NON-NLS-1$
- pw = new PrintWriter(osw);
- String tmpS;
- while ((tmpS = tmpBR.readLine()) != null) {
- // for MSN
- tmpS = tmpS.replaceAll(" ", " ");
-
- // Added on 2004/03/03 for MSN
- tmpS = tmpS.replaceAll(" ", " ");
-
- // for amazon
- tmpS = tmpS.replaceAll("'", "'").replaceAll("'", "'");
-
- // for java script
- tmpS = tmpS.replaceAll("[", "[").replaceAll("]", "]");
-
- // for description
- tmpS = tmpS.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
-
- pw.println(tmpS);
- }
- pw.flush();
- pw.close();
- fis.close();
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- try {
- FileOutputStream fos = new FileOutputStream(targetFile);
- // OutputStreamWriter osw = new OutputStreamWriter(fos,
- // encoding);
- PrintWriter pw = new PrintWriter(fos);
- result.printAsSGML(pw, true);
- fos.flush();
- fos.close();
- } catch (Exception e1) {
- e1.printStackTrace();
- }
- }
- return false;
- }
-
- public static void main(String args[]) {
- HtmlParserUtil hpu = new HtmlParserUtil();
- hpu.addErrorLogListener(new IErrorLogListener() {
- public void errorLog(int errorCode, String msg) {
- System.out.println(errorCode + ": " + msg);
- }
- });
-
- String filename = "sample-map.html";
- if (args.length > 0) {
- filename = args[0];
- }
-
- try {
- hpu.parse(new FileInputStream(filename));
- saveHtmlDocumentAsUTF8(hpu.getSHDocument(), File.createTempFile("tmp", "html", new File("tmp")), new File(
- "tmp.html"));
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/util/HtmlUtil.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/util/HtmlUtil.java
deleted file mode 100644
index 2d5c754..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/html/util/HtmlUtil.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.html.util;
-
-import org.eclipse.actf.model.dom.sgml.util.SgmlUtil;
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLCollection;
-
-
-public class HtmlUtil {
- public static Node commonAncester(HTMLCollection ancesters) {
- switch (ancesters.getLength()) {
- case 0:
- return null;
- case 1:
- return ancesters.item(0).getParentNode();
- default:
- Node ret = SgmlUtil
- .commonAncester(ancesters.item(0), ancesters.item(1));
- for (int i = 2; i < ancesters.getLength(); i++) {
- Node tmp = SgmlUtil.commonAncester(ancesters.item(i - 1), ancesters
- .item(i));
- if (ret != tmp) {
- ret = SgmlUtil.commonAncester(ret, tmp);
- }
- }
- return ret;
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/AttributeDefinition.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/AttributeDefinition.java
deleted file mode 100644
index a040638..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/AttributeDefinition.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.sgml;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-/**
- * Attribute definition
- *
- * @see ElementDefinition#getAttributeDef(java.lang.String)
- */
-public class AttributeDefinition {
- // DeclaredValueType
- static final int CDATA = 1;
-
- static final int ID = 2;
-
- static final int IDREF = 3;
-
- static final int IDREFS = 4;
-
- static final int NUMBER = 5;
-
- static final int NAME = 6;
-
- static final int NAME_TOKEN_GROUP = 7;
-
- static final int NMTOKEN = 8;
-
- static final int NAMES = 9;
-
- // DefaultValueType
- static final int FIXED = 1;
-
- static final int REQUIRED = 2;
-
- static final int IMPLIED = 3;
-
- private int declaredType = 0;
-
- private int defaultType = 0;
-
- private String name;
-
- String defaultValue;
-
- private Vector<String> nameTokens;
-
- AttributeDefinition(String name) {
- this.name = name;
- }
-
- void addNameToken(String token) throws ParseException {
- if (declaredType != NAME_TOKEN_GROUP)
- throw new DTDParseException();
- if (nameTokens == null)
- nameTokens = new Vector<String>();
- nameTokens.addElement(token);
- }
-
- int getDeclaredType() {
- return declaredType;
- }
-
- private String declaredTypeStrs[] = { null, "CDATA", "ID", "IDREF",
- "IDREFS", "NUMBER", "NAME", "NAME_TOKEN_GROUP", "NMTOKEN", "NAMES" };
-
- String getDeclaredTypeStr() {
- return declaredTypeStrs[declaredType];
- }
-
- int getDefaultType() {
- return defaultType;
- }
-
- String getDefaultValue() {
- return this.defaultValue;
- }
-
- String getName() {
- return name;
- }
-
- boolean nameTokenGroupContain(String token) {
- return nameTokens.contains(token);
- }
-
- void setDeclaredType(int type) {
- declaredType = type;
- }
-
- void setDefaultType(int type) {
- defaultType = type;
- }
-
- void setDefaultValue(String str) {
- this.defaultValue = str;
- }
-
- void setName(String arg) {
- name = arg;
- }
-
- // for debug.
- public String toString() {
- String ret = name + '\t';
- if (declaredType == NAME_TOKEN_GROUP) {
- for (Enumeration e = nameTokens.elements(); e.hasMoreElements();) {
- ret = ret + ' ' + e.nextElement();
- }
- } else {
- ret = ret + declaredValueTable[declaredType];
- }
- ret = ret + '\t';
- if (defaultValueTable[defaultType] != null) {
- ret = ret + defaultValueTable[defaultType] + ' ';
- }
- if (defaultValue != null) {
- ret = ret + defaultValue;
- }
- return ret;
- }
-
- private static String declaredValueTable[] = { null, "CDATA", "ID",
- "IDREF", "IDREFS", "NUMBER", "NAME", null, "NMTOKEN" };
-
- private static String defaultValueTable[] = { null, "#FIXED", "#REQUIRED",
- "#IMPLIED" };
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/AttributeListImpl.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/AttributeListImpl.java
deleted file mode 100644
index 76c4aca..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/AttributeListImpl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.sgml;
-
-import org.xml.sax.AttributeList;
-
-class AttributeListImpl implements AttributeList {
- private String names[] = new String[8];
-
- private String values[] = new String[8];
-
- private String types[] = new String[8];
-
- private int num = 0;
-
- private void expand() {
- String newArray[] = new String[num * 2];
- System.arraycopy(names, 0, newArray, 0, num);
- names = newArray;
- newArray = new String[num * 2];
- System.arraycopy(values, 0, newArray, 0, num);
- values = newArray;
- newArray = new String[num * 2];
- System.arraycopy(types, 0, newArray, 0, num);
- types = newArray;
- }
-
- final void addAttribute(String name, String type, String value) {
- int num = this.num;
- if (names.length == num)
- expand();
- names[num] = name;
- types[num] = type;
- values[num] = value;
- this.num = num + 1;
- }
-
- public int getLength() {
- return num;
- }
-
- public String getName(int i) {
- try {
- return names[i];
- } catch (ArrayIndexOutOfBoundsException e) {
- return null;
- }
- }
-
- public String getType(int i) {
- try {
- return types[i];
- } catch (ArrayIndexOutOfBoundsException e) {
- return null;
- }
- }
-
- public String getValue(int i) {
- try {
- return values[i];
- } catch (ArrayIndexOutOfBoundsException e) {
- return null;
- }
- }
-
- public String getType(String name) {
- for (int i = num - 1; i >= 0; i--) {
- if (names[i].equalsIgnoreCase(name))
- return types[i];
- }
- return null;
- }
-
- public String getValue(String name) {
- for (int i = num - 1; i >= 0; i--) {
- if (names[i].equalsIgnoreCase(name))
- return values[i];
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DTDParseException.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DTDParseException.java
deleted file mode 100644
index d22825b..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DTDParseException.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-class DTDParseException extends ParseException {
- public DTDParseException() {
- super();
- }
-
- public DTDParseException(String msg) {
- super(msg);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DTDParser.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DTDParser.java
deleted file mode 100644
index e6806d3..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DTDParser.java
+++ /dev/null
@@ -1,632 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.Enumeration;
-import java.util.Stack;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.AndModelGroup;
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.IModelGroup;
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.OptModelGroup;
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.OrModelGroup;
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.PlusModelGroup;
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.RepModelGroup;
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.SeqModelGroup;
-
-class DTDParser implements ISGMLConstants {
- private DTDTokenizer tokenizer;
-
- private Stack<DTDTokenizer> tokenizerStack = new Stack<DTDTokenizer>();
-
- private SGMLDocTypeDef dtd;
-
- DTDParser(DTDTokenizer tokenizer, SGMLDocTypeDef dtd) {
- this.tokenizer = tokenizer;
- this.dtd = dtd;
- }
-
- /**
- * Reads a DTD. Only supports initially setted public entity. Real entity is
- * ignored.
- *
- * @return top ElementDefinition instance. If DOCTYPE declaration does not
- *
- */
- final ElementDefinition readDTD() throws ParseException, IOException {
- ElementDefinition lastDef = null;
- loop: while (true) {
- if (tokenizer.nextToken() == EOF)
- break;
- while (tokenizer.ttype == COMMENT)
- tokenizer.nextToken();
- switch (tokenizer.ttype) {
- case MDO: // <!
- switch (tokenizer.nextToken()) {
- case NAME_CHAR:
- String str = tokenizer.sval;
- if (str.equalsIgnoreCase("ELEMENT")) { //
- lastDef = readElementDefinition();
- } else if (str.equalsIgnoreCase("ATTLIST")) {
- readAttributeList();
- } else if (str.equalsIgnoreCase("ENTITY")) {
- readEntity();
- } else {
- throw new DTDParseException("Unknown Declaration: "
- + str);
- }
- // consume '>'
- while (tokenizer.nextToken() != TAGC)
- ;
- break;
- case DSO: // [
- if (mark()) {
- if (tokenizer.nextToken() == '[') {
- tokenizer.switchTo(DEFAULT);
- lastDef = readDTD();
- tokenizer.switchTo(TAG);
- if (tokenizer.nextToken() == ']'
- && tokenizer.nextToken() == ']'
- && tokenizer.nextToken() == '>')
- break;
- }
- } else {
- if (tokenizer.nextToken() == '[') {
- tokenizer.skipToDSC();
- if (tokenizer.nextToken() == ']'
- && tokenizer.nextToken() == '>')
- break;
- }
- }
- throw new DTDParseException("invalid mark region.");
- default:
- throw new DTDParseException("invalid declaration");
- }
- break;
- case '%':
- tokenizer.pushBack();
- SGMLEntityReference ref = readEntityReference();
- SGMLEntityDeclaration ed = ref.getEntityDeclaration();
- if (ed != null) {
- tokenizerStack.push(tokenizer);
- tokenizer = new DTDTokenizer(ed.getReplacementReader());
- readDTD();
- tokenizer = (DTDTokenizer) tokenizerStack.pop();
- }
- break;
- case STAGO: // <
- case ETAGO: // </
- case MISC: //
- default:
- tokenizer.pushBack();
- break loop;
-
- }
- }
- return lastDef;
- }
-
- private ElementDefinition readElementDefinition() throws ParseException,
- IOException {
- ElementDefinition defs[] = readElementType();
- boolean start = false;
- boolean end = false;
- boolean notXHTML = dtd.toString().indexOf("XHTML") < 0;
-
- if (notXHTML) {
- start = omit();
- end = omit();
- }
- IModelGroup content = exp();
- // System.out.println("read: "+defs[0].toString()+" "+
- // content.toString());
-
- // can't omit
- if (!notXHTML && content.toString().equalsIgnoreCase("EMPTY")) {
- end = true;
- }
-
- ElementDefinition exceptions[];
- for (int i = 0; i < defs.length; i++) {
- defs[i].setStartTag(start);
- defs[i].setEndTag(end);
- defs[i].setContentModel(content);
- }
- if (tokenizer.nextToken() == INCO) {
- exceptions = inclusion();
- for (int i = 0; i < defs.length; i++) {
- defs[i].setInclusion(exceptions);
- }
- } else if (tokenizer.ttype == EXCO) {
- exceptions = inclusion();
- for (int i = 0; i < defs.length; i++) {
- defs[i].setExclusion(exceptions);
- }
- } else {
- tokenizer.pushBack();
- }
- return defs[0];
- }
-
- private ElementDefinition[] readElementType() throws ParseException,
- IOException {
- if (tokenizer.nextToken() == LEFTPAR) {
- Vector<ElementDefinition[]> tmpVector = new Vector<ElementDefinition[]>();
- tmpVector.addElement(makeElementArray(atom()));
- while (tokenizer.nextToken() == '|')
- tmpVector.addElement(makeElementArray(atom()));
- if (tokenizer.ttype != ')')
- throw new DTDParseException("invalid ELEMENT type");
- int size = 0;
- for (Enumeration e = tmpVector.elements(); e.hasMoreElements();)
- size += ((ElementDefinition[]) (e.nextElement())).length;
- ElementDefinition ret[] = new ElementDefinition[size];
- int i = 0;
- for (Enumeration e = tmpVector.elements(); e.hasMoreElements();) {
- ElementDefinition defs[] = (ElementDefinition[]) (e
- .nextElement());
- for (int j = 0; j < defs.length; j++)
- ret[i++] = defs[j];
- }
- return ret;
- } else {
- tokenizer.pushBack();
- return makeElementArray(atom());
- }
- }
-
- /**
- * Reads Entity.
- *
- * <PRE>
- *
- * <!ENTITY ..... > ^ ^ already read at this point. Reads until this point.
- *
- * </PRE>
- */
- private void readEntity() throws ParseException, IOException {
- String entityName;
- if (tokenizer.nextToken() != '%') {
- if (tokenizer.ttype == NAME_CHAR) {
- entityName = tokenizer.sval;
- int next = tokenizer.nextToken();
- if (next == NAME_CHAR
- && tokenizer.sval.equalsIgnoreCase("CDATA")) {
- if (tokenizer.nextToken() == STRING) {
- // System.out.println(entityName+" : "+tokenizer.sval);
- dtd.putEntityDeclaration(entityName, tokenizer.sval);
- return;
- }
- } else if (next == STRING) {
- // add 040930 to support xhtml-*.ent
- // System.out.println(entityName+" : "+ tokenizer.sval);
- dtd.putEntityDeclaration(entityName, tokenizer.sval);
- return;
- }
- }
- throw new DTDParseException("invalid entity");
- } else if (tokenizer.nextToken() == NAME_CHAR) {
- entityName = tokenizer.sval;
- if (tokenizer.nextToken() != STRING) {
- if (tokenizer.ttype == NAME_CHAR
- && tokenizer.sval.equalsIgnoreCase("PUBLIC")) {
- if (tokenizer.nextToken() == STRING) {
- String publicID = tokenizer.sval;
- String entityFileName = (String) SGMLParser.pubEntityMap
- .get(publicID);
- if (entityFileName != null) {
- dtd.putPublicEntity(entityName, publicID,
- entityFileName);
- } else {
- System.out.println(entityName + " : " + publicID
- + " : " + entityFileName);
- throw new DTDParseException("invalid entity");
- }
- // check syntax
- if (tokenizer.nextToken() == '>') {
- tokenizer.pushBack();
- return;
- } else if (tokenizer.ttype == STRING) {
- return;
- }
- }
- }
- } else { // if (tokenizer.nextToken() != STRING) {
- dtd.putEntityDeclaration(entityName, tokenizer.sval);
- return;
- }
- }
- throw new DTDParseException("invalid entity");
- }
-
- private SGMLEntityReference readEntityReference() throws ParseException,
- IOException {
- if (tokenizer.nextToken() == '%') {
- if (tokenizer.nextToken() == NAME_CHAR || tokenizer.ttype == PCDATA) {
- String str = tokenizer.sval;
- if (tokenizer.nextToken() != ';')
- tokenizer.pushBack();
- return dtd.getEntityReference(str);
- }
- }
- throw new DTDParseException("invalid entity reference");
- }
-
- private void readToken(AttributeDefinition attr) throws ParseException,
- IOException {
- if (tokenizer.nextToken() == NAME_CHAR || tokenizer.ttype == NUM) {
- attr.addNameToken(tokenizer.sval);
- } else if (tokenizer.ttype == '%') {
- tokenizer.pushBack();
- SGMLEntityReference er = readEntityReference();
- SGMLEntityDeclaration ed = er.getEntityDeclaration();
- tokenizerStack.push(tokenizer);
- tokenizer = new DTDTokenizer(ed.getReplacementReader(), TAG);
- readTokenGroup(attr);
- tokenizer = (DTDTokenizer) tokenizerStack.pop();
- } else {
- throw new DTDParseException("invalid token");
- }
- }
-
- private void readTokenGroup(AttributeDefinition attr)
- throws ParseException, IOException {
- readToken(attr);
- while (tokenizer.nextToken() != ')' && tokenizer.ttype != EOF) {
- if (tokenizer.ttype != '|')
- throw new DTDParseException("invalid token group");
- readToken(attr);
- }
- }
-
- /**
- * Reads an exp EXP -> TERM [(, TERM)* | (| TERM)* | (& TERM)*]
- */
- private IModelGroup exp() throws ParseException, IOException {
- IModelGroup ret;
- ret = term();
- // System.out.println("exp: "+ret.toString());
- int tmpC = tokenizer.nextToken();
- switch (tmpC) {
- case ',':
- SeqModelGroup seq = new SeqModelGroup(ret);
- seq.add(term());
- while (tokenizer.nextToken() == ',')
- seq.add(term());
- tokenizer.pushBack();
- if (seq.getChildLength() > dtd.maxSeqLength) {
- dtd.maxSeqLength = seq.getChildLength();
- }
- return seq;
- case '|':
- ret = new OrModelGroup(ret);
- ((OrModelGroup) ret).add(term());
- while (tokenizer.nextToken() == '|')
- ((OrModelGroup) ret).add(term());
- tokenizer.pushBack();
- return ret;
- case '&':
- ret = new AndModelGroup(ret);
- ((AndModelGroup) ret).add(term());
- while (tokenizer.nextToken() == '&')
- ((AndModelGroup) ret).add(term());
- tokenizer.pushBack();
- return ret;
- default:
- // System.out.println("expd: "+tmpC);
- tokenizer.pushBack();
- return ret;
- }
- }
-
- /**
- * TERM -> FACTOR [? | + | *]
- */
- private IModelGroup term() throws ParseException, IOException {
- IModelGroup ret = factor();
- // System.out.println("term ret: "+ret.toString());
- int tmpC = tokenizer.nextToken();
- // System.out.println("term next: "+tmpC+" "+(char)tmpC);
- switch (tmpC) {
- case QUESTION:
- // System.out.println("term: ?");
- ret = new OptModelGroup(ret);
- break;
- case PLUS:
- // System.out.println("term: +");
- ret = new PlusModelGroup(ret);
- break;
- case MULTI:
- // System.out.println("term: *");
- ret = new RepModelGroup(ret);
- break;
- default:
- // System.out.println("term: error");
- tokenizer.pushBack();
- }
- return ret;
- }
-
- /**
- * Reads a factor FACTOR -> ATOM (EXP) PCDATA CDATA EMPTY
- */
- private IModelGroup factor() throws ParseException, IOException {
- switch (tokenizer.nextToken()) {
- case LEFTPAR:
- IModelGroup ret = exp();
- if (tokenizer.nextToken() != ')') {
- // System.out.println("factor: error");
- throw new DTDParseException("ret: " + ret.toString()
- + " sval: " + tokenizer.sval + " ttype: "
- + tokenizer.ttype);
- } else {
- // System.out.println("factor: "+ret.toString());
- return ret;
- }
- case CDATA:
- return SGMLParser.cdata;
- case NUM: // #PCDATA
- if (tokenizer.sval.equalsIgnoreCase("#PCDATA")) {
- return SGMLParser.pcdata;
- } else {
- throw new DTDParseException("sval: " + tokenizer.sval
- + " ttype: " + tokenizer.ttype);
- }
- default:
- if (tokenizer.ttype == NAME_CHAR
- && tokenizer.sval.equalsIgnoreCase("EMPTY")) {
- return SGMLParser.empty;
- } else if (tokenizer.ttype == NAME_CHAR
- && tokenizer.sval.equalsIgnoreCase("CDATA")) {
- return SGMLParser.cdata;
- }
- tokenizer.pushBack();
- return atom();
- }
- }
-
- /**
- * Reads atom. ATOM -> <NAME_CHAR> ENTITY_REFERENCE
- */
- private IModelGroup atom() throws ParseException, IOException {
- if (tokenizer.nextToken() == NAME_CHAR) {
- return dtd.createElementDefinition(tokenizer.sval);
- } else if (tokenizer.ttype == '%') {
- tokenizer.pushBack();
- SGMLEntityReference er = readEntityReference();
- SGMLEntityDeclaration ed = er.getEntityDeclaration();
- IModelGroup ret = ed.getReplacementSubtree();
- if (ret == null) {
- tokenizerStack.push(tokenizer);
- tokenizer = new DTDTokenizer(ed.getReplacementReader(), TAG);
- ret = exp();
- ed.setReplacementSubtree(ret);
- tokenizer = (DTDTokenizer) tokenizerStack.pop();
- }
- return ret;
- } else {
- throw new DTDParseException("sval: " + tokenizer.sval + " ttype: "
- + tokenizer.ttype);
- }
- }
-
- private void declaredValue(AttributeDefinition attr) throws ParseException,
- IOException {
- if (tokenizer.nextToken() == NAME_CHAR) {
- String str = tokenizer.sval;
- if (str.equalsIgnoreCase("CDATA")) {
- attr.setDeclaredType(AttributeDefinition.CDATA);
- } else if (str.equalsIgnoreCase("ID")) {
- attr.setDeclaredType(AttributeDefinition.ID);
- } else if (str.equalsIgnoreCase("IDREF")) {
- attr.setDeclaredType(AttributeDefinition.IDREF);
- } else if (str.equalsIgnoreCase("IDREFS")) {
- attr.setDeclaredType(AttributeDefinition.IDREFS);
- } else if (str.equalsIgnoreCase("NAME")) {
- attr.setDeclaredType(AttributeDefinition.NAME);
- } else if (str.equalsIgnoreCase("NUMBER")) {
- attr.setDeclaredType(AttributeDefinition.NUMBER);
- } else if (str.equalsIgnoreCase("NMTOKEN")) {
- attr.setDeclaredType(AttributeDefinition.NMTOKEN);
- } else if (str.equalsIgnoreCase("NAMES")) {
- attr.setDeclaredType(AttributeDefinition.NAMES);
- } else {
- throw new DTDParseException(tokenizer.getCurrentLine()
- + ": unknown declared value " + str);
- }
- } else if (tokenizer.ttype == '(') {
- attr.setDeclaredType(AttributeDefinition.NAME_TOKEN_GROUP);
- readTokenGroup(attr);
- } else if (tokenizer.ttype == '%') {
- tokenizer.pushBack();
- SGMLEntityReference er = readEntityReference();
- SGMLEntityDeclaration ed = er.getEntityDeclaration();
- tokenizerStack.push(tokenizer);
- tokenizer = new DTDTokenizer(ed.getReplacementReader(), TAG);
- declaredValue(attr);
- tokenizer = (DTDTokenizer) tokenizerStack.pop();
- } else {
- throw new DTDParseException("at " + tokenizer);
- }
- }
-
- private void defaultValue(AttributeDefinition attr) throws ParseException,
- IOException {
- switch (tokenizer.nextToken()) {
- case NAME_CHAR:
- attr.setDefaultValue(tokenizer.sval);
- break;
- case STRING:
- String str = tokenizer.sval;
- break;
- case NUM:
- str = tokenizer.sval;
- if (str.equalsIgnoreCase("#REQUIRED")) {
- attr.setDefaultType(AttributeDefinition.REQUIRED);
- } else if (str.equalsIgnoreCase("#IMPLIED")) {
- attr.setDefaultType(AttributeDefinition.IMPLIED);
- } else if (str.equalsIgnoreCase("#FIXED")) {
- if (tokenizer.nextToken() == EOF) {
- tokenizer = (DTDTokenizer) tokenizerStack.peek();
- } else {
- tokenizer.pushBack();
- }
- if (tokenizer.nextToken() != STRING) {
- throw new DTDParseException(tokenizer.getCurrentLine()
- + ": STRING must follow #FIXED");
- }
- attr.setDefaultType(AttributeDefinition.FIXED);
- str = tokenizer.sval;
- // data is entity?
- tokenizerStack.push(tokenizer);
- tokenizer = new DTDTokenizer(new StringReader(str), TAG);
- SGMLEntityReference ref;
- try {
- ref = readEntityReference();
- attr.setDefaultValue(ref.getEntityDeclaration()
- .getReplacementString());
- } catch (ParseException e) {
- attr.setDefaultValue(str);
- }
- tokenizer = (DTDTokenizer) tokenizerStack.pop();
- } else {
- attr.setDefaultValue(str);
- }
-
- }
- }
-
- private void readAttributeList() throws ParseException, IOException {
- readAttributeList(readElementType());
- }
-
- /**
- * read lines in attlist.
- */
- private AttributeDefinition[] readAttributeList(ElementDefinition defs[])
- throws ParseException, IOException {
- Vector<AttributeDefinition> v = new Vector<AttributeDefinition>();
- while (tokenizer.nextToken() != '>' && tokenizer.ttype != EOF) {
- tokenizer.pushBack();
- AttributeDefinition[] ads = attributeDefinitionList(defs);
- for (int i = 0; i < ads.length; i++)
- v.addElement(ads[i]);
- }
- tokenizer.pushBack();
- AttributeDefinition ret[] = new AttributeDefinition[v.size()];
- v.copyInto(ret);
- return ret;
- }
-
- /**
- * read each line in attlist.
- */
- private AttributeDefinition[] attributeDefinitionList(
- ElementDefinition defs[]) throws ParseException, IOException {
- if (tokenizer.nextToken() == NAME_CHAR) {
- AttributeDefinition ad = new AttributeDefinition(tokenizer.sval);
- declaredValue(ad);
- defaultValue(ad);
- for (int i = 0; i < defs.length; i++)
- defs[i].addAttributeDefinition(ad);
- AttributeDefinition ads[] = new AttributeDefinition[] { ad };
- return ads;
- } else if (tokenizer.ttype == '%') {
- tokenizer.pushBack();
- SGMLEntityReference er = readEntityReference();
- SGMLEntityDeclaration ed = er.getEntityDeclaration();
- tokenizerStack.push(tokenizer);
- tokenizer = new DTDTokenizer(ed.getReplacementReader(), TAG);
- AttributeDefinition ads[] = readAttributeList(defs);
- tokenizer = (DTDTokenizer) tokenizerStack.pop();
- return ads;
- } else {
- throw new DTDParseException("illegal attlist.");
- }
-
- }
-
- private boolean mark() throws ParseException, IOException {
- if (tokenizer.nextToken() == NAME_CHAR) {
- if (tokenizer.sval.equalsIgnoreCase("INCLUDE")) {
- return true;
- } else if (tokenizer.sval.equalsIgnoreCase("IGNORE")) {
- return false;
- } else {
- throw new DTDParseException("last sval: " + tokenizer.sval);
- }
- } else if (tokenizer.ttype == '%') {
- tokenizer.pushBack();
- SGMLEntityReference er = readEntityReference();
- SGMLEntityDeclaration ed = er.getEntityDeclaration();
- tokenizerStack.push(tokenizer);
- tokenizer = new DTDTokenizer(ed.getReplacementReader(), TAG);
- boolean ret = mark();
- tokenizer = (DTDTokenizer) tokenizerStack.pop();
- return ret;
- } else {
- throw new DTDParseException("sval: " + tokenizer.sval + " ttype: "
- + tokenizer.ttype);
- }
- }
-
- private ElementDefinition[] makeElementArray(IModelGroup model)
- throws ParseException {
- if (model instanceof ElementDefinition) {
- ElementDefinition ret[] = { (ElementDefinition) model };
- return ret;
- } else if (model instanceof OrModelGroup) {
- return ((OrModelGroup) model).getChildren();
- }
- throw new DTDParseException("sval: " + tokenizer.sval + " ttype: "
- + tokenizer.ttype);
- }
-
- /**
- * Reads a token that represents whether tag is omittable or not. OMIT -> -
- * O
- */
- private boolean omit() throws ParseException, IOException {
- switch (tokenizer.nextToken()) {
- case OMITTABLE:
- return true;
- case MINUS:
- return false;
- default:
- throw new DTDParseException("'O' or '-' is required at "
- + tokenizer.getCurrentLine());
- }
- }
-
- private ElementDefinition[] inclusion() throws ParseException, IOException {
- Vector<ElementDefinition[]> tmpVector = new Vector<ElementDefinition[]>();
- tmpVector.addElement(makeElementArray(atom()));
- while (tokenizer.nextToken() == '|')
- tmpVector.addElement(makeElementArray(atom()));
- if (tokenizer.ttype != ')')
- throw new DTDParseException("sval: " + tokenizer.sval + " ttype: "
- + tokenizer.ttype);
- int size = 0;
- for (Enumeration e = tmpVector.elements(); e.hasMoreElements();)
- size += ((ElementDefinition[]) (e.nextElement())).length;
- ElementDefinition ret[] = new ElementDefinition[size];
- int i = 0;
- for (Enumeration e = tmpVector.elements(); e.hasMoreElements();) {
- ElementDefinition defs[] = (ElementDefinition[]) (e.nextElement());
- for (int j = 0; j < defs.length; j++)
- ret[i++] = defs[j];
- }
- return ret;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DTDTokenizer.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DTDTokenizer.java
deleted file mode 100644
index 63b100b..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DTDTokenizer.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.IOException;
-import java.io.Reader;
-
-class DTDTokenizer extends SGMLTokenizer {
- /**
- * Constructs SGMLTokenizer instance.
- * @param reader reader that read SGML Documents.
- */
- DTDTokenizer(Reader reader) {
- super(reader, DEFAULT);
- }
- DTDTokenizer(Reader reader, int state) {
- super(reader, state);
- }
- protected int defaultState() throws IOException, ParseException {
- int ch;
- ch = read();
- while (Character.isWhitespace((char)ch))
- ch = read();
- switch (ch) {
- case '%' :
- return (ttype = '%');
- case '<' :
- if ((ch = read()) == '/') {
- state = TAG;
- return (ttype = ETAGO);
- } else if (ch == '?') {
- StringBuffer data = new StringBuffer();
- while ((ch = read()) != '>' && ch != EOF) {
- data.append((char)ch);
- }
- sval = data.toString();
- return (ttype = PI);
- } else if (ch == '!') { // declaration.
- if ((ch = read()) == '-') { // <!-
- if ((ch = read()) == '-') { // <!-- enter comment
- StringBuffer sb = new StringBuffer();
- while (true) {
- while ((ch = read()) != '-' && ch != EOF)
- sb.append((char)ch);
- if ((ch = read()) == '-') { // --
- while ((ch = read()) == '-')
- sb.append((char)ch);
- StringBuffer ws = new StringBuffer();
- while (Character.isWhitespace((char)ch)) {
- ws.append((char)ch);
- ch = read();
- }
- if (ch == '>') {
- state = DEFAULT;
- sval = new String(sb);
- return (ttype = COMMENT);
- } else {
- sb.append("--");
- sb.append(ws);
- unread(ch);
- }
- } else if (ch == EOF) {
- throw new DTDParseException(
- "Unexpeceted EOF in comment. at "
- + getReader()
- + ':'
- + getCurrentLine());
- } else {
- sb.append('-');
- sb.append((char)ch);
- }
- }
- } else { // <!-
- unread(ch);
- unread('-');
- }
- } else {
- unread(ch);
- }
- state = TAG;
- return (ttype = MDO);
- } else {
- unread(ch);
- state = TAG;
- return (ttype = STAGO);
- }
- case EOF :
- return (ttype = EOF);
- case ';' :
- return (ttype = ';');
- case ']' :
- return (ttype = ']');
- default :
- if (Character.isLetter((char)ch)) {
- unread(ch);
- return readNameChar();
- }
- throw new DTDParseException(
- "Unknown character '"
- + (char)ch
- + "at "
- + getReader()
- + ':'
- + getCurrentLine());
- }
- }
- public void skipToDSC() throws IOException {
- while (read() != ']');
- }
- protected int tag() throws IOException {
- int ch;
- StringBuffer sb = new StringBuffer();
- through();
- switch (ch = read()) {
- case '-' :
- if (Character.isWhitespace((char) (ch = read()))) {
- return (ttype = MINUS);
- } else if (ch == '(') {
- return (ttype = EXCO);
- } else if (ch == ')') {
- unread(ch);
- return (ttype = MINUS);
- } else if (!Character.isDigit((char)ch)) {
- while (!Character.isWhitespace((char)ch) && ch != '>') {
- sb.append((char)ch);
- ch = read();
- }
- unread(ch);
- sval = new String(sb);
- return (ttype = MISC);
- }
- sb.append('-');
- sb.append((char)ch);
- while (Character.isDigit((char) (ch = read())))
- sb.append((char)ch);
- if (ch == '%') {
- sb.append((char)ch);
- } else {
- unread(ch);
- }
- sval = new String(sb);
- return (ttype = NUM);
- case '+' :
- if (Character.isWhitespace((char) (ch = read()))) {
- return (ttype = PLUS);
- } else if (ch == '(') {
- return (ttype = INCO);
- //add 040703 to handle (tbody+|tr+)
- //add 040929 to handle (tr)+>
- } else if (ch == ')' || ch=='|' || ch=='>') {
- unread(ch);
- return (ttype = PLUS);
- } else if (!Character.isDigit((char)ch)) {
- while (!Character.isWhitespace((char)ch) && ch != '>') {
- sb.append((char)ch);
- ch = read();
- }
- unread(ch);
- sval = new String(sb);
- return (ttype = MISC);
- }
- sb.append('+');
- sb.append((char)ch);
- while (Character.isDigit((char) (ch = read())))
- sb.append((char)ch);
- if (ch == '%') {
- sb.append((char)ch);
- } else {
- unread(ch);
- }
- sval = new String(sb);
- return (ttype = NUM);
- case '#' :
- sb.append((char)ch);
- while (Character.isLetter((char) (ch = read()))
- || Character.isDigit((char)ch))
- sb.append((char)ch);
- unread(ch);
- sval = new String(sb);
- return (ttype = NUM);
- case '\'' :
- case '"' :
- int closing = ch;
- while (true) {
- if ((ch = read()) == closing) {
- break;
- } else if (ch == EOF) {
- throw new IOException(
- "Unexpected EOF at "
- + getReader()
- + ':'
- + getCurrentLine());
- } else {
- sb.append((char)ch);
- }
- }
- sval = new String(sb);
- return (ttype = STRING);
- case '>' :
- state = DEFAULT;
- return (ttype = '>');
- default :
- if (Character.isLetter((char)ch)) {
- if (ch == 'O') {
- int ch1;
- if (Character.isWhitespace((char) (ch1 = read())))
- return (ttype = OMITTABLE);
- unread(ch1);
- }
- unread(ch);
- return readNameChar();
- } else if (Character.isDigit((char)ch)) {
- sb.append((char)ch);
- ch = read();
- while (Character.isDigit((char)ch)) {
- sb.append((char)ch);
- ch = read();
- }
- if (ch == '%') {
- sb.append((char)ch);
- } else {
- unread(ch);
- }
- sval = new String(sb);
- return (ttype = NUM);
- } else {
- return (ttype = ch);
- }
- }
- }
- private int readNameChar() throws IOException {
- int ch = read();
- if (Character.isLetter((char)ch)) {
- StringBuffer sb = new StringBuffer();
- sb.append((char)ch);
- ch = read();
- while (Character.isLetter((char)ch)
- || Character.isDigit((char)ch)
- || ch == '.'
- || ch == '-'
- || ch == ':'
- || ch == '#') {
- sb.append((char)ch);
- ch = read();
- }
- unread(ch);
- sval = sb.toString();
- return (ttype = NAME_CHAR);
- } else {
- unread(ch);
- return -1;
- }
- }
-
- protected void through() throws IOException {
- int ch;
- while (true) {
- ch = read();
- if (!Character.isWhitespace((char)ch)) {
- if (ch == '-') {
- if ((ch = read()) == '-') { // getting into a comment.
- while (true) {
- while ((ch = read()) != '-' && ch != EOF); // -
- if (ch == EOF) {
- throw new IOException("Unexpected EOF in comment");
- }
- if (read() == '-') { // -- getting out of a comment
- through();
- break;
- }
- }
- } else {
- unread(ch);
- unread('-');
- return;
- }
- } else {
- unread(ch);
- return;
- }
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DefaultDocumentHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DefaultDocumentHandler.java
deleted file mode 100644
index 24fbadb..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/DefaultDocumentHandler.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import org.xml.sax.AttributeList;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * Default DocumentHandler class. This class makes linked list of document
- * handlers.
- */
-public class DefaultDocumentHandler implements DocumentHandler {
- /**
- * Next DocumentHandler messages are forwarded to.
- */
- protected DocumentHandler another;
-
- /**
- * Parser instance which this instance is added to and holding a next
- * handler.
- */
- protected SGMLParser parser;
-
- /**
- * Constructs DefaultDocumentHandler that points next DocumentHandler hold
- * by the parser.
- *
- * @param parser
- * parser instance that holds a next handler.
- */
- public DefaultDocumentHandler(SGMLParser parser) {
- this.another = parser.getDocumentHandler();
- this.parser = parser;
- }
-
- /**
- * Just forwards this method invokation with <code>locator</code> to the
- * next handler.
- */
- public void setDocumentLocator(Locator locator) {
- if (another != null)
- another.setDocumentLocator(locator);
- }
-
- /**
- * Just forwards this method invokation with <code>locator</code> to the
- * next handler.
- */
- public void startDocument() throws SAXException {
- if (another != null)
- another.startDocument();
- }
-
- /**
- * Just forwards this method invokation with <code>locator</code> to the
- * next handler.
- */
- public void endDocument() throws SAXException {
- if (another != null)
- another.endDocument();
- }
-
- /**
- * Just forwards this method invokation with <code>locator</code> to the
- * next handler.
- */
- public void startElement(String name, AttributeList atts)
- throws SAXException {
- if (another != null)
- another.startElement(name, atts);
- }
-
- /**
- * Just forwards this method invokation with <code>locator</code> to the
- * next handler.
- */
- public void endElement(String name) throws SAXException {
- if (another != null)
- another.endElement(name);
- }
-
- /**
- * Just forwards this method invokation with <code>locator</code> to the
- * next handler.
- */
- public void characters(char ch[], int start, int length)
- throws SAXException {
- if (another != null)
- another.characters(ch, start, length);
- }
-
- /**
- * Just forwards this method invokation with <code>locator</code> to the
- * next handler.
- */
- public void ignorableWhitespace(char ch[], int start, int length)
- throws SAXException {
- if (another != null)
- another.ignorableWhitespace(ch, start, length);
- }
-
- /**
- * Just forwards this method invokation with <code>locator</code> to the
- * next handler.
- */
- public void processingInstruction(String target, String data)
- throws SAXException {
- if (another != null)
- another.processingInstruction(target, data);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/ElementDefinition.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/ElementDefinition.java
deleted file mode 100644
index 223eeb0..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/ElementDefinition.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.IModelGroup;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * Instance of this class is made from DTD.
- */
-public class ElementDefinition implements IModelGroup {
- private boolean start, end;
-
- private String name;
-
- private IModelGroup contentModel;
-
- private ElementDefinition inclusions[];
-
- private ElementDefinition exclusions[];
-
- private AttributeDefinition attributeDefs[] = new AttributeDefinition[32];
-
- private int attributeDefHashes[] = new int[32];
-
- private int attrNum = 0;
-
- protected ElementDefinition(String name) {
- this.name = name;
- }
-
- protected ElementDefinition(String name, IModelGroup contentModel) {
- this.name = name;
- this.contentModel = contentModel;
- }
-
- final void addAttributeDefinition(AttributeDefinition def) {
- if (def != null) {
- if (attrNum == attributeDefs.length) {
- AttributeDefinition newDefs[] = new AttributeDefinition[attrNum * 2];
- int newHashes[] = new int[attrNum * 2];
- for (int i = 0; i < attrNum; i++) {
- newDefs[i] = attributeDefs[i];
- newHashes[i] = attributeDefHashes[i];
- }
- attributeDefs = newDefs;
- attributeDefHashes = newHashes;
- }
- attributeDefs[attrNum] = def;
- attributeDefHashes[attrNum++] = hashCode(def.getName()
- .toCharArray());
- }
- }
-
- /**
- * Check if an end tag is omittable or not
- *
- * @return true if an end tag is omittable, otherwise false.
- */
- public final boolean endTagOmittable() {
- return end;
- }
-
- /**
- * Matches <code>child</code> to <code>parent</code> by
- * <code>parser</code>.
- *
- * @return <code>true</code> if succeeded. Otherwise, <code>false</code>
- */
- public boolean match(SGMLParser parser, Node parent, Node child) {
- if (child instanceof Element
- && child.getNodeName().equalsIgnoreCase(name)) {
- parent.appendChild(child);
- return true;
- }
- if (start) {
- Element tmp = parser.getDocument().createElement(
- parser.changeDefaultTagCase(name));
- // check excepiton
- if (child instanceof Element) {
- Element ec = (Element) child;
- if (exclusion(ec)) {
- return false;
- } else if (inclusion(ec)) {
- tmp.appendChild(child);
- parent.appendChild(tmp);
- parser.addAutoGenerated(tmp);
- return true;
- }
- }
- boolean ret = contentModel.match(parser, tmp, child);
- if (ret) {
- parent.appendChild(tmp);
- parser.addAutoGenerated(tmp);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Gets content model
- *
- * @return content model
- */
- final IModelGroup getContentModel() {
- return contentModel;
- }
-
- /**
- * Matches <code>child</code> to <code>parent</code> by
- * <code>parser</code> as a conent. Suppose this instance is a definition
- * derived from <code><!ELEMENT TBODY O O (TR)+>,
- * <TR> doesn't match <TBODY> in this method but in the {@link
- * #match(SGMLParser,org.w3c.dom.Node,org.w3c.dom.Node)} method.
- * @return <code>true</code> if succeeded. Otherwise, <code>false</code>
- */
- public boolean contentMatch(SGMLParser parser, Node parent, Node child) {
- return contentModel.match(parser, parent, child);
- }
-
- /**
- * gets default value of a specified attribute.
- *
- * @param attrName
- * name of attribute
- * @return default value. If <code>attrName</code> is not an attribute of
- * this object, null.
- */
- public final String getDefaultValue(String attrName) {
- int hash = hashCode(attrName.toCharArray());
- for (int i = 0; i < attrNum; i++) {
- if (attributeDefHashes[i] == hash) {
- AttributeDefinition ad = attributeDefs[i];
- if (ad.getName().equalsIgnoreCase(attrName)) {
- return ad.getDefaultValue();
- }
- }
- }
- return null;
- }
-
- final boolean exclusion(Element element) {
- if (exclusions == null)
- return false;
- for (int i = exclusions.length - 1; i >= 0; i--) {
- if (exclusions[i].name.equalsIgnoreCase(element.getNodeName())) {
- return true;
- }
- }
- return false;
- }
-
- final boolean inclusion(Element element) {
- if (inclusions == null)
- return false;
- for (int i = inclusions.length - 1; i >= 0; i--) {
- if (inclusions[i].name.equalsIgnoreCase(element.getNodeName())) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Name of element defined by this object.
- *
- * @return name.
- */
- public final String getName() {
- return name;
- }
-
- final boolean instance(Node node) {
- return node instanceof Element
- && node.getNodeName().equalsIgnoreCase(name);
- }
-
- /**
- * set content model
- */
- final void setContentModel(IModelGroup arg) {
- contentModel = arg;
- }
-
- final void setEndTag(boolean end) {
- this.end = end;
- }
-
- final void setExclusion(ElementDefinition exclusions[]) {
- this.exclusions = exclusions;
- }
-
- final void setInclusion(ElementDefinition inclusions[]) {
- this.inclusions = inclusions;
- }
-
- final void setStartTag(boolean start) {
- this.start = start;
- }
-
- /**
- * checks if defining element's start tag is omittable or not
- *
- * @return true if and only if the tag is omittable, otherwise false.
- */
- public final boolean startTagOmittable() {
- return start;
- }
-
- /**
- * For debug.
- */
- public String toString() {
- String ret = "<!ELEMENT " + name + ' ' + (start ? 'O' : '-') + ' '
- + (end ? 'O' : '-') + ' ' + '>';
- return ret;
- }
-
- /**
- * @return <code>null</code> if not found.
- */
- public AttributeDefinition getAttributeDef(String attrName) {
- int hash = hashCode(attrName.toCharArray());
- for (int i = attrNum - 1; i >= 0; i--) {
- if (attributeDefHashes[i] == hash
- && attributeDefs[i].getName().equalsIgnoreCase(attrName)) {
- return attributeDefs[i];
- }
- }
- return null;
- }
-
- private int hashCode(char key[]) {
- int ret = 0;
- for (int i = key.length - 1; i >= 0; i--) {
- ret = 25 * ret + (key[i] & 0x1f) - 1;
- }
- return ret;
- }
-
- /**
- * @return always <code>false</code>
- */
- public boolean optional() {
- return false;
- }
-
- private int refercount = 0;
-
- /**
- * Sets reference flag.
- *
- * @param infinite
- * <code>true</code> if referenced infinitely. Otherwise,
- * <code>false</code>
- */
- public void refer(boolean infinite) {
- if (infinite) {
- this.infinite = infinite;
- } else {
- refercount++;
- }
- if (inclusions != null) {
- for (int i = 0; i < inclusions.length; i++) {
- inclusions[i].refer(true);
- }
- }
- if (contentModel != null) {
- contentModel.refer(infinite);
- }
- }
-
- private boolean infinite = false;
-
- /**
- * Checks if this is a singleton element in a document.
- *
- * @return <code>true</code> if this element is singleton. Otherwise
- * <code>false</code>
- */
- public boolean isSingleton() {
- return !infinite;
- }
-
- int number;
-
- /**
- * Gets the Magic Number of this definition. A Magic Number is used for
- * comparison to nodes.
- */
- public int getMagicNumber() {
- return this.number;
- }
-
- /**
- * Just checks a node with <code>number</code> as Magic Number can match
- * to a parent defined by this instance. Rather than {@link
- * #match(SGMLParser,org.w3c.dom.Node,org.w3c.dom.Node)} or {@link
- * #contentMatch(SGMLParser,org.w3c.dom.Node,org.w3c.dom.Node)}, this has no
- * side effects.
- */
- public boolean match(int number) {
- return hash[number];
- }
-
- private boolean inclusionVector[];
-
- final boolean[] getInclusionVector() {
- return inclusionVector;
- }
-
- final boolean inclusion(int elementNumber) {
- return inclusionVector[elementNumber];
- }
-
- private boolean exclusionVector[];
-
- final boolean[] getExclusionVector() {
- return exclusionVector;
- }
-
- final boolean exclusion(int elementNumber) {
- return exclusionVector[elementNumber];
- }
-
- private boolean hash[] = null;
-
- /**
- * Rehashes Magic Number vectors.
- *
- * @param totalSize
- * size of the vectors.
- */
- public boolean[] rehash(int totalSize) {
- if (this.hash != null)
- return this.hash;
- inclusionVector = new boolean[totalSize];
- if (inclusions != null) {
- for (int i = 0; i < inclusions.length; i++) {
- inclusionVector[inclusions[i].number] = true;
- }
- }
- exclusionVector = new boolean[totalSize];
- if (exclusions != null) {
- for (int i = 0; i < exclusions.length; i++) {
- exclusionVector[exclusions[i].number] = true;
- }
- }
- this.hash = new boolean[totalSize];
- boolean contentModelHash[] = contentModel.rehash(totalSize);
- if (start) {
- if (contentModelHash == null) {
- contentModelHash = new boolean[totalSize];
- }
- for (int i = totalSize - 1; i >= 0; i--) {
- hash[i] = (inclusionVector[i] | contentModelHash[i])
- & !exclusionVector[i];
- }
- }
- hash[this.number] = true;
- return hash;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/EndTag.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/EndTag.java
deleted file mode 100644
index 78f89f3..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/EndTag.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * This class represents intermediate data of end tag. Instances of this class
- * are used intermediately by parsers, so they are not included in DOM tree
- * generated by parsers.
- */
-public class EndTag extends SGMLNode {
- private String tagName;
-
- EndTag(String name) {
- super(null);
- tagName = name;
- }
-
- public String getNodeName() {
- return tagName;
- }
-
- /**
- * @return always -1
- */
- public short getNodeType() {
- return -1;
- }
-
- /**
- * @return always ""
- */
- public String getNodeValue() {
- return "";
- }
-
- /**
- * does nothing.
- */
- public void setNodeValue(String value) {
- }
-
- public String toString() {
- return "</" + tagName + '>';
- }
-
- public boolean equals(Node node) {
- return node instanceof EndTag
- && node.getNodeName().equalsIgnoreCase(tagName);
- }
-
- private Element element;
-
- /**
- * Gets an element this end tag closes.
- *
- * @return an element this end tag closes. <code>null</code>if this end
- * tag is an error node.
- */
- public Element getElement() {
- return element;
- }
-
- /**
- * Set an element this end tag closes.
- *
- * @param an
- * element this end tag closes.
- */
- public void setElement(Element element) {
- this.element = element;
- }
-
- public Node getParentNode() {
- return element == null ? null : element.getParentNode();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/IErrorLogListener.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/IErrorLogListener.java
deleted file mode 100644
index 1e8dea6..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/IErrorLogListener.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-/**
- * Implementation class of this interface is added to {@link SGMLParser
- * SGMLParser} instance by {@link
- * SGMLParser#addErrorLogListener(ErrorLogListener)
- * addErrorLogListener}.
- */
-public interface IErrorLogListener {
- /**
- * Records error messages.
- */
- public void errorLog(int errorCode, String msg);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/IPrintXML.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/IPrintXML.java
deleted file mode 100644
index 01e5ea5..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/IPrintXML.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.PrintWriter;
-
-interface IPrintXML {
- void printAsXML(PrintWriter pw, int indentLevel, boolean indent);
-
- void printAsSGML(PrintWriter pw, int indentLevel, boolean indent);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/ISGMLConstants.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/ISGMLConstants.java
deleted file mode 100644
index 7697fd7..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/ISGMLConstants.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-public interface ISGMLConstants {
- int EOF = -1;
- int MDO = 1; // <!
- int CDATA = 2;
- int INCO = 3; // +(
- int EXCO = 4; // -(
- int STRING = 5;
- int DQSTR = 6; // "....."
- int QSTR = 7; // '.....'
- int ETAGO = 8; // </
- int LETTER = 9;
- int DIGIT = 10;
- int NAME_CHAR = 11;
- int NUM = 12;
- int COMMENT = 13; // <!-- .... -->
- int PCDATA = 14;
- int WHITESPACE = 15;
- int PI = 17;
- int MISC = 1000;
-
- int EQ = '='; // =
- int TAGC = '>'; // >
- int STAGO = '<'; // <
- int DSO = '['; // [
- int DSC = ']'; // ]
- int PERCENT = '%'; // %
- int LEFTPAR = '('; // (
- int RIGHTPAR = ')'; // )
- int MINUS = '-'; // -
- int OMITTABLE = 'O'; // O
- int COMMA = ','; // ,
- int BAR = '|'; // |
- int AMPA = '&'; // &
- int QUESTION = '?'; // ?
- int PLUS = '+'; // +
- int MULTI = '*'; // *
-
- int DEFAULT = 0;
- int TAG = 1;
- int ETAG = 2;
-
- /**
- * Represents org.eclipse.actf.model.dom.sgml.EndTag
- */
- public static final int ENDTAG = -1;
-
- /**
- * Error code for missing DOCTYPE declaration. This kind of error is not
- * dealt with error handlers
- */
- public static final int DOCTYPE_MISSED = 1;
- /**
- * Error code for syntax error of DOCTYPE declaration. This kind of error
- * is not dealt with error handlers
- */
- public static final int ILLEGAL_DOCTYPE = 2;
- /**
- * Error code for an illegal top element. For HTML example, if an HTML
- * document starts with <LI> as follows, this is an illegal top element.
- * Because of the doctype declaration the document must start with <HTML>
- * <pre>
- * <!DOCTYPE <em>HTML</em> PUBLIC "-//W3C//DTD HTML 4.0//EN">
- * <em><LI></em>
- * </pre>
- * This kind of error is not dealt with error handlers
- */
- public static final int ILLEGAL_TOP_ELEMENT = 3;
- /**
- * Error code for an illegal attribute. If an element has an unknown
- * attribute, that is an illegal attribute.
- */
- public static final int ILLEGAL_ATTRIBUTE = 4;
- /**
- * Error code for a floating endtag. Endtags whose corresponding start tag
- * is missing are defined as <em>floating</em>. For HTML example, following
- * </P> is floating because the P element is closed before HR.
- * <pre>
- * <P>
- * ...
- * <!-- Here is an omitted end tag of P becase following HR is now allowed
- * as a child of P -->
- * <HR>
- * ...
- * </P>
- */
- public static final int FLOATING_ENDTAG = 5;
- /**
- * Error code for sudden endtag. A strange endtag that appears in some
- * context is defined as <em>sudden</em>. For HTML example, following <em>
- * </I></em> is sudden.
- * <pre>
- * <I> ... <B> ... <em></I></em> ... </B>
- * </pre>
- */
- public static final int SUDDEN_ENDTAG = 6;
- /**
- * Error code for illegal child. A node that is not allowed as a child of
- * context's element is defined as an illegal child. For HTML example,
- * following <em>P</em> element is an illegal child of HEAD
- * <pre>
- * <HTML>
- * <HEAD>
- * <em><P> Illegal </P> </em>
- * <TITLE>
- * ...
- * </pre>
- */
- public static final int ILLEGAL_CHILD = 7;
- /**
- * Error code for unknown elements (not defined in pre-read DTD)
- */
- public static final int UNKNOWN_ELEMENT = 8;
- /**
- * Error code for syntax error of start tag text.
- */
- public static final int STARTTAG_SYNTAX_ERR = 9;
- /**
- * Error code for miscellenious
- */
- public static final int MISC_ERR = 10;
-
- /**
- * Error code for token-level error of attribute value.
- */
- public static final int ATTR_VALUE = 11;
- /**
- * Error code for token-level error before attribute's name.
- */
- public static final int BEFORE_ATTRNAME = 12;
- /**
- * Error code for token-level error of tag name.
- */
- public static final int TAG_NAME = 13;
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/InsTokenizer.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/InsTokenizer.java
deleted file mode 100644
index e6290d9..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/InsTokenizer.java
+++ /dev/null
@@ -1,1097 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.IOException;
-import java.io.Reader;
-
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * Tokenizer for document instance.
- */
-class InsTokenizer implements ISGMLConstants, Locator {
- private boolean extractChar = true;
-
- private boolean extractNum = true;
-
- private int state;
-
- private boolean pushBacked;
-
- public String sval;
-
- public int ttype;
-
- private Reader reader;
-
- void extractCharEntity(boolean b) {
- extractChar = b;
- }
-
- void extractNumEntity(boolean b) {
- extractNum = b;
- }
-
- private SGMLParser parser;
-
- /**
- * Constructs InsTokenizer instance.
- *
- * @param reader
- * reader that read SGML Documents.
- */
- public InsTokenizer(Reader reader, SGMLParser parser) {
- this(reader, DEFAULT, parser);
- }
-
- InsTokenizer(Reader reader, int state, SGMLParser parser) {
- this.reader = reader;
- this.state = state;
- this.parser = parser;
- pushBacked = false;
- }
-
- private boolean forward(String str, boolean ignoreCase) throws IOException {
- int buf[] = new int[str.length()];
- boolean ret = true;
- int i;
- if (!ignoreCase) {
- for (i = 0; i < buf.length; i++) {
- buf[i] = read();
- if (buf[i] != str.charAt(i)) {
- ret = false;
- i++;
- break;
- }
- }
- } else {
- for (i = 0; i < buf.length; i++) {
- buf[i] = read();
- if (Character.toUpperCase((char) buf[i]) != Character
- .toUpperCase(str.charAt(i))
- && Character.toLowerCase((char) buf[i]) != Character
- .toLowerCase(str.charAt(i))) {
- ret = false;
- i++;
- break;
- }
- }
- }
- while (i > 0)
- unread(buf[--i]);
- return ret;
- }
-
- private int eatComment() throws IOException, ParseException {
- int ch;
- miscIndex = 0;
- if ((ch = read()) == '-') { // <!-
-
- if ((ch = read()) == '-') { // <!-- enter comment
- while (true) {
- while ((ch = read()) != '-' && ch != EOF) {
- setCharToMiscBuffer(miscIndex, (char) ch);
- miscIndex++;
- }
- if ((ch = read()) == '-') { // --
- if ((ch = read()) == '-') {
- // This is a very nasty case. <!-- ... ---...>
- // eat comment until '>' appears.
- if (miscBuffer.length <= miscIndex + 2) {
- expandMiscBuffer();
- }
- miscBuffer[miscIndex] = miscBuffer[miscIndex + 1] = miscBuffer[miscIndex + 2] = '-';
- miscIndex += 3;
- storeUntil('>');
- if (Character
- .isWhitespace(miscBuffer[miscIndex - 1])
- || miscBuffer[miscIndex - 1] == '-'
- || miscBuffer[miscIndex - 1] == '!') {
- if (miscBuffer[miscIndex - 2] == '-'
- && miscBuffer[miscIndex - 1] == '-') {
- miscIndex -= 2;
- }
- state = DEFAULT;
- sval = new String(miscBuffer, 0, miscIndex);
- parser.setCharacter(miscBuffer, 0, miscIndex);
- return (ttype = COMMENT);
- } else {
- setCharToMiscBuffer(miscIndex, '>');
- miscIndex++;
- continue;
- }
- } else if (ch == '!') { // doesn't meet specification,
- // but...
- if ((ch = read()) == '>') {
- state = DEFAULT;
- sval = new String(miscBuffer, 0, miscIndex);
- parser.setCharacter(miscBuffer, 0, miscIndex);
- return (ttype = COMMENT);
- } else {
- if (miscBuffer.length <= miscIndex + 2) {
- expandMiscBuffer();
- }
- miscBuffer[miscIndex] = miscBuffer[miscIndex + 1] = '-';
- miscBuffer[miscIndex + 2] = '!';
- miscIndex += 3;
- unread(ch);
- continue;
- }
- }
- int wsIndex = 0;
- char ws[] = null;
- if (Character.isWhitespace((char) ch)) {
- // Compressed Representation.
- ws = new char[256];
- ws[0] = (char) ch;
- ws[1] = 1;
- while (Character.isWhitespace((char) ch)) {
- if (ch == ws[wsIndex]) {
- ws[wsIndex + 1]++;
- } else {
- wsIndex += 2;
- ws[wsIndex] = (char) ch;
- ws[wsIndex + 1] = 1;
- }
- ch = read();
- }
- }
- if (ch == '>') {
- state = DEFAULT;
- sval = new String(miscBuffer, 0, miscIndex);
- parser.setCharacter(miscBuffer, 0, miscIndex);
- return (ttype = COMMENT);
- } else {
- if (miscBuffer.length <= miscIndex + 2) {
- expandMiscBuffer();
- }
- miscBuffer[miscIndex] = miscBuffer[miscIndex + 1] = '-';
- miscIndex += 2;
- for (int i = 0; i < wsIndex; i += 2) {
- for (int j = 0; j < ws[i + 1]; j++)
- setCharToMiscBuffer(miscIndex, ws[i]);
- miscIndex++;
- }
- unread(ch);
- }
- } else if (ch == EOF) {
- parser.error(MISC_ERR, "Unexpected EOF in comment.");
- for (int i = 0; i < miscBuffer.length; i++) {
- if (miscBuffer[i] == '>') {
- unread(miscBuffer, i + 1, miscIndex - i - 1);
- state = DEFAULT;
- sval = new String(miscBuffer, 0, i);
- parser.setCharacter(miscBuffer, 0, miscIndex);
- return (ttype = COMMENT);
- }
- }
- throw new ParseException("Unexpected EOF in comment.");
- } else {
- setCharToMiscBuffer(miscIndex, '-');
- miscIndex++;
- setCharToMiscBuffer(miscIndex, (char) ch);
- miscIndex++;
- }
- } // while (true) {
- } else { // <!-
- // if finished reading dtd, deals with <!- ... > as a comment
- sval = "-" + (char) ch + eatUntil('>');
- char svalChar[] = sval.toCharArray();
- parser.setCharacter(svalChar, 0, svalChar.length);
- return (ttype = COMMENT);
- }
- } else if ((ch == 'D' || ch == 'd') && forward("OCTYPE", true)) { // chech
- // if
- // <!DOCTYPE
- unread(ch);
- state = TAG;
- return (ttype = MDO);
- } else {
- // if finished reading dtd, deals with <! ... > as a comment
- sval = (char) ch + eatUntil('>');
- char svalChar[] = sval.toCharArray();
- parser.setCharacter(svalChar, 0, svalChar.length);
- return (ttype = COMMENT);
- }
- }
-
- private int etagStartIndex;
-
- private int defaultState() throws IOException, ParseException, SAXException {
- miscIndex = 0;
- int ch = read();
- while (Character.isWhitespace((char) ch)) {
- addCharToMiscBuffer((char) ch);
- ch = read();
- }
- if (miscIndex > 0) {
- if (prsvWS) {
- unread(ch);
- sval = new String(miscBuffer, 0, miscIndex);
- parser.setCharacter(miscBuffer, 0, miscIndex);
- return (ttype = WHITESPACE);
- }
- }
- switch (ch) {
- case '<':
- if (miscIndex > 0 && !prsvWS) {
- DocumentHandler docHandler = parser.getDocumentHandler();
- if (docHandler != null) {
- unread(ch);
- docHandler.ignorableWhitespace(miscBuffer, 0, miscIndex);
- read();
- }
- }
- miscIndex = 0;
- if ((ch = read()) == '/') {
- if (Character.isLowerCase((char) (ch = read()))
- || Character.isUpperCase((char) ch)) {
- unread(ch);
- state = ETAG;
- etagStartIndex = miscIndex;
- addCharToMiscBuffer('<');
- addCharToMiscBuffer('/');
- return (ttype = ETAGO);
- } else {
- addCharToMiscBuffer('<');
- addCharToMiscBuffer('/');
- return readPCDATA(ch);
- }
- } else if (ch == '?') {
- miscIndex = 0;
- while ((ch = read()) != '>' && ch != EOF) {
- addCharToMiscBuffer((char) ch);
- }
- sval = new String(miscBuffer, 0, miscIndex);
- return (ttype = PI);
- } else if (ch == '!') { // declaration.
- return eatComment();
- } else if (Character.isLowerCase((char) ch)
- || Character.isUpperCase((char) ch)) {
- unread(ch);
- state = TAG;
- return (ttype = STAGO);
- } else {
- addCharToMiscBuffer('<');
- return readPCDATA(ch);
- }
- case EOF:
- return (ttype = EOF);
- default:
- return readPCDATA(ch);
- }
- }
-
- private int entityBuf[] = new int[64];
-
- private int entityBufIndex;
-
- private int rslvCharEnt() throws IOException, ParseException, SAXException {
- entityBufIndex = 0;
- int ch = entityBuf[entityBufIndex++] = read();
- if (ch == '#') {
- ch = entityBuf[entityBufIndex++] = read();
- int radix = 10;
- if (ch == 'x' || ch == 'X') {
- radix = 16;
- ch = entityBuf[entityBufIndex++] = read();
- }
- int k = Character.digit((char) ch, radix);
- if (k >= 0) {
- int num = k;
- ch = entityBuf[entityBufIndex++] = read();
- while ((k = Character.digit((char) ch, radix)) >= 0) {
- num = num * radix + k;
- ch = entityBuf[entityBufIndex++] = read();
- }
- if (ch == ';') {
- char orig[] = new char[entityBufIndex - 1];
- for (int i = 0; i < entityBufIndex - 1; i++) {
- orig[i] = (char) entityBuf[i];
- }
- parser.putCharNumEntity(new Character((char) num),
- new String(orig));
- return num;
- }
- }
- } else if (Character.isLowerCase((char) ch)
- || Character.isUpperCase((char) ch)) {
- do {
- ch = entityBuf[entityBufIndex++] = read();
- } while (Character.isLowerCase((char) ch)
- || Character.isUpperCase((char) ch));
- if (ch == ';') {
- char orig[] = new char[entityBufIndex - 1];
- for (int i = 0; i < entityBufIndex - 1; i++)
- orig[i] = (char) entityBuf[i];
- String orgStr = new String(orig);
- int charEntity = parser.getCharEntity(orgStr);
- if (charEntity != -1) {
- parser.putCharNumEntity(new Character((char) charEntity),
- orgStr);
- return charEntity;
- }
- }
- }
- for (int i = entityBufIndex - 1; i >= 0; i--)
- unread(entityBuf[i]);
- return -1;
- }
-
- private void setCharToMiscBuffer(int miscIndex, char c) {
- if (miscBuffer.length <= miscIndex) {
- expandMiscBuffer();
- }
- miscBuffer[miscIndex] = c;
- }
-
- private void addCharToMiscBuffer(char c) {
- if (miscBuffer.length <= miscIndex) {
- expandMiscBuffer();
- }
- miscBuffer[miscIndex++] = c;
- }
-
- private int readPCDATA(int cur) throws IOException, ParseException,
- SAXException {
- int succeeding;
- int firstLFindex = this.lastLFindex;
- if (!extractChar && !extractNum) {
- setCharToMiscBuffer(miscIndex, (char) cur);
- miscIndex++;
-
- while (((cur = read()) != '<' || !Character
- .isLowerCase((char) (succeeding = sence()))
- && !Character.isUpperCase((char) succeeding)
- && succeeding != '!'
- && succeeding != '?'
- && (succeeding != '/' || !Character
- .isLowerCase((char) (succeeding = sence(1)))
- && !Character.isUpperCase((char) succeeding)))
- && cur != EOF) {
- setCharToMiscBuffer(miscIndex, (char) cur);
-
- if (miscBuffer[miscIndex - 1] == '\n' && cur != '\n') {
- firstLFindex = this.index - 1;
- }
- miscIndex++;
- }
- } else if (cur != EOF) {
- do {
- if (cur == '&') {
- if (!extractNum) {
- if ((cur = read()) == '#') {
- addCharToMiscBuffer('&');
- addCharToMiscBuffer('#');
- continue;
- } else {
- unread(cur);
- }
- }
- int charEntity = rslvCharEnt();
- if (charEntity == -1) {
- addCharToMiscBuffer('&');
- } else {
- addCharToMiscBuffer((char) charEntity);
- }
- } else {
- setCharToMiscBuffer(miscIndex, (char) cur);
- if (miscIndex > 0 && miscBuffer[miscIndex - 1] == '\n'
- && cur != '\n') {
- firstLFindex = this.index - 2;
- }
- miscIndex++;
- }
- } while (((cur = read()) != '<' || !Character
- .isLowerCase((char) (succeeding = sence()))
- && !Character.isUpperCase((char) succeeding)
- && succeeding != '!'
- && succeeding != '?'
- && (succeeding != '/' || !Character
- .isLowerCase((char) (succeeding = sence(1)))
- && !Character.isUpperCase((char) succeeding)))
- && cur != EOF);
- }
- if (cur != EOF)
- unread(cur);
- if (!prsvWS) {
- int begin = 0;
- while ((cur = miscBuffer[begin]) == '\r' || cur == '\n')
- begin++;
- int end = miscIndex - 1;
- try {
- while ((cur = miscBuffer[end]) == '\r' || cur == '\n')
- end--;
- } catch (ArrayIndexOutOfBoundsException e) {
- sval = new String(miscBuffer, 0, miscIndex);
- parser.setCharacter(miscBuffer, 0, miscIndex);
- return (ttype = PCDATA);
- }
- int len = end + 1 - begin;
- sval = new String(miscBuffer, begin, len);
- parser.setCharacter(miscBuffer, begin, len);
- if (end != miscIndex - 1) {
- unread(miscBuffer, end + 1, miscIndex - end - 1);
- lastLFindex = firstLFindex;
- }
- } else {
- sval = new String(miscBuffer, 0, miscIndex);
- parser.setCharacter(miscBuffer, 0, miscIndex);
- return (ttype = WHITESPACE);
- }
- return (ttype = PCDATA);
- }
-
- private char endTagBuffer[] = new char[64];
-
- /**
- * Gets raw text up to end tag specified(<<code>end</code>>)
- *
- * @param end
- * specifed end tags name
- * @return raw text up to specified end tag.
- */
- final String rawText(String end) throws IOException, ParseException {
- char endTagArray[] = end.toUpperCase().toCharArray();
- int ch;
- miscIndex = 0;
- int limitCandidate = 0;
-
- boolean inComment = false;
-
- outer: while (true) {
- ch = read();
- if (!inComment && ch == '<') {
- ch = read();
- if (ch == '/') {
- if (limitCandidate == 0) {
- limitCandidate = miscIndex;
- }
- endTagBufferIndex = 0;
- for (int i = 0; i < end.length(); i++) {
- endTagBuffer[endTagBufferIndex] = (char) read();
- if ((endTagBuffer[endTagBufferIndex] & 0xffdf) == endTagArray[endTagBufferIndex]) {
- endTagBufferIndex++;
- } else {
- endTagBufferIndex++;
- addCharToMiscBuffer('<');
- addCharToMiscBuffer('/');
- for (int j = 0; j < endTagBufferIndex; j++) {
- addCharToMiscBuffer(endTagBuffer[j]);
- }
- continue outer;
- }
- }
- while (Character.isWhitespace((char) (ch = read()))) {
- endTagBuffer[endTagBufferIndex++] = (char) ch;
- }
- if (ch == '>') {
- endTagBufferIndex += 3;
- unread(endTagBuffer, 0, endTagBufferIndex);
- return new String(miscBuffer, 0, miscIndex);
- } else {
- endTagBuffer[endTagBufferIndex++] = (char) ch;
- addCharToMiscBuffer('<');
- addCharToMiscBuffer('/');
- for (int i = 0; i < endTagBufferIndex; i++) {
- addCharToMiscBuffer(endTagBuffer[i]);
- }
- }
- } else if (ch == '!') {
- addCharToMiscBuffer('<');
- addCharToMiscBuffer((char) ch);
- ch = read();
- addCharToMiscBuffer((char) ch);
- if (ch == '-') {
- ch = read();
- addCharToMiscBuffer((char) ch);
- if (ch == '-') {
- inComment = true;
- }
- }
-
- } else {
- addCharToMiscBuffer('<');
- addCharToMiscBuffer((char) ch);
- }
- } else if (ch == EOF) {
- parser.error(MISC_ERR, "Unexpected EOF in CDATA after " + end);
- endTagBufferIndex = 0;
- if (limitCandidate != 0) {
- unread(miscBuffer, limitCandidate, miscIndex
- - limitCandidate);
- return new String(miscBuffer, 0, limitCandidate);
- } else {
- return new String(miscBuffer, 0, miscIndex);
- }
- } else if (inComment && ch == '-') {
- addCharToMiscBuffer((char) ch);
- ch = read();
- addCharToMiscBuffer((char) ch);
- if (ch == '-') {
- ch = read();
- addCharToMiscBuffer((char) ch);
- if (ch == '>') {
- inComment = false;
- }
- }
-
- } else {
- // setCharToMiscBuffer(miscIndex, (char)ch);
- // miscIndex++;
- addCharToMiscBuffer((char) ch);
- }
- }
- }
-
- private int endTagBufferIndex = 0;
-
- void eatCDATAEndTag() throws IOException {
- for (int i = endTagBufferIndex; i > 0; i--)
- read();
- }
-
- private char attrValBuffer[] = new char[8192];
-
- private static boolean includeAngleBracket(char chars[], int begin, int end) {
- while (begin < end) {
- char ch = chars[begin++];
- if (ch == '>' || ch == '<')
- return true;
- }
- return false;
- }
-
- private void checkAttrValBuffer(int index) {
- int curSize = attrValBuffer.length;
- if (curSize < index + 128) {
- char tmpBuffer[] = new char[curSize + 8192];
- System.arraycopy(attrValBuffer, 0, tmpBuffer, 0, curSize);
- attrValBuffer = tmpBuffer;
- }
- }
-
- /**
- * Reads attribute values. Nasty attribute value examples:
- * <ul>
- * <li>width=<em>"100"%</em>
- * <li>width=<em>"100%</em> height=...
- * </ul>
- */
- final String readAttributeValue(AttributeDefinition ad, ElementDefinition ed)
- throws IOException, ParseException, SAXException {
- int ch;
- while (Character.isWhitespace((char) (ch = read())))
- ;
- miscIndex = 0;
- int attrValBufferIndex = 0;
-
- addCharToMiscBuffer((char) ch);
-
- if (ch == '\'' || ch == '"') {
- int endChar = ch;
- while ((ch = read()) != EOF && ch != endChar) {
- checkAttrValBuffer(attrValBufferIndex);
-
- setCharToMiscBuffer(miscIndex, (char) ch);
- miscIndex++;
- if (ch == '&' && (extractChar || extractNum)) {
- if (!extractNum) {
- if ((ch = read()) == '#') {
- attrValBuffer[attrValBufferIndex++] = '&';
- attrValBuffer[attrValBufferIndex++] = '#';
- continue;
- } else {
- unread(ch);
- }
- }
- int charEntity = rslvCharEnt();
- if (charEntity == -1) {
- attrValBuffer[attrValBufferIndex++] = '&';
- } else {
- attrValBuffer[attrValBufferIndex++] = (char) charEntity;
-
- for (int i = 0; i < entityBufIndex; i++) {
- addCharToMiscBuffer((char) entityBuf[i]);
- }
- }
- } else {
- try {
- attrValBuffer[attrValBufferIndex] = (char) ch;
- } catch (ArrayIndexOutOfBoundsException e) {
- char newAttrValBuffer[] = new char[attrValBuffer.length * 2];
- System.arraycopy(attrValBuffer, 0, newAttrValBuffer, 0,
- attrValBufferIndex);
- attrValBuffer = newAttrValBuffer;
- }
- attrValBufferIndex++;
- }
- }
- if (ch != EOF) {
- addCharToMiscBuffer((char) ch);
- } else {
- parser.error(ATTR_VALUE, "EOF in attribute value.");
- }
- if (miscIndex > 1
- && (includeAngleBracket(miscBuffer, 1, miscIndex - 1) || miscBuffer[miscIndex - 2] == '=')
- && parser.handleError(ATTR_VALUE, new String(miscBuffer, 0,
- miscIndex))) {
- return readAttributeValue(ad, ed);
- }
- } else if (ch == '>') {
- unread(ch);
- return "";
- } else {
- int ch1 = -1;
- if (!isUnquotedChar((char) ch) && (ch1 = sence()) == '"'
- || ch1 == '\'' || Character.isWhitespace((char) ch1)) {
- return readAttributeValue(ad, ed);
- }
- attrValBuffer[attrValBufferIndex++] = (char) ch;
- while ((ch = read()) != EOF && ch != '>'
- && !Character.isWhitespace((char) ch)) {
-
- checkAttrValBuffer(attrValBufferIndex);
-
- if (ch == '&' && (extractChar || extractNum)) {
- if (!extractNum) {
- if ((ch = read()) == '#') {
- attrValBuffer[attrValBufferIndex++] = '&';
- attrValBuffer[attrValBufferIndex++] = '#';
- continue;
- } else {
- unread(ch);
- }
- }
- int charEntity = rslvCharEnt();
- if (charEntity == -1) {
- attrValBuffer[attrValBufferIndex++] = '&';
- } else {
- attrValBuffer[attrValBufferIndex++] = (char) charEntity;
- }
- } else {
- attrValBuffer[attrValBufferIndex++] = (char) ch;
- }
- }
- if (ch == '>')
- unread(ch);
- }
- ch = read();
- String ret = new String(attrValBuffer, 0, attrValBufferIndex);
- if (ch == '"' || ch == '\'') {
- if (!parser.handleError(BEFORE_ATTRNAME, "\"")) {
- parser.error(STARTTAG_SYNTAX_ERR,
- "requires attribute name after \"" + ret + '"');
- }
- } else {
- unread(ch);
- }
- return ret;
- }
-
- private int sence(int forward) throws IOException {
- switch (forward) {
- case 0:
- int ch = read();
- unread(ch);
- return ch;
- case 1:
- int ch0 = read();
- ch = read();
- unread(ch);
- unread(ch0);
- return ch;
- default:
- int buf[] = new int[forward];
- for (int i = 0; i < forward; i++) {
- buf[i] = read();
- }
- for (int i = forward - 1; i >= 0; i--) {
- unread(buf[i]);
- }
- return buf[forward - 1];
- }
- }
-
- private int sence() throws IOException {
- int ch = read();
- unread(ch);
- return ch;
- }
-
- private boolean isUnquotedChar(char ch) {
- return Character.isLowerCase(ch) || Character.isUpperCase(ch)
- || Character.isDigit(ch) || ch == '-' || ch == '.';
- }
-
- private int etag() throws ParseException, IOException {
- int ch;
- // while (Character
- // .isWhitespace(miscBuffer[miscIndex++] = (char) (ch = read())));
- while (Character.isWhitespace((char) (ch = read()))) {
- addCharToMiscBuffer((char) ch);
- }
- ;
- addCharToMiscBuffer((char) ch);
-
- if (ch == '>') {
- state = DEFAULT;
- sval = ">";
- parser.setCharacter(miscBuffer, etagStartIndex, miscIndex
- - etagStartIndex);
- return (ttype = '>');
- } else if (ch == EOF) {
- state = DEFAULT;
- sval = "";
- return (ttype = EOF);
- } else if (Character.isLowerCase((char) ch)
- || Character.isUpperCase((char) ch)) {
- int startIndex = miscIndex - 1;
- do {
- setCharToMiscBuffer(miscIndex, (char) (ch = read()));
- miscIndex++;
- } while (Character.isLowerCase((char) ch)
- || Character.isUpperCase((char) ch)
- || Character.isDigit((char) ch) || ch == '.' || ch == '-'
- || ch == ':' || ch == '#');
- unread(ch);
- miscIndex--;
- sval = new String(miscBuffer, startIndex, miscIndex - startIndex);
- return (ttype = NAME_CHAR);
- } else {
- return etag();
- }
- }
-
- private int tag() throws ParseException, IOException {
- int ch;
- miscIndex = 0;
- while (Character.isWhitespace((char) (ch = read())))
- ;
-
- if (ch == '!') {
- System.out.println("comment between DOCTYPE and HTML !!!");
- return eatComment();
- }
-
- if (ch == '>') {
- state = DEFAULT;
- sval = ">";
- return (ttype = '>');
- } else if (ch == EOF) {
- state = DEFAULT;
- sval = "";
- return (ttype = EOF);
- } else if (Character.isLowerCase((char) ch)
- || Character.isUpperCase((char) ch)) {
-
- do {
- setCharToMiscBuffer(miscIndex, (char) ch);
- miscIndex++;
- ch = read();
- } while (Character.isLowerCase((char) ch)
- || Character.isUpperCase((char) ch)
- || Character.isDigit((char) ch) || ch == '.' || ch == '-'
- || ch == ':' || ch == '#');
- unread(ch);
- sval = new String(miscBuffer, 0, miscIndex);
- return (ttype = NAME_CHAR);
- } else if (Character.isDigit((char) ch)) {
- do {
- addCharToMiscBuffer((char) ch);
- ch = read();
- } while (Character.isDigit((char) ch));
- if (ch == '%') {
- addCharToMiscBuffer((char) ch);
- } else {
- unread(ch);
- }
- sval = new String(miscBuffer, 0, miscIndex);
- return (ttype = NUM);
- } else if (ch == '<') {
- ch = read();
- if (ch == '/') {
- sval = "</";
- miscBuffer[0] = '<';
- miscBuffer[1] = '/';
- etagStartIndex = 0;
- state = ETAGO;
- return (ttype = ETAGO);
- } else {
- unread(ch);
- sval = "<";
- return (ttype = '<');
- }
- } else {
- return (ttype = ch);
- }
- }
-
- final void consumeUntil(char limit) throws IOException {
- while (limit != read())
- ;
- }
-
- private boolean prsvWS = false;
-
- void setPreserveWhitespace(boolean preserv) {
- this.prsvWS = preserv;
- }
-
- private int index = 0;
-
- private char charBuffer[] = new char[INITIAL_BUF_SIZ];
-
- private void expandBuffer(int increase) {
- if (bufLimit != index) {
- increase += index < bufLimit ? (bufLimit + index)
- : (charBuffer.length - index + bufLimit);
- }
- int length = charBuffer.length * 2;
- while (length < increase)
- length *= 2;
- char newBuffer[] = new char[length];
- if (index < bufLimit) {
- System.arraycopy(charBuffer, index, newBuffer, index, bufLimit
- - index);
- } else if (index != bufLimit) {
- System.arraycopy(charBuffer, 0, newBuffer, 0, bufLimit);
- System.arraycopy(charBuffer, index, newBuffer, length
- - charBuffer.length + index, charBuffer.length - index);
- index = length - charBuffer.length + index;
- }
- charBuffer = newBuffer;
- }
-
- public final static int INITIAL_BUF_SIZ = 8192;
-
- public final static int READ_UNIT = 1024;
-
- private int bufLimit = 0;
-
- private char miscBuffer[] = new char[INITIAL_BUF_SIZ];
-
- private int miscIndex = 0;
-
- private void expandMiscBuffer() {
- char newBuffer[];
- if (miscBuffer.length < 32768) {
- newBuffer = new char[miscBuffer.length * 2];
- } else {
- newBuffer = new char[miscBuffer.length + 32768];
- }
-
- System.arraycopy(miscBuffer, 0, newBuffer, 0, miscIndex);
- miscBuffer = newBuffer;
- }
-
- private void storeUntil(char limit) throws IOException {
- int ch = read();
- while (ch != limit && ch != EOF) {
- setCharToMiscBuffer(miscIndex, (char) ch);
- miscIndex++;
- ch = read();
- }
- }
-
- final String eatUntil(char limit) throws IOException {
- miscIndex = 0;
- int ch = read();
- while (ch != limit && ch != EOF) {
- setCharToMiscBuffer(miscIndex, (char) ch);
- miscIndex++;
- ch = read();
- }
- return new String(miscBuffer, 0, miscIndex);
- }
-
- private boolean skipLF;
-
- private boolean fillBuffer() throws IOException {
- if (bufLimit == charBuffer.length) {
- index = 0;
- bufLimit = reader.read(charBuffer, 0, READ_UNIT);
- if (bufLimit == -1)
- return false;
- } else if (bufLimit + READ_UNIT < charBuffer.length) {
- int count = reader.read(charBuffer, bufLimit, READ_UNIT);
- if (count == -1)
- return false;
- bufLimit += count;
- } else {
- int count = reader.read(charBuffer, bufLimit, charBuffer.length
- - bufLimit);
- if (count == -1)
- return false;
- bufLimit += count;
- }
- return true;
- }
-
- // private void printCharBuffer() {
- // if (bufLimit < index) {
- // System.err.print(
- // new String(charBuffer, index, charBuffer.length - index));
- // System.err.println(new String(charBuffer, 0, bufLimit));
- // } else if (bufLimit == index) {
- // System.err.println("Empty");
- // } else {
- // System.err.println(new String(charBuffer, index, bufLimit - index));
- // }
- // }
-
- private int read() throws IOException {
- if (bufLimit == index) {
- if (!fillBuffer())
- return -1;
- } else if (index == charBuffer.length) {
- index = 0;
- }
- int ret = charBuffer[index++];
- if (skipLF) {
- if (ret == '\n') {
- if (bufLimit == index) {
- if (!fillBuffer())
- return -1;
- } else if (index == charBuffer.length) {
- index = 0;
- }
- lastLFindex++;
- ret = charBuffer[index++];
- }
- skipLF = false;
- }
- switch (ret) {
- case '\r':
- skipLF = true;
- case '\n':
- lineNumber++;
- lastLFindex = index - 1;
- return '\n';
- }
- return ret;
- }
-
- private int lastLFindex = -1;
-
- private int lineNumber = 0;
-
- private void unread(int ch) throws IOException {
- if (ch == '\n')
- lineNumber--;
- if (index == 0) {
- charBuffer[index = charBuffer.length - 1] = (char) ch;
- } else {
- charBuffer[--index] = (char) ch;
- }
- }
-
- void unread(String str) throws IOException {
- unread(str.toCharArray());
- }
-
- private void unread(char str[], int begin, int len) {
- if (bufLimit >= index) {
- if (charBuffer.length - (bufLimit - index) < len) {
- expandBuffer(len);
- }
- } else if (index - bufLimit < len) {
- expandBuffer(len);
- }
- if (index < len) {
- int i = begin + len - 1;
- int j;
- for (j = index - 1; j >= 0; j--) {
- if ((charBuffer[j] = str[i--]) == '\n')
- lineNumber--;
- }
- j = charBuffer.length - 1;
- for (; i >= begin; j--) {
- if ((charBuffer[j] = str[i--]) == '\n')
- lineNumber--;
- }
- index = j + 1;
- } else {
- for (int i = begin + len - 1; i >= begin; i--) {
- if ((charBuffer[--index] = str[i]) == '\n')
- lineNumber--;
- }
- }
- }
-
- private void unread(char str[]) {
- unread(str, 0, str.length);
- }
-
- final int nextToken() throws IOException, ParseException, SAXException {
- if (pushBacked) {
- pushBacked = false;
- return ttype;
- }
-
- switch (state) {
- case DEFAULT:
- return defaultState();
- case TAG:
- return tag();
- case ETAG:
- return etag();
- default:
- return -1;
- }
- }
-
- final void pushBack() {
- pushBacked = true;
- }
-
- final int getCurrentLine() {
- return lineNumber + 1;
- }
-
- final int getCurrentCol() {
- return getColumnNumber();
- }
-
- final void switchTo(int state) {
- this.state = state;
- }
-
- final void close() throws IOException {
- this.reader.close();
- }
-
- public String getPublicId() {
- return null;
- }
-
- public String getSystemId() {
- return null;
- }
-
- public int getLineNumber() {
- return lineNumber + 1;
- }
-
- public int getColumnNumber() {
- int ret;
- if (index >= lastLFindex) {
- ret = index - lastLFindex;
- } else {
- ret = charBuffer.length - lastLFindex + index;
- }
- return ret;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/ParseException.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/ParseException.java
deleted file mode 100644
index a2ad39e..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/ParseException.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-/**
- * When a parser meets an unexpected and unrecoverable error, ParseException is
- * thrown
- */
-public class ParseException extends Exception {
- public ParseException() {
- super();
- }
-
- public ParseException(String msg) {
- super(msg);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLAttribute.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLAttribute.java
deleted file mode 100644
index 7262ecd..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLAttribute.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.Serializable;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.TypeInfo;
-import org.w3c.dom.UserDataHandler;
-
-class SGMLAttribute implements Attr, Serializable {
- // Node interface;
- public String getNodeName() {
- return name;
- }
-
- public String getNodeValue() {
- return value;
- }
-
- public void setNodeValue(String nodeValue) throws DOMException {
- this.value = nodeValue;
- this.isSpecified = true;
- }
-
- public short getNodeType() {
- return ATTRIBUTE_NODE;
- }
-
- public Node getParentNode() {
- return null;
- }
-
- public NodeList getChildNodes() {
- return new NodeList() {
- public Node item(int index) {
- return null;
- }
-
- public int getLength() {
- return 0;
- }
- };
- }
-
- public Node getFirstChild() {
- return null;
- }
-
- public Node getLastChild() {
- return null;
- }
-
- public Node getPreviousSibling() {
- return null;
- }
-
- public Node getNextSibling() {
- return null;
- }
-
- public NamedNodeMap getAttributes() {
- return null;
- }
-
- public Document getOwnerDocument() {
- return ownerDocument;
- }
-
- public Node insertBefore(Node newChild, Node refChild) throws DOMException {
- throw new DOMException(DOMException.NO_DATA_ALLOWED_ERR,
- "attributes can't have siblings.") {
- };
- }
-
- public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
- throw new DOMException(DOMException.NO_DATA_ALLOWED_ERR,
- "attributes can't have siblings.") {
- };
- }
-
- public Node removeChild(Node newChild) throws DOMException {
- throw new DOMException(DOMException.NO_DATA_ALLOWED_ERR,
- "attributes can't have siblings.") {
- };
- }
-
- public Node appendChild(Node newChild) throws DOMException {
- throw new DOMException(DOMException.NO_DATA_ALLOWED_ERR,
- "attributes can't have siblings.") {
- };
- }
-
- public boolean hasChildNodes() {
- return false;
- }
-
- public Node cloneNode(boolean deep) {
- return new SGMLAttribute(this);
- }
-
- // Attr interface
- public String getName() {
- return name;
- }
-
- /**
- * Not supported.
- */
- public boolean getSpecified() {
- return isSpecified;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- this.isSpecified = true;
- }
-
- String name, value;
-
- boolean isSpecified = false;
-
- private Document ownerDocument;
-
- SGMLAttribute(String name, String value, Document doc) {
- this.name = name;
- this.value = value;
- this.ownerDocument = doc;
- }
-
- // copy constructor
- SGMLAttribute(SGMLAttribute another) {
- this.name = another.name;
- this.value = another.value;
- this.isSpecified = another.isSpecified;
- this.ownerDocument = another.ownerDocument;
- }
-
- public String toString() {
- SGMLDocument doc = (SGMLDocument) getOwnerDocument();
- StringBuffer sb = new StringBuffer();
- char quote = '"';
- for (int i = 0; i < value.length(); i++) {
- char ch = value.charAt(i);
- String entityOrigin = doc.getEntityOrigin(new Character(ch));
- if (entityOrigin != null) {
- sb.append('&' + entityOrigin + ';');
- } else {
- if (ch == '"')
- quote = '\'';
- sb.append(ch);
- }
- }
- return ' ' + name + '=' + quote + sb + quote;
- }
-
- String toXMLString() {
- SGMLDocument doc = (SGMLDocument) getOwnerDocument();
- StringBuffer sb = new StringBuffer();
- char quote = '"';
- for (int i = 0; i < value.length(); i++) {
- char ch = value.charAt(i);
- String entityOrigin = doc.getEntityOrigin(new Character(ch));
- if (entityOrigin != null) {
- sb.append("&#" + (int) ch + ';');
- } else if (ch == '&') {
- sb.append("&");
- } else if (ch == '<') {
- sb.append("<");
- } else if (ch == '>') {
- sb.append(">");
- } else {
- if (ch == '"')
- quote = '\'';
- sb.append(ch);
- }
- }
- return ' ' + name + '=' + quote + sb + quote;
- }
-
- /**
- * @return always null
- */
- public String getPrefix() {
- return null;
- }
-
- /**
- * Does nothing.
- */
- public void setPrefix(String prefix) {
- }
-
- /**
- * @return always same as <code>getName()</code>.
- */
- public String getLocalName() {
- return getName();
- }
-
- /**
- * @return always null
- */
- public String getNamespaceURI() {
- return null;
- }
-
- /**
- * Does nothing.
- */
- public void normalize() {
- }
-
- private Element ownerElement = null;
-
- public Element getOwnerElement() {
- return ownerElement;
- }
-
- void setOwnerElement(Element owner) {
- this.ownerElement = owner;
- }
-
- /**
- * @return always false because this is not XML implementation but SGML.
- */
- public boolean supports(String feature, String version) {
- return false;
- }
-
- public boolean isSupported(String feature, String version) {
- return false;
- }
-
- public boolean hasAttributes() {
- return false;
- }
-
- /**
- * DOM Level 3
- */
-
- public TypeInfo getSchemaTypeInfo() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean isId() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public short compareDocumentPosition(Node other) throws DOMException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public String getBaseURI() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Object getFeature(String feature, String version) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getTextContent() throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Object getUserData(String key) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean isDefaultNamespace(String namespaceURI) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isEqualNode(Node arg) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isSameNode(Node other) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public String lookupNamespaceURI(String prefix) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String lookupPrefix(String namespaceURI) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setTextContent(String textContent) throws DOMException {
- // TODO Auto-generated method stub
-
- }
-
- public Object setUserData(String key, Object data, UserDataHandler handler) {
- // TODO Auto-generated method stub
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLCDATASection.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLCDATASection.java
deleted file mode 100644
index 7d0a78c..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLCDATASection.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.PrintWriter;
-
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Document;
-
-public class SGMLCDATASection extends SGMLText implements CDATASection,
- IPrintXML {
- public SGMLCDATASection(String str, Document doc) {
- super(str, doc);
- }
-
- public short getNodeType() {
- return CDATA_SECTION_NODE;
- }
-
- public String getNodeName() {
- return "#cdata-section";
- }
-
- public String toString() {
- return text;
- }
-
- public void printAsXML(PrintWriter pw, int indentLevel, boolean indent) {
- if (indent)
- for (int i = 0; i < indentLevel; i++)
- pw.print(' ');
- pw.print("<![CDATA[" + text + "]]>");
- if (indent)
- pw.println();
- }
-
- public void printAsSGML(PrintWriter pw, int indentLevel, boolean indent) {
- pw.print(text);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLCharacterData.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLCharacterData.java
deleted file mode 100644
index 650c81e..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLCharacterData.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-
-abstract class SGMLCharacterData extends SGMLNode implements CharacterData {
- protected SGMLCharacterData(String str, Document doc) {
- super(doc);
- text = str;
- }
-
- protected String text;
-
- public String getNodeValue() {
- return text;
- }
-
- public void setNodeValue(String nodeValue) {
- text = nodeValue;
- }
-
- public String getData() throws DOMException {
- return text;
- }
-
- public void setData(String data) throws DOMException {
- text = data;
- }
-
- public int getLength() {
- return text.length();
- }
-
- public String substringData(int offset, int count) throws DOMException {
- try {
- return text.substring(offset, count);
- } catch (StringIndexOutOfBoundsException e) {
- throw new DOMException(DOMException.INDEX_SIZE_ERR, e.getMessage()) {
- };
- }
- }
-
- public void appendData(String arg) throws DOMException {
- text = text + arg;
- }
-
- public void insertData(int offset, String arg) throws DOMException {
- try {
- text = text.substring(0, offset) + arg + text.substring(offset);
- } catch (StringIndexOutOfBoundsException e) {
- throw new DOMException(DOMException.INDEX_SIZE_ERR, e.getMessage()) {
- };
- }
- }
-
- public void deleteData(int offset, int count) throws DOMException {
- try {
- text = text.substring(0, offset) + text.substring(offset + count);
- } catch (StringIndexOutOfBoundsException e) {
- throw new DOMException(DOMException.INDEX_SIZE_ERR, e.getMessage()) {
- };
- }
- }
-
- public void replaceData(int offset, int count, String arg)
- throws DOMException {
- try {
- if (text.length() < offset + count) {
- text = text.substring(0, offset) + arg.substring(0, count);
- } else {
- text = text.substring(0, offset) + arg.substring(0, count)
- + text.substring(offset + count);
- }
- } catch (StringIndexOutOfBoundsException e) {
- throw new DOMException(DOMException.INDEX_SIZE_ERR, e.getMessage()) {
- };
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLComment.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLComment.java
deleted file mode 100644
index 2ff3b16..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLComment.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.PrintWriter;
-
-import org.w3c.dom.Comment;
-import org.w3c.dom.Document;
-
-public class SGMLComment extends SGMLCharacterData implements Comment,
- IPrintXML {
- public short getNodeType() {
- return COMMENT_NODE;
- }
-
- public String getNodeName() {
- return "#comment";
- }
-
- public SGMLComment(String data, Document doc) {
- super(data, doc);
- }
-
- public String toString() {
- return "<!--" + text + "-->";
- }
-
- public void printAsXML(PrintWriter pw, int indentLevel, boolean indent) {
- StringBuffer sb = new StringBuffer();
- int len = text.length();
- for (int i = 0; i < len - 2; i++) {
- if (text.charAt(i) == '-' && text.charAt(i + 1) == '-') {
- i++;
- } else {
- sb.append(text.charAt(i));
- }
- }
- if (len - 2 >= 0) {
- if (text.charAt(len - 1) != '-') {
- sb.append(text.charAt(len - 2));
- sb.append(text.charAt(len - 1));
- } else if (text.charAt(len - 2) != '-') {
- sb.append(text.charAt(len - 2));
- }
- } else if (len - 1 >= 0 && text.charAt(len - 1) != '-') {
- sb.append(text.charAt(len - 1));
- }
- pw.print("<!--" + sb + "-->");
- }
-
- public void printAsSGML(PrintWriter pw, int indentLevel, boolean indent) {
- pw.print("<!--" + text + "-->");
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDOMImpl.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDOMImpl.java
deleted file mode 100644
index 30bb5cf..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDOMImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-
-/**
- * Light-weight implementation of DOM</a>.
- * This implementation is thread-unsafe. If you require thread-safe
- * implementation, use Xerces DOM.
- * This supports:
- * <ul>
- * <li>Level 1 Core
- * <li>Level 1 HTML
- * <li>Level 2 Core (No namespaces)
- * <li>Level 2 HTML
- * </ul>
- *
- * @see SGMLParser#setDOMImplementation(org.w3c.dom.DOMImplementation)
- */
-public class SGMLDOMImpl implements DOMImplementation {
- /**
- * @return always false because this is not XML implementation but SGML.
- */
- public boolean hasFeature(String feature, String version) {
- return false;
- }
-
- public DocumentType createDocumentType(String qualifiedName,
- String publicId, String systemId) {
- return new SGMLDocType(qualifiedName, publicId, systemId);
- }
-
- /**
- * @param namespaceURI
- * always ignored.
- * @param qualifiedName
- * always ignored.
- */
- public Document createDocument(String namespaceURI, String qualifiedName,
- DocumentType doctype) throws DOMException {
- if (doctype == null) {
- return new SGMLDocument(this);
- } else if (doctype.getOwnerDocument() != null
- || !(doctype instanceof SGMLDocType)) {
- throw new DOMException(
- DOMException.WRONG_DOCUMENT_ERR,
- doctype
- + " has been already owned or created by a different DOMImplementation") {
- };
- } else {
- Document ret = new SGMLDocument(this);
- if (doctype != null) {
- ret.appendChild(doctype);
- }
- return ret;
- }
- }
-
- protected SGMLDOMImpl() {
- }
-
- private static SGMLDOMImpl instance = new SGMLDOMImpl();
-
- public static DOMImplementation getDOMImplementation() {
- return instance;
- }
-
- /*
- * DOM Level 3
- */
-
- /*
- * (non-Javadoc)
- * @see org.w3c.dom.DOMImplementation#getFeature(java.lang.String, java.lang.String)
- */
- public Object getFeature(String feature, String version) {
- // TODO Auto-generated method stub
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocType.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocType.java
deleted file mode 100644
index 4467143..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocType.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-public class SGMLDocType extends SGMLNode implements DocumentType {
- private static final long serialVersionUID = -4133901290836989142L;
-
- /**
- * @serial
- */
- private String name;
-
- /**
- * ID. For HTML4.0 strict, it is "-//W3C//DTD HTML 4.0//EN".
- *
- * @serial
- */
- protected String id;
-
- public String getPublicId() {
- return id;
- }
-
- /**
- * @serial
- */
- private String systemID;
-
- public String getSystemId() {
- return systemID;
- }
-
- // SGMLDocType(String name, String id, Document doc) {
- // super(doc);
- // this.name = name;
- // this.id = id;
- // }
-
- /**
- * @serial
- */
- private String internalSubset;
-
- public String getInternalSubset() {
- return internalSubset;
- }
-
- public void setInternalSubset(String str) {
- internalSubset = str;
- }
-
- public SGMLDocType(String name, String publicID, String systemID) {
- super(null);
- this.name = name;
- this.id = publicID;
- this.systemID = systemID;
- }
-
- // SGMLNode abstract method implementation.
- void check(Node newChild) throws DOMException {
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, this
- + "cannot have children.") {
- private static final long serialVersionUID = -1251093824923453659L;
- };
- }
-
- /**
- * Does not support this method.
- *
- * @return always return null
- */
- public NamedNodeMap getEntities() {
- return null;
- }
-
- // DocumentType interface implementation.
- public String getName() {
- return name;
- }
-
- // Node interface implementation.
- public String getNodeName() {
- return id;
- }
-
- public short getNodeType() {
- return DOCUMENT_TYPE_NODE;
- }
-
- public String getNodeValue() throws DOMException {
- return null;
- }
-
- /**
- * Does not support this method.
- *
- * @return always return null
- */
- public NamedNodeMap getNotations() {
- return null;
- }
-
- public void setNodeValue(String nodeValue) throws DOMException {
- throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
- "cannot set value on " + this) {
- private static final long serialVersionUID = -2040752127102111247L;
- };
- }
-
- /**
- * @serial
- */
- private String rawString;
-
- public void setRawString(String str) {
- this.rawString = str;
- }
-
- /**
- * @return raw string from original document if {@link
- * #setRawString(java.lang.String)} has been invoked. Otherwise,
- * <code><!DOCTYPE name PUBLIC "id" ></code>
- */
- public String toString() {
- return rawString != null ? rawString : "<!DOCTYPE " + name
- + " PUBLIC \"" + id + "\">";
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocTypeDef.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocTypeDef.java
deleted file mode 100644
index 161bd56..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocTypeDef.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Hashtable;
-
-/**
- * This class represents Document Type Definition and holds <code>
- * ElementntDefinition </code>
- * instances created by the DTD, entity declarations and so on.
- */
-public class SGMLDocTypeDef {
- private static Hashtable<String, SGMLDocTypeDef> table = new Hashtable<String, SGMLDocTypeDef>();
-
- private SGMLParser parser;
-
- /**
- * key: element name value: ElementDefinition instance
- */
- protected UnsynchronizedHashtable elementDefs = new UnsynchronizedHashtable();
-
- private Hashtable<String, SGMLEntityReference> entityRefs = new Hashtable<String, SGMLEntityReference>();
-
- private Hashtable<String, SGMLEntityDeclaration> entityDecls = new Hashtable<String, SGMLEntityDeclaration>();
-
- private String id;
-
- protected SGMLDocTypeDef(SGMLParser parser, String id) {
- this.parser = parser;
- this.id = id;
- }
-
- static SGMLDocTypeDef createAnonymous(SGMLParser parser) {
- return new SGMLDocTypeDef(parser, "anonymous");
- }
-
- /**
- * Gets ElementDefinition instance with specified name. There is only one
- * ElementDefinition instance that has the same name. So if a definition
- * that has specified name already exists, return that variable. If not make
- * new instance. Using singleton pattern.
- *
- * @param name
- * name of element defined by a object.
- * @return singleton instance.
- */
- public ElementDefinition createElementDefinition(String name) {
- name = name.toUpperCase();
- ElementDefinition ret = elementDefs.get(name);
- if (ret == null) {
- ret = new ElementDefinition(name);
- elementDefs.put(name, ret);
- }
- return ret;
- }
-
- /**
- * Creates public <code>SGMLDocTypeDef</code> instance.
- *
- * @param publicID
- * id related to public entity. For example <code>
- * "-//W3C//DTD HTML 4.0 Transitional//EN" </code>
- */
- public static SGMLDocTypeDef createPublic(String publicID, SGMLParser parser) {
- return new SGMLDocTypeDef(parser, publicID);
- }
-
- static void putPublic(String publicID, SGMLDocTypeDef dtd) {
- table.put(publicID, dtd);
- }
-
- /**
- * Gets the ElementDefinition instance related to the argument.
- *
- * @param name
- * ElementDefinition's name.
- * @return ElementDefinition named name. If no instance, return null.
- */
- public ElementDefinition getElementDefinition(String name) {
- return elementDefs.get(name);
- }
-
- /**
- * Gets the ElementDefinition instance whose Magic Number is specifed.
- *
- * @param num
- * ElementDefinition's Magic Number.
- * @return ElementDefinition named name. If no instance, return null.
- */
- public ElementDefinition getElementDefinition(int num) {
- try {
- return elementDefs.get(num);
- } catch (ArrayIndexOutOfBoundsException e) {
- return null;
- }
- }
-
- SGMLEntityDeclaration getEntityDeclaration(String entityName) {
- return (SGMLEntityDeclaration) entityDecls.get(entityName);
- }
-
- SGMLEntityReference getEntityReference(String name) throws ParseException {
- SGMLEntityReference ret = (SGMLEntityReference) entityRefs.get(name);
- if (ret == null) {
- SGMLEntityDeclaration ed = getEntityDeclaration(name);
- if (ed == null) {
- throw new DTDParseException("No Entity Definition: " + name);
- }
- ret = new SGMLEntityReference(name, ed);
- entityRefs.put(name, ret);
- }
- return ret;
- }
-
- /**
- * Gets public <code>SGMLDocTypeDef</code> instance.
- *
- * @param publicID
- * id related to public entity. For example <code>
- * "-//W3C//DTD HTML 4.0 Transitional//EN" </code>
- */
- public static SGMLDocTypeDef getPublic(String publicID) {
- return (SGMLDocTypeDef) table.get(publicID);
- }
-
- void putEntityDeclaration(String entityName, String entityString) {
- if (entityDecls.get(entityName) != null)
- return;
- SGMLEntityDeclaration dec = new SGMLEntityDeclaration(entityName,
- entityString, this);
- entityDecls.put(entityName, dec);
- }
-
- void putPublicEntity(String entityName, String entityString, String filename) {
- if (entityDecls.get(entityName) != null)
- return;
- class PUBLICEntity extends SGMLEntityDeclaration {
- String filename;
-
- Reader getReplacementReader() throws IOException {
- return parser.getResource(filename);
- }
-
- PUBLICEntity(String entityName, String entityString,
- String filename, SGMLDocTypeDef dtd) {
- super(entityName, entityString, dtd);
- this.filename = filename;
- }
- }
- ;
- entityDecls.put(entityName, new PUBLICEntity(entityName, entityString,
- filename, this));
- }
-
- /**
- * returns its public id. For example "-//W3C//DTD HTML 4.0
- * Transitional//EN".
- *
- * @return public id.
- */
- public String toString() {
- return id;
- }
-
- /**
- * Checks if a element is singleton or not. A singleton element appears only
- * once in a document. For example, HTML, HEAD and BODY are singleton in
- * HTML, but not TABLE, LI.
- *
- * @param tagName
- * element name to be checked.
- */
- public boolean singleton(String tagName) {
- ElementDefinition ed = getElementDefinition(tagName);
- return ed != null && ed.isSingleton();
- }
-
- private int elementNum;
-
- /**
- * @return number of elements this DTD defines
- */
- public int getElementCount() {
- return elementNum;
- }
-
- void rehash() {
- elementNum = elementDefs.size();
- int size = elementNum + 2; // The second last element is for #PCDATA.
- // The last element is for ANONYMOUS.
- for (int i = elementNum - 1; i >= 0; i--) {
- elementDefs.get(i).rehash(size);
- }
- }
-
- int maxSeqLength = 0;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocument.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocument.java
deleted file mode 100644
index 503809d..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocument.java
+++ /dev/null
@@ -1,595 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URL;
-import java.util.Hashtable;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Comment;
-import org.w3c.dom.DOMConfiguration;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-/**
- * Root node is a instance of this class.
- */
-public class SGMLDocument extends SGMLParentNode implements Document {
- /**
- * @serial
- */
- private Element documentElement = null;
-
- /**
- * @serial
- */
- private DocumentType doctype = null;
-
- private transient DOMImplementation domImpl;
-
- /**
- * @see SGMLDOMImpl#createDocument(java.lang.String,java.lang.String,org.w3c.dom.DocumentType)
- */
- public SGMLDocument() {
- this(SGMLDOMImpl.getDOMImplementation());
- }
-
- protected SGMLDocument(DOMImplementation imple) {
- super(null);
- this.domImpl = imple;
- }
-
- void check(Node node) throws DOMException {
- if (node.getOwnerDocument() != this && !(node instanceof SGMLDocType)) {
- throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, node
- + " created from " + node.getOwnerDocument() + " this.") {
- };
- }
- switch (node.getNodeType()) {
- case ELEMENT_NODE:
- if (documentElement == null) {
- documentElement = (Element) node;
- } else {
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,
- " document cannot have roots.") {
- };
- }
- break;
- case PROCESSING_INSTRUCTION_NODE:
- case COMMENT_NODE:
- break;
- case DOCUMENT_TYPE_NODE:
- doctype = (DocumentType) node;
- ((SGMLNode) node).ownerDocument = this;
- break;
- default:
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, node
- + " is not allowed as a child of " + this) {
- };
- }
- }
-
- public Node cloneNode(boolean deep) {
- SGMLDocument ret = (SGMLDocument) super.cloneNode(true);
- setOwnerDocument(ret, ret);
- for (Node child = ret.firstChild; child != null; child = child
- .getNextSibling()) {
- if (child instanceof Element) {
- ret.documentElement = (Element) child;
- } else if (child instanceof DocumentType) {
- ret.doctype = (DocumentType) child;
- }
- }
- return ret;
- }
-
- private void setOwnerDocument(SGMLNode ret, Document doc) {
- ret.ownerDocument = doc;
- for (SGMLNode child = (SGMLNode) ret.getFirstChild(); child != null; child = (SGMLNode) child
- .getNextSibling()) {
- setOwnerDocument(child, doc);
- }
- }
-
- public Attr createAttribute(String name) {
- return new SGMLAttribute(name, name, this);
- }
-
- public CDATASection createCDATASection(String c) {
- return new SGMLCDATASection(c, this);
- }
-
- public Comment createComment(String data) {
- return new SGMLComment(data, this);
- }
-
- public DocumentFragment createDocumentFragment() {
- return new SGMLDocumentFragment(this);
- }
-
- public Element createElement(String tagName) {
- return new SGMLElement(tagName, this);
- }
-
- public EntityReference createEntityReference(String a) throws DOMException {
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
- "cannot create Entity Ref.") {
- };
- }
-
- public ProcessingInstruction createProcessingInstruction(String target,
- String data) {
- return new SGMLPI(target, data, this);
- }
-
- public Text createTextNode(String data) {
- return new SGMLText(data, this);
- }
-
- public DocumentType getDoctype() {
- return doctype;
- }
-
- public Element getDocumentElement() {
- return documentElement;
- }
-
- // implementation of Document interface;
- public Node getDocumentType() {
- return doctype;
- }
-
- public NodeList getElementsByTagName(String tagname) {
- final boolean all = tagname.equals("*");
- final String targetName = tagname;
- return new NodeList() {
- public int getLength() {
- int ret = 0;
- Node tmp1, tmp2;
- tmp1 = documentElement;
- outer: while (tmp1 != null) {
- if (tmp1 instanceof Element
- && (all || targetName.equalsIgnoreCase(tmp1
- .getNodeName()))) {
- ret++;
- }
- if ((tmp2 = tmp1.getFirstChild()) == null) {
- if (tmp1 == documentElement) {
- break outer;
- } else {
- tmp2 = tmp1.getNextSibling();
- }
- }
- while (tmp2 == null && tmp1 != null) {
- tmp1 = tmp2 = tmp1.getParentNode();
- if (tmp1 != documentElement) {
- tmp2 = tmp1.getNextSibling();
- } else {
- break outer;
- }
- }
- tmp1 = tmp2;
- }
- return ret;
- }
-
- public Node item(int index) {
- Node tmp1, tmp2;
- tmp1 = documentElement;
- outer: while (tmp1 != null) {
- if (tmp1 instanceof Element
- && (all || targetName.equalsIgnoreCase(tmp1
- .getNodeName()))) {
- if (index == 0) {
- return tmp1;
- } else {
- index--;
- }
- }
- if ((tmp2 = tmp1.getFirstChild()) == null) {
- if (tmp1 == documentElement) {
- break outer;
- } else {
- tmp2 = tmp1.getNextSibling();
- }
- }
- while (tmp2 == null && tmp1 != null) {
- tmp1 = tmp2 = tmp1.getParentNode();
- if (tmp1 != documentElement) {
- tmp2 = tmp1.getNextSibling();
- } else {
- break outer;
- }
- }
- tmp1 = tmp2;
- }
- return null;
- }
- };
- }
-
- public DOMImplementation getImplementation() {
- return this.domImpl;
- }
-
- public Node getNextSibling() {
- return null;
- }
-
- public String getNodeName() {
- return "#document";
- }
-
- // implementation of Node interface
- public short getNodeType() {
- return DOCUMENT_NODE;
- }
-
- public String getNodeValue() {
- return null;
- }
-
- public Document getOwnerDocument() {
- return null;
- }
-
- public Node getParentNode() {
- return null;
- }
-
- /**
- * A Document object is the root node. So this have no siblings.
- */
- public Node getPreviousSibling() {
- return null;
- }
-
- /**
- * This method was created in VisualAge.
- *
- * @return org.w3c.dom.Node
- * @param oldChild
- * org.w3c.dom.Node
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public Node removeChild(Node oldChild) throws DOMException {
- if (oldChild == documentElement) {
- documentElement = null;
- } else if (oldChild == doctype) {
- doctype = null;
- }
- return super.removeChild(oldChild);
- }
-
- public void setNodeValue(String nodeValue) throws DOMException {
- throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
- "#document is always null") {
- };
- }
-
- public void printAsXML(String publicID, URL location, PrintWriter pw,
- boolean indent) throws IOException {
- printAsXML(publicID, location, pw, indent, null);
- }
-
- /**
- * Print Document as XML
- *
- * @param public
- * ID
- * @param DTD's
- * location
- * @param pw
- * stream to write this document.
- * @param indent
- * indent if true. Otherwise, not indent.
- * @param enc
- */
- public void printAsXML(String publicID, URL location, PrintWriter pw,
- boolean indent, String enc) throws IOException {
- if (enc == null) {
- pw.println("<?xml version=\"1.0\"?>");
- } else {
- pw.println("<?xml version=\"1.0\" encoding=\"" + enc + "\"?>");
- }
- if (publicID != null) {
- pw.print("<!DOCTYPE " + documentElement.getTagName() + " PUBLIC \""
- + publicID + '"');
- if (location != null) {
- pw.println(" \"" + location + "\">");
- } else {
- pw.println('>');
- }
- }
- ((SGMLElement) documentElement).printAsXML(pw, 0, indent);
- pw.println();
- pw.flush();
- // charEntities4Xml = null;
- }
-
- public void printAsXML(PrintWriter pw, boolean indent, String enc)
- throws IOException {
- printAsXML(null, null, pw, indent, enc);
- }
-
- /**
- * Print Document as SGML. starttag's string in this document are from the
- * original document (see {@link SGMLElement#toString()}. Even if
- * attributes in elements are modified, starttag's string does not change.
- *
- * @param DTD's
- * location
- * @param pw
- * stream to write this document.
- */
- public void printAsSGML(PrintWriter pw, boolean indent) throws IOException {
- if (doctype != null) {
- pw.println(doctype.toString());
- }
- if (documentElement != null)
- ((SGMLElement) documentElement).printAsSGML(pw, 0, indent);
- pw.println();
- pw.flush();
- }
-
- /**
- * @serial
- */
- private Hashtable charEntities4Xml;
-
- String getEntityOrigin4Xml(String entity) {
- return (String) charEntities4Xml.get(entity);
- }
-
- private transient SGMLDocTypeDef dtd;
-
- public SGMLDocTypeDef getDTD() {
- return dtd;
- }
-
- public void setDTD(SGMLDocTypeDef dtd) {
- this.dtd = dtd;
- }
-
- String getEntityOrigin(Character Ch) {
- return (String) charNumEntities.get(Ch);
- }
-
- /**
- * @serial
- */
- private Hashtable<Character, String> charNumEntities = new Hashtable<Character, String>();
-
- void putCharNumEntity(Character C, String ent) {
- charNumEntities.put(C, ent);
- }
-
- String getCharNumEntity(Character C) {
- return (String) charNumEntities.get(C);
- }
-
- // DOM Level 2
-
- public Node importNode(Node importedNode, boolean deep) throws DOMException {
- Node ret;
- switch (importedNode.getNodeType()) {
- case Node.ELEMENT_NODE:
- ret = createElement(importedNode.getNodeName());
- NamedNodeMap attributes = importedNode.getAttributes();
- for (int i = 0; i < attributes.getLength(); i++) {
- Attr importedAttr = (Attr) attributes.item(i);
- if (importedAttr.getSpecified()) {
- Attr attr = createAttribute(importedAttr.getNodeName());
- attr.setValue(importedAttr.getValue());
- ((Element) ret).setAttributeNode(attr);
- }
- }
- break;
- case Node.ATTRIBUTE_NODE:
- ret = createAttribute(importedNode.getNodeName());
- ((Attr) ret).setValue(importedNode.getNodeValue());
- break;
- case Node.TEXT_NODE:
- ret = createTextNode(importedNode.getNodeValue());
- break;
- case Node.CDATA_SECTION_NODE:
- ret = createCDATASection(importedNode.getNodeValue());
- break;
- case Node.COMMENT_NODE:
- ret = createComment(importedNode.getNodeValue());
- break;
- case Node.PROCESSING_INSTRUCTION_NODE:
- ProcessingInstruction pi = (ProcessingInstruction) importedNode;
- ret = createProcessingInstruction(pi.getTarget(), pi.getData());
- break;
- case Node.ENTITY_REFERENCE_NODE:
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
- "ENTITY_REFERENCE: " + importedNode) {
- };
- case Node.ENTITY_NODE:
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "ENTITY: "
- + importedNode) {
- };
- case Node.DOCUMENT_NODE:
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "DOCUMENT: "
- + importedNode) {
- };
- case Node.DOCUMENT_TYPE_NODE:
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
- "DOCUMENT_TYPE: " + importedNode) {
- };
- case Node.DOCUMENT_FRAGMENT_NODE:
- ret = createDocumentFragment();
- break;
- case Node.NOTATION_NODE:
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "NOTATION: "
- + importedNode) {
- };
- default:
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
- "Unknown node type: " + importedNode.getNodeType()) {
- };
- }
- if (deep) {
- for (Node importedChild = importedNode.getFirstChild(); importedChild != null; importedChild = importedChild
- .getNextSibling()) {
- ret.appendChild(importNode(importedChild, true));
- }
- }
- return ret;
- }
-
- /**
- * @param namespaceURI
- * always ignored.
- * @return same as <code>createElement(qualifiedName)</code>
- */
- public Element createElementNS(String namespaceURI, String qualifiedName)
- throws DOMException {
- return createElement(qualifiedName);
- }
-
- /**
- * @param namespaceURI
- * always ignored.
- * @return same as <code>createAttribute(qualifiedName)</code>
- */
- public Attr createAttributeNS(String namespaceURI, String qualifiedName)
- throws DOMException {
- return createAttribute(qualifiedName);
- }
-
- /**
- * @param namespaceURI
- * always ignored.
- * @return same as <code>getElementsByTagName(localName)</code>
- */
- public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
- return getElementsByTagName(localName);
- }
-
- /**
- * Returns the <code>Element</code> whose <code>ID</code> is given by
- * <code>elementId</code>. If more than one element has this
- * <code>ID</code> The first element in the depth-first and pre-order
- * traversal is returned.
- */
- public Element getElementById(String elementID) {
- return getElementById(documentElement, elementID);
- }
-
- private Element getElementById(Element el, String elementID) {
- if (el.getAttribute("id").equals(elementID)) {
- return el;
- } else {
- for (Node child = el.getFirstChild(); child != null; child = child
- .getNextSibling()) {
- if (child instanceof Element) {
- Element ret = getElementById((Element) child, elementID);
- if (ret != null) {
- return ret;
- }
- }
- }
- return null;
- }
- }
-
- /**
- * DOM Level 3
- */
-
- public Node adoptNode(Node source) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getDocumentURI() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public DOMConfiguration getDomConfig() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getInputEncoding() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean getStrictErrorChecking() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public String getXmlEncoding() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean getXmlStandalone() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public String getXmlVersion() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void normalizeDocument() {
- // TODO Auto-generated method stub
-
- }
-
- public Node renameNode(Node n, String namespaceURI, String qualifiedName)
- throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setDocumentURI(String documentURI) {
- // TODO Auto-generated method stub
-
- }
-
- public void setStrictErrorChecking(boolean strictErrorChecking) {
- // TODO Auto-generated method stub
-
- }
-
- public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
- // TODO Auto-generated method stub
-
- }
-
- public void setXmlVersion(String xmlVersion) throws DOMException {
- // TODO Auto-generated method stub
-
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocumentFragment.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocumentFragment.java
deleted file mode 100644
index 97ba560..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLDocumentFragment.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.Node;
-
-class SGMLDocumentFragment extends SGMLParentNode implements DocumentFragment {
- void check(Node newChild) throws DOMException {
- switch (newChild.getNodeType()) {
- case ELEMENT_NODE:
- case PROCESSING_INSTRUCTION_NODE:
- case COMMENT_NODE:
- case TEXT_NODE:
- case CDATA_SECTION_NODE:
- case ENTITY_REFERENCE_NODE:
- break;
- default:
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, newChild
- + " cannot be a child of " + this) {
- };
- }
- }
-
- public String getNodeName() {
- return "#document-fragment";
- }
-
- public String getNodeValue() throws DOMException {
- return null;
- }
-
- public void setNodeValue(String nodeValue) throws DOMException {
- throw new DOMException(DOMException.NO_DATA_ALLOWED_ERR, this
- + " cannot have any data.") {
- };
- }
-
- public short getNodeType() {
- return DOCUMENT_FRAGMENT_NODE;
- }
-
- SGMLDocumentFragment(Document doc) {
- super(doc);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("DocumentFragment[");
- for (Node child = getFirstChild(); child != null; child = child
- .getNextSibling()) {
- sb.append(child.toString());
- if (child.getNextSibling() != null) {
- sb.append(',');
- }
- }
- sb.append(']');
- return sb.toString();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLElement.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLElement.java
deleted file mode 100644
index fbb0ad9..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLElement.java
+++ /dev/null
@@ -1,600 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.PrintWriter;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.TypeInfo;
-
-/**
- * Element class of SGML.
- *
- */
-public class SGMLElement extends SGMLParentNode implements Element, IPrintXML {
- /**
- * @serial
- */
- private String tagName;
-
- /**
- * @serial
- */
- private SGMLAttribute attributes[] = new SGMLAttribute[8];
-
- /**
- * @serial
- */
- private int attrNum = 0;
-
- /**
- * Constructs an element.
- *
- * @param name
- * element's name
- * @param doc
- * owner document of this element.
- */
- public SGMLElement(String name, Document doc) {
- super(doc);
- this.tagName = name;
- }
-
- /**
- * Checks if an specified node is appropriate as a child.
- *
- * @param node
- * child node to add
- * @exception DOMException
- * If <code> node </code> is not appropriate as a child.
- */
- void check(Node node) throws DOMException {
- if (node == null) {
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,
- "trying to insert null") {
- };
- } else if (node.getOwnerDocument() != ownerDocument) {
- throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, node
- + " created from " + node.getOwnerDocument() + ". " + this
- + " created from " + ownerDocument) {
- };
- }
- switch (node.getNodeType()) {
- case ELEMENT_NODE:
- case TEXT_NODE:
- case COMMENT_NODE:
- case PROCESSING_INSTRUCTION_NODE:
- case CDATA_SECTION_NODE:
- case ENTITY_REFERENCE_NODE:
- break;
- default:
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, node
- + " is not allowed as a child of " + this) {
- };
- }
- }
-
- public String getAttribute(String name) {
- for (int i = attrNum - 1; i >= 0; i--) {
- SGMLAttribute attr = attributes[i];
- if (attr.getNodeName().equalsIgnoreCase(name)) {
- return attr.getNodeValue();
- }
- }
- return "";
- }
-
- public Attr getAttributeNode(String name) {
- for (int i = attrNum - 1; i >= 0; i--) {
- SGMLAttribute ret = attributes[i];
- if (ret.getNodeName().equalsIgnoreCase(name)) {
- return ret;
- }
- }
- return null;
- }
-
- private void expandAttrBuf() {
- SGMLAttribute newBuf[] = new SGMLAttribute[attrNum * 2];
- System.arraycopy(attributes, 0, newBuf, 0, attrNum);
- attributes = newBuf;
- }
-
- /**
- * returned instance always ignores <code>namespaceURI</code>
- */
- public NamedNodeMap getAttributes() {
- return new NamedNodeMap() {
- public String toString() {
- StringBuffer ret = new StringBuffer('[');
- for (int i = 0; i < attrNum - 1; i++) {
- ret.append(attributes[i] + ", ");
- }
- if (attrNum > 0) {
- ret.append(attributes[attrNum - 1]);
- }
- ret.append(']');
- return ret.toString();
- }
-
- public Node getNamedItem(String name) {
- return getAttributeNode(name);
- }
-
- public Node getNamedItemNS(String namespaceURI, String localName) {
- return getNamedItem(localName);
- }
-
- public Node setNamedItem(Node arg) throws DOMException {
- if (arg instanceof SGMLAttribute) {
- for (int i = attrNum - 1; i >= 0; i--) {
- SGMLAttribute ret = attributes[i];
- if (ret.getNodeName().equalsIgnoreCase(
- arg.getNodeName())) {
- attributes[i] = (SGMLAttribute) arg;
- attributes[i].setOwnerElement(SGMLElement.this);
- return ret;
- }
- }
- if (attrNum == attributes.length) {
- expandAttrBuf();
- }
- attributes[attrNum++] = (SGMLAttribute) arg;
- ((SGMLAttribute) arg).setOwnerElement(SGMLElement.this);
- return null;
- } else {
- throw new DOMException(
- DOMException.NO_MODIFICATION_ALLOWED_ERR,
- "only Attr instance can be set: " + arg) {
- };
- }
- }
-
- public Node setNamedItemNS(Node arg) throws DOMException {
- return setNamedItem(arg);
- }
-
- public Node removeNamedItem(String name) throws DOMException {
- for (int i = attrNum - 1; i >= 0; i--) {
- SGMLAttribute attr = attributes[i];
- if (attr.getNodeName().equalsIgnoreCase(name)) {
- attributes[i] = null;
- attr.setOwnerElement(null);
- for (i++; i < attrNum; i++) {
- attributes[i - 1] = attributes[i];
- }
- attrNum--;
- return attr;
- }
- }
- return null;
- }
-
- public Node removeNamedItemNS(String namespaceURI, String localName)
- throws DOMException {
- return removeNamedItem(localName);
- }
-
- public Node item(int index) {
- if (0 <= index && index < attrNum) {
- return attributes[index];
- }
- return null;
- }
-
- public int getLength() {
- return attrNum;
- }
- };
- }
-
- public NodeList getElementsByTagName(String name) {
- final boolean all = name.equals("*");
- final String targetName = name;
- return new NodeList() {
- public int getLength() {
- int ret = 0;
- Node tmp1, tmp2;
- tmp1 = SGMLElement.this.firstChild;
- outer: while (tmp1 != null) {
- if (tmp1 instanceof Element
- && (all || targetName.equalsIgnoreCase(tmp1
- .getNodeName()))
- && tmp1 != SGMLElement.this) {
- ret++;
- }
- if ((tmp2 = tmp1.getFirstChild()) == null) {
- if (tmp1 == SGMLElement.this) {
- break outer;
- } else {
- tmp2 = tmp1.getNextSibling();
- }
- }
- while (tmp2 == null && tmp1 != null) {
- tmp1 = tmp2 = tmp1.getParentNode();
- if (tmp1 != SGMLElement.this) {
- tmp2 = tmp1.getNextSibling();
- } else {
- break outer;
- }
- }
- tmp1 = tmp2;
- }
- return ret;
- }
-
- public Node item(int index) {
- Node tmp1, tmp2;
- tmp1 = SGMLElement.this.firstChild;
- outer: while (tmp1 != null) {
- if (tmp1 instanceof Element
- && (all || targetName.equalsIgnoreCase(tmp1
- .getNodeName()))
- && tmp1 != SGMLElement.this) {
- if (index == 0) {
- return tmp1;
- } else {
- index--;
- }
- }
- if ((tmp2 = tmp1.getFirstChild()) == null) {
- if (tmp1 == SGMLElement.this) {
- break outer;
- } else {
- tmp2 = tmp1.getNextSibling();
- }
- }
- while (tmp2 == null && tmp1 != null) {
- tmp1 = tmp2 = tmp1.getParentNode();
- if (tmp1 != SGMLElement.this) {
- tmp2 = tmp1.getNextSibling();
- } else {
- break outer;
- }
- }
- tmp1 = tmp2;
- }
- return null;
- }
- };
-
- }
-
- public String getNodeName() {
- return tagName;
- }
-
- public short getNodeType() {
- return ELEMENT_NODE;
- }
-
- public String getNodeValue() {
- return null;
- }
-
- public String getTagName() {
- return tagName;
- }
-
- public void removeAttribute(String name) throws DOMException {
- for (int i = attrNum - 1; i >= 0; i--) {
- SGMLAttribute attr = attributes[i];
- if (attr.getNodeName().equalsIgnoreCase(name)) {
- String defaultValue = getDefaultValue(name);
- if (defaultValue != null) {
- attr.setNodeValue(defaultValue);
- } else {
- attributes[i] = null;
- attr.setOwnerElement(null);
- for (i++; i < attrNum; i++) {
- attributes[i - 1] = attributes[i];
- }
- attrNum--;
- }
- return;
- }
- }
- }
-
- private String getDefaultValue(String attrName) {
- ElementDefinition edef;
- SGMLDocTypeDef dtd = ((SGMLDocument) ownerDocument).getDTD();
- if (dtd == null)
- return null;
- edef = dtd.getElementDefinition(tagName);
- if (edef == null)
- return null;
- AttributeDefinition adef = edef.getAttributeDef(attrName);
- return adef != null ? adef.getDefaultValue() : null;
- }
-
- public Attr removeAttributeNode(Attr oldAttr) {
- for (int i = attrNum - 1; i >= 0; i--) {
- if (attributes[i] == oldAttr) {
- String defaultValue = getDefaultValue(oldAttr.getNodeName());
- if (defaultValue != null) {
- SGMLAttribute attr = (SGMLAttribute) ownerDocument
- .createAttribute(oldAttr.getNodeName());
- attr.setValue(defaultValue);
- attributes[i] = attr;
- attr.setOwnerElement(this);
- } else {
- attributes[i] = null;
- for (i++; i < attrNum; i++) {
- attributes[i - 1] = attributes[i];
- }
- attrNum--;
- }
- break;
- }
- }
- ((SGMLAttribute) oldAttr).setOwnerElement(this);
- return oldAttr;
- }
-
- public void setAttribute(String name, String value) throws DOMException {
- SGMLAttribute attr;
- for (int i = attrNum - 1; i >= 0; i--) {
- attr = attributes[i];
- if (attr.getName().equalsIgnoreCase(name)) {
- attr.setValue(value);
- return;
- }
- }
- attr = (SGMLAttribute) ownerDocument.createAttribute(name);
- attr.setValue(value);
- attr.setOwnerElement(this);
- if (attributes.length == attrNum) {
- expandAttrBuf();
- }
- attributes[attrNum++] = attr;
- }
-
- public Attr setAttributeNode(Attr newAttr) throws DOMException {
- if (!(newAttr instanceof SGMLAttribute)) {
- throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, newAttr
- + "is not SGMLAttribute") {
- };
- }
- for (int i = attrNum - 1; i >= 0; i--) {
- SGMLAttribute attr = attributes[i];
- if (attr.getName().equalsIgnoreCase(newAttr.getName())) {
- attr.setOwnerElement(null);
- attributes[i] = (SGMLAttribute) newAttr;
- attributes[i].setOwnerElement(this);
- return attr;
- }
- }
- if (attributes.length == attrNum) {
- expandAttrBuf();
- }
- attributes[attrNum] = (SGMLAttribute) newAttr;
- attributes[attrNum++].setOwnerElement(this);
- return null;
- }
-
- public void setNodeValue(String nodeValue) throws DOMException {
- throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
- "can't set value in " + this) {
- };
- }
-
- /**
- * Get start tag string. If attribute value includes a character that can be
- * reverted, replaces it to original character entity.
- *
- * @return string of start tag.
- */
- public String toString() {
- StringBuffer ret = new StringBuffer();
- ret.append('<');
- ret.append(tagName);
- for (int i = 0; i < attrNum; i++)
- ret.append(attributes[i].toString());
- ret.append('>');
- return new String(ret);
- }
-
- public void printAsXML(PrintWriter pw, int indentLevel, boolean indent) {
- if (indent
- && (previousSibling == null || previousSibling.getNodeType() != Node.TEXT_NODE
- && previousSibling.getNodeType() != Node.CDATA_SECTION_NODE)) {
- for (int i = 0; i < indentLevel; i++)
- pw.print(' ');
- }
- pw.print('<' + getTagName());
- for (int i = 0; i < attrNum; i++) {
- pw.print(attributes[i].toXMLString());
- }
- if (hasChildNodes()) {
- pw.print('>');
- for (Node child = getFirstChild(); child != null; child = child
- .getNextSibling()) {
- if (indent && child.getNodeType() != Node.TEXT_NODE
- && child.getNodeType() != Node.CDATA_SECTION_NODE) {
- pw.println();
- }
- ((IPrintXML) child).printAsXML(pw, indentLevel + 1, indent);
- }
- if (indent
- && (getLastChild() == null || getLastChild().getNodeType() != Node.TEXT_NODE
- && getLastChild().getNodeType() != Node.CDATA_SECTION_NODE)) {
- pw.println();
- for (int i = indentLevel; i > 0; i--)
- pw.print(' ');
- }
- pw.print("</" + getTagName() + '>');
- } else {
- pw.print("/>");
- }
- }
-
- public void printAsSGML(PrintWriter pw, int indentLevel, boolean indent) {
- if (indent
- && (previousSibling == null || previousSibling.getNodeType() != Node.TEXT_NODE
- && previousSibling.getNodeType() != Node.CDATA_SECTION_NODE)) {
- for (int i = indentLevel; i > 0; i--)
- pw.print(' ');
- }
- pw.print(toString());
- boolean parent;
- if (parent = hasChildNodes()) {
- for (Node child = getFirstChild(); child != null; child = child
- .getNextSibling()) {
- if (indent && child.getNodeType() != Node.TEXT_NODE
- && child.getNodeType() != Node.CDATA_SECTION_NODE) {
- pw.println();
- }
- ((IPrintXML) child).printAsSGML(pw, indentLevel + 1, indent);
- }
- }
- SGMLDocTypeDef dtd = ((SGMLDocument) getOwnerDocument()).getDTD();
- ElementDefinition ed = null;
- if (dtd != null) {
- ed = dtd.getElementDefinition(tagName);
- }
- if (parent || ed == null || ed.getContentModel() != SGMLParser.empty) {
- if (indent
- && (getLastChild() == null || getLastChild().getNodeType() != Node.TEXT_NODE
- && getLastChild().getNodeType() != Node.CDATA_SECTION_NODE)) {
- pw.println();
- for (int i = indentLevel; i > 0; i--)
- pw.print(' ');
- }
- pw.print("</" + getTagName() + '>');
- }
- }
-
- public Node cloneNode(boolean deep) {
- SGMLElement ret = (SGMLElement) super.cloneNode(deep);
- SGMLAttribute cloneAttributes[] = new SGMLAttribute[attributes.length];
- for (int i = attrNum - 1; i >= 0; i--) {
- cloneAttributes[i] = (SGMLAttribute) attributes[i].cloneNode(false);
- cloneAttributes[i].setOwnerElement(ret);
- }
- ret.attributes = cloneAttributes;
- return ret;
- }
-
- /**
- * @param namespaceURI
- * always ignored
- * @return same as <code>getAttribute(localName)</code>
- */
- public String getAttributeNS(String namespaceURI, String localName) {
- return getAttribute(localName);
- }
-
- /**
- * Sets an attribute. In this implementation, this method is same as
- * <code>setAttribute(qualifiedName, value)</code>
- *
- * @param namespaceURI
- * always ignored
- */
- public void setAttributeNS(String namespaceURI, String qualifiedName,
- String value) throws DOMException {
- setAttribute(qualifiedName, value);
- }
-
- /**
- * Removes an attribute. In this implementation, this method is same as
- * <code>removeAttribute(localName)</code>
- *
- * @param namespaceURI
- * always ignored
- */
- public void removeAttributeNS(String namespaceURI, String localName)
- throws DOMException {
- removeAttribute(localName);
- }
-
- /**
- * @param namespaceURI
- * always ignored
- * @return same as <code>getAttributeNode(localName)</code>
- */
- public Attr getAttributeNodeNS(String namespaceURI, String localName) {
- return getAttributeNode(localName);
- }
-
- /**
- * @return same as <code>setAttributeNode(newAttr)</code>
- */
- public Attr setAttributeNodeNS(Attr newAttr) throws DOMException {
- return setAttributeNode(newAttr);
- }
-
- /**
- * @param namespaceURI
- * always ignored
- * @return same as <code>getElementsByTagName(localName)</code>
- */
- public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
- return getElementsByTagName(localName);
- }
-
- public boolean hasAttribute(String name) {
- for (int i = attrNum - 1; i >= 0; i--) {
- SGMLAttribute attr = attributes[i];
- if (attr.getNodeName().equalsIgnoreCase(name)) {
- return true;
- }
- }
- return getDefaultValue(name) != null;
- }
-
- /**
- * @param namespaceURI
- * ignored
- * @return same as <code>hasAttributeNS(localName)</code>
- */
- public boolean hasAttributeNS(String namespaceURI, String localName) {
- return hasAttribute(localName);
- }
-
- public boolean hasAttributes() {
- return attrNum > 0;
- }
-
- /**
- * DOM Level 3
- */
-
- public TypeInfo getSchemaTypeInfo() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setIdAttribute(String name, boolean isId) throws DOMException {
- // TODO Auto-generated method stub
-
- }
-
- public void setIdAttributeNS(String namespaceURI, String localName,
- boolean isId) throws DOMException {
- // TODO Auto-generated method stub
-
- }
-
- public void setIdAttributeNode(Attr idAttr, boolean isId)
- throws DOMException {
- // TODO Auto-generated method stub
-
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLEntityDeclaration.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLEntityDeclaration.java
deleted file mode 100644
index 8bb45a2..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLEntityDeclaration.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.IModelGroup;
-
-class SGMLEntityDeclaration {
- private String name = null;
-
- private String replacementString = null;
-
- private IModelGroup replacementSubtree = null;
-
- private AttributeDefinition attributeDefinitions[] = null;
-
- private SGMLDocTypeDef dtd;
-
- SGMLEntityDeclaration(String entityName, String entityString,
- SGMLDocTypeDef dtd) {
- this.name = entityName;
- this.replacementString = entityString;
- this.dtd = dtd;
- }
-
- AttributeDefinition[] getAttributeDefinitions() {
- return attributeDefinitions;
- }
-
- Reader getReplacementReader() throws IOException {
- return new StringReader(replacementString);
- }
-
- String getReplacementString() {
- return replacementString;
- }
-
- IModelGroup getReplacementSubtree() {
- return replacementSubtree;
- }
-
- void setAttributeDefinitions(AttributeDefinition ads[]) {
- attributeDefinitions = ads;
- }
-
- void setReplacementString(String arg) {
- replacementString = arg;
- }
-
- void setReplacementSubtree(IModelGroup arg) {
- replacementSubtree = arg;
- }
-
- public String toString() {
- return name + '=' + replacementString;
- }
-
- String getEntityName() {
- return name;
- }
-
- private int charEntity = -1;
-
- int getReplacementChar() {
- return charEntity;
- }
-
- void setReplacementChar(int ch) {
- charEntity = ch;
- }
-
- SGMLDocTypeDef getDTD() {
- return dtd;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLEntityReference.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLEntityReference.java
deleted file mode 100644
index 63d6841..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLEntityReference.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-class SGMLEntityReference {
- private String name;
-
- private SGMLEntityDeclaration ed;
-
- SGMLEntityReference(String name, SGMLEntityDeclaration ed) {
- this.name = name;
- this.ed = ed;
- }
-
- SGMLEntityDeclaration getEntityDeclaration() {
- return ed;
- }
-
- String getName() {
- return name;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLNode.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLNode.java
deleted file mode 100644
index bca2c80..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLNode.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.Serializable;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.UserDataHandler;
-
-/**
- * Base class of org.w3c.dom.Node implementation. This class implements most
- * methods except for a few which depends on concrete its classes.
- */
-public abstract class SGMLNode implements Node, Cloneable, Serializable {
- SGMLNode previousSibling, nextSibling, parent;
-
- Document ownerDocument;
-
- SGMLNode(Document doc) {
- ownerDocument = doc;
- }
-
- public Node cloneNode(boolean deep) {
- try {
- SGMLNode ret = (SGMLNode) clone();
- ret.parent = ret.nextSibling = ret.previousSibling = null;
- return ret;
- } catch (CloneNotSupportedException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- /**
- * default implementation. Element must override this method.
- */
- public NamedNodeMap getAttributes() {
- return null;
- }
-
- private static NodeList nullNodeList = new NodeList() {
- public Node item(int index) {
- return null;
- }
-
- public int getLength() {
- return 0;
- }
- };
-
- public NodeList getChildNodes() {
- return nullNodeList;
- }
-
- public Node getFirstChild() {
- return null;
- }
-
- public Node getLastChild() {
- return null;
- }
-
- public Node getNextSibling() {
- return this.nextSibling;
- }
-
- public Document getOwnerDocument() {
- return ownerDocument;
- }
-
- public Node getParentNode() {
- return parent;
- }
-
- public Node getPreviousSibling() {
- return previousSibling;
- }
-
- public boolean hasChildNodes() {
- return false;
- }
-
- public Node appendChild(Node node) throws DOMException {
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, this
- + " cannot have children.") {
- };
- }
-
- public Node insertBefore(Node newChild, Node refChild) throws DOMException {
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, this
- + " cannot have children.") {
- };
- }
-
- public Node removeChild(Node oldChild) throws DOMException {
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, this
- + " cannot have children.") {
- };
- }
-
- public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, this
- + " cannot have children.") {
- };
- }
-
- // DOM Level 2
-
- public void normalize() {
- }
-
- /**
- * @return always false because this is not XML implementation but SGML.
- */
- public boolean supports(String feature, String version) {
- return false;
- }
-
- /**
- * @return always null
- */
- public String getNamespaceURI() {
- return null;
- }
-
- /**
- * @return always null
- */
- public String getPrefix() {
- return null;
- }
-
- /**
- * Does nothing.
- */
- public void setPrefix(String prefix) throws DOMException {
- }
-
- /**
- * @return always null
- */
- public String getLocalName() {
- return null;
- }
-
- public boolean isSupported(String feature, String version) {
- return false;
- }
-
- public boolean hasAttributes() {
- return false;
- }
-
- /**
- * DOM Level 3
- */
-
- public short compareDocumentPosition(Node other) throws DOMException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public String getBaseURI() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Object getFeature(String feature, String version) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getTextContent() throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Object getUserData(String key) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean isDefaultNamespace(String namespaceURI) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isEqualNode(Node arg) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isSameNode(Node other) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public String lookupNamespaceURI(String prefix) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String lookupPrefix(String namespaceURI) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setTextContent(String textContent) throws DOMException {
- // TODO Auto-generated method stub
-
- }
-
- public Object setUserData(String key, Object data, UserDataHandler handler) {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLPI.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLPI.java
deleted file mode 100644
index bfd351f..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLPI.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.PrintWriter;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-
-/**
- * Originally <code>org.w3c.dom.ProcessingInstruction</code> is defined for
- * XML. Structure of XML's ProcessingInstruction is <?<code>target data
- * </code>
- * ?>. But structure of SGML's PI is <?<code>data</code> > So, this
- * class has no <code>target</code>. Everything is <code>data</code>
- */
-public class SGMLPI extends SGMLNode implements ProcessingInstruction,
- IPrintXML {
- void check(Node node) {
- throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,
- "ProcessingInstruction cannot have any children.") {
- };
- }
-
- private static NodeList nullNodeList = new NodeList() {
- public Node item(int index) {
- return null;
- }
-
- public int getLength() {
- return 0;
- }
- };
-
- public String getNodeName() {
- return data;
- }
-
- public String getNodeValue() {
- return data;
- }
-
- public void setNodeValue(String nodeValue) {
- this.data = nodeValue;
- }
-
- public short getNodeType() {
- return PROCESSING_INSTRUCTION_NODE;
- }
-
- public Node getParentNode() {
- return parent;
- }
-
- public NodeList getChildNodes() {
- return nullNodeList;
- }
-
- public Node getFirstChild() {
- return null;
- }
-
- public Node getLastChild() {
- return null;
- }
-
- /**
- * @serial
- */
- private String target, data;
-
- /**
- * Constructs ProcessingInstruction instance whose target value is null.
- */
- public SGMLPI(String target, String data, SGMLDocument doc) {
- super(doc);
- this.target = target;
- this.data = data;
- }
-
- public boolean hasChildNodes() {
- return false;
- }
-
- /**
- * SGML's PI has no taget. So returns data instead of target.
- *
- * @return always same as {@link #getData() getData()}
- */
- public String getTarget() {
- return null;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- /**
- * For debug.
- */
- public String toString() {
- return "<?" + data + '>';
- }
-
- public void printAsXML(PrintWriter pw, int indentLevel, boolean indent) {
- pw.print("<?" + data + "?>");
- }
-
- public void printAsSGML(PrintWriter pw, int indentLevel, boolean indent) {
- pw.print("<?" + data + '>');
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLParentNode.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLParentNode.java
deleted file mode 100644
index f2871f6..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLParentNode.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.Serializable;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-/**
- * Base class of org.w3c.dom.Node implementation. This class implements most
- * methods except for a few which depends on concrete its classes.
- */
-public abstract class SGMLParentNode extends SGMLNode implements Node,
- Cloneable, Serializable {
- SGMLNode firstChild, lastChild;
-
- SGMLParentNode(Document doc) {
- super(doc);
- }
-
- abstract void check(Node newChild) throws DOMException;
-
- public Node cloneNode(boolean deep) {
- SGMLParentNode ret = null;
- if (deep && firstChild != null) {
- ret = cloneNodeDeep();
- if (ret == null)
- return null;
- } else {
- try {
- ret = (SGMLParentNode) clone();
- } catch (CloneNotSupportedException e) {
- e.printStackTrace();
- return null;
- }
- ret.lastChild = ret.firstChild = null;
- }
- ret.parent = ret.nextSibling = ret.previousSibling = null;
- return ret;
- }
-
- private SGMLParentNode cloneNodeDeep() {
- try {
- SGMLParentNode ret = (SGMLParentNode) clone();
- ret.previousSibling = ret.nextSibling = ret.parent = ret.firstChild = ret.lastChild = null;
- if (this.firstChild == null)
- return ret;
- SGMLNode child = ret.firstChild = (SGMLNode) this.firstChild
- .cloneNode(true);
- child.parent = ret;
- for (SGMLNode source = this.firstChild.nextSibling; source != null; source = source.nextSibling) {
- child.nextSibling = (SGMLNode) source.cloneNode(true);
- child.nextSibling.previousSibling = child;
- child = child.nextSibling;
- child.parent = ret;
- }
- ret.lastChild = child;
- return ret;
- } catch (CloneNotSupportedException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- public NodeList getChildNodes() {
- return new NodeList() {
- public Node item(int index) {
- SGMLNode ret = firstChild;
- while (index > 0 && ret != null) {
- ret = ret.nextSibling;
- index--;
- }
- return index == 0 ? ret : null;
- }
-
- public int getLength() {
- int ret = 0;
- for (SGMLNode child = firstChild; child != null; child = child.nextSibling) {
- ret++;
- }
- return ret;
- }
- };
- }
-
- public Node getFirstChild() {
- return this.firstChild;
- }
-
- public Node getLastChild() {
- return this.lastChild;
- }
-
- public Node getPreviousSibling() {
- return previousSibling;
- }
-
- public boolean hasChildNodes() {
- return firstChild != null;
- }
-
- public Node appendChild(Node node) throws DOMException {
- if (node instanceof SGMLDocumentFragment
- && node.getOwnerDocument() == this.getOwnerDocument()) {
- SGMLDocumentFragment fragment = (SGMLDocumentFragment) node;
- for (SGMLNode child = fragment.firstChild; child != null; child = child.nextSibling) {
- child.parent = this;
- }
- if (firstChild == null) {
- this.firstChild = fragment.firstChild;
- this.lastChild = fragment.lastChild;
- } else {
- this.lastChild.nextSibling = fragment.firstChild;
- fragment.firstChild.previousSibling = this.lastChild;
- this.lastChild = fragment.lastChild;
- }
- return node;
- }
- check(node);
- SGMLNode sgmlNode = (SGMLNode) node;
- if (sgmlNode.parent != null) {
- sgmlNode.parent.removeChild(sgmlNode);
- }
- sgmlNode.parent = this;
- if (firstChild == null) {
- this.firstChild = this.lastChild = sgmlNode;
- return node;
- } else {
- this.lastChild.nextSibling = sgmlNode;
- sgmlNode.previousSibling = this.lastChild;
- this.lastChild = sgmlNode;
- return node;
- }
- }
-
- public Node insertBefore(Node newChild, Node refChild) throws DOMException {
- if (refChild == null) {
- return appendChild(newChild);
- }
- SGMLNode sgmlRefChild = (SGMLNode) refChild;
- if (sgmlRefChild.parent != this) {
- throw new DOMException(DOMException.NOT_FOUND_ERR, "There isn't "
- + refChild + " as a children") {
- };
- }
- if (newChild instanceof SGMLDocumentFragment
- && newChild.getOwnerDocument() == this.getOwnerDocument()) {
- SGMLDocumentFragment fragment = (SGMLDocumentFragment) newChild;
- for (SGMLNode child = fragment.firstChild; child != null; child = child.nextSibling) {
- child.parent = this;
- }
- if (firstChild == refChild) {
- this.firstChild.previousSibling = fragment.lastChild;
- fragment.lastChild.nextSibling = this.firstChild;
- this.firstChild = fragment.firstChild;
- } else {
- fragment.firstChild.previousSibling = sgmlRefChild.previousSibling;
- fragment.lastChild.nextSibling = sgmlRefChild;
- sgmlRefChild.previousSibling.nextSibling = fragment.firstChild;
- sgmlRefChild.previousSibling = fragment.lastChild;
- }
- return newChild;
- }
- check(newChild);
- SGMLNode sgmlNewChild = (SGMLNode) newChild;
- if (sgmlNewChild.parent != null) {
- sgmlNewChild.parent.removeChild(sgmlNewChild);
- }
-
- if (this.firstChild == refChild) {
- this.firstChild.previousSibling = sgmlNewChild;
- sgmlNewChild.nextSibling = this.firstChild;
- sgmlNewChild.parent = this;
- this.firstChild = sgmlNewChild;
- } else {
- sgmlNewChild.previousSibling = sgmlRefChild.previousSibling;
- sgmlNewChild.nextSibling = sgmlRefChild;
- sgmlRefChild.previousSibling.nextSibling = sgmlNewChild;
- sgmlRefChild.previousSibling = sgmlNewChild;
- sgmlNewChild.parent = this;
- }
- return newChild;
- }
-
- public Node removeChild(Node oldChild) throws DOMException {
- SGMLNode sgmlOldChild;
- if (firstChild == null || !(oldChild instanceof SGMLNode)
- || (sgmlOldChild = (SGMLNode) oldChild).parent != this) {
- throw new DOMException(DOMException.NOT_FOUND_ERR, "There isn't "
- + oldChild + " as a children") {
- };
- }
- if (this.firstChild == oldChild) {
- if (this.firstChild == this.lastChild) {
- this.firstChild = this.lastChild = null;
- } else {
- this.firstChild = sgmlOldChild.nextSibling;
- this.firstChild.previousSibling = null;
- }
- } else if (this.lastChild == oldChild) {
- this.lastChild = sgmlOldChild.previousSibling;
- this.lastChild.nextSibling = null;
- } else {
- sgmlOldChild.nextSibling.previousSibling = sgmlOldChild.previousSibling;
- sgmlOldChild.previousSibling.nextSibling = sgmlOldChild.nextSibling;
- }
- sgmlOldChild.previousSibling = sgmlOldChild.nextSibling = null;
- sgmlOldChild.parent = null;
- return oldChild;
- }
-
- public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
- check(newChild);
- SGMLNode sgmlNewChild = (SGMLNode) newChild;
- SGMLNode sgmlOldChild = (SGMLNode) oldChild;
- if (sgmlOldChild.parent != this) {
- throw new DOMException(DOMException.NOT_FOUND_ERR, this
- + "doesn't have " + newChild + " as a child") {
- };
- }
-
- if (this.firstChild == oldChild) {
- if (this.firstChild != this.lastChild) {
- sgmlNewChild.nextSibling = this.firstChild.nextSibling;
- this.firstChild.nextSibling.previousSibling = sgmlNewChild;
- } else {
- this.lastChild = sgmlNewChild;
- }
- this.firstChild = sgmlNewChild;
- sgmlOldChild.previousSibling = sgmlOldChild.nextSibling = null;
- sgmlOldChild.parent = null;
- sgmlNewChild.parent = this;
- return newChild;
- }
- if (this.lastChild == oldChild) {
- this.lastChild.previousSibling.nextSibling = sgmlNewChild;
- sgmlNewChild.previousSibling = this.lastChild.previousSibling;
- this.lastChild = sgmlNewChild;
- sgmlOldChild.previousSibling = null;
- sgmlOldChild.parent = null;
- sgmlNewChild.parent = this;
- return newChild;
- }
- sgmlNewChild.previousSibling = sgmlOldChild.previousSibling;
- sgmlNewChild.nextSibling = sgmlOldChild.nextSibling;
- sgmlOldChild.previousSibling.nextSibling = sgmlNewChild;
- sgmlOldChild.nextSibling.previousSibling = sgmlNewChild;
- sgmlOldChild.previousSibling = sgmlOldChild.nextSibling = null;
- sgmlOldChild.parent = null;
- sgmlNewChild.parent = this;
- return newChild;
- }
-
- // DOM Level 2
-
- public void normalize() {
- for (SGMLNode n = this.firstChild; n != null;) {
- if (n.getNodeType() == TEXT_NODE) {
- if (n.nextSibling != null
- && n.nextSibling.getNodeType() == TEXT_NODE) {
- ((Text) n).appendData(((Text) n.nextSibling).getData());
- removeChild(n.nextSibling);
- } else {
- n = n.nextSibling;
- }
- } else {
- n.normalize();
- n = n.nextSibling;
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLParser.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLParser.java
deleted file mode 100644
index 1390efa..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLParser.java
+++ /dev/null
@@ -1,2346 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.sgml.errorhandler.AttributeValueErrorHandler;
-import org.eclipse.actf.model.dom.sgml.errorhandler.DefaultErrorHandler;
-import org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler;
-import org.eclipse.actf.model.dom.sgml.errorhandler.ITokenErrorHandler;
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.IModelGroup;
-import org.eclipse.actf.model.dom.sgml.internal.modelgroup.AndModelGroup.AndContext;
-import org.w3c.dom.Attr;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-
-
-/**
- * Pure SGML parser. Base class of a parser which parses a SGML derived markup
- * language. Language-dependent customization have to be provided by a subclass.
- */
-public class SGMLParser implements ISGMLConstants {
-
- private boolean isXHTML = false;
-
- private boolean isEmptyElement = true;
-
- private boolean isEndWithSlash = false;
-
- private String currentTagName = "";
-
- private DOMImplementation domImpl;
-
- private static Class createDocumentMethodParamTypes[] = { String.class,
- String.class, DocumentType.class };
-
- /**
- * @return <code>null</code> if failed.
- */
- public DOMImplementation setDOMImplementation(DOMImplementation domImpl) {
- Class domImpleInterface = DOMImplementation.class;
- try {
- java.lang.reflect.Method createDocumentMethod = domImpleInterface
- .getMethod("createDocument", createDocumentMethodParamTypes);
- if (createDocumentMethod != null) {
- this.domImpl = domImpl;
- doc = null;
- return domImpl;
- }
- } catch (Exception e) {
- }
- return null;
- }
-
- /**
- * @return A DOMImplementation instace this parser users.
- */
- public DOMImplementation getDOMImplementation() {
- return this.domImpl;
- }
-
- /**
- * Constructs this instance and {@link DefaultErrorHandler}instance is
- * added.
- */
- public SGMLParser() {
- addErrorHandler(new DefaultErrorHandler());
- addTokenErrorHandler(new AttributeValueErrorHandler());
- setDOMImplementation(SGMLDOMImpl.getDOMImplementation());
- if (getDOMImplementation() == null) {
- setDocument(new SGMLDocument());
- }
- anonymousElementDef = new ElementDefinition("ANONYMOUS", any);
- }
-
- private IErrorHandler errorHandlers[] = new IErrorHandler[8];
-
- private ITokenErrorHandler tokenErrorHandlers[] = new ITokenErrorHandler[8];
-
- private int errorHandlerNum = 0;
-
- private int tokenErrorHandlerNum = 0;
-
- /**
- * Sets an error handler that recovers error.
- *
- * @param errorHandler
- * @deprecated {@link #addErrorHandler(org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler)}
- */
- public void setErrorHandler(IErrorHandler errorHandler) {
- addErrorHandler(errorHandler);
- }
-
- /**
- * Adds an ErrorHandler instance. An errorHandler added later is invoked
- * earlier by this parser instance than errorHandlers added earlier. If one
- * errorHandler handles error (eg. returns <code>
- * true</code>), no more
- * errorHandlers are invoked.
- *
- * @param errorHandler
- * errorHandler instance to be added to this parser
- */
- public void addErrorHandler(IErrorHandler errorHandler) {
- if (errorHandlerNum == errorHandlers.length) {
- IErrorHandler newErrorHandlers[] = new IErrorHandler[errorHandlers.length * 2];
- for (int i = 0; i < errorHandlerNum; i++) {
- newErrorHandlers[i] = errorHandlers[i];
- }
- errorHandlers = newErrorHandlers;
- }
- this.errorHandlers[errorHandlerNum++] = errorHandler;
- }
-
- /**
- * Adds an ErrorHandler instance. An errorHandler added later is invoked
- * earlier by this parser instance than errorHandlers added earlier. If one
- * errorHandler handles error (eg. returns <code>
- * true</code>), no more
- * errorHandlers are invoked.
- *
- * @param errorHandler
- * errorHandler instance to be added to this parser
- */
- public void addTokenErrorHandler(ITokenErrorHandler errorHandler) {
- if (tokenErrorHandlerNum == tokenErrorHandlers.length) {
- ITokenErrorHandler newErrorHandlers[] = new ITokenErrorHandler[errorHandlers.length * 2];
- for (int i = 0; i < tokenErrorHandlerNum; i++) {
- newErrorHandlers[i] = tokenErrorHandlers[i];
- }
- tokenErrorHandlers = newErrorHandlers;
- }
- this.tokenErrorHandlers[tokenErrorHandlerNum++] = errorHandler;
- }
-
- /**
- * Gets node-level error handlers included in this parser
- *
- * @return error handlers
- */
- public IErrorHandler[] getErrorHandlers() {
- IErrorHandler ret[] = new IErrorHandler[errorHandlerNum];
- for (int i = 0; i < errorHandlerNum; i++) {
- ret[i] = errorHandlers[i];
- }
- return ret;
- }
-
- /**
- * Gets token-level error handlers included in this parser.
- */
- public ITokenErrorHandler[] getTokenErrorHandlers() {
- ITokenErrorHandler ret[] = new ITokenErrorHandler[errorHandlerNum];
- for (int i = 0; i < tokenErrorHandlerNum; i++) {
- ret[i] = tokenErrorHandlers[i];
- }
- return ret;
- }
-
- /**
- * Removes a node-level error handler.
- *
- * @param errorHandler
- * error handler to remove
- */
- public void removeErrorHandler(IErrorHandler errorHandler) {
- for (int i = 0; i < errorHandlerNum; i++) {
- if (errorHandlers[i] == errorHandler) {
- errorHandlers[i] = null;
- for (i++; i < errorHandlerNum; i++) {
- errorHandlers[i - 1] = errorHandlers[i];
- }
- errorHandlerNum--;
- return;
- }
- }
- }
-
- /**
- * Removes a token-level error handler.
- *
- * @param errorHandler
- * error handler to remove
- */
- public void removeTokenErrorHandler(ITokenErrorHandler errorHandler) {
- for (int i = 0; i < tokenErrorHandlerNum; i++) {
- if (tokenErrorHandlers[i] == errorHandler) {
- tokenErrorHandlers[i] = null;
- for (i++; i < tokenErrorHandlerNum; i++) {
- tokenErrorHandlers[i - 1] = tokenErrorHandlers[i];
- }
- errorHandlerNum--;
- return;
- }
- }
- }
-
- /**
- * This variable is for debugging.
- */
- public static final boolean _DEBUG = false;
-
- private boolean extractNum = true;
-
- private boolean extractChar = true;
-
- /**
- * Determines if this parser extracts both character and number entities or
- * not. Default value is <code>true</code>.
- */
- public void extractEntity(boolean b) {
- this.extractChar = this.extractNum = b;
- }
-
- /**
- * Sets if it parses and extracts number entities or not. By default, it
- * parses and number character entities.
- *
- * @param b
- * if true, extracts number entities.
- */
- public void extractNumEntity(boolean b) {
- this.extractNum = b;
- }
-
- /**
- * Checks if it parses and extracts number entities or not. By default, it
- * parses and extracts number entities.
- *
- * @return true if extracts number entities. Otherwise false
- */
- public boolean extractNumEntity() {
- return this.extractNum;
- }
-
- /**
- * Sets if it parses and extracts character entities or not. By default, it
- * parses and extracts character entities.
- *
- * @param b
- * if true, extracts character entities.
- */
- public void extractCharEntity(boolean b) {
- this.extractChar = b;
- }
-
- /**
- * Checks if it parses and extracts character entities or not. By default,
- * it parses and extracts character entities.
- *
- * @return true if extracts character entities. Otherwise false
- */
- public boolean extractCharEntity() {
- return extractChar;
- }
-
- private InsTokenizer tokenizer;
-
- private Document doc = null;
-
- /**
- * Public entities are stored in this variable. Keys are id and values are
- * file name. Both are instances of <code>java.lang.String</code>. For
- * example, for the key "-//W3C//DTD HTML 4.0 Transitional//EN", the value
- * is "loose.dtd"
- */
- protected static Hashtable<String, String> pubEntityMap = new Hashtable<String, String>();
-
- /**
- * Gets public entity map.
- *
- * @return Hashtable instance whose keys are public id and values are file
- * name.
- */
- public static Hashtable<String, String> getPublicEntityMap() {
- return pubEntityMap;
- }
-
- /**
- * Top element's ElementDefinition.
- */
- private ElementDefinition lastDef = null;
-
- static IModelGroup pcdata = new IModelGroup() {
- public boolean match(SGMLParser parser, Node parent, Node child) {
- if (child instanceof Text && !(child instanceof CDATASection)) {
- parent.appendChild(child);
- return true;
- } else {
- return false;
- }
- }
-
- public boolean optional() {
- return false;
- }
-
- public void refer(boolean infinite) {
- }
-
- public String toString() {
- return "#PCDATA";
- }
-
- public boolean match(int number) {
- return true;
- }
-
- public boolean[] rehash(int totalSize) {
- boolean ret[] = new boolean[totalSize];
- ret[totalSize - 2] = true;
- return ret;
- }
- };
-
- static IModelGroup cdata = new IModelGroup() {
- public boolean match(SGMLParser parser, Node parent, Node child) {
- if (child instanceof CDATASection) {
- parent.appendChild(child);
- return true;
- } else {
- return false;
- }
- }
-
- public boolean optional() {
- return false;
- }
-
- public void refer(boolean infinite) {
- }
-
- public String toString() {
- return "CDATA";
- }
-
- public boolean match(int number) {
- return false;
- }
-
- public boolean[] rehash(int totalSize) {
- return null;
- }
- };
-
- static IModelGroup empty = new IModelGroup() {
- public boolean match(SGMLParser parser, Node parent, Node child) {
- return false;
- }
-
- public boolean optional() {
- return true;
- }
-
- public void refer(boolean infinite) {
- }
-
- public String toString() {
- return "EMPTY";
- }
-
- public boolean match(int number) {
- return false;
- }
-
- public boolean[] rehash(int totalSize) {
- return null;
- }
- };
-
- static IModelGroup any = new IModelGroup() {
- public boolean match(SGMLParser parser, Node parent, Node child) {
- parent.appendChild(child);
- return true;
- }
-
- public boolean optional() {
- return true;
- }
-
- public void refer(boolean infinite) {
- }
-
- public boolean match(int number) {
- return true;
- }
-
- public boolean[] rehash(int totalSize) {
- return null;
- }
- };
-
- private ElementDefinition anonymousElementDef;
-
- /**
- * Gets a element definition for undefined elements.
- */
- public ElementDefinition getAnonymousElementDefinition() {
- return anonymousElementDef;
- }
-
- private SGMLDocTypeDef dtd;
-
- /**
- * Gets DTD that defines this Document's syntax.
- *
- * @return DTD that defines this Document's syntax.
- */
- public SGMLDocTypeDef getDTD() {
- return this.dtd;
- }
-
- /**
- * Sets DTD that defines this Document's syntax.
- *
- * @param dtd
- * DTD that defines this Document's syntax.
- */
- public final void setDTD(SGMLDocTypeDef dtd) {
- this.dtd = dtd;
- if (doc instanceof SGMLDocument) {
- ((SGMLDocument) doc).setDTD(dtd);
- }
-
- isXHTML = (dtd.toString().indexOf("XHTML") > -1);
-
- }
-
- private Hashtable<Node, AndContext> andMap = new Hashtable<Node, AndContext>();
-
- public Hashtable<Node, AndContext> getAndMap() {
- return andMap;
- }
-
- private Hashtable<Node, Integer> seqMap = new Hashtable<Node, Integer>();
-
- public Hashtable<Node, Integer> getSeqMap() {
- return seqMap;
- }
-
- private Hashtable<Node, Node> plusMap = new Hashtable<Node, Node>();
-
- public Hashtable<Node, Node> getPlusMap() {
- return plusMap;
- }
-
- public void clearContextMap(Node parent) {
- andMap.remove(parent);
- seqMap.remove(parent);
- plusMap.remove(parent);
- }
-
- private Attr attribute(ElementDefinition ed, AttributeListImpl attrlist)
- throws IOException, ParseException, SAXException {
- Attr ret = null;
- if (tokenizer.nextToken() != NAME_CHAR) {
- if (handleError(TAG_NAME, tokenizer.sval)) {
- return attribute(ed, attrlist);
- }
- } else {
- String attName = changeAttrNameCase(tokenizer.sval);
- AttributeDefinition ad = ed != null ? ed.getAttributeDef(attName)
- : null;
- String attValue = attName;
- if (tokenizer.nextToken() == EQ) {
- attValue = tokenizer.readAttributeValue(ad, ed);
- ret = doc.createAttribute(attName);
- ret.setValue(attValue);
- } else {
- tokenizer.pushBack();
- ret = doc.createAttribute(attName);
- }
- if (ad == null) {
- if (attrlist != null) {
- attrlist.addAttribute(attName, "CDATA", attValue);
- }
- if (ed != null && ed != anonymousElementDef) {
- if (handleError(ILLEGAL_ATTRIBUTE, ret)) {
- ret = attribute(ed, attrlist);
- } else {
- error(ILLEGAL_ATTRIBUTE, "Illegal attribute '"
- + attName + "' for " + ed.getName());
- }
- }
- } else if (attrlist != null) {
- attrlist.addAttribute(attName, ad.getDeclaredTypeStr(),
- attValue);
- }
- }
- return ret;
- }
-
- /**
- * Records an error. Does nothing by default. If it has ErrorLogListener
- * instances, calls their {@link IErrorLogListener#errorLog(int,String)}
- * method.
- *
- * @param code
- * error code.
- * @param msg
- * message of the error.
- */
- public final void error(int code, String msg) {
- for (int i = 0; i < errorLogListenerNum; i++) {
- if (tokenizer != null) {
- errorLogListeners[i].errorLog(code, tokenizer.getCurrentLine()
- + ": " + msg);
- } else {
- errorLogListeners[i].errorLog(code, msg);
- }
- }
- }
-
- private IErrorLogListener errorLogListeners[] = new IErrorLogListener[8];
-
- private int errorLogListenerNum = 0;
-
- /**
- * Adds an error log listerner. Listener is invoked when error is occured.
- */
- public void addErrorLogListener(IErrorLogListener listener) {
- if (errorLogListenerNum == errorLogListeners.length) {
- IErrorLogListener newListeners[] = new IErrorLogListener[errorLogListenerNum * 2];
- for (int i = 0; i < errorLogListenerNum; i++) {
- newListeners[i] = errorLogListeners[i];
- }
- errorLogListeners = newListeners;
- }
- errorLogListeners[errorLogListenerNum++] = listener;
- }
-
- /**
- * Removes an error log listener.
- *
- * @param lister
- * error log listener to remove.
- */
- public void removeErrorLogListener(IErrorLogListener listener) {
- for (int i = 0; i < errorLogListenerNum; i++) {
- if (errorLogListeners[i] == listener) {
- errorLogListeners[i] = null;
- for (i++; i < errorLogListenerNum; i++) {
- errorLogListeners[i - 1] = errorLogListeners[i];
- }
- errorLogListenerNum--;
- return;
- }
- }
- }
-
- private EndTag etag() throws IOException, ParseException, SAXException {
- String tagName;
- if (tokenizer.nextToken() == NAME_CHAR) {
- tagName = changeTagCase(tokenizer.sval);
- while (tokenizer.nextToken() != TAGC && tokenizer.ttype != EOF) {
- }
- ;
-
- EndTag et = new EndTag(tagName);
- currentNode = et;
- if (docHandler != null && !eHandleLogical) {
- docHandler.endElement(tagName);
- }
- ElementDefinition ed = dtd.getElementDefinition(tagName);
-
- if (ed != null) {
- lastElementNumber = ed.number;
- return et;
- } else if (keepUnknowns) {
- lastElementDef = anonymousElementDef;
- lastElementNumber = pcdataNumber + 1;
- return et;
- } else if (handleError(UNKNOWN_ELEMENT, et)) {
-
- return null;
- }
- }
- return null;
- }
-
- /**
- * Gets a document parsed by this instance.
- *
- * @return parsed document instance.
- * @see #setDocument(org.w3c.dom.Document)
- */
- public Document getDocument() {
- return doc;
- }
-
- /**
- * push back buffer size
- */
- public static final int BUF_SIZ = 256;
-
- private int bufCount = 0;
-
- private Node buf[] = new Node[BUF_SIZ];
-
- /**
- * Gets a Node or {@link EndTag}from a currently reading stream as a result
- * of tokenizing.
- *
- * @return {@link org.w3c.dom.Node Node}or {@link EndTag}
- * @exception ParseException
- * @exception IOException
- * @see #pushBackNode(org.w3c.dom.Node)
- */
- public Node getNode() throws ParseException, IOException, SAXException {
- if (bufCount == 0) {
- return node();
- } else {
- return buf[--bufCount];
- }
- }
-
- /**
- * Pushes back a node to this parser.
- *
- * @param node
- * node to be pushed back.
- * @see #getNode()
- */
- public void pushBackNode(Node node) {
- buf[bufCount++] = node;
- if (node instanceof Element) {
- lastElementDef = dtd.getElementDefinition(node.getNodeName());
- lastElementNumber = lastElementDef.number;
- }
- }
-
- /**
- * Gets a resource reader for this parser. By default, this class has no
- * resource. So if some resource is required, override this method in a
- * subclass.
- *
- * @exception IOException
- * always thrown.
- */
- protected Reader getResource(String resourceName) throws IOException {
- throw new IOException("cannot find " + resourceName);
- }
-
- private Node node() throws ParseException, IOException, SAXException {
- Node ret;
-
- // TODO emulate <tag /> by using EndTag
- if (isEndWithSlash && !isEmptyElement) {
- // if(isXHTML && isEndWithSlash){
- isEndWithSlash = false;
-
- EndTag et = new EndTag(currentTagName);
- currentNode = et;
- if (docHandler != null && !eHandleLogical) {
- docHandler.endElement(currentTagName);
- }
- ElementDefinition ed = dtd.getElementDefinition(currentTagName);
- if (ed != null) {
- lastElementNumber = ed.number;
- return et;
- } else if (keepUnknowns) {
- lastElementDef = anonymousElementDef;
- lastElementNumber = pcdataNumber + 1;
- return et;
- } else if (handleError(UNKNOWN_ELEMENT, et)) {
-
- return null;
- }
- }
- switch (tokenizer.nextToken()) {
- case STAGO:
- ret = stag();
- if (ret == null) { // Unknown Element. Skip it.
- ret = getNode();
- }
- break;
- case ETAGO:
- ret = etag();
- if (ret == null) { // Unknown Element. Skip it.
- ret = node();
- }
- break;
- case WHITESPACE:
- currentNode = ret = doc.createTextNode(tokenizer.sval);
- if (ret instanceof SGMLText) {
- ((SGMLText) ret).setIsWhitespaceInElementContent(true);
- }
- if (docHandler != null) {
- if (saxch != null) {
- docHandler.characters(saxch, begin, len);
- saxch = null;
- }
- }
- break;
- case PCDATA:
- currentNode = ret = doc.createTextNode(tokenizer.sval);
- if (docHandler != null) {
- if (saxch != null) {
- docHandler.characters(saxch, begin, len);
- saxch = null;
- }
- }
- break;
- case COMMENT:
- currentNode = ret = doc.createComment(tokenizer.sval);
- if (lexHandler != null) {
- lexHandler.comment(saxch, begin, len);
- saxch = null;
- }
- break;
- case PI:
- currentNode = ret = doc.createProcessingInstruction(null,
- tokenizer.sval);
- if (docHandler != null) {
- docHandler.processingInstruction(null, tokenizer.sval);
- }
- break;
- case EOF:
- ret = null;
- break;
- case MDO:
- error(ILLEGAL_DOCTYPE,
- "Illegal Declaration. Discarding to next '>'");
- if (tokenizer.nextToken() != '>') {
- // consume '>'
- tokenizer.consumeUntil('>');
- tokenizer.switchTo(DEFAULT);
- }
- return node();
- default:
- error(MISC_ERR,
- "Internal Parser Error: character encoding may be wrong.");
- return node();
- }
- return ret;
- }
-
- /**
- * Set up syntax information described by DTD.
- *
- * @param publicID
- * DTD's public id that specifies which to set up.
- */
- public void setupDTD(String publicID) throws ParseException, IOException {
- publicID = makeUnique(publicID);
- SGMLDocTypeDef ret = SGMLDocTypeDef.getPublic(publicID);
- if (ret != null) {
- setDTD(ret);
- lastDef = ret.getElementDefinition(getDefaultTopElement());
- } else {
- synchronized (publicID) {
- ret = SGMLDocTypeDef.getPublic(publicID);
- if (ret == null) {
- ret = SGMLDocTypeDef.createPublic(publicID, this);
- setDTD(ret);
- Reader dr = getResource((String) pubEntityMap.get(publicID));
- DTDTokenizer tok = new DTDTokenizer(dr);
- new DTDParser(tok, ret).readDTD();
- dr.close();
- SGMLDocTypeDef.putPublic(publicID, ret);
- ret.rehash();
- } else {
- setDTD(ret);
- }
- }
- }
- lastDef = dtd.getElementDefinition(getDefaultTopElement());
- pcdataNumber = dtd.getElementCount();
- for (int i = depth - 1; i >= 0; i--) {
- ancesterElementDefs[i] = dtd
- .getElementDefinition(ancesterElementDefs[i].getName());
- if (ancesterElementDefs[i] == null) {
- error(UNKNOWN_ELEMENT, ancesters[i].getNodeName()
- + " is not defined in " + publicID);
- ancesterElementDefs[i] = anonymousElementDef;
- }
- }
- anonymousElementDef.rehash(pcdataNumber + 2);
- anonymousElementDef.number = pcdataNumber + 1;
- }
-
- int pcdataNumber;
-
- /**
- * Parses SGML a document and return its top element. SGML documents are
- * consists of three parts. 1. SGML declaration. 2. Dcument type definition.
- * 3. SGML instances. If a document misses 1. and 2., this parser try to
- * read the default declaration specified by
- * {@link #setDefaultDTD(java.lang.String)}.
- *
- * @param reader
- * parse to read.
- * @return document.
- * @exception PaserException
- * If unrecoverable syntax or token error occured, throwed
- * @exception IOException
- */
- public Node parse(Reader reader) throws ParseException, IOException,
- SAXException {
- if (domImpl == null && doc == null) {
- throw new ParseException("No factory instance.");
- }
- init();
-
- this.tokenizer = new InsTokenizer(reader, this);
- if (docHandler != null) {
- docHandler.setDocumentLocator(this.tokenizer);
- docHandler.startDocument();
- }
- setDTD(SGMLDocTypeDef.createAnonymous(this));
- DocumentType docType = readDocType();
- if (docType == null) {
- error(DOCTYPE_MISSED, "<!DOCTYPE ...> is missing. Try to use \""
- + defaultDTD + "\" as document type");
- setupDTD(defaultDTD);
- }
- tokenizer.extractNumEntity(extractNum);
- tokenizer.extractCharEntity(extractChar);
- tokenizer.setPreserveWhitespace(preserveWhitespace);
- if (doc == null) {
- doc = createDocument(docType);
- if (doc instanceof SGMLDocument
- && ((SGMLDocument) doc).getDTD() == null) {
- ((SGMLDocument) doc).setDTD(this.dtd);
- }
- while (!commentsBeforeDoctype.isEmpty()) {
- CATB catb = (CATB) commentsBeforeDoctype.lastElement();
- Node node = catb.comment ? (Node) doc.createComment(catb.str)
- : doc.createProcessingInstruction(null, catb.str);
- doc.insertBefore(node, doc.getFirstChild());
- commentsBeforeDoctype.removeElement(catb);
- }
- }
-
- // //041026 handle comments after doctype
- // comment_loop: while (true) {
- // switch (tokenizer.nextToken()) {
- // case COMMENT:
- // doc.appendChild(doc.createComment(tokenizer.sval));
- // if (lexHandler != null) {
- // lexHandler.comment(saxch, begin, len);
- // }
- // break;
- // case PI:
- // doc.appendChild(doc.createComment(tokenizer.sval));
- // if (docHandler != null) {
- // docHandler.processingInstruction(null, tokenizer.sval);
- // }
- // break;
- // case MDO:
- // break comment_loop;
- // default:
- // tokenizer.pushBack();
- // break comment_loop;
- // }
- // }
-
- // dummy
- context = doc.createElement("dummy0");
- seqArray = new IModelGroup[dtd.maxSeqLength];
- Node ret = readInstances();
- if (docHandler != null)
- docHandler.endDocument();
- return ret;
- }
-
- private IModelGroup seqArray[];
-
- public IModelGroup[] getSeqArray() {
- return this.seqArray;
- }
-
- protected Document createDocument(DocumentType docType) {
- Document ret = domImpl.createDocument("dummy1", "dummy1",
- docType);
- if (ret.getDocumentElement() != null) {
- ret.removeChild(ret.getDocumentElement());
- }
- return ret;
- }
-
- /**
- * Context element.
- */
- private Element context = null;
-
- /**
- * Gets a current context element.
- *
- * @return context element
- * @see #setContext(org.w3c.dom.Element)
- */
- public Element getContext() {
- return this.context;
- }
-
- private Element forwardPath[] = new Element[BUF_SIZ];
-
- private ElementDefinition ancesterElementDefs[] = new ElementDefinition[BUF_SIZ];
-
- private Element ancesters[] = new Element[BUF_SIZ];
-
- private int depth = 0;
-
- private AttributeListImpl nullAttributeList = createAttributeList();
-
- private void setContextForward(Element element) throws SAXException {
- ElementDefinition ed;
- if (eHandleLogical && docHandler != null) {
- for (Node down = context.getLastChild(); down instanceof Element; down = down
- .getLastChild()) {
- if (down == element) {
- ancesters[depth] = element;
- ancesterElementDefs[depth] = lastElementDef;
- depth++;
- docHandler.startElement(element.getNodeName(), attrlist);
- attrlist = null;
- this.context = element;
- return;
- } else {
- ancesters[depth] = (Element) down;
- ancesterElementDefs[depth] = ed = dtd
- .getElementDefinition(down.getNodeName());
- if (ed == null) {
- ancesterElementDefs[depth] = anonymousElementDef;
- }
- docHandler.startElement(down.getNodeName(),
- nullAttributeList);
- depth++;
- }
- }
- } else {
- for (Node down = context.getLastChild(); down instanceof Element; down = down
- .getLastChild()) {
- if (down == element) {
- ancesters[depth] = element;
- ancesterElementDefs[depth] = lastElementDef;
- depth++;
- attrlist = null;
- this.context = element;
- return;
- } else {
- ancesters[depth] = (Element) down;
- ancesterElementDefs[depth] = ed = dtd
- .getElementDefinition(down.getNodeName());
- if (ed == null) {
- ancesterElementDefs[depth] = anonymousElementDef;
- }
- }
- depth++;
- }
- }
- throw new RuntimeException("Internal Parser Error.");
- }
-
- private void setContextBackward(int newDepth) throws SAXException {
- if (eHandleLogical && docHandler != null) {
- for (int i = depth - 1; i >= newDepth; i--) {
- docHandler.endElement(ancesters[i].getNodeName());
- }
- }
- depth = newDepth;
- this.context = ancesters[newDepth - 1];
- return;
- }
-
- /**
- * Sets current context element node.
- *
- * @param element
- * new context.
- * @see #getContext()
- */
- public final void setContext(Element element) throws SAXException {
- for (int i = depth - 1; i >= 0; i--) {
- Element up = ancesters[i];
- if (up == element) {
- if (eHandleLogical && docHandler != null) {
- for (int j = depth - 1; j > i; j--) {
- docHandler.endElement(ancesters[j].getNodeName());
- }
- }
- depth = i + 1;
- this.context = element;
- return;
- }
- int forwardPathLen = 0;
- for (Node down = up.getLastChild(); down instanceof Element; down = down
- .getLastChild()) {
- if (down == element) {
- if (eHandleLogical && docHandler != null) {
- for (int j = depth - 1; j > i; j--) {
- docHandler.endElement(ancesters[j].getNodeName());
- }
- for (int j = 0; j < forwardPathLen; j++) {
- docHandler.startElement(forwardPath[j]
- .getNodeName(), nullAttributeList);
- ancesters[i + j + 1] = forwardPath[j];
- ancesterElementDefs[i + j + 1] = dtd
- .getElementDefinition(forwardPath[j]
- .getNodeName());
- if (ancesterElementDefs[i + j + 1] == null) {
- ancesterElementDefs[i + j + 1] = anonymousElementDef;
- }
- }
- docHandler.startElement(down.getNodeName(), attrlist);
- } else {
- for (int j = 0; j < forwardPathLen; j++) {
- ancesters[i + j + 1] = forwardPath[j];
- ancesterElementDefs[i + j + 1] = dtd
- .getElementDefinition(forwardPath[j]
- .getNodeName());
- if (ancesterElementDefs[i + j + 1] == null) {
- ancesterElementDefs[i + j + 1] = anonymousElementDef;
- }
- }
- }
- depth = i + forwardPathLen + 1;
- ancesters[depth] = element;
- ancesterElementDefs[depth] = lastElementDef;
- depth++;
- attrlist = null;
- this.context = element;
- return;
- } else {
- forwardPath[forwardPathLen++] = (Element) down;
- }
- }
- }
- // creates backward context.
- int newDepth = 0;
- for (Node up = element; up instanceof Element; up = up.getParentNode()) {
- newDepth++;
- }
- Element newAncesters[] = new Element[newDepth];
- int i = 1;
- for (Node up = element; up instanceof Element; up = up.getParentNode()) {
- newAncesters[newDepth - i] = (Element) up;
- i++;
- }
- for (i = 0; i < newDepth; i++) {
- if (ancesters[i] != newAncesters[i]) {
- if (eHandleLogical && docHandler != null) {
- for (int j = depth - 1; j >= i; j--) {
- docHandler.endElement(ancesters[j].getNodeName());
- }
- for (int j = i; j < newDepth - 1; j++) {
- docHandler.startElement(newAncesters[j].getNodeName(),
- nullAttributeList);
- }
- docHandler.startElement(element.getNodeName(), attrlist);
- }
- while (i < newDepth - 1) {
- ancesters[i] = newAncesters[i];
- ancesterElementDefs[i] = dtd
- .getElementDefinition(newAncesters[i].getNodeName());
- }
- ancesters[newDepth - 1] = element;
- ancesterElementDefs[newDepth - 1] = lastElementDef;
- depth = newDepth;
- attrlist = null;
- this.context = element;
- return;
- }
- }
- }
-
- private Vector<Element> nodesWithEndtag = new Vector<Element>();
-
- /**
- * Checks if a specified element has its end tag or not.
- *
- * @param element
- * element to be checked.
- * @return <code>true</code> if <code>element</code> has its end tag.
- * Otherwise, false.
- */
- public boolean hasEndTag(Element element) {
- return nodesWithEndtag.contains(element);
- }
-
- /**
- * Determines that a specified element has its end tag.
- */
- public void setHasEndTag(Element element) {
- nodesWithEndtag.addElement(element);
- }
-
- private void setTopElement(Element element) throws SAXException {
- Element prev = doc.getDocumentElement();
- if (prev != null) {
- doc.replaceChild(element, prev);
- } else {
- doc.appendChild(element);
- }
- context = element;
- if (docHandler != null && eHandleLogical) {
- AttributeListImpl al = attrlist != null ? attrlist
- : nullAttributeList;
- docHandler.startElement(element.getNodeName(), al);
- attrlist = null;
- }
- ancesterElementDefs[0] = lastDef;
- ancesters[0] = element;
- depth++;
- }
-
- private Vector<EndTag> missedEndtags = new Vector<EndTag>();
-
- private Node readInstances() throws ParseException, IOException,
- SAXException {
- Node node = getNode();
- if (node == null)
- return doc;
- while (node.getNodeType() == Node.COMMENT_NODE
- || node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
- if (keepComment)
- doc.appendChild(node);
- node = getNode();
- }
-
- switch (node.getNodeType()) {
- case ENDTAG:
-
- if (!handleError(FLOATING_ENDTAG, node)) {
- if (eHandleLogical && docHandler != null) {
- docHandler.ignorableWhitespace(saxch, begin, len);
- }
- error(FLOATING_ENDTAG, "Illegal end tag: " + node
- + ". Ignore it.");
- }
- return readInstances();
- case Node.ELEMENT_NODE:
- if (lastDef.instance(node)) {
- setTopElement((Element) node);
- } else {
- AttributeListImpl attrlisttmp = attrlist;
- attrlist = null;
- setTopElement(doc.createElement(changeDefaultTagCase(lastDef
- .getName())));
- attrlist = attrlisttmp;
- addAutoGenerated(context);
- if (lastDef.getContentModel().match(this, context, node)) {
- if (!lastDef.startTagOmittable()) {
- error(ILLEGAL_TOP_ELEMENT, node
- + " can't be a top element.");
- }
- setContextForward((Element) node);
- } else if (!handleError(ILLEGAL_CHILD, node)) {
- addErrorNode(context);
- error(ILLEGAL_CHILD, node
- + " is not allowed as a child of " + context);
- context.appendChild(node);
- setContextForward((Element) node);
- }
- }
- postElement((Element) node);
- break;
- case Node.TEXT_NODE:
- if (preserveWhitespace && whitespaceText((Text) node)) {
- return readInstances();
- }
- error(ILLEGAL_TOP_ELEMENT, "#text can't be a top element");
- setTopElement(doc.createElement(changeDefaultTagCase(lastDef
- .getName())));
- addAutoGenerated(context);
- context.appendChild(node);
- break;
- default:
- throw new ParseException(tokenizer.getCurrentLine()
- + ": Internal Parser Error " + node);
- }
- return readInstances2();
- }
-
- private Node readInstances2() throws ParseException, IOException,
- SAXException {
- ElementDefinition ed;
- Node node;
- outer: for (node = getNode(); node != null; node = getNode()) {
- // System.out.println(node.getNodeType()+" : "+node);
-
- // System.out.println(node.toString());
-
- node_sel: switch (node.getNodeType()) {
- case Node.COMMENT_NODE:
- case Node.PROCESSING_INSTRUCTION_NODE:
- if (keepComment)
- context.appendChild(node);
- break;
- case ENDTAG:
-
- missedEndtags.removeAllElements();
- if (_DEBUG
- && node.getNodeName().equalsIgnoreCase(
- System.getProperty("DEBUG_ENDTAG"))) {
- System.err.println("DEBUG: " + node);
- }
- for (int i = depth - 1; i >= 0; i--) {
- if (ancesterElementDefs[i].number == lastElementNumber
- && (lastElementNumber != pcdataNumber + 1 || ancesters[i]
- .getNodeName().equalsIgnoreCase(
- node.getNodeName()))) {
-
- if (!missedEndtags.isEmpty()) {
-
- extraErrInfo = missedEndtags;
- if (handleError(SUDDEN_ENDTAG, node)) {
- extraErrInfo = null;
- break node_sel;
- }
- extraErrInfo = null;
- error(SUDDEN_ENDTAG, missedEndtags
- + " have been forced to be inserted by "
- + node);
- }
- /*
- * if (ancesterElementDefs[depth - 1].number ==
- * lastElementNumber) {
- * nodesWithEndtag.addElement(context); }
- */
- ((EndTag) node).setElement(ancesters[i]);
- nodesWithEndtag.addElement(ancesters[i]);
- if (i > 0) {
- setContextBackward(i);
-
- } else {
- break outer;
- }
- break node_sel;
- } else {
- if (!ancesterElementDefs[i].endTagOmittable()) {
- missedEndtags.insertElementAt(new EndTag(
- ancesters[i].getNodeName()), 0);
- }
- }
-
- }
- if (!handleError(FLOATING_ENDTAG, node)) {
- if (eHandleLogical && docHandler != null) {
- docHandler.ignorableWhitespace(saxch, begin, len);
- }
- error(FLOATING_ENDTAG, "Illegal end tag: " + node
- + ". Ignore it");
- }
- break;
- case Node.ELEMENT_NODE:
- Element element = (Element) node;
- Element exParent = null;
- if (_DEBUG
- && element.getTagName().equalsIgnoreCase(
- System.getProperty("DEBUG_STARTTAG"))) {
- System.err.println("DEBUG: " + element);
- }
-
- // System.out.println("element");
-
- for (int i = depth - 1; i >= 0; i--) {
- ed = ancesterElementDefs[i];
- if (!ed.endTagOmittable() && exParent == null) {
- exParent = ancesters[i];
- }
-
- // System.out.println(ed.toString());
-
- if (ed.exclusion(lastElementNumber)) {
- if (exParent != null) {
- if (!handleError(ILLEGAL_CHILD, node)) {
- addErrorNode(context);
- error(ILLEGAL_CHILD, node
- + " is an exception uner "
- + ancesters[i]);
- } else {
- if (context != node && eHandleLogical
- && docHandler != null) {
- docHandler.startElement(node.getNodeName(),
- attrlist);
- }
- postElement(element);
- break node_sel;
- }
- } else if (ancesters[i - 1] != null) {
- setContextBackward(i);
- }
- break;
- }
-
- // System.out.println("elenent: mid");
-
- if (ed.inclusion(lastElementNumber)) {
- context.appendChild(node);
- setContextForward(element);
- postElement(element);
- break node_sel;
- }
- }
- ed = ancesterElementDefs[depth - 1];
- IModelGroup contentModel = ed.getContentModel();
-
- // TODO correct this
- if (contentModel.match(lastElementNumber)
- && contentModel.match(this, context, node)) {
-
- // System.out.println("model: fow");
-
- setContextForward(element);
- } else if (ed.endTagOmittable()) {
-
- // System.out.println("model: omit");
-
- boolean found = false;
- for (int i = depth - 2; i >= 0; i--) {
- ed = ancesterElementDefs[i];
- contentModel = ed.getContentModel();
- if (contentModel.match(lastElementNumber)
- && (found = contentModel.match(this,
- ancesters[i], node))
- || !ed.endTagOmittable()) {
- break;
- }
- }
-
- // System.out.println("model: omit2 "+found);
-
- if (found) {
- // System.out.println("model: ok");
- setContext(element);
- } else if (!handleError(ILLEGAL_CHILD, node)) {
- // System.out.println("model: child");
-
- context.appendChild(element);
- addErrorNode(context);
- error(ILLEGAL_CHILD, node
- + " is not allowed as a child of " + context);
-
- setContextForward(element);
- } else if (element.getParentNode() != null) {
- // unless the error handlers ignore the node
-
- // System.out.println("model: post");
-
- postElement(element);
-
- break;
- }
-
- // System.out.println("model: omit3");
-
- } else if (!handleError(ILLEGAL_CHILD, node)) {
- // System.out.println("model: error");
- // TODO ???
- context.appendChild(element);
- addErrorNode(context);
- error(ILLEGAL_CHILD, node
- + " is not allowed as a child of " + context);
- // System.out.println(node.getNodeName()+context);
- setContextForward(element);
- }
-
- // System.out.println("model: end");
-
- if (context != node && eHandleLogical && docHandler != null) {
- docHandler.startElement(node.getNodeName(), attrlist);
- }
- postElement(element);
- break;
- case Node.TEXT_NODE:
- if (preserveWhitespace && whitespaceText((Text) node)) {
- getContext().appendChild(node);
- break;
- }
- ed = ancesterElementDefs[depth - 1];
- contentModel = ed.getContentModel();
- if (contentModel.match(pcdataNumber)
- && contentModel.match(this, context, node)) {
- break;
- } else if (ed.endTagOmittable()) {
- for (int i = depth - 2; i >= 0; i--) {
- ed = ancesterElementDefs[i];
- contentModel = ed.getContentModel();
- if (contentModel.match(pcdataNumber)
- && contentModel.match(this, ancesters[i], node)) {
- break node_sel;
- } else if (!ed.endTagOmittable()) {
- break;
- }
- }
- }
- if (handleError(ILLEGAL_CHILD, node))
- break node_sel;
- addErrorNode(context);
- error(ILLEGAL_CHILD, "#text(" + node
- + ") is not allowed as a child of " + context);
- context.appendChild(node);
- break;
- default:
- throw new ParseException(tokenizer.getCurrentLine()
- + ": Internal parser error " + node);
- }
- }
-
- // System.out.println("SGMLParser: a");
-
- if (docHandler != null && eHandleLogical) {
- Element top = doc.getDocumentElement();
- if (getContext() != top) {
- setContext(top);
- }
- if (top != null)
- docHandler.endElement(top.getNodeName());
- }
- if ((node = getNode()) != null) {
- this.context = doc.getDocumentElement();
- if (docHandler != null && eHandleLogical) {
- docHandler.startElement(this.context.getNodeName(),
- nullAttributeList);
- }
- // System.out.println("SGMLParser: pushback");
-
- pushBackNode(node);
- readInstances2();
- }
- // System.out.println("SGMLParser: end");
- return doc;
- }
-
- private boolean whitespaceText(Text text) {
- if (text instanceof SGMLText) {
- return ((SGMLText) text).getIsWhitespaceInElementContent();
- }
- char str[] = text.getData().toCharArray();
- for (int i = str.length - 1; i >= 0; i--) {
- if (!Character.isWhitespace(str[i]))
- return false;
- }
- return true;
- }
-
- private void postElement(Element element) throws ParseException,
- IOException, SAXException {
- IModelGroup mg = lastElementDef.getContentModel();
-
- if (mg == cdata) {
- String tagName = element.getNodeName();
- Node cdata = readCDATA(tagName);
- currentNode = new EndTag(tagName);
- ((EndTag) currentNode).setElement(element);
- nodesWithEndtag.addElement(element);
- if (docHandler != null && !eHandleLogical) {
- docHandler.endElement(tagName);
- }
- element.appendChild(cdata);
- if (context == element)
- setContextBackward(depth - 1);
-
- } else if (mg == empty && lastElementDef.endTagOmittable()) { // must
- // be
- // omitted
-
- // System.out.println(element.toString()+lastElementDef.toString());
- if (context == element) {
- setContextBackward(depth - 1);
- } else if (eHandleLogical && docHandler != null) {
- docHandler.endElement(element.getNodeName());
- }
- } else if (isXHTML && isEndWithSlash) {
- // System.out.println(element.toString()+lastElementDef.toString());
- }
- }
-
- private CDATASection readCDATA(String arg) throws ParseException,
- IOException, SAXException {
- if (lexHandler != null) {
- lexHandler.startCDATA();
- }
- String str = tokenizer.rawText(arg);
- CDATASection ret = doc.createCDATASection(str);
- currentNode = ret;
- if (lexHandler != null) {
- lexHandler.endCDATA();
- }
- tokenizer.eatCDATAEndTag();
- return ret;
- }
-
- private Vector<CATB> commentsBeforeDoctype = new Vector<CATB>();
-
- private Vector commentsAftereDoctype = new Vector();
-
- /**
- * comment at the beginning
- */
- class CATB {
- /**
- * If comment, true. Otherwise, false.
- */
- boolean comment = true;
-
- String str;
- }
-
- private DocumentType readDocType() throws ParseException, IOException,
- SAXException {
- if (lastDef != null) {
- throw new ParseException("Already read DOCTYPE declaration");
- }
-
- comment_loop: while (true) {
- switch (tokenizer.nextToken()) {
- case COMMENT:
- if (doc == null) {
- CATB catb = new CATB();
- catb.str = tokenizer.sval;
- commentsBeforeDoctype.addElement(catb);
- } else {
- currentNode = doc.createComment(tokenizer.sval);
- doc.appendChild(currentNode);
- }
- if (lexHandler != null) {
- lexHandler.comment(saxch, begin, len);
- }
- break;
- case PI:
- if (doc == null) {
- CATB catb = new CATB();
- catb.comment = false;
- catb.str = tokenizer.sval;
- commentsBeforeDoctype.addElement(catb);
- } else {
- currentNode = doc.createProcessingInstruction(null,
- tokenizer.sval);
- doc.appendChild(currentNode);
- }
- if (docHandler != null) {
- docHandler.processingInstruction(null, tokenizer.sval);
- }
- break;
- case MDO:
- break comment_loop;
- default:
- tokenizer.pushBack();
- return null;
- }
- }
-
- if (tokenizer.nextToken() != NAME_CHAR
- && !tokenizer.sval.equals("DOCTYPE")) {
- throw new ParseException("Unknown declaration at "
- + tokenizer.getCurrentLine());
- }
- /*
- * Only supports initially setted public entity. For example, <!DOCTYPE
- * HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- */
- if (tokenizer.nextToken() == NAME_CHAR) {
- String docTypeName = tokenizer.sval;
- this.defaultTopElement = docTypeName;
- if (tokenizer.nextToken() == NAME_CHAR
- && tokenizer.sval.equalsIgnoreCase("PUBLIC")) {
- if (tokenizer.nextToken() == '"') {
- String publicID = tokenizer.eatUntil('"');
- if (enforcedDoctype != null) {
- publicID = enforcedDoctype;
- }
- if (lexHandler != null) {
- lexHandler.startDTD(docTypeName, publicID, null);
- }
- String entityFileName = (String) pubEntityMap.get(publicID);
- if (entityFileName == null) {
- if (defaultDTD != null) {
- error(ILLEGAL_DOCTYPE, "Instead of \"" + publicID
- + "\" use \"" + defaultDTD + "\" as a DTD.");
- entityFileName = (String) pubEntityMap
- .get(defaultDTD);
- }
- if (entityFileName == null) {
- throw new ParseException(tokenizer.getCurrentLine()
- + ": this parser does not support "
- + publicID);
- }
- publicID = defaultDTD;
- }
- setupDTD(publicID);
- if (domImpl == null) {
- domImpl = doc.getImplementation();
- }
- DocumentType ret = null;
- if (domImpl != null) {
- currentNode = ret = createDocType(domImpl, docTypeName,
- publicID);
- }
- // consume '>'
- tokenizer.consumeUntil('>');
- tokenizer.switchTo(DEFAULT);
- lastDef = dtd.getElementDefinition(docTypeName);
- if (lastDef == null) {
- String topElementName = getDefaultTopElement();
- error(ILLEGAL_DOCTYPE, docTypeName
- + " is not defined as a root element. Use "
- + topElementName + '.');
- lastDef = dtd.getElementDefinition(topElementName);
- }
- if (lexHandler != null) {
- lexHandler.endDTD();
- }
- return ret;
- }
- }
- }
- tokenizer.consumeUntil('>');
- error(ILLEGAL_DOCTYPE, "Invalid DOCTYPE declaration. Use " + defaultDTD);
- setupDTD(defaultDTD);
- lastDef = dtd.getElementDefinition(getDefaultTopElement());
- return null;
- }
-
- private DocumentType createDocType(DOMImplementation domImpl,
- String docTypeName, String publicID) {
- /*
- * For compatibility to DOM level 1
- */
- Class domImplClass = domImpl.getClass();
- Class stringClass = docTypeName.getClass();
- Class parameterTypes[] = { stringClass, stringClass, stringClass };
- java.lang.reflect.Method method;
- try {
- method = domImplClass.getMethod("createDocumentType",
- parameterTypes);
- } catch (NoSuchMethodException e) {
- return null;
- }
- String args[] = { docTypeName, publicID, "" };
- try {
- return (DocumentType) method.invoke(domImpl, (Object[])args);
- } catch (IllegalAccessException e) {
- return null;
- } catch (java.lang.reflect.InvocationTargetException e) {
- return null;
- } catch (DOMException e) {
- return null;
- }
- /*
- * For DOM level 2 try { return domImpl.createDocumentType(docTypeName,
- * publicID, ""); } catch (DOMException e) { return null; }
- */
- }
-
- private Node nodesWithIllegalChildren[] = new Node[BUF_SIZ];
-
- private int nodeWithIllegalChildNum = 0;
-
- private void expandNodesWithIllegalChildren() {
- Node newNodes[] = new Node[nodeWithIllegalChildNum * 2];
- System.arraycopy(nodesWithIllegalChildren, 0, newNodes, 0,
- nodeWithIllegalChildNum);
- nodesWithIllegalChildren = newNodes;
- }
-
- private void addErrorNode(Node node) {
- for (int i = nodeWithIllegalChildNum - 1; i >= 0; i--) {
- if (nodesWithIllegalChildren[i] == node)
- return;
- }
- if (nodesWithIllegalChildren.length == nodeWithIllegalChildNum) {
- expandNodesWithIllegalChildren();
- }
- nodesWithIllegalChildren[nodeWithIllegalChildNum++] = node;
- }
-
- /**
- * Checks if a specified node has an error or not.
- *
- * @param node
- * node to be ckecked.
- * @return <code>true</code> if <code>node</code> is an error node.
- * Otherwise <code>false</code>
- */
- public boolean isErrorNode(Node node) {
- for (int i = nodeWithIllegalChildNum - 1; i >= 0; i--) {
- if (nodesWithIllegalChildren[i] == node)
- return true;
- }
- return false;
- }
-
- /**
- * Initialized this parser.
- */
- protected void init() {
- lastDef = null;
- context = null;
- nodeWithIllegalChildNum = 0;
- depth = 0;
- andMap.clear();
- seqMap.clear();
- plusMap.clear();
- commentsBeforeDoctype.removeAllElements();
- commentsAftereDoctype.removeAllElements();
- if (getDOMImplementation() != null) {
- setDOMImplementation(getDOMImplementation());
- } else {
- for (Node child = doc.getFirstChild(); child != null; child = doc
- .getFirstChild()) {
- doc.removeChild(child);
- }
- }
- }
-
- int getCharEntity(String entity) throws IOException, ParseException,
- SAXException {
- SGMLEntityReference er = null;
- try {
- er = dtd.getEntityReference(entity);
- } catch (ParseException e) {
- return -1;
- }
- SGMLEntityDeclaration ed = er.getEntityDeclaration();
- int ch = ed.getReplacementChar();
- if (ch != -1) {
- return ch;
- }
- InsTokenizer tokenizer2 = new InsTokenizer(ed.getReplacementReader(),
- this);
- if (tokenizer2.nextToken() == PCDATA && tokenizer2.sval.length() == 1) {
- char ret = tokenizer2.sval.charAt(0);
- ed.setReplacementChar(ret);
- return ret;
- } else {
- throw new ParseException("Internal Parser Error: " + entity
- + " not defined.");
- }
- }
-
- /**
- * Sets a <i>Document </i> instance that will be a factory of nodes in DOM
- * tree. This parser can use any implementation of W3C's DOM. By default,
- * Parsers use {@link SGMLDocument}. This method make the parser instance
- * ignore DOMImplementation by side effects.
- *
- * @param doc
- * new Document instance.
- * @see #getDocument()
- * @deprecated See {@link #setDOMImplementation(DOMImplementation)}
- */
- public void setDocument(Document doc) {
- this.doc = doc;
- domImpl = null;
- }
-
- private AttributeListImpl attrlist = null;
-
- private int lastElementNumber;
-
- private ElementDefinition lastElementDef;
-
- private Node stag() throws IOException, ParseException, SAXException {
- Element ret;
- isEmptyElement = true;
- isEndWithSlash = false;
- if (tokenizer.nextToken() != NAME_CHAR) {
- if (handleError(TAG_NAME, tokenizer.sval)) {
- return stag();
- }
- error(STARTTAG_SYNTAX_ERR,
- "Perhaps character encoding may not be correct.");
- while (tokenizer.nextToken() != NAME_CHAR) {
- if (tokenizer.ttype == EOF || tokenizer.ttype == TAGC) {
- return null;
- }
- }
- }
-
- ElementDefinition ed = this.dtd.getElementDefinition(tokenizer.sval);
- if (ed != null) {
- lastElementNumber = ed.number;
- lastElementDef = ed;
- isEmptyElement = ed.getContentModel().toString().equalsIgnoreCase(
- "EMPTY");
- } else if (keepUnknowns) {
- lastElementNumber = pcdataNumber + 1;
- ed = lastElementDef = anonymousElementDef;
- }
- currentNode = ret = doc.createElement(changeTagCase(tokenizer.sval));
- /*
- * boolean syntaxError = false;
- */
- Attr attr = null;
- if (docHandler != null)
- attrlist = createAttributeList();
- isEndWithSlash = false;
- while (tokenizer.nextToken() != TAGC) {
- if (tokenizer.ttype == '/') {
- isEndWithSlash = true;
- } else {
- isEndWithSlash = false;
- }
- if (tokenizer.ttype == STAGO || tokenizer.ttype == ETAGO) {
- if (handleError(BEFORE_ATTRNAME, tokenizer.sval)) {
- continue;
- }
- error(STARTTAG_SYNTAX_ERR, "requires an attribute in " + ret);
- tokenizer.pushBack();
- break;
- } else if (tokenizer.ttype == EOF) {
- break;
- }
-
- tokenizer.pushBack();
- attr = attribute(ed, attrlist);
- if (attr != null) {
- ret.setAttributeNode(attr);
- /*
- * } else if (!syntaxError) { syntaxError = true;
- * error(STARTTAG_SYNTAX_ERR, "requires an attribute after " +
- * ret);
- */
- }
- }
-
- if (docHandler != null && !eHandleLogical) {
- // if(dtd.toString().indexOf("XHTML") < 0 || !endWithSlash){
- docHandler.startElement(ret.getNodeName(), attrlist);
- // }
- }
-
- if (ed == null) {
-
- if (!handleError(UNKNOWN_ELEMENT, ret)) {
- error(UNKNOWN_ELEMENT, "Unknown Element: " + ret.getTagName()
- + ". Ignore it.");
- }
- return null;
- } else if (ed == anonymousElementDef) {
-
- if (handleError(UNKNOWN_ELEMENT, ret)) {
- return null;
- } else {
- error(UNKNOWN_ELEMENT, "Unknown Element: " + ret.getTagName()
- + ". Define its definition as <!ELEMENT "
- + ret.getNodeName().toUpperCase() + " - - ANY>");
- }
- }
-
- currentTagName = ret.getNodeName();
- // if (isXHTML && isEndWithSlash) {
- // System.out.println("slash end tag");
- // if (docHandler != null && !eHandleLogical) {
- // docHandler.endElement(ret.getNodeName());
- // }
- // System.out.println(docHandler);
- // }
- return ret;
- }
-
- private String makeUnique(String id) {
- for (Enumeration e = pubEntityMap.elements(); e.hasMoreElements();) {
- String ret = (String) e.nextElement();
- if (id.equals(ret))
- return ret;
- }
- return id;
- }
-
- /**
- * Changes default dtd. If <!DOCTYPE ... > statement is missing in a
- * top of a document, a parser reads it by specifed dtd.
- *
- * @param dtd
- * dtd's public id for default like
- * <code>"-//W3C//DTD HTML 4.0 Transitional//EN"</code>
- */
- public void setDefaultDTD(String dtd) {
- defaultDTD = makeUnique(dtd);
- }
-
- /**
- * This instance variable holds a default DTD's public ID. If a parser meets
- * a strange DOCTYPE declaration, it reads a document with this default DTD.
- */
- protected String defaultDTD = null;
-
- /**
- * Gets top element's name. If you want the parser to read document without
- * DOCTYPE declaration at the top, you must override this method to return
- * some element's name. For HTML documents, it returns "HTML".
- *
- * @return top element's name
- * @exception ParseException
- * always thrown.
- */
- protected String getDefaultTopElement() throws ParseException {
- if (defaultTopElement != null) {
- return defaultTopElement;
- }
- throw new ParseException(
- "doesn't know which element must be at the top.");
- }
-
- private String defaultTopElement = null;
-
- public static final int UPPER_CASE = 0;
-
- public static final int LOWER_CASE = 1;
-
- public static final int ORIGINAL_CASE = 2;
-
- private int defaultTagCase = UPPER_CASE;
-
- /**
- * Specifies element names' case whose start tags are omitted. Default
- * behavier makes them uppercased.
- *
- * @param tagCase
- * this must be {@link #UPPER_CASE}or {@link #LOWER_CASE}. If
- * otherwise, ignore.
- */
- public void setDefaultTagCase(int tagCase) {
- if (tagCase == 0 || tagCase == LOWER_CASE) {
- this.defaultTagCase = tagCase;
- }
- }
-
- /**
- * Change a specified string to specified cased.
- *
- * @see #setDefaultTagCase(int)
- */
- public String changeDefaultTagCase(String tag) {
- switch (this.defaultTagCase) {
- case UPPER_CASE:
- return tag.toUpperCase();
- case LOWER_CASE:
- return tag.toLowerCase();
- default:
- throw new RuntimeException("Internal Parser Error");
- }
- }
-
- private int tagCase = ORIGINAL_CASE;
-
- /**
- * Specifies element names' case. Default behavier makes them original
- * cased.
- *
- * @param tagCase
- * this must be {@link #UPPER_CASE},{@link #LOWER_CASE}or
- * {@link #ORIGINAL_CASE}. If otherwise, ignore.
- */
- public void setTagCase(int tagCase) {
- if (tagCase == UPPER_CASE || tagCase == LOWER_CASE
- || tagCase == ORIGINAL_CASE) {
- this.tagCase = tagCase;
- }
- }
-
- final String changeTagCase(String tag) {
- switch (this.tagCase) {
- case UPPER_CASE:
- return tag.toUpperCase();
- case LOWER_CASE:
- return tag.toLowerCase();
- case ORIGINAL_CASE:
- return tag;
- default:
- throw new RuntimeException("Internal Parser Error");
- }
- }
-
- private int attrCase = ORIGINAL_CASE;
-
- /**
- * Specifies attribute names' case. Default behavier makes them original
- * cased.
- *
- * @param attrCase
- * this must be {@link #UPPER_CASE},{@link #LOWER_CASE}or
- * {@link #ORIGINAL_CASE}. If otherwise, ignore.
- */
- public void setAttrNameCase(int attrCase) {
- if (attrCase == UPPER_CASE || attrCase == LOWER_CASE
- || attrCase == ORIGINAL_CASE) {
- this.attrCase = attrCase;
- }
- }
-
- final String changeAttrNameCase(String attr) {
- switch (this.attrCase) {
- case UPPER_CASE:
- return attr.toUpperCase();
- case LOWER_CASE:
- return attr.toLowerCase();
- case ORIGINAL_CASE:
- return attr;
- default:
- throw new RuntimeException("Internal Parser Error");
- }
- }
-
- private String enforcedDoctype = null;
-
- /**
- * Ignores a declaration at the top of the document and enforces document
- * type specified by <code>publicId</code>
- */
- public void enforceDoctype(String publicId) {
- enforcedDoctype = makeUnique(publicId);
- }
-
- /**
- * Closes input stream.
- */
- public void close() throws IOException {
- tokenizer.close();
- tokenizer = null;
- }
-
- private Object extraErrInfo = null;
-
- /**
- * Gets extra error information. A parser passes two error information (e.g.
- * error code and error node) to node-level error handlers. However, it is
- * now enough for some kind of error handlers to recover the error. If
- * {@link ISGMLConstants#SUDDEN_ENDTAG}error occurs, parser set missed end
- * tags between error node and future context to extra error information.
- */
- public Object getExtraErrInfo() {
- return extraErrInfo;
- }
-
- private boolean handleError(int code, Node node) throws ParseException,
- IOException, SAXException {
- for (int i = errorHandlerNum - 1; i >= 0; i--) {
- if (errorHandlers[i].handleError(code, this, node)) {
- return true;
- }
- }
- return false;
- }
-
- boolean handleError(int code, String errorStr) throws ParseException,
- IOException {
- for (int i = tokenErrorHandlerNum - 1; i >= 0; i--) {
- if (tokenErrorHandlers[i].handleError(code, this, errorStr)) {
- return true;
- }
- }
- return false;
- }
-
- void putCharNumEntity(Character C, String ent) {
- Document doc = getDocument();
- if (doc instanceof SGMLDocument) {
- ((SGMLDocument) doc).putCharNumEntity(C, ent);
- }
- }
-
- private DocumentHandler docHandler = null;
-
- /**
- * Gets a <i>DocumentHandler </i> instance included in this parser.
- *
- * @see #setDocumentHandler(org.xml.sax.DocumentHandler)
- */
- public DocumentHandler getDocumentHandler() {
- return this.docHandler;
- }
-
- /**
- * Sets a <i>DocumentHandler </i> instace for this parser.
- *
- * @see #getDocumentHandler()
- */
- public void setDocumentHandler(DocumentHandler handler) {
- this.docHandler = handler;
- }
-
- private boolean preserveWhitespace = false;
-
- /**
- * Checks if parser preserve whitespaces or not.
- *
- * @return <code>true</code> if this parser preserve whitespaces.
- * Otherwise <code>false</code>
- */
- public boolean getPreserveWhitespace() {
- return preserveWhitespace;
- }
-
- /**
- * Determines if this parser preserve whitespaces or not. If preserve, the
- * parser create text node for whitespace between tags and does not ignore
- * carriage return and line feed after start tags and before end tags. By
- * default a parser ignores whitespaces.
- *
- * @see #getPreserveWhitespace()
- */
- public void setPreserveWhitespace(boolean preserv) {
- if (tokenizer != null) {
- tokenizer.setPreserveWhitespace(preserv);
- }
- this.preserveWhitespace = preserv;
- }
-
- /**
- * Determines which this parser invokes {@link
- * org.xml.sax.DocumentHandler#startElement(java.lang.String,
- * org.xml.sax.AttributeList)} and
- * {@link org.xml.sax.DocumentHandler#endElement(java.lang.String)}
- * <code>logically</code> or <code>physically</code>.<code>
- * Logical</code>
- * means that if a start or end tag of a element is omitted, a parser
- * invokes each method. <code>Physical</code> means that parsers invokes
- * each method if and only if their tag appearently exist. If
- * <code>physical</code>, a parser does not care if the tag is illegal or
- * not. Default is <code>physical</code>
- *
- * @param logical
- * if true, deal with tags as logical. Otherwise, as physical
- */
- public void elementHandle(boolean logical) {
- this.eHandleLogical = logical;
- }
-
- private boolean eHandleLogical = true;
-
- private Vector<Element> autoGenerated = new Vector<Element>();
-
- /**
- * Checks if the specified element is automatically generated by this parser
- * or not. For example, <code>TBODY</code> under <code>TABLE</code> is
- * automatically generated in following document.
- *
- * <PRE>
- *
- * <TABLE> <TR><TD><TD> </TABLE>
- *
- * <PRE>
- *
- * @param an
- * element node to be checked
- * @return <code>true</code> if <code>element</code> is automatically
- * generated by this. Otherwise false.
- */
- public boolean autoGenerated(Element element) {
- return autoGenerated.contains(element);
- }
-
- final void addAutoGenerated(Element element) {
- autoGenerated.addElement(element);
- }
-
- /**
- * Inserts a string to current position in read stream. This method is
- * usually invoked by token-level error handlers.
- *
- * @param str
- * String to insert
- */
- public void insert(String str) throws IOException {
- tokenizer.unread(str);
- }
-
- private AttributeListImpl createAttributeList() {
- return new AttributeListImpl();
- }
-
- private boolean keepUnknowns;
-
- /**
- * Determines unknown elements are kept or not. The definition of the
- * elmeents is <code><!ELEMENT <i>anonymous</i> - - ANY></code>,
- * where <i>anynymous </i> is an unknown element.
- *
- * @param keep
- * <code>true</code> if parser keeps. Otherwise
- * <code>false</code>
- */
- public void keepUnknownElements(boolean keep) {
- this.keepUnknowns = keep;
- }
-
- /**
- * Gets current line number of source document.
- *
- * @return line number
- * @deprecated Use {@link org.xml.sax.Locator#getLineNumber()}
- */
- public int getCurrentLineNumber() {
- return tokenizer.getCurrentLine();
- }
-
- /**
- * Gets current column number of source document.
- *
- * @return column number
- * @deprecated Use {@link org.xml.sax.Locator#getColumnNumber()}
- */
- public int getCurrentColumnNumber() {
- return tokenizer.getCurrentCol();
- }
-
- /**
- * Gets current reading node
- */
- public Node getCurrentNode() {
- return this.currentNode;
- }
-
- private Node currentNode;
-
- public void setCurrentNode(Node node) {
- this.currentNode = node;
- }
-
- private boolean keepComment = true;
-
- /**
- * Determines if this parser keeps comments and processing instructions in
- * the tree or not. By default, it keeps.
- *
- * @param <code>true</code> if it keeps, Otherwise <code>false</code>
- */
- public void setKeepComment(boolean keep) {
- this.keepComment = keep;
- }
-
- private char saxch[];
-
- private int begin, len;
-
- void setCharacter(char ch[], int begin, int len) {
- this.saxch = ch;
- this.begin = begin;
- this.len = len;
- }
-
- private LexicalHandler lexHandler;
-
- /**
- * Note: does not support
- * {@link org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String)}and
- * {@link org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String)}.
- */
- public void setLexicalHandler(LexicalHandler lexHandler) {
- this.lexHandler = lexHandler;
- }
-
- LexicalHandler getLexicalHandler() {
- return this.lexHandler;
- }
-
- void incrementDepth(int i) {
- this.depth += i;
- }
-
- /**
- * @param i
- * depth
- */
- public void reopenContext(int i) throws SAXException {
- this.depth += i;
- this.context = ancesters[depth - 1];
- if (!eHandleLogical || docHandler == null)
- return;
- for (int j = depth; j < i; j++) {
- docHandler.startElement(ancesters[j].getNodeName(),
- nullAttributeList);
- }
- }
-
- public Element[] getContextElements() {
- Element ret[] = new Element[depth];
- System.arraycopy(ancesters, 0, ret, 0, depth);
- return ret;
- }
-
- /**
- * Parses a fragment under specified context.
- *
- */
- public void parseFragment(Element parent, Reader reader)
- throws IOException, ParseException, SAXException {
- if (dtd == null) {
- throw new ParseException("Can't parse without DTD");
- } else if (doc == null) {
- throw new ParseException("Can't parse without a Document");
- }
- this.ancesterElementDefs[0] = dtd.getElementDefinition(parent
- .getNodeName());
- if (this.ancesterElementDefs[0] == null) {
- this.ancesterElementDefs[0] = anonymousElementDef;
- }
- this.ancesters[0] = parent;
- this.context = parent;
- depth = 1;
- this.tokenizer = new InsTokenizer(reader, this);
- if (docHandler != null) {
- docHandler.setDocumentLocator(this.tokenizer);
- }
- tokenizer.extractNumEntity(extractNum);
- tokenizer.extractCharEntity(extractChar);
- tokenizer.setPreserveWhitespace(preserveWhitespace);
-
- readInstances2();
- }
-
- /**
- * Parses a fragment. As a side effect, wastes a element node.
- *
- */
- public DocumentFragment parseFragment(Reader reader) throws IOException,
- ParseException, SAXException {
- Element dummy = doc != null ? doc.createElement("dummy") : null;
- parseFragment(dummy, reader);
- DocumentFragment ret = doc.createDocumentFragment();
- for (Node child = dummy.getFirstChild(); child != null; child = dummy
- .getFirstChild()) {
- dummy.removeChild(child);
- ret.appendChild(child);
- }
- return ret;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLText.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLText.java
deleted file mode 100644
index 011d0c9..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLText.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.PrintWriter;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Text;
-
-public class SGMLText extends SGMLCharacterData implements Text, IPrintXML {
- public SGMLText(String str, Document doc) {
- super(str, doc);
- }
-
- public short getNodeType() {
- return TEXT_NODE;
- }
-
- public String getNodeName() {
- return "#text";
- }
-
- public Text splitText(int offset) throws DOMException {
- SGMLText sibling;
- try {
- sibling = new SGMLText(text.substring(offset), ownerDocument);
- } catch (StringIndexOutOfBoundsException e) {
- throw new DOMException(DOMException.INDEX_SIZE_ERR, e.getMessage()) {
- };
- }
- sibling.previousSibling = this;
- sibling.parent = parent;
- nextSibling = sibling;
- text = text.substring(offset);
- return this;
- }
-
- /**
- * Gets original string whose converted character entities are reverted. If
- * an original string is "a &gt; b", then returned value is also "a
- * &gt; b" (eg. return value of {@link #getNodeValue()} is "a > b").
- *
- * @return original string
- */
- public String toString() {
- SGMLDocument doc = (SGMLDocument) getOwnerDocument();
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < text.length(); i++) {
- char ch = text.charAt(i);
- Character C = new Character(ch);
- String entityOrigin = doc.getEntityOrigin(C);
- if (entityOrigin != null) {
- sb.append('&' + entityOrigin + ';');
- } else {
- sb.append(ch);
- }
- }
- return sb.toString();
- }
-
- public String toXMLString() {
- SGMLDocument doc = (SGMLDocument) getOwnerDocument();
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < text.length(); i++) {
- char ch = text.charAt(i);
- Character C = new Character(ch);
- String entityOrigin = doc.getEntityOrigin(C);
- if (entityOrigin != null) {
- sb.append("&#" + (int) ch + ';');
- } else if (ch == '&') {
- sb.append("&");
- } else if (ch == '<') {
- sb.append("<");
- } else if (ch == '>') {
- sb.append(">");
- } else {
- sb.append(ch);
- }
- }
- return sb.toString();
- }
-
- public void printAsXML(PrintWriter pw, int indentLevel, boolean indent) {
- pw.print(toXMLString());
- }
-
- public void printAsSGML(PrintWriter pw, int indentLevel, boolean indent) {
- pw.print(toString());
- }
-
- private boolean isWhitespace = false;
-
- public boolean getIsWhitespaceInElementContent() {
- return this.isWhitespace;
- }
-
- void setIsWhitespaceInElementContent(boolean b) {
- this.isWhitespace = b;
- }
-
- /**
- * DOM Level 3
- */
-
- public String getWholeText() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean isElementContentWhitespace() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public Text replaceWholeText(String content) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLTokenizer.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLTokenizer.java
deleted file mode 100644
index 2802c10..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/SGMLTokenizer.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.LineNumberReader;
-import java.io.Reader;
-
-/**
- * Tokenizer interface
- */
-abstract class SGMLTokenizer implements ISGMLConstants {
- protected LineNumberReader reader;
-
- public BufferedReader getReader() {
- return this.reader;
- }
-
- /**
- * token value.
- */
- public String sval;
-
- /**
- * token type.
- */
- public int ttype;
-
- protected int state = DEFAULT;
-
- protected boolean pushBacked;
-
- /**
- * Constructs SGMLTokenizer instance.
- *
- * @param reader
- * reader that read SGML Documents.
- */
- public SGMLTokenizer(Reader reader) {
- this(reader, DEFAULT);
- }
-
- SGMLTokenizer(Reader reader, int state) {
- if (reader instanceof LineNumberReader) {
- this.reader = (LineNumberReader) reader;
- } else {
- this.reader = new LineNumberReader(reader);
- }
- this.state = state;
- pushBacked = false;
- }
-
- abstract protected int defaultState() throws IOException, ParseException;
-
- /**
- * Gets Current Line Number.
- *
- * @return line number.
- */
- public final int getCurrentLine() {
- return reader.getLineNumber() + 1;
- }
-
- /**
- * Get a token from a SGML document and return a type of the token.
- *
- * @return type of a read token.
- * @exception IOException
- * If an I/O error occurs
- * @exception ParseException
- * If an Unexpected EOF occurs
- */
- public final int nextToken() throws IOException, ParseException {
- if (pushBacked) {
- pushBacked = false;
- return ttype;
- }
- switch (state) {
- case DEFAULT:
- return defaultState();
- case TAG:
- return tag();
- default:
- return -1;
- }
- }
-
- /**
- * Push back tokens. Next call of nextToken() returns current ttype and sval
- * will not change.
- */
- public final void pushBack() {
- pushBacked = true;
- }
-
- /**
- * Character Ring Buffer for unread;
- */
- protected int charBuffer[] = new int[BUF_SIZ];
-
- public final static int BUF_SIZ = 1024;
-
- protected int index = 0;
-
- protected final int read() throws IOException {
- if (index > 0) {
- return charBuffer[--index];
- } else {
- return reader.read();
- }
- }
-
- protected final void unread(int ch) {
- charBuffer[index++] = ch;
- }
-
- final void switchTo(int state) {
- this.state = state;
- }
-
- abstract protected int tag() throws ParseException, IOException;
-
- final void close() throws IOException {
- this.reader.close();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/UnsynchronizedHashtable.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/UnsynchronizedHashtable.java
deleted file mode 100644
index 49e56e6..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/UnsynchronizedHashtable.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml;
-
-class UnsynchronizedHashtable {
- class Entry {
- String key;
-
- ElementDefinition val;
-
- int num;
-
- Entry next;
- }
-
- private ElementDefinition linearTable[] = new ElementDefinition[256];
-
- private int count = 0;
-
- private void expand() {
- ElementDefinition newTable[] = new ElementDefinition[count * 2];
- System.arraycopy(linearTable, 0, newTable, 0, count);
- linearTable = newTable;
- }
-
- private Entry table[] = new Entry[256];
-
- private int hashCode(char key[]) {
- int ret = 0;
- for (int i = key.length - 1; i >= 0; i--) {
- ret = 25 * ret + (key[i] & 0x1f) - 1;
- }
- return ret;
- }
-
- final ElementDefinition get(int number) {
- return linearTable[number];
- }
-
- final ElementDefinition get(String key) {
- char str[] = key.toCharArray();
- for (Entry entry = table[0xff & hashCode(str)]; entry != null; entry = entry.next) {
- String entryKey = entry.key;
- if (entryKey.equalsIgnoreCase(key))
- return entry.val;
- }
- return null;
- }
-
- final void put(String key, ElementDefinition val) {
- char str[] = key.toCharArray();
- Entry entry = new Entry();
- entry.key = key;
- entry.val = val;
- val.number = entry.num = count;
- if (linearTable.length == count)
- expand();
- linearTable[count++] = val;
- int index = 0xff & hashCode(str);
- entry.next = table[index];
- table[index] = entry;
- }
-
- final int size() {
- return count;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/AttributeValueErrorHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/AttributeValueErrorHandler.java
deleted file mode 100644
index 3caf31c..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/AttributeValueErrorHandler.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.errorhandler;
-
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.sgml.ISGMLConstants;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-
-
-public class AttributeValueErrorHandler implements ITokenErrorHandler, ISGMLConstants {
- public boolean handleError(int code, SGMLParser parser, String errorStr)
- throws IOException {
- if (code != ATTR_VALUE)
- return false;
- int gtIndex = errorStr.indexOf('>');
- int ltIndex;
- char closingChar;
- int errorStrLen = errorStr.length();
- if (errorStrLen == 0)
- return false;
- if ((closingChar = errorStr.charAt(0)) != '\'' && closingChar != '"') {
- return false;
- }
- if (gtIndex > 1 && (ltIndex = errorStr.indexOf('<')) > gtIndex) {
- // case of attr="value_without_endquote> ... <nextTag
- int nextTagBegin = ltIndex + 1;
- if (errorStr.charAt(nextTagBegin) == '/')
- nextTagBegin++;
- int nextTagEnd = nextTagBegin;
- char c0;
- while (Character.isLowerCase(c0 = errorStr.charAt(nextTagEnd))
- || Character.isUpperCase(c0)) {
- nextTagEnd++;
- }
- if (nextTagBegin == nextTagEnd)
- return false;
- String nextTag = errorStr.substring(nextTagBegin, nextTagEnd);
- if (parser.getDTD().getElementDefinition(nextTag) != null) {
- parser.error(STARTTAG_SYNTAX_ERR,
- " attribute value missed closing quotation.");
- parser.insert(errorStr.substring(0, gtIndex) + closingChar
- + errorStr.substring(gtIndex));
- return true;
- }
- } else if (errorStr.charAt(errorStrLen - 1) == closingChar
- && errorStr.length() > 1
- && errorStr.charAt(errorStrLen - 2) == '=') {
- // case of attr="value_without_endquote
- // nextAttrName="nextAttrValue...
- for (int i = 0; i < errorStrLen; i++) {
- if (Character.isWhitespace(errorStr.charAt(i))) {
- int errorPoint = i;
- while (Character.isWhitespace(errorStr.charAt(++i)))
- ;
- char c0;
- // int nextAttrNameStart = i;
- c0 = errorStr.charAt(i);
- if (!Character.isLowerCase(c0)
- && !Character.isUpperCase(c0)) {
- return false;
- }
- do {
- i++;
- c0 = errorStr.charAt(i);
- } while (Character.isLowerCase(c0)
- || Character.isUpperCase(c0));
- while (Character.isWhitespace(c0 = errorStr.charAt(i)))
- i++;
- if (c0 == '=') {
- parser.insert(errorStr.substring(0, errorPoint)
- + closingChar + errorStr.substring(errorPoint));
- parser.error(STARTTAG_SYNTAX_ERR,
- " attribute value missed closing quotation.");
- return true;
- }
- }
- }
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/DefaultErrorHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/DefaultErrorHandler.java
deleted file mode 100644
index 38779ed..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/DefaultErrorHandler.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.errorhandler;
-
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.sgml.ElementDefinition;
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-
-/**
- * An implementation of {@link IErrorHandler}
- */
-public class DefaultErrorHandler implements IErrorHandler {
- /**
- * Set appropriate context element to context if an error occurs.
- * <ol>
- * <li> If <code>node</code> is a singleton instance, find another
- * element with the same name. And if the other has no attribute,
- * merge them.
- * <li> If current context has already an illegal children,
- * it fails (Since ver.1.1.a7).
- * <li> If <code>errorNode</code> is unknown element, fail.
- * <!--
- * <li> if <code>errorNode</code> is an element with the same name as context
- * and has no attribute, it interpret <code>errorNode</code> as endtag.
- * <li> If <code>node</code> is and Element and empty child element, it also fails.
- * <li> Otherwise searches a proper parent from current context
- * to outer-most and right-most node.
- * -->
- * </ol>
- * @param node illegal child
- * @return true if found, otherwise false
- * @see SGMLParser#getContext()
- * @see SGMLParser#setContext(org.w3c.dom.Element)
- */
- public boolean handleError(int code, SGMLParser parser, Node errorNode)
- throws ParseException, IOException, SAXException {
- if (errorNode instanceof Element) {
- Element element = (Element)errorNode;
- String elementName = element.getTagName();
- ElementDefinition ed;
- if ((ed = parser.getDTD().getElementDefinition(elementName)) == null) {
- return false;
- } else if (ed.isSingleton()) {
- NodeList others = parser.getDocument().getElementsByTagName(elementName);
- if (others.getLength() == 1) {
- Element another = (Element)others.item(0);
- if (parser.autoGenerated(another)) {
- NamedNodeMap attributes = element.getAttributes();
- for (int i = 0; i < attributes.getLength(); i++) {
- Attr attr = (Attr)attributes.item(i);
- element.removeAttributeNode(attr);
- another.setAttributeNode(attr);
- }
- parser.setCurrentNode(another);
- parser.setContext(another);
- parser.error(ILLEGAL_CHILD, errorNode + " and " + another +
- " are duplicated.");
- return true;
- }
- }
- }
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/IErrorHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/IErrorHandler.java
deleted file mode 100644
index c558652..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/IErrorHandler.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.errorhandler;
-
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.sgml.ISGMLConstants;
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-
-/**
- * Node-level error handler interface.
- */
-public interface IErrorHandler extends ISGMLConstants {
- /**
- * Handles error whose type is specified by <code>code</code>
- *
- * @param code
- * error type.
- * @param parser
- * caller of this handler. This parser's state is easily changed
- * by the methods below.
- * @param errorNode
- * a node that causes the error.
- * @return <code>true</code> if error was handled. Otherwise <code>false
- * </code>.
- * @see SGMLParser#getNode()
- * @see SGMLParser#pushBackNode(org.w3c.dom.Node)
- * @see SGMLParser#getExtraErrInfo()
- * @see SGMLParser#getContext()
- * @see SGMLParser#setContext(org.w3c.dom.Element)
- */
- public boolean handleError(int code, SGMLParser parser, Node errorNode)
- throws ParseException, IOException, SAXException;
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/ITokenErrorHandler.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/ITokenErrorHandler.java
deleted file mode 100644
index c47ee94..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/ITokenErrorHandler.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.errorhandler;
-
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.sgml.ISGMLConstants;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-
-
-/**
- * Token-levle error handler interface.
- */
-public interface ITokenErrorHandler {
- /**
- * Handles error whose type is specified by <code>code</code>
- *
- * @param code
- * error type. This parameter represents tokenizer's state. In
- * other words, where the tokenizer read. <code>Code</code>
- * must be {@link ISGMLConstants#ATTR_VALUE} (Error occurs when a
- * tokenizer is to read attribute's value),
- * {@link ISGMLConstants#BEFORE_ATTRNAME} (to read attribute's
- * name) or {@link ISGMLConstants#TAG_NAME} (to read tag name).
- * If string to substitute is diecovered, that can be inserted to
- * current reading position.
- * @param parser
- * caller of this handler.
- * @param errorStr
- * string that causes the error.
- * @return true if error was handled. Otherwise false.
- * @see SGMLParser#insert(java.lang.String)
- */
- public boolean handleError(int code, SGMLParser parser, String errorStr)
- throws IOException;
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/InterleavedEndtagExchanger.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/InterleavedEndtagExchanger.java
deleted file mode 100644
index 849621f..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/InterleavedEndtagExchanger.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.errorhandler;
-
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.html.HTMLParser;
-import org.eclipse.actf.model.dom.sgml.ElementDefinition;
-import org.eclipse.actf.model.dom.sgml.EndTag;
-import org.eclipse.actf.model.dom.sgml.IErrorLogListener;
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-
-/**
- * A sample implementation class of {@link IErrorHandler}.
- * This class is experimental.
- */
-public class InterleavedEndtagExchanger implements IErrorHandler {
- /**
- * Exchanges interleaved end tags. For example, changes
- * <pre>
- * <center><font>...</center></font>
- * </pre>
- * to
- * <pre>
- * <center><font>...</font></center>
- * </pre>
- * @param code If {@link SGMLParser#SUDDEN_ENDTAG}, tries to exchange.
- * @param errorNode sudden endtag. It must be an instance of
- * {@link EndTag}
- * Otherwise, does nothing.
- */
- public boolean handleError(int code, SGMLParser parser, Node errorNode)
- throws ParseException, IOException, SAXException {
- if (!(code == SUDDEN_ENDTAG && errorNode instanceof EndTag)) {
- return false;
- }
- // searches an element without an unomittable endtag.
- for (Node pNode = parser.getContext();
- pNode instanceof Element; pNode = pNode.getParentNode()) {
- if (!pNode.getNodeName().equalsIgnoreCase(errorNode.getNodeName())) {
- ElementDefinition ed = parser.getDTD().getElementDefinition(pNode.getNodeName());
- // if found, try to exchange endtags.
- if (!ed.endTagOmittable() && exchangeEndtag(parser, errorNode, ed.getName())) {
- return true;
- }
- }
- }
- return false;
- }
- /**
- * @param target target endtag's name.
- */
- private boolean exchangeEndtag(SGMLParser parser, Node errorNode, String target)
- throws ParseException, IOException, SAXException {
- // makes look ahead buffer
- Node foBuf[] = new Node[SGMLParser.BUF_SIZ/2];
- int i;
- // searchs an target endtag and store nodes to buffer simultaneously
- for (i = 0; i < SGMLParser.BUF_SIZ/2; i++) {
- Node fo = parser.getNode();
- if (fo instanceof EndTag) {
- // If found exchange endtags and pushes back them to the parser
- if (fo.getNodeName().equalsIgnoreCase(target)) {
- parser.error(SUDDEN_ENDTAG, errorNode + " and " + fo +
- " are interleaved. So exchange it by an error handler.");
- parser.pushBackNode(errorNode);
- while (i > 0) parser.pushBackNode(foBuf[--i]);
- parser.pushBackNode(fo);
- return true;
- }
- }
- foBuf[i] = fo;
- }
- while (i > 0) parser.pushBackNode(foBuf[--i]);
- return false;
- }
- /**
- * Just for tests.
- */
- public static void main(String args[]) {
- try {
- HTMLParser parser = new HTMLParser();
- parser.addErrorLogListener(new IErrorLogListener() {
- public void errorLog(int code, String msg) {
- System.err.println(msg);
- }
- });
- parser.setErrorHandler(new InterleavedEndtagExchanger());
- parser.parse(new java.io.FileInputStream(args[0]));
- } catch (Exception e) {
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/RangeExpander.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/RangeExpander.java
deleted file mode 100644
index 0890a79..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/errorhandler/RangeExpander.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.errorhandler;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Enumeration;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.html.HTMLParser;
-import org.eclipse.actf.model.dom.sgml.EndTag;
-import org.eclipse.actf.model.dom.sgml.IErrorLogListener;
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLDocument;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-
-/**
- * A sample implementation class of {@link IErrorHandler}.
- */
-public class RangeExpander implements IErrorHandler {
- public boolean handleError(int code, SGMLParser parser, Node errorNode)
- throws ParseException, IOException, SAXException {
- if (!(code == SUDDEN_ENDTAG && errorNode instanceof EndTag)) {
- return false;
- }
- Vector<Element> elementsToBeInserted = new Vector<Element>();
- for (Node node = parser.getContext(); node instanceof Element; node = node
- .getParentNode()) {
- String tagName = node.getNodeName();
- if (tagName.equalsIgnoreCase(errorNode.getNodeName())) {
- parser.setContext((Element) node.getParentNode());
- for (Enumeration e = elementsToBeInserted.elements(); e
- .hasMoreElements();) {
- Element el = (Element) e.nextElement();
- parser.getContext().appendChild(el);
- parser.setContext(el);
- }
- return true;
- } else {
- elementsToBeInserted.addElement(parser.getDocument()
- .createElement(tagName));
- }
- }
- return false;
- }
-
- /**
- * Just for tests.
- */
- public static void main(String args[]) {
- try {
- HTMLParser parser = new HTMLParser();
- parser.addErrorLogListener(new IErrorLogListener() {
- public void errorLog(int code, String msg) {
- System.err.println(msg);
- }
- });
- parser.setErrorHandler(new RangeExpander());
- parser.parse(new java.io.FileInputStream(args[0]));
- ((SGMLDocument) parser.getDocument()).printAsSGML(new PrintWriter(
- System.out), false);
- } catch (Exception e) {
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/AndModelGroup.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/AndModelGroup.java
deleted file mode 100644
index a5bbc0a..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/AndModelGroup.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.sgml.internal.modelgroup;
-
-import java.util.Hashtable;
-
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Node;
-
-
-public class AndModelGroup extends CompositeModelGroup {
- public AndModelGroup(IModelGroup modelGroup) {
- super(modelGroup);
- }
-
- public void add(IModelGroup modelGroup) {
- /*
- * (a & b & (c & d)) != (a & b & c & d)
- */
- children[childLength++] = modelGroup;
- }
-
- public String toString() {
- String ret = new String("(");
- for (int i = 0; i < childLength - 1; i++) {
- ret = ret + children[i] + '&';
- }
- ret = ret + children[childLength - 1] + ')';
- return ret;
- }
-
- public boolean match(SGMLParser parser, Node parent, Node child) {
- Hashtable<Node, AndContext> map = parser.getAndMap();
- AndContext ac = (AndContext) map.get(parent);
- if (ac == null) {
- ac = new AndContext(this);
- map.put(parent, ac);
- } else if (ac.prev != null && ac.prev.match(parser, parent, child)) {
- return true;
- } else if (ac.prevIndex != -1) {
- ac.mgs[ac.prevIndex] = null;
- }
- for (int i = childLength - 1; i >= 0; i--) {
- IModelGroup mg = ac.mgs[i];
- if (mg != null && mg.match(parser, parent, child)) {
- ac.prevIndex = i;
- if (mg instanceof RepModelGroup || mg instanceof PlusModelGroup) {
- ac.prev = mg;
- }
- return true;
- }
- }
- return false;
- }
-
- public boolean optional() {
- for (int i = childLength - 1; i >= 0; i--) {
- if (!children[i].optional())
- return false;
- }
- return true;
- }
-
- public class AndContext {
- IModelGroup mgs[];
-
- IModelGroup prev = null;
-
- int prevIndex = -1;
-
- AndContext(AndModelGroup amg) {
- mgs = new IModelGroup[amg.childLength];
- for (int i = 0; i < mgs.length; i++) {
- mgs[i] = amg.children[i];
- }
- }
-
- void setPrev(IModelGroup mg) {
- prev = mg;
- }
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/CompositeModelGroup.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/CompositeModelGroup.java
deleted file mode 100644
index 31926c4..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/CompositeModelGroup.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.internal.modelgroup;
-
-public abstract class CompositeModelGroup implements IModelGroup {
- protected IModelGroup children[];
-
- protected int childLength;
-
- public void refer(boolean infinite) {
- for (int i = 0; i < childLength; i++) {
- children[i].refer(infinite);
- }
- }
-
- protected CompositeModelGroup(IModelGroup modelGroup) {
- children = new IModelGroup[128];
- children[0] = modelGroup;
- childLength = 1;
- modelGroup.refer(false);
- }
-
- public boolean match(int number) {
-// System.out.println(hash[number]);
- return hash[number];
- }
-
- private boolean hash[] = null;
-
- public boolean[] rehash(int totalSize) {
- if (hash != null) {
- return hash;
- }
- hash = new boolean[totalSize];
- for (int i = childLength - 1; i >= 0; i--) {
- boolean childHash[] = children[i].rehash(totalSize);
- if (childHash != null) {
- for (int j = totalSize - 1; j >= 0; j--)
- hash[j] |= childHash[j];
- }
- }
- return hash;
- }
-
- public int getChildLength() {
- return childLength;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/IModelGroup.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/IModelGroup.java
deleted file mode 100644
index 5c591bf..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/IModelGroup.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.internal.modelgroup;
-
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Node;
-
-
-public interface IModelGroup {
- /**
- * Checks if <code>child</code> matches to <code>parent</code>. And as
- * a side effect, adds child to parent and sets parsers context to it if it
- * matches.
- *
- * @param parser
- * @param parent
- * @param child
- * node to be tested by this method
- * @return true if <code>child</code> matches to <code>parent</code>
- */
- boolean match(SGMLParser parser, Node parent, Node child);
-
- public boolean optional();
-
- public void refer(boolean infinite);
-
- boolean match(int number);
-
- boolean[] rehash(int totalSize);
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/OptModelGroup.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/OptModelGroup.java
deleted file mode 100644
index 84cf593..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/OptModelGroup.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.internal.modelgroup;
-
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Node;
-
-
-public class OptModelGroup implements IModelGroup {
- private IModelGroup child;
-
- public OptModelGroup(IModelGroup modelGroup) {
- child = modelGroup;
- modelGroup.refer(false);
- }
-
- // for debug.
- public String toString() {
- return "(" + child + ")?";
- }
-
- public boolean match(SGMLParser parser, Node parent, Node child) {
- boolean ret = this.child.match(parser, parent, child);
- // System.out.println("opt: "+ret);
- return ret;
- }
-
- public boolean optional() {
- return true;
- }
-
- public void refer(boolean infinite) {
- child.refer(infinite);
- }
-
- private boolean hash[];
-
- public boolean match(int number) {
- return hash[number];
- }
-
- public boolean[] rehash(int totalSize) {
- return hash != null ? hash : (hash = child.rehash(totalSize));
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/OrModelGroup.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/OrModelGroup.java
deleted file mode 100644
index c84d8e2..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/OrModelGroup.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.internal.modelgroup;
-
-import org.eclipse.actf.model.dom.sgml.ElementDefinition;
-import org.eclipse.actf.model.dom.sgml.ParseException;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Node;
-
-
-public class OrModelGroup extends CompositeModelGroup {
- public OrModelGroup(IModelGroup modelGroup) {
- super(modelGroup);
- if (modelGroup instanceof OrModelGroup) {
- OrModelGroup orMG = (OrModelGroup) modelGroup;
- this.childLength = orMG.childLength;
- for (int i = 0; i < this.childLength; i++) {
- this.children[i] = orMG.children[i];
- }
- }
- }
-
- /**
- * (a | b | (c | d)) == (a | b | c | d)
- */
- public void add(IModelGroup modelGroup) {
- if (modelGroup instanceof OrModelGroup) {
- OrModelGroup orModelGroup = (OrModelGroup) modelGroup;
- for (int i = 0; i < orModelGroup.childLength; i++) {
- children[childLength++] = orModelGroup.children[i];
- }
- } else {
- children[childLength++] = modelGroup;
- }
- }
-
- public ElementDefinition[] getChildren() throws ParseException {
- ElementDefinition ret[] = new ElementDefinition[childLength];
- for (int i = 0; i < childLength; i++) {
- ret[i] = (ElementDefinition) children[i];
- }
- return ret;
- }
-
- // for debug.
- public String toString() {
- String ret = new String("(");
- for (int i = 0; i < childLength - 1; i++) {
- ret = ret + children[i] + '|';
- }
- ret = ret + children[childLength - 1] + ')';
- return ret;
- }
-
- public boolean match(SGMLParser parser, Node parent, Node child) {
- for (int i = 0; i < childLength; i++) {
- if (children[i].match(parser, parent, child)) {
-// System.out.println("or: match");
- return true;
- }
- }
-// System.out.println("or: out");
- return false;
- }
-
- public boolean optional() {
- for (int i = childLength - 1; i >= 0; i--) {
- if (children[i].optional())
- return true;
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/PlusModelGroup.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/PlusModelGroup.java
deleted file mode 100644
index 5f93c86..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/PlusModelGroup.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.internal.modelgroup;
-
-import java.util.Hashtable;
-
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Node;
-
-
-public class PlusModelGroup implements IModelGroup {
- private IModelGroup child;
-
- RepModelGroup rep;
-
- public PlusModelGroup(IModelGroup modelGroup) {
- child = modelGroup;
- rep = new RepModelGroup(modelGroup);
- }
-
- // for debug.
- public String toString() {
- return "(" + child + ")+";
- }
-
- public boolean match(SGMLParser parser, Node parent, Node child) {
- Hashtable<Node, Node> map = parser.getPlusMap();
- boolean ret;
- if (map.get(parent) == null) {
- ret = this.child.match(parser, parent, child);
- if (ret) {
- map.put(parent, parent);
- }
-// System.out.println("plus: "+ret);
- return ret;
- } else {
- ret = rep.match(parser, parent, child);
-// System.out.println("plus: "+ret);
- return ret;
- }
- }
-
- public boolean optional() {
- return child.optional();
- }
-
- public void refer(boolean infinite) {
- }
-
- private boolean hash[];
-
- public boolean match(int number) {
- return hash[number];
- }
-
- public boolean[] rehash(int totalSize) {
- return hash != null ? hash : (hash = rep.rehash(totalSize));
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/RepModelGroup.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/RepModelGroup.java
deleted file mode 100644
index 25ae148..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/RepModelGroup.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.internal.modelgroup;
-
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Node;
-
-
-public class RepModelGroup implements IModelGroup {
- private IModelGroup child;
-
- public RepModelGroup(IModelGroup modelGroup) {
- child = modelGroup;
- modelGroup.refer(true);
- }
-
- public String toString() {
- return "(" + child + ")*";
- }
-
- public boolean match(SGMLParser parser, Node parent, Node child) {
- parser.clearContextMap(parent);
- return this.child.match(parser, parent, child);
- }
-
- public boolean optional() {
- return true;
- }
-
- public void refer(boolean infinite) {
- }
-
- private boolean hash[];
-
- public boolean match(int number) {
- return hash[number];
- }
-
- public boolean[] rehash(int totalSize) {
- return hash != null ? hash : (hash = child.rehash(totalSize));
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/SeqModelGroup.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/SeqModelGroup.java
deleted file mode 100644
index 89ceb63..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/internal/modelgroup/SeqModelGroup.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.internal.modelgroup;
-
-import java.util.Hashtable;
-
-import org.eclipse.actf.model.dom.sgml.ISGMLConstants;
-import org.eclipse.actf.model.dom.sgml.SGMLParser;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-public class SeqModelGroup extends CompositeModelGroup {
- public SeqModelGroup(IModelGroup modelGroup) {
- super(modelGroup);
- }
-
- public void add(IModelGroup modelGroup) {
- /*
- * (a , b, (c, d)) == (a, b, c, d)
- */
- if (modelGroup instanceof SeqModelGroup) {
- SeqModelGroup another = (SeqModelGroup) modelGroup;
- for (int i = 0; i < another.childLength; i++) {
- another.children[i].refer(false);
- this.children[this.childLength++] = another.children[i];
- }
- } else {
- children[childLength++] = modelGroup;
- modelGroup.refer(false);
- }
- }
-
- // for debug.
- public String toString() {
- String ret = new String("(");
- for (int i = 0; i < childLength - 1; i++) {
- ret = ret + children[i] + ',';
- }
- ret = ret + children[childLength - 1] + ')';
- return ret;
- }
-
- // TODO support nested seqModel
- public boolean match(SGMLParser parser, Node parent, Node child) {
- Hashtable<Node, Integer> map = parser.getSeqMap();
- Integer current = (Integer) map.get(parent);
- IModelGroup mg;
- int index = current == null ? 0 : current.intValue();
- // prefetch 2
- int rest = 0;
- // int curIndex = index;
- IModelGroup skipped[] = parser.getSeqArray();
- int skippedNum = 0;
-
- // System.out.println("match: 1st");
- while (index < childLength) {
- mg = children[index];
-
- if (mg.match(parser, parent, child)) {
- if (!(mg instanceof PlusModelGroup)
- && !(mg instanceof RepModelGroup)) {
- index++;
- }
- if (skippedNum > 0) {
- parser.error(ISGMLConstants.ILLEGAL_CHILD, "Order of "
- + parent + "'s children is wrong.");
- }
-
- // System.out.println("match: true "+index);
-
- map.put(parent, new Integer(index));
- return true;
- } else if (mg.optional()) {
- index++;
- } else if (rest < 2) {
- skipped[skippedNum++] = mg;
- rest++;
- index++;
- } else {
- System.out.println("match: false");
- return false;
- }
- }
- // System.out.println("match: 2nd");
- // search before index, if found -> error
- /*
- * for (int i = curIndex - 2; i >= 0; i--) { mg = children[i]; if
- * (mg.match(parser, parent, child)) { // map.put(parent, new Integer(i +
- * 1)); outer1: for (Node prev = child.getPreviousSibling(); prev !=
- * null; ) { int prevID = child instanceof Element ?
- * parser.getDTD().getElementDefinition(prev.getNodeName()).number :
- * parser.pcdataNumber; for (int j = i + 1; j < curIndex; j++) { mg =
- * children[j]; if (mg.match(prevID)) { parent.removeChild(child);
- * parent.insertBefore(child, prev); prev = child.getPreviousSibling();
- * continue outer1; } } prev = prev.getPreviousSibling(); }
- * parser.error(SGMLConstants.ILLEGAL_CHILD, "Order of " + parent + "'s
- * children is wrong."); return true; } }
- */
- Node sibling = parent.getLastChild();
- if (sibling instanceof Element && child instanceof Element
- && sibling.getNodeName().equalsIgnoreCase(child.getNodeName())
- && parser.autoGenerated((Element) sibling)) {
- // must be error
- while (sibling.hasChildNodes()) {
- Node sibChild = sibling.getFirstChild();
- sibling.removeChild(sibChild);
- child.appendChild(sibChild);
- }
- parent.replaceChild(child, sibling);
- return true;
- }
- return false;
- }
-
- public boolean optional() {
- for (int i = childLength - 1; i >= 0; i--) {
- if (!children[i].optional())
- return false;
- }
- return true;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/ErrorHandlerTableImpl.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/ErrorHandlerTableImpl.java
deleted file mode 100644
index 4769ad6..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/ErrorHandlerTableImpl.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.util;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.util.*;
-
-import org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler;
-
-/**
- * For JDK1.2 or later
- */
-public class ErrorHandlerTableImpl extends Hashtable<URL, IErrorHandler[]> implements
- IErrorHandlerTable {
- public ErrorHandlerTableImpl() {
- init();
- }
-
- private void init() {
- Properties prop = new Properties();
- try {
- prop.load(getClass()
- .getResourceAsStream("errorhandlers.properties"));
- } catch (Exception e) {
- e.printStackTrace();
- }
- for (Enumeration e = prop.keys(); e.hasMoreElements();) {
- String urlStr = (String) e.nextElement();
- URL url;
- try {
- url = new URL(urlStr);
- } catch (MalformedURLException ex) {
- ex.printStackTrace();
- continue;
- }
- put(url, createErrorHandlers((String) prop.get(urlStr)));
- }
- }
-
- private String errorHandlerNameArray[] = new String[128];
-
- private IErrorHandler[] createErrorHandlers(String errorHandlerNames) {
- int lastComma = 0;
- int errorHandlerNum = 0;
- for (int i = 0; i < errorHandlerNames.length(); i++) {
- if (errorHandlerNames.charAt(i) == ',') {
- errorHandlerNameArray[errorHandlerNum++] = errorHandlerNames
- .substring(lastComma, i);
- lastComma = i + 1;
- }
- }
- errorHandlerNameArray[errorHandlerNum++] = errorHandlerNames
- .substring(lastComma);
-
- IErrorHandler ret[] = new IErrorHandler[errorHandlerNum];
- for (int i = 0; i < errorHandlerNum; i++) {
- try {
- Class errorHandlerClass = Class
- .forName(errorHandlerNameArray[i]);
- ret[i] = (IErrorHandler) errorHandlerClass.newInstance();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- return ret;
- }
-
- public IErrorHandler[] getErrorHandlers(URL url) {
- return (IErrorHandler[]) get(url);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/IErrorHandlerTable.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/IErrorHandlerTable.java
deleted file mode 100644
index 89edcca..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/IErrorHandlerTable.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.util;
-
-import java.net.URL;
-
-import org.eclipse.actf.model.dom.sgml.errorhandler.IErrorHandler;
-
-public interface IErrorHandlerTable {
- public IErrorHandler[] getErrorHandlers(URL url);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/IMutableTreeNodeFactory.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/IMutableTreeNodeFactory.java
deleted file mode 100644
index 1310b5a..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/IMutableTreeNodeFactory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.util;
-
-import javax.swing.tree.*;
-import org.w3c.dom.*;
-
-public interface IMutableTreeNodeFactory {
- public MutableTreeNode createNode(Node node);
-
- public MutableTreeNode getNode(Node node);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/MutableTreeNodeFactoryImpl.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/MutableTreeNodeFactoryImpl.java
deleted file mode 100644
index 84be3b0..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/MutableTreeNodeFactoryImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.util;
-
-import javax.swing.tree.*;
-
-import org.w3c.dom.*;
-
-import java.util.Hashtable;
-
-public class MutableTreeNodeFactoryImpl implements IMutableTreeNodeFactory {
- /**
- * Key: DOM Node, Value: MutableTreeNodeImpl
- */
- private Hashtable<Node, MutableTreeNodeImpl> table = new Hashtable<Node, MutableTreeNodeImpl>();
-
- public MutableTreeNode createNode(Node node) {
- MutableTreeNodeImpl ret = (MutableTreeNodeImpl) table.get(node);
- if (ret == null) {
- ret = new MutableTreeNodeImpl(node, this);
- table.put(node, ret);
- }
- return ret;
- }
-
- public MutableTreeNode getNode(Node node) {
- return (MutableTreeNodeImpl) table.get(node);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/MutableTreeNodeImpl.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/MutableTreeNodeImpl.java
deleted file mode 100644
index 38a558a..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/MutableTreeNodeImpl.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.util;
-
-import javax.swing.tree.*;
-import org.w3c.dom.*;
-import java.util.*;
-
-public class MutableTreeNodeImpl implements MutableTreeNode {
- private Node domNode;
-
- private IMutableTreeNodeFactory factory;
-
- public Node getDomNode() {
- return domNode;
- }
-
- private static IMutableTreeNodeFactory sfactory;
-
- /**
- * @deprecated See {@link IMutableTreeNodeFactory}
- */
- public static MutableTreeNodeImpl createNode(Node node) {
- if (sfactory == null) {
- sfactory = new MutableTreeNodeFactoryImpl();
- }
- return (MutableTreeNodeImpl) sfactory.createNode(node);
- }
-
- protected MutableTreeNodeImpl(Node node, IMutableTreeNodeFactory factory) {
- this.domNode = node;
- this.factory = factory;
- }
-
- public String toString() {
- return domNode.toString();
- }
-
- public TreeNode getChildAt(int childIndex) {
- Node ret;
- for (ret = domNode.getFirstChild(); childIndex > 0 && ret != null; ret = ret
- .getNextSibling(), childIndex--)
- ;
- return ret != null ? factory.createNode(ret) : null;
- }
-
- public int getChildCount() {
- int ret = 0;
- for (Node child = domNode.getFirstChild(); child != null; child = child
- .getNextSibling())
- ret++;
- return ret;
- }
-
- public TreeNode getParent() {
- Node domParent = domNode.getParentNode();
- return domParent == null ? null : factory.createNode(domParent);
- }
-
- public int getIndex(TreeNode node) {
- Node targetChild = ((MutableTreeNodeImpl) node).domNode;
- int ret = 0;
- for (Node child = domNode.getFirstChild(); child != null; child = child
- .getNextSibling()) {
- if (child == targetChild) {
- return ret;
- } else {
- ret++;
- }
- }
- return -1;
- }
-
- public boolean getAllowsChildren() {
- return domNode instanceof Element || domNode instanceof Document;
- }
-
- public boolean isLeaf() {
- return !(domNode instanceof Element) && !domNode.hasChildNodes()
- && !(domNode instanceof Document);
- }
-
- public Enumeration children() {
- return new Enumeration() {
- private Node nextChild = domNode.getFirstChild();
-
- public boolean hasMoreElements() {
- return nextChild != null;
- }
-
- public Object nextElement() {
- if (nextChild == null)
- throw new NoSuchElementException();
- MutableTreeNode ret = factory.createNode(nextChild);
- nextChild = nextChild.getNextSibling();
- return ret;
- }
- };
- }
-
- public void insert(MutableTreeNode child, int index) {
- Node after;
- for (after = domNode.getFirstChild(); after != null && index > 0; after = after
- .getNextSibling(), index--)
- ;
- domNode.insertBefore(((MutableTreeNodeImpl) child).domNode, after);
- }
-
- public void remove(int index) {
- Node child;
- for (child = domNode.getFirstChild(); index > 0 && child != null; child = child
- .getNextSibling(), index--)
- ;
- if (child != null)
- domNode.removeChild(child);
- }
-
- public void remove(MutableTreeNode node) {
- domNode.removeChild(((MutableTreeNodeImpl) node).domNode);
- }
-
- public void setUserObject(Object object) {
- if (object instanceof Node) {
- this.domNode = (Node) object;
- }
- }
-
- public void removeFromParent() {
- domNode.getParentNode().removeChild(domNode);
- }
-
- public void setParent(MutableTreeNode newParent) {
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/SgmlUtil.java b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/SgmlUtil.java
deleted file mode 100644
index 4646fad..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/SgmlUtil.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1998, 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:
- * Goh KONDOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.dom.sgml.util;
-
-import org.w3c.dom.Node;
-
-public class SgmlUtil {
- public static Node commonAncester(Node anc1, Node anc2) {
- for (Node p1 = anc1.getParentNode(); p1 != null; p1 = p1
- .getParentNode()) {
- for (Node p2 = anc2.getParentNode(); p2 != null; p2 = p2
- .getParentNode()) {
- if (p1 == p2)
- return p1;
- }
- }
- return null;
- }
-
- /**
- * Replaces <code>node</code> with its children. The following is an
- * example:
- *
- * <pre>
- * R R
- * / \ /|\
- * A B -> A E F
- * / \
- * E F
- *
- * remove B
- * </pre>
- *
- * @param node
- * target node.
- * @return <code>node</code> if succeeded. Otherwize, <code>null</code>.
- * @throws IllegalArgumentException
- */
- public static void remove(Node node) {
- Node parent = node.getParentNode();
- if (parent == null) {
- throw new IllegalArgumentException(node + " doesn't have a parent");
- }
- for (Node child = node.getFirstChild(); child != null; child = node
- .getFirstChild()) {
- node.removeChild(child);
- parent.insertBefore(child, node);
- }
- parent.removeChild(node);
- }
-
- /**
- * Adds <code>node</code> and moves children specified by
- * <code>from</code> and <code>to</code> to it. The following is an
- * example:
- *
- * <pre>
- * R R
- * /|\ / \
- * A E F -> A B
- * / \
- * E F
- *
- * add B ...
- * </pre>
- *
- * @param node
- * target node
- * @param from
- * beginning of the children moved to <code>node</code>. If
- * <code>null</code>, no child will be moved.
- * @param to
- * end of the children moved to <code>node</code>
- * @return <code>node</code> if succeeded. Otherwize, <code>null</code>.
- * @throws IllegalArgumentException
- */
- public static void add(Node parent, Node node, Node from, Node to) {
- if (parent == null) {
- throw new IllegalArgumentException("parent=null");
- } else if (node.getParentNode() != null) {
- throw new IllegalArgumentException(node + " already has its parent");
- } else if (from == null) {
- parent.insertBefore(node, null);
- } else if (from.getParentNode() != parent) {
- throw new IllegalArgumentException(from + "'s parent isn't "
- + parent);
- } else if (to.getParentNode() != parent) {
- throw new IllegalArgumentException(to + "'s parent isn't " + parent);
- } else if (from != null) {
- for (Node child = from; child != null; child = child
- .getNextSibling()) {
- if (child == to) {
- parent.insertBefore(node, from);
- for (child = from; child != to; child = node
- .getNextSibling()) {
- parent.removeChild(child);
- node.insertBefore(child, null);
- }
- parent.removeChild(to);
- node.insertBefore(to, null);
- return;
- }
- }
- throw new IllegalArgumentException("No link from " + from + " to "
- + to);
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/errorhandlers.properties b/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/errorhandlers.properties
deleted file mode 100644
index bc23270..0000000
--- a/plugins/org.eclipse.actf.model.dom.html/src/org/eclipse/actf/model/dom/sgml/util/errorhandlers.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-###############################################################################
-# Copyright (c) 1998, 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
-###############################################################################
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/.classpath b/plugins/org.eclipse.actf.model.dom.odf/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.model.dom.odf/.cvsignore b/plugins/org.eclipse.actf.model.dom.odf/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.actf.model.dom.odf/.project b/plugins/org.eclipse.actf.model.dom.odf/.project
deleted file mode 100644
index bc6bd7f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.model.dom.odf</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.model.dom.odf/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.model.dom.odf/META-INF/MANIFEST.MF
deleted file mode 100644
index 24e560f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,33 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF ODF Model Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.model.dom.odf
-Bundle-Version: 0.0.1.qualifier
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.actf.core
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.actf.model.dom.odf,
- org.eclipse.actf.model.dom.odf.anim,
- org.eclipse.actf.model.dom.odf.base,
- org.eclipse.actf.model.dom.odf.chart,
- org.eclipse.actf.model.dom.odf.content,
- org.eclipse.actf.model.dom.odf.dr3d,
- org.eclipse.actf.model.dom.odf.draw,
- org.eclipse.actf.model.dom.odf.form,
- org.eclipse.actf.model.dom.odf.format,
- org.eclipse.actf.model.dom.odf.manifest,
- org.eclipse.actf.model.dom.odf.number,
- org.eclipse.actf.model.dom.odf.office,
- org.eclipse.actf.model.dom.odf.presentation,
- org.eclipse.actf.model.dom.odf.range,
- org.eclipse.actf.model.dom.odf.style,
- org.eclipse.actf.model.dom.odf.svg,
- org.eclipse.actf.model.dom.odf.table,
- org.eclipse.actf.model.dom.odf.text,
- org.eclipse.actf.model.dom.odf.util,
- org.eclipse.actf.model.dom.odf.util.accessibility,
- org.eclipse.actf.model.dom.odf.util.converter,
- org.eclipse.actf.model.dom.odf.xlink
-Bundle-ClassPath: odfapi.jar
-Bundle-Activator: org.eclipse.actf.model.dom.odf.OdfPlugin
diff --git a/plugins/org.eclipse.actf.model.dom.odf/about.html b/plugins/org.eclipse.actf.model.dom.odf/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/build.properties b/plugins/org.eclipse.actf.model.dom.odf/build.properties
deleted file mode 100644
index 685d092..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- odfapi.jar
-jars.compile.order = odfapi.jar
-source.odfapi.jar = src/
-output.odfapi.jar = bin/
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/ODFConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/ODFConstants.java
deleted file mode 100644
index dce81ad..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/ODFConstants.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf;
-
-public final class ODFConstants {
- public enum ContentType {
- WRITE, SPREADSHEET, PRESENTATION, DRAW, CHART, NONE
- }
-
- public static final String ODT_SUFFIX = ".odt";
-
- public static final String ODS_SUFFIX = ".ods";
-
- public static final String ODP_SUFFIX = ".odp";
-
- public static final String ODF_MANIFEST_DIR = "META-INF";
-
- public static final String ODF_CONTENT_FILENAME = "content.xml";
-
- public static final String ODF_STYLE_FILENAME = "styles.xml";
-
- public static final String ODF_MANIFEST_FILENAME = ODF_MANIFEST_DIR
- + System.getProperty("file.separator") + "manifest.xml";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/ODFException.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/ODFException.java
deleted file mode 100644
index 6387cd5..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/ODFException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf;
-
-public class ODFException extends Exception {
- private static final long serialVersionUID = -5189990975068451718L;
-
- /**
- *
- */
- public ODFException() {
- super();
- }
-
- /**
- * @param message
- */
- public ODFException(String message) {
- super(message);
- }
-
- /**
- * @param message
- * @param cause
- */
- public ODFException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * @param cause
- */
- public ODFException(Throwable cause) {
- super(cause);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/ODFParser.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/ODFParser.java
deleted file mode 100644
index 5b0182f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/ODFParser.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFNode;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFDocumentImpl;
-import org.eclipse.actf.util.FileUtils;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-
-public class ODFParser {
-
- private InputStream getFileInputStream(String odfName, String fileName) {
- URL url = null;
- try {
- url = new URL(odfName);
- } catch (MalformedURLException e) {
- }
-
- ZipFile zipFile = null;
- ZipEntry zipEntry = null;
- try {
- if (url != null) {
- zipFile = new ZipFile(new File(url.toURI()));
- } else {
- zipFile = new ZipFile(odfName);
- }
- String zipFileName = fileName.replaceAll("\\\\", "/");
- zipEntry = zipFile.getEntry(zipFileName);
- } catch (IOException e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
-
- InputStream is = null;
- if (zipEntry != null) {
- try {
- is = zipFile.getInputStream(zipEntry);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return is;
- }
-
- private void createODFNode(Node parent, ODFDocument odfDoc,
- ODFNode odfNodeParent) {
- if (parent instanceof Element) {
- NamedNodeMap attrs = ((Element) parent).getAttributes();
- if ((attrs != null) && (attrs.getLength() > 0)) {
- for (int i = 0; i < attrs.getLength(); i++) {
- ((ODFDocumentImpl) odfDoc).getODFNode(attrs.item(i));
- }
- }
- }
-
- NodeList nl = parent.getChildNodes();
- if ((nl != null) && (nl.getLength() != 0)) {
- for (int i = 0; i < nl.getLength(); i++) {
- Node child = nl.item(i);
-
- ODFNode odfChild = ((ODFDocumentImpl) odfDoc).getODFNode(child);
- createODFNode(child, odfDoc, odfChild);
- }
- }
- }
-
- private ODFDocument parse(InputSource is) {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setNamespaceAware(true);
-
- Document document = null;
- try {
- DocumentBuilder documentBuilder = factory.newDocumentBuilder();
- document = documentBuilder.parse(is);
- } catch (ParserConfigurationException e) {
- } catch (SAXException e) {
- } catch (IOException e) {
- }
- if (document == null)
- return null;
-
- Node root = document.getDocumentElement();
- ODFDocument odfDoc = new ODFDocumentImpl(document);
- ODFNode odfDocRoot = (ODFNode) odfDoc.getDocumentElement();
- createODFNode(root, odfDoc, odfDocRoot);
-
- return odfDoc;
- }
-
- public ODFDocument getDocument(String odfName, String xmlName) {
- ODFDocument odfDoc = null;
- try {
- InputStream is = getFileInputStream(odfName, xmlName);
- if (is != null) {
- odfDoc = parse(new InputSource(is));
- is.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- return odfDoc;
- }
-
- public ODFDocument getDocument(String odfName) {
- ODFDocument contentDoc = getDocument(odfName,
- ODFConstants.ODF_CONTENT_FILENAME);
- ODFDocument styleDoc = getDocument(odfName,
- ODFConstants.ODF_STYLE_FILENAME);
-
- if (contentDoc != null) {
- contentDoc.setStyleDocument(styleDoc);
- contentDoc.setURL(odfName);
- }
-
- return contentDoc;
- }
-
- public String[] getFileEntries(String odfName) {
- ZipFile zipFile = null;
-
- URL url = null;
- try {
- url = new URL(odfName);
- } catch (MalformedURLException e) {
- }
-
- try {
- if (url != null) {
- zipFile = new ZipFile(url.getPath());
- } else {
- zipFile = new ZipFile(odfName);
- }
- Enumeration entries = zipFile.entries();
- List<String> list = new ArrayList<String>();
- while (entries.hasMoreElements()) {
- ZipEntry entry = (ZipEntry) entries.nextElement();
- String name = entry.getName();
- list.add(name);
- }
- return list.toArray(new String[list.size()]);
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- return null;
- }
-
- public void extractFile(String odfName, String entry, String outputFileName) {
- InputStream is = getFileInputStream(odfName, entry);
- FileUtils.saveToFile(is, outputFileName, true);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/OdfPlugin.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/OdfPlugin.java
deleted file mode 100644
index e604092..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/OdfPlugin.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf;
-
-import org.eclipse.core.runtime.Plugin;
-
-public class OdfPlugin extends Plugin {
-
- private static OdfPlugin plugin;
-
- public OdfPlugin() {
- plugin = this;
- }
-
- public static OdfPlugin getDefault() {
- return plugin;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/anim/AnimConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/anim/AnimConstants.java
deleted file mode 100644
index dc38dd4..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/anim/AnimConstants.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.anim;
-
-public final class AnimConstants {
- static public final String ANIM_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:animation:1.0";
-
- static public final String ELEMENT_PAR = "par";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ContentBaseElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ContentBaseElement.java
deleted file mode 100644
index caad839..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ContentBaseElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.range.IContentRange;
-
-
-public interface ContentBaseElement extends ODFElement {
- public ContentType getContentType();
-
- IContentRange createRange();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/DrawingObjectBaseElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/DrawingObjectBaseElement.java
deleted file mode 100644
index 96e0541..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/DrawingObjectBaseElement.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.eclipse.actf.model.dom.odf.svg.DescElement;
-import org.eclipse.actf.model.dom.odf.svg.TitleElement;
-
-public interface DrawingObjectBaseElement extends ODFElement {
- public TitleElement getSVGTitleElement();
-
- public DescElement getSVGDescElement();
-
- public ODFElement getShortDescElement();
-
- public ODFElement getLongDescElement();
-
- // for Notes8, Notes8 save document by ODF 1.1 schema,
- // but odf:version is set as 1.0
- public ODFElement getShortDescElement(double version);
-
- public ODFElement getLongDescElement(double version);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/DrawingObjectElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/DrawingObjectElement.java
deleted file mode 100644
index 77befbe..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/DrawingObjectElement.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.eclipse.actf.model.dom.odf.draw.TextBoxElement;
-
-public interface DrawingObjectElement extends DrawingObjectBaseElement {
- public String getAttrDrawCaptionId();
-
- long getHeight();
-
- long getWidth();
-
- long getX();
-
- long getY();
-
- void setHeight(long height);
-
- void setWidth(long width);
-
- void setX(long x);
-
- void setY(long y);
-
- long getPageIndex();
-
- long getZIndex();
-
- public TextBoxElement getBoundCaptionTextBoxElement();
-
- // for Notes8, Notes8 save document by ODF 1.1 schema,
- // but odf:version is set as 1.0
- public TextBoxElement getBoundCaptionTextBoxElement(double version);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/EmbedDrawingObjectElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/EmbedDrawingObjectElement.java
deleted file mode 100644
index dcf8d68..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/EmbedDrawingObjectElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.eclipse.actf.model.dom.odf.draw.FrameElement;
-import org.eclipse.actf.model.dom.odf.text.SequenceElement;
-
-
-public interface EmbedDrawingObjectElement extends DrawingObjectBaseElement {
- public FrameElement getFrameElement();
-
- public SequenceElement getTextSequenceElement();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFAttr.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFAttr.java
deleted file mode 100644
index 64437c2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFAttr.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.w3c.dom.Attr;
-
-public interface ODFAttr extends ODFNode, Attr {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFCharacterData.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFCharacterData.java
deleted file mode 100644
index 924494e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFCharacterData.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.w3c.dom.CharacterData;
-
-public interface ODFCharacterData extends ODFNode, CharacterData {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFComment.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFComment.java
deleted file mode 100644
index 0d5df8f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFComment.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.w3c.dom.Comment;
-
-public interface ODFComment extends ODFCharacterData, Comment {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFDocument.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFDocument.java
deleted file mode 100644
index 3ac544b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFDocument.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.w3c.dom.Document;
-
-public interface ODFDocument extends Document {
- public String getURL();
-
- public void setURL(String sUrl);
-
- public void setODFVersion(double version);
-
- public double getODFVersion();
-
- public void setStyleDocument(ODFDocument styleDoc);
-
- public ODFDocument getStyleDocument();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFElement.java
deleted file mode 100644
index 306b790..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.w3c.dom.Element;
-
-public interface ODFElement extends Element {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFNamedNodeMap.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFNamedNodeMap.java
deleted file mode 100644
index 36126b8..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFNamedNodeMap.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.w3c.dom.NamedNodeMap;
-
-public interface ODFNamedNodeMap extends NamedNodeMap {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFNode.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFNode.java
deleted file mode 100644
index be2dfe3..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFNode.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.w3c.dom.Node;
-
-public interface ODFNode extends Node {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFNodeList.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFNodeList.java
deleted file mode 100644
index 265a9d1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFNodeList.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.w3c.dom.NodeList;
-
-public interface ODFNodeList extends NodeList {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFProcessingInstruction.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFProcessingInstruction.java
deleted file mode 100644
index 8b2b259..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFProcessingInstruction.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.w3c.dom.ProcessingInstruction;
-
-public interface ODFProcessingInstruction extends ODFNode,
- ProcessingInstruction {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFText.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFText.java
deleted file mode 100644
index 091f402..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/ODFText.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base;
-
-import org.w3c.dom.Text;
-
-public interface ODFText extends ODFCharacterData, Text {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/AbstractODFNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/AbstractODFNodeFactory.java
deleted file mode 100644
index 6fb6903..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/AbstractODFNodeFactory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import java.lang.reflect.Constructor;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.w3c.dom.Element;
-
-
-public abstract class AbstractODFNodeFactory {
-
- protected static Constructor findElementConstractor(Class cs) {
- Constructor[] constructors = cs.getDeclaredConstructors();
- for (int i = 0; i < constructors.length; i++) {
- Class[] parms = constructors[i].getParameterTypes();
- if (parms.length == 2 && parms[0].equals(ODFDocument.class)
- && parms[1].equals(Element.class)) {
- return constructors[i];
- }
- }
- return null;
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/DrawingObjectBaseElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/DrawingObjectBaseElementImpl.java
deleted file mode 100644
index dcd534f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/DrawingObjectBaseElementImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectBaseElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.w3c.dom.Element;
-
-
-public abstract class DrawingObjectBaseElementImpl extends ODFElementImpl
- implements DrawingObjectBaseElement {
-
- protected DrawingObjectBaseElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public ODFElement getShortDescElement() {
- ODFDocument doc = (ODFDocument) this.getOwnerDocument();
- return getShortDescElement(doc.getODFVersion());
- }
-
- public ODFElement getShortDescElement(double version) {
- if (version == 1.0) {
- return this.getSVGDescElement();
- } else if (version > 1.0) {
- return this.getSVGTitleElement();
- } else {
- new ODFException("invalid office version").printStackTrace();
- }
- return null;
- }
-
- public ODFElement getLongDescElement() {
- ODFDocument doc = (ODFDocument) this.getOwnerDocument();
- return getLongDescElement(doc.getODFVersion());
- }
-
- public ODFElement getLongDescElement(double version) {
- if (version == 1.0) {
- new ODFException("long desc is not available for ODF 1.0")
- .printStackTrace();
- } else if (version > 1.0) {
- return this.getSVGDescElement();
- } else {
- new ODFException("invalid office version").printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/DrawingObjectElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/DrawingObjectElementImpl.java
deleted file mode 100644
index cb6d017..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/DrawingObjectElementImpl.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.GElement;
-import org.eclipse.actf.model.dom.odf.draw.PageElement;
-import org.eclipse.actf.model.dom.odf.draw.TextBoxElement;
-import org.eclipse.actf.model.dom.odf.office.BodyElement;
-import org.eclipse.actf.model.dom.odf.office.DocumentContentElement;
-import org.eclipse.actf.model.dom.odf.office.SpreadSheetElement;
-import org.eclipse.actf.model.dom.odf.svg.DescElement;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.eclipse.actf.model.dom.odf.svg.TitleElement;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-public abstract class DrawingObjectElementImpl extends
- DrawingObjectBaseElementImpl implements DrawingObjectElement {
-
- protected DrawingObjectElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrDrawCaptionId() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_CAPTION_ID))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_CAPTION_ID);
- return null;
- }
-
- public long getHeight() {
- // TODO Auto-generated method stub
- return -1;
- }
-
- public long getWidth() {
- // TODO Auto-generated method stub
- return -1;
- }
-
- public long getX() {
- // TODO Auto-generated method stub
- return -1;
- }
-
- public long getY() {
- // TODO Auto-generated method stub
- return -1;
- }
-
- public void setHeight(long height) {
- // TODO Auto-generated method stub
-
- }
-
- public void setWidth(long width) {
- // TODO Auto-generated method stub
-
- }
-
- public void setX(long x) {
- // TODO Auto-generated method stub
-
- }
-
- public void setY(long y) {
- // TODO Auto-generated method stub
-
- }
-
- public long getPageIndex() {
- // if presentation doc
- PageElement page = null;
- Node parent = getParentNode();
- while (null != parent) {
- if (parent instanceof PageElement) {
- page = (PageElement) parent;
- break;
- }
- if ((null == parent) || (parent instanceof BodyElement))
- break;
- parent = parent.getParentNode();
- }
- if (null != page)
- return page.getPageIndex();
-
- // if spreadsheet doc
- TableElement sheet = null;
- parent = getParentNode();
- while (null != parent) {
- if (parent instanceof TableElement) {
- Node gparent = parent.getParentNode();
- if (gparent instanceof SpreadSheetElement) {
- sheet = (TableElement) parent;
- break;
- }
- }
- if ((null == parent) || (parent instanceof BodyElement))
- break;
- parent = parent.getParentNode();
- }
- if (null != sheet) {
- int sheetIndex = 0;
-
- Node preSib = sheet.getPreviousSibling();
- while (preSib != null) {
- if (preSib instanceof TableElement)
- sheetIndex++;
- preSib = preSib.getPreviousSibling();
- }
-
- return sheetIndex;
- }
-
- return -1;
- }
-
- public long getZIndex() {
- // OpenOffice.org save draw:z-index attribute for all graphic object in
- // ODT and ODS
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_Z_INDEX)) {
- try {
- return new Integer(getAttributeNS(
- DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_Z_INDEX)).intValue();
- } catch (NumberFormatException e) {
- }
- }
-
- // OpenOffice.org don't save draw:z-index attribute for all graphic
- // object in ODP
- DocumentContentElement content = (DocumentContentElement) odfDoc
- .getDocumentElement();
- ContentType type = content.getBodyElement().getContent()
- .getContentType();
- if ((type == ContentType.PRESENTATION) || (type == ContentType.DRAW)) {
- Node parent = getParentNode();
- if (parent instanceof PageElement) {
- int zIndex = 0;
- Node preNode = this.getPreviousSibling();
- while (preNode != null) {
- if (preNode instanceof DrawingObjectElement) {
- zIndex++;
- } else if (preNode instanceof Element) {
- NodeList nl = ((Element) preNode)
- .getElementsByTagNameNS(
- DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ELEMENT_CONTROL);
- if ((null != nl) && (nl.getLength() > 0))
- zIndex += nl.getLength();
- }
- preNode = preNode.getPreviousSibling();
- }
- return zIndex;
- } else if (parent instanceof GElement) {
- return ((GElement) parent).getZIndex();
- }
- }
- return -1;
- }
-
- public TextBoxElement getBoundCaptionTextBoxElement() {
- ODFDocument odfDoc = (ODFDocument) getOwnerDocument();
- return getBoundCaptionTextBoxElement(odfDoc.getODFVersion());
- }
-
- public TextBoxElement getBoundCaptionTextBoxElement(double version) {
- if (version == 1.0)
- return null;
-
- String captionId = getAttrDrawCaptionId();
- if (captionId == null)
- return null;
-
- ODFDocument odfDoc = (ODFDocument) getOwnerDocument();
- ODFElementImpl root = (ODFElementImpl) odfDoc.getDocumentElement();
- ODFElement elem = root.findElementByAttrValue(
- DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ELEMENT_TEXT_BOX,
- TextConstants.TEXT_NAMESPACE_URI, TextConstants.ATTR_ID,
- captionId);
- if ((elem != null) && (elem instanceof TextBoxElement)) {
- return (TextBoxElement) elem;
- }
- new ODFException(
- "'draw:caption-id' does not point to text:box element.")
- .printStackTrace();
- return null;
- }
-
- public TitleElement getSVGTitleElement() {
- NodeList nl = XPathUtil.evalXPathNodeList(this,
- "./*[(namespace-uri()='" + SVGConstants.SVG_NAMESPACE_URI
- + "' and local-name()='" + SVGConstants.ELEMENT_TITLE
- + "')]");
- if ((nl != null) && (nl.getLength() == 1))
- return (TitleElement) nl.item(0);
- if ((nl != null) && (nl.getLength() > 1)) {
- new ODFException(
- "drawing object has more than one svg:title elements.")
- .printStackTrace();
- }
- return null;
- }
-
- public DescElement getSVGDescElement() {
- NodeList nl = XPathUtil.evalXPathNodeList(this,
- "./*[(namespace-uri()='" + SVGConstants.SVG_NAMESPACE_URI
- + "' and local-name()='" + SVGConstants.ELEMENT_DESC
- + "')]");
- if ((nl != null) && (nl.getLength() == 1))
- return (DescElement) nl.item(0);
- if ((nl != null) && (nl.getLength() > 1)) {
- new ODFException(
- "drawing object has more than one svg:desc elements.")
- .printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/EmbedDrawingObjectElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/EmbedDrawingObjectElementImpl.java
deleted file mode 100644
index b119518..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/EmbedDrawingObjectElementImpl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.EmbedDrawingObjectElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.draw.FrameElement;
-import org.eclipse.actf.model.dom.odf.svg.DescElement;
-import org.eclipse.actf.model.dom.odf.svg.TitleElement;
-import org.eclipse.actf.model.dom.odf.text.SequenceElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-
-public abstract class EmbedDrawingObjectElementImpl extends
- DrawingObjectBaseElementImpl implements EmbedDrawingObjectElement {
-
- protected EmbedDrawingObjectElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public FrameElement getFrameElement() {
- ODFElement parent = (ODFElement) this.getParentNode();
- if (parent instanceof FrameElement) {
- return (FrameElement) parent;
- } else {
- new ODFException(
- "parent of embed object element should be draw:frame element.")
- .printStackTrace();
- }
- return null;
- }
-
- public TitleElement getSVGTitleElement() {
- FrameElement frame = getFrameElement();
- if (frame == null)
- return null;
- return frame.getSVGTitleElement();
- }
-
- public DescElement getSVGDescElement() {
- FrameElement frame = getFrameElement();
- if (frame == null)
- return null;
- return frame.getSVGDescElement();
- }
-
- public SequenceElement getTextSequenceElement() {
- FrameElement frame = getFrameElement();
- if (frame == null)
- return null;
-
- NodeList nl = XPathUtil.evalXPathNodeList(frame,
- "../*[namespace-uri()='" + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='"
- + TextConstants.ELEMENT_SEQUENCE + "']");
- if ((nl != null) && (nl.getLength() == 1))
- return (SequenceElement) nl.item(0);
- if ((nl != null) && (nl.getLength() > 1)) {
- new ODFException(
- "draw:image has more than one text:sequence elements.")
- .printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFAttrImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFAttrImpl.java
deleted file mode 100644
index fa9aed8..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFAttrImpl.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFAttr;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.TypeInfo;
-
-
-class ODFAttrImpl extends ODFNodeImpl implements ODFAttr {
-
- public ODFAttrImpl(ODFDocument odfDoc, Attr iAttr) {
- super(odfDoc, iAttr);
- }
-
- public String getName() {
- return ((Attr) iNode).getName();
- }
-
- public Element getOwnerElement() {
- if (iNode instanceof Attr) {
- Element iOwner = ((Attr) iNode).getOwnerElement();
- if (iOwner == null)
- return null;
-
- return (Element) odfDoc.getODFNode(iOwner);
- }
- return null;
- }
-
- public TypeInfo getSchemaTypeInfo() {
- return ((Attr) iNode).getSchemaTypeInfo();
- }
-
- public boolean getSpecified() {
- return ((Attr) iNode).getSpecified();
- }
-
- public String getValue() {
- return ((Attr) iNode).getValue();
- }
-
- public boolean isId() {
- return ((Attr) iNode).isId();
- }
-
- public void setValue(String value) throws DOMException {
- ((Attr) iNode).setValue(value);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFCharacterDataImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFCharacterDataImpl.java
deleted file mode 100644
index 1974ad6..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFCharacterDataImpl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFCharacterData;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.DOMException;
-
-
-public class ODFCharacterDataImpl extends ODFNodeImpl implements
- ODFCharacterData {
-
- public ODFCharacterDataImpl(ODFDocument odfDoc,
- CharacterData innerCharacterData) {
- super(odfDoc, innerCharacterData);
- }
-
- public void appendData(String arg) throws DOMException {
- if (iNode instanceof CharacterData) {
- ((CharacterData) iNode).appendData(arg);
- }
- }
-
- public void deleteData(int offset, int count) throws DOMException {
- if (iNode instanceof CharacterData) {
- ((CharacterData) iNode).deleteData(offset, count);
- }
- }
-
- public String getData() throws DOMException {
- if (iNode instanceof CharacterData) {
- return ((CharacterData) iNode).getData();
- }
- return null;
- }
-
- public int getLength() {
- if (iNode instanceof CharacterData) {
- return ((CharacterData) iNode).getLength();
- }
- return 0;
- }
-
- public void insertData(int offset, String arg) throws DOMException {
- if (iNode instanceof CharacterData) {
- ((CharacterData) iNode).insertData(offset, arg);
- }
- }
-
- public void replaceData(int offset, int count, String arg)
- throws DOMException {
- if (iNode instanceof CharacterData) {
- ((CharacterData) iNode).replaceData(offset, count, arg);
- }
- }
-
- public void setData(String data) throws DOMException {
- if (iNode instanceof CharacterData) {
- ((CharacterData) iNode).setData(data);
- }
- }
-
- public String substringData(int offset, int count) throws DOMException {
- if (iNode instanceof CharacterData) {
- return ((CharacterData) iNode).substringData(offset, count);
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFCommentImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFCommentImpl.java
deleted file mode 100644
index f326775..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFCommentImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFComment;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.w3c.dom.Comment;
-
-
-public class ODFCommentImpl extends ODFCharacterDataImpl implements ODFComment {
- public ODFCommentImpl(ODFDocument odfDoc, Comment innerComment) {
- super(odfDoc, innerComment);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFDocumentImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFDocumentImpl.java
deleted file mode 100644
index 1d4b2bf..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFDocumentImpl.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFNode;
-import org.eclipse.actf.model.dom.odf.chart.ChartConstants;
-import org.eclipse.actf.model.dom.odf.chart.impl.ChartNodeFactory;
-import org.eclipse.actf.model.dom.odf.dr3d.Dr3dConstants;
-import org.eclipse.actf.model.dom.odf.dr3d.impl.Dr3dNodeFactory;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.impl.DrawNodeFactory;
-import org.eclipse.actf.model.dom.odf.form.FormConstants;
-import org.eclipse.actf.model.dom.odf.form.impl.FormNodeFactory;
-import org.eclipse.actf.model.dom.odf.number.NumberConstants;
-import org.eclipse.actf.model.dom.odf.number.impl.NumberNodeFactory;
-import org.eclipse.actf.model.dom.odf.office.DocumentContentElement;
-import org.eclipse.actf.model.dom.odf.office.DocumentStylesElement;
-import org.eclipse.actf.model.dom.odf.office.OfficeConstants;
-import org.eclipse.actf.model.dom.odf.office.impl.OfficeNodeFactory;
-import org.eclipse.actf.model.dom.odf.presentation.PresentationConstants;
-import org.eclipse.actf.model.dom.odf.presentation.impl.PresentationNodeFactory;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.impl.StyleNodeFactory;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.eclipse.actf.model.dom.odf.svg.impl.SVGNodeFactory;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.eclipse.actf.model.dom.odf.table.impl.TableNodeFactory;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.eclipse.actf.model.dom.odf.text.impl.TextNodeFactory;
-import org.w3c.dom.Attr;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.Comment;
-import org.w3c.dom.DOMConfiguration;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-
-public class ODFDocumentImpl extends ODFNodeImpl implements ODFDocument {
- private static final long serialVersionUID = 1L;
-
- private static final Map<String, Class> factoryMap = new HashMap<String, Class>();
- static {
- factoryMap.put(ChartConstants.CHART_NAMESPACE_URI,
- ChartNodeFactory.class);
- factoryMap.put(Dr3dConstants.DR3D_NAMESPACE_URI, Dr3dNodeFactory.class);
- factoryMap.put(DrawConstants.DRAW_NAMESPACE_URI, DrawNodeFactory.class);
- factoryMap.put(FormConstants.FORM_NAMESPACE_URI, FormNodeFactory.class);
- factoryMap.put(NumberConstants.NUMBER_NAMESPACE_URI,
- NumberNodeFactory.class);
- factoryMap.put(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeNodeFactory.class);
- factoryMap.put(PresentationConstants.PRESENTATION_NAMESPACE_URI,
- PresentationNodeFactory.class);
- factoryMap.put(StyleConstants.STYLE_NAMESPACE_URI,
- StyleNodeFactory.class);
- factoryMap.put(TableConstants.TABLE_NAMESPACE_URI,
- TableNodeFactory.class);
- factoryMap.put(TextConstants.TEXT_NAMESPACE_URI, TextNodeFactory.class);
- factoryMap.put(SVGConstants.SVG_NAMESPACE_URI, SVGNodeFactory.class);
- }
-
- private Map<Node, ODFNode> internalNodeMap = new HashMap<Node, ODFNode>();
-
- private String sUrl = null;
-
- private ODFDocument styleDoc = null;
-
- public ODFDocumentImpl(Document doc) {
- super(doc);
- internalNodeMap.put(doc, this);
- }
-
- public Node adoptNode(Node source) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Attr createAttribute(String name) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Attr createAttributeNS(String namespaceURI, String qualifiedName)
- throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public CDATASection createCDATASection(String data) throws DOMException {
- if (iNode instanceof Document) {
- return ((Document) iNode).createCDATASection(data);
- }
- return null;
- }
-
- public Comment createComment(String data) {
- if (iNode instanceof Document) {
- return ((Document) iNode).createComment(data);
- }
- return null;
- }
-
- public DocumentFragment createDocumentFragment() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Element createElement(String tagName) throws DOMException {
- if (iNode instanceof Document) {
- return (Element) getODFNode(((Document) iNode)
- .createElement(tagName));
- }
- return null;
- }
-
- public Element createElementNS(String namespaceURI, String qualifiedName)
- throws DOMException {
- if (iNode instanceof Document) {
- return (Element) getODFNode(((Document) iNode).createElementNS(
- namespaceURI, qualifiedName));
- }
- return null;
- }
-
- public EntityReference createEntityReference(String name)
- throws DOMException {
- if (iNode instanceof Document) {
- return ((Document) iNode).createEntityReference(name);
- }
- return null;
- }
-
- public ProcessingInstruction createProcessingInstruction(String target,
- String data) throws DOMException {
- if (iNode instanceof Document) {
- return ((Document) iNode).createProcessingInstruction(target, data);
- }
- return null;
- }
-
- public Text createTextNode(String data) {
- if (iNode instanceof Document) {
- Text iText = ((Document) iNode).createTextNode(data);
- return (Text) getODFNode(iText);
- }
- return null;
- }
-
- public DocumentType getDoctype() {
- if (iNode instanceof Document) {
- return ((Document) iNode).getDoctype();
- }
- return null;
- }
-
- public Element getDocumentElement() {
- if (iNode instanceof Document) {
- Element iElem = ((Document) iNode).getDocumentElement();
- if (iElem == null)
- return iElem;
- return (Element) getODFNode(iElem);
- }
- return null;
- }
-
- public String getDocumentURI() {
- if (iNode instanceof Document) {
- return ((Document) iNode).getDocumentURI();
- }
- return null;
- }
-
- public DOMConfiguration getDomConfig() {
- if (iNode instanceof Document) {
- return ((Document) iNode).getDomConfig();
- }
- return null;
- }
-
- public Element getElementById(String elementId) {
- if (iNode instanceof Document) {
- Element iElem = ((Document) iNode).getElementById(elementId);
- if (iElem == null)
- return null;
- return (Element) getODFNode(iElem);
- }
- return null;
- }
-
- public NodeList getElementsByTagName(String tagname) {
- if (iNode instanceof Document) {
- NodeList iNodeList = ((Document) iNode)
- .getElementsByTagName(tagname);
- if (iNodeList == null)
- return null;
- return new ODFNodeListImpl(this, iNodeList);
- }
- return null;
- }
-
- public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
- if (iNode instanceof Document) {
- NodeList iNodeList = ((Document) iNode).getElementsByTagNameNS(
- namespaceURI, localName);
- if (iNodeList == null)
- return null;
- return new ODFNodeListImpl(this, iNodeList);
- }
- return null;
- }
-
- public DOMImplementation getImplementation() {
- if (iNode instanceof Document) {
- return ((Document) iNode).getImplementation();
- }
- return null;
- }
-
- public String getInputEncoding() {
- if (iNode instanceof Document) {
- return ((Document) iNode).getInputEncoding();
- }
- return null;
- }
-
- public boolean getStrictErrorChecking() {
- if (iNode instanceof Document) {
- return ((Document) iNode).getStrictErrorChecking();
- }
- return false;
- }
-
- public String getXmlEncoding() {
- if (iNode instanceof Document) {
- return ((Document) iNode).getXmlEncoding();
- }
- return null;
- }
-
- public boolean getXmlStandalone() {
- if (iNode instanceof Document) {
- return ((Document) iNode).getXmlStandalone();
- }
- return false;
- }
-
- public String getXmlVersion() {
- if (iNode instanceof Document) {
- return ((Document) iNode).getXmlVersion();
- }
- return null;
- }
-
- public Node importNode(Node importedNode, boolean deep) throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void normalizeDocument() {
- // TODO Auto-generated method stub
-
- }
-
- public Node renameNode(Node n, String namespaceURI, String qualifiedName)
- throws DOMException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setDocumentURI(String documentURI) {
- if (iNode instanceof Document) {
- ((Document) iNode).setDocumentURI(documentURI);
- }
- }
-
- public void setStrictErrorChecking(boolean strictErrorChecking) {
- if (iNode instanceof Document) {
- ((Document) iNode).setStrictErrorChecking(strictErrorChecking);
- }
- }
-
- public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
- if (iNode instanceof Document) {
- ((Document) iNode).setXmlStandalone(xmlStandalone);
- }
- }
-
- public void setXmlVersion(String xmlVersion) throws DOMException {
- if (iNode instanceof Document) {
- ((Document) iNode).setXmlVersion(xmlVersion);
- }
- }
-
- // /////////////////////////////////
- // ODFDocument implementation
- // /////////////////////////////////
-
- private Method findCreateElementMethod(Class cs) {
- Method[] methods = cs.getDeclaredMethods();
- for (int i = 0; i < methods.length; i++) {
- if ("createElement".equals(methods[i].getName())) {
- Class[] parms = methods[i].getParameterTypes();
- if (parms.length == 3 && parms[0].equals(ODFDocument.class)
- && parms[1].equals(String.class)
- && parms[2].equals(Element.class)) {
- return methods[i];
- }
- }
- }
- return null;
- }
-
- public ODFNode getODFNode(Node node) {
- ODFNode result = internalNodeMap.get(node);
- if (result != null)
- return result;
-
- Class factory = factoryMap.get(node.getNamespaceURI());
- if (factory != null) {
- if (node instanceof Element) {
- Method createElemMethod = findCreateElementMethod(factory);
- try {
- result = (ODFNode) createElemMethod.invoke(factory,
- new Object[] { this, node.getLocalName(),
- (Element) node });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- }
- }
- if (result == null) {
- if (node instanceof Element) {
- result = new ODFElementImpl(this, (Element) node);
- } else if (node instanceof Attr) {
- result = new ODFAttrImpl(this, (Attr) node);
- } else if (node instanceof Text) {
- result = new ODFTextImpl(this, (Text) node);
- } else if (node instanceof Comment) {
- result = new ODFCommentImpl(this, (Comment) node);
- } else if (node instanceof CharacterData) {
- result = new ODFCharacterDataImpl(this, (CharacterData) node);
- } else if (node instanceof ProcessingInstruction) {
- result = new ODFProcessingInstructionImpl(this,
- (ProcessingInstruction) node);
- } else {
- result = new ODFNodeImpl(this, node);
- }
- }
- internalNodeMap.put(node, result);
- return result;
- }
-
- public String getURL() {
- return sUrl;
- }
-
- public void setURL(String sUrl) {
- this.sUrl = sUrl;
- }
-
- public void setODFVersion(double version) {
- Element root = this.getDocumentElement();
- root.setAttributeNS(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_VERSION, new Double(version).toString());
- }
-
- public double getODFVersion() {
- Element root = this.getDocumentElement();
- if (root instanceof DocumentContentElement) {
- return ((DocumentContentElement) root).getAttrOfficeVersion();
- } else if (root instanceof DocumentStylesElement) {
- return ((DocumentStylesElement) root).getAttrOfficeVersion();
- }
- return -1.0;
- }
-
- public void setStyleDocument(ODFDocument styleDoc) {
- this.styleDoc = styleDoc;
- }
-
- public ODFDocument getStyleDocument() {
- return this.styleDoc;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFElementImpl.java
deleted file mode 100644
index 7d0e3dd..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFElementImpl.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import java.io.Serializable;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.office.DocumentStylesElement;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.TypeInfo;
-
-
-public class ODFElementImpl extends ODFNodeImpl implements ODFElement,
- Serializable {
- private static final long serialVersionUID = -4579652376938577296L;
-
- public ODFElementImpl(ODFDocument odfDoc, Element iElement) {
- super(odfDoc, iElement);
- }
-
- public ODFElement findElementByAttrValue(String elemNamespaceURI,
- String elemLocalName, String attrNamespaceURI,
- String attrLocalName, String attrValue) {
- Element root = getOwnerDocument().getDocumentElement();
- NodeList nl = XPathUtil.evalXPathNodeList(root,
- ".//*[namespace-uri()='" + elemNamespaceURI
- + "' and local-name()='" + elemLocalName + "']"
- + "[attribute::*[namespace-uri()='" + attrNamespaceURI
- + "' and local-name()='" + attrLocalName + "']='"
- + attrValue + "']");
- if ((nl != null) && (nl.getLength() != 0)) {
- return (ODFElement) nl.item(0);
- }
- return null;
- }
-
- public ODFElement findElementByAttrValueFromStyleDoc(
- String elemNamespaceURI, String elemLocalName,
- String attrNamespaceURI, String attrLocalName, String attrValue) {
- ODFDocument styleDoc = ((ODFDocument) getOwnerDocument())
- .getStyleDocument();
- if (styleDoc == null)
- return null;
- Element styleRoot = styleDoc.getDocumentElement();
- if ((styleRoot != null) && (styleRoot instanceof DocumentStylesElement)) {
- return ((ODFElementImpl) styleRoot).findElementByAttrValue(
- elemNamespaceURI, elemLocalName, attrNamespaceURI,
- attrLocalName, attrValue);
- }
- return null;
- }
-
- public String getAttribute(String name) {
- if (iNode instanceof Element) {
- return ((Element) iNode).getAttribute(name);
- }
- return null;
- }
-
- public String getAttributeNS(String namespaceURI, String localName)
- throws DOMException {
- if (iNode instanceof Element) {
- return ((Element) iNode).getAttributeNS(namespaceURI, localName);
- }
- return null;
- }
-
- public Attr getAttributeNode(String name) {
- if (iNode instanceof Element) {
- Attr iAttr = ((Element) iNode).getAttributeNode(name);
- if (iAttr == null)
- return null;
-
- return (Attr) odfDoc.getODFNode(iAttr);
- }
- return null;
- }
-
- public Attr getAttributeNodeNS(String namespaceURI, String localName)
- throws DOMException {
- if (iNode instanceof Element) {
- Attr iAttr = ((Element) iNode).getAttributeNodeNS(namespaceURI,
- localName);
- if (iAttr == null)
- return null;
-
- return (Attr) odfDoc.getODFNode(iAttr);
- }
- return null;
- }
-
- public NodeList getElementsByTagName(String name) {
- if (iNode instanceof Element) {
- NodeList iNodeList = ((Element) iNode).getElementsByTagName(name);
- return new ODFNodeListImpl(odfDoc, iNodeList);
- }
- return null;
- }
-
- public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
- throws DOMException {
- if (iNode instanceof Element) {
- NodeList iNodeList = ((Element) iNode).getElementsByTagNameNS(
- namespaceURI, localName);
- return new ODFNodeListImpl(odfDoc, iNodeList);
- }
- return null;
- }
-
- public TypeInfo getSchemaTypeInfo() {
- if (iNode instanceof Element) {
- return ((Element) iNode).getSchemaTypeInfo();
- }
- return null;
- }
-
- public String getTagName() {
- if (iNode instanceof Element) {
- return ((Element) iNode).getTagName();
- }
- return null;
- }
-
- public boolean hasAttribute(String name) {
- if (iNode instanceof Element) {
- return ((Element) iNode).hasAttribute(name);
- }
- return false;
- }
-
- public boolean hasAttributeNS(String namespaceURI, String localName)
- throws DOMException {
- if (iNode instanceof Element) {
- return ((Element) iNode).hasAttributeNS(namespaceURI, localName);
- }
- return false;
- }
-
- public void removeAttribute(String name) throws DOMException {
- if (iNode instanceof Element) {
- ((Element) iNode).removeAttribute(name);
- }
- }
-
- public void removeAttributeNS(String namespaceURI, String localName)
- throws DOMException {
- if (iNode instanceof Element) {
- ((Element) iNode).removeAttributeNS(namespaceURI, localName);
- }
- }
-
- public Attr removeAttributeNode(Attr oldAttr) throws DOMException {
- if (iNode instanceof Element) {
- Attr iRemovedAttr = ((Element) iNode).removeAttributeNode(oldAttr);
- odfDoc.getODFNode(iRemovedAttr);
- }
- return null;
- }
-
- public void setAttribute(String name, String value) throws DOMException {
- ((Element) iNode).setAttribute(name, value);
- Attr iNewAttr = ((Element) iNode).getAttributeNode(name);
-
- if (iNewAttr == null)
- return;
- odfDoc.getODFNode(iNewAttr);
- return;
- }
-
- public void setAttributeNS(String namespaceURI, String qualifiedName,
- String value) throws DOMException {
- ((Element) iNode).setAttributeNS(namespaceURI, qualifiedName, value);
- Attr iNewAttr = ((Element) iNode).getAttributeNodeNS(namespaceURI,
- qualifiedName);
-
- if (iNewAttr == null)
- return;
- odfDoc.getODFNode(iNewAttr);
- return;
- }
-
- public Attr setAttributeNode(Attr newAttr) throws DOMException {
- if ((iNode instanceof Element) && (newAttr instanceof ODFNodeImpl)) {
- Node iNewAttr = ((ODFNodeImpl) newAttr).getInternalNode();
- if (iNewAttr instanceof Attr) {
- try {
- ((Element) iNode).setAttributeNode((Attr) iNewAttr);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- if (iNewAttr == null)
- return null;
- return (Attr) odfDoc.getODFNode(iNewAttr);
- }
- }
- return null;
- }
-
- public Attr setAttributeNodeNS(Attr newAttr) throws DOMException {
- return setAttributeNode(newAttr);
- }
-
- public void setIdAttribute(String name, boolean isId) throws DOMException {
- ((Element) iNode).setIdAttribute(name, isId);
- }
-
- public void setIdAttributeNS(String namespaceURI, String localName,
- boolean isId) throws DOMException {
- ((Element) iNode).setIdAttributeNS(namespaceURI, localName, isId);
- }
-
- public void setIdAttributeNode(Attr idAttr, boolean isId)
- throws DOMException {
- Node internalIdAttr = ((ODFNodeImpl) idAttr).getInternalNode();
- if ((iNode instanceof Element) && (internalIdAttr instanceof Attr)) {
- ((Element) iNode).setIdAttributeNode((Attr) internalIdAttr, isId);
- }
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFNamedNodeMapImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFNamedNodeMapImpl.java
deleted file mode 100644
index c7ce9fe..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFNamedNodeMapImpl.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFNamedNodeMap;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-
-class ODFNamedNodeMapImpl implements ODFNamedNodeMap {
- protected ODFDocumentImpl odfDoc = null;
-
- private NamedNodeMap iAttrs;
-
- public ODFNamedNodeMapImpl(ODFDocument odfDoc, NamedNodeMap iAttrs) {
- this.odfDoc = (ODFDocumentImpl) odfDoc;
- this.iAttrs = iAttrs;
- }
-
- public Node item(int index) {
- Node iNode = iAttrs.item(index);
- if (iNode == null)
- return null;
- return odfDoc.getODFNode(iNode);
- }
-
- public int getLength() {
- return iAttrs.getLength();
- }
-
- public Node getNamedItem(String name) {
- Node iNode = iAttrs.getNamedItem(name);
- if (iNode == null)
- return null;
- return odfDoc.getODFNode(iNode);
- }
-
- public Node setNamedItem(Node node) throws DOMException {
- Node iNode = iAttrs.setNamedItem(node);
- if (iNode == null)
- return null;
- return odfDoc.getODFNode(iNode);
- }
-
- public Node removeNamedItem(String name) throws DOMException {
- Node iNode = iAttrs.removeNamedItem(name);
- if (iNode == null)
- return null;
- return odfDoc.getODFNode(iNode);
- }
-
- public Node getNamedItemNS(String namespaceURI, String localName) {
- Node iNode = iAttrs.getNamedItemNS(namespaceURI, localName);
- if (iNode == null)
- return null;
- return odfDoc.getODFNode(iNode);
- }
-
- public Node setNamedItemNS(Node node) throws DOMException {
- Node iNode = iAttrs.setNamedItemNS(node);
- if (iNode == null)
- return null;
- return odfDoc.getODFNode(iNode);
- }
-
- public Node removeNamedItemNS(String namespaceURI, String localName)
- throws DOMException {
- Node iNode = iAttrs.removeNamedItemNS(namespaceURI, localName);
- if (iNode == null)
- return null;
- return odfDoc.getODFNode(iNode);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFNodeImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFNodeImpl.java
deleted file mode 100644
index 1a3190b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFNodeImpl.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFNode;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.UserDataHandler;
-
-
-class ODFNodeImpl implements ODFNode {
- protected ODFDocumentImpl odfDoc = null;
-
- protected Node iNode = null;
-
- // constructure for ODFDocumentImpl
- protected ODFNodeImpl(Node iNode) {
- this.odfDoc = (ODFDocumentImpl) this;
- this.iNode = iNode;
- }
-
- protected ODFNodeImpl(ODFDocument odfDoc, Node iNode) {
- this.odfDoc = (ODFDocumentImpl) odfDoc;
- this.iNode = iNode;
- }
-
- protected Node getInternalNode() {
- return iNode;
- }
-
- public Node appendChild(Node newChild) throws DOMException {
- if (newChild instanceof ODFNodeImpl) {
- Node iNewChild = ((ODFNodeImpl) newChild).getInternalNode();
- Node iResultNode = iNode.appendChild(iNewChild);
- return new ODFNodeImpl(odfDoc, iResultNode);
- }
- return null;
- }
-
- public Node cloneNode(boolean deep) {
- if (odfDoc == null)
- return null;
-
- Node iCloneNode = iNode.cloneNode(deep);
- if (iCloneNode == null)
- return null;
-
- return odfDoc.getODFNode(iCloneNode);
- }
-
- public short compareDocumentPosition(Node other) throws DOMException {
- if (other instanceof ODFNodeImpl) {
- Node iOther = ((ODFNodeImpl) other).getInternalNode();
- return iNode.compareDocumentPosition(iOther);
- }
- return 0;
- }
-
- public NamedNodeMap getAttributes() {
- if (odfDoc == null)
- return null;
-
- NamedNodeMap iAttrs = iNode.getAttributes();
- if (iAttrs == null)
- return null;
- return new ODFNamedNodeMapImpl(odfDoc, iAttrs);
- }
-
- public String getBaseURI() {
- return iNode.getBaseURI();
- }
-
- public NodeList getChildNodes() {
- return new ODFNodeListImpl(odfDoc, iNode.getChildNodes());
- }
-
- public Object getFeature(String feature, String version) {
- throw new UnsupportedOperationException();
- }
-
- public Node getFirstChild() {
- if (odfDoc == null)
- return null;
-
- Node iFirstChild = iNode.getFirstChild();
- if (iFirstChild == null)
- return null;
-
- return odfDoc.getODFNode(iFirstChild);
- }
-
- public Node getLastChild() {
- if (odfDoc == null)
- return null;
-
- Node iLastChild = iNode.getLastChild();
- if (iLastChild == null)
- return null;
-
- return odfDoc.getODFNode(iLastChild);
- }
-
- public String getLocalName() {
- return iNode.getLocalName();
- }
-
- public String getNamespaceURI() {
- return iNode.getNamespaceURI();
- }
-
- public Node getNextSibling() {
- if (odfDoc == null)
- return null;
-
- Node iNextSibling = iNode.getNextSibling();
- if (iNextSibling == null)
- return null;
-
- return odfDoc.getODFNode(iNextSibling);
- }
-
- public String getNodeName() {
- return iNode.getNodeName();
- }
-
- public short getNodeType() {
- return iNode.getNodeType();
- }
-
- public String getNodeValue() throws DOMException {
- return iNode.getNodeValue();
- }
-
- public Document getOwnerDocument() {
- return odfDoc;
- }
-
- public Node getParentNode() {
- Node iParent = iNode.getParentNode();
- if (iParent == null)
- return null;
- return odfDoc.getODFNode(iParent);
- }
-
- public String getPrefix() {
- return iNode.getPrefix();
- }
-
- public Node getPreviousSibling() {
- if (odfDoc == null)
- return null;
-
- Node iPreviousSibling = iNode.getPreviousSibling();
- if (iPreviousSibling == null)
- return null;
-
- return odfDoc.getODFNode(iPreviousSibling);
- }
-
- public String getTextContent() throws DOMException {
- return iNode.getTextContent();
- }
-
- public Object getUserData(String key) {
- return iNode.getUserData(key);
- }
-
- public boolean hasAttributes() {
- return iNode.hasAttributes();
- }
-
- public boolean hasChildNodes() {
- return iNode.hasChildNodes();
- }
-
- public Node insertBefore(Node newChild, Node refChild) throws DOMException {
- if (odfDoc == null)
- return null;
-
- if ((newChild instanceof ODFNodeImpl)
- && (refChild instanceof ODFNodeImpl)) {
- Node iNewChild = ((ODFNodeImpl) newChild).getInternalNode();
- Node iRefChild = ((ODFNodeImpl) refChild).getInternalNode();
- Node iInsertedChild = iNode.insertBefore(iNewChild, iRefChild);
- if (iInsertedChild == null)
- return null;
- return odfDoc.getODFNode(iInsertedChild);
- }
- return null;
- }
-
- public boolean isDefaultNamespace(String namespaceURI) {
- return iNode.isDefaultNamespace(namespaceURI);
- }
-
- public boolean isEqualNode(Node arg) {
- if (arg instanceof ODFNodeImpl) {
- Node iarg = ((ODFNodeImpl) arg).getInternalNode();
- return iNode.isEqualNode(iarg);
- }
- return false;
- }
-
- public boolean isSameNode(Node other) {
- if (other instanceof ODFNodeImpl) {
- Node iother = ((ODFNodeImpl) other).getInternalNode();
- return iNode.isSameNode(iother);
- }
- return false;
- }
-
- public boolean isSupported(String feature, String version) {
- return iNode.isSupported(feature, version);
- }
-
- public String lookupNamespaceURI(String prefix) {
- return iNode.lookupNamespaceURI(prefix);
- }
-
- public String lookupPrefix(String namespaceURI) {
- return iNode.lookupPrefix(namespaceURI);
- }
-
- public void normalize() {
- // TODO Auto-generated method stub
-
- }
-
- public Node removeChild(Node oldChild) throws DOMException {
- if (odfDoc == null)
- return null;
-
- if (oldChild instanceof ODFNodeImpl) {
- Node iOldChild = ((ODFNodeImpl) oldChild).getInternalNode();
- Node iRemovedChild = iNode.removeChild(iOldChild);
- return odfDoc.getODFNode(iRemovedChild);
- }
- return null;
- }
-
- public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
- if (odfDoc == null)
- return null;
-
- if ((newChild instanceof ODFNodeImpl)
- && (oldChild instanceof ODFNodeImpl)) {
- Node iNewChild = ((ODFNodeImpl) newChild).getInternalNode();
- Node iOldChild = ((ODFNodeImpl) oldChild).getInternalNode();
- Node iReplacedChild = iNode.replaceChild(iNewChild, iOldChild);
- return odfDoc.getODFNode(iReplacedChild);
- }
- return null;
- }
-
- public void setNodeValue(String nodeValue) throws DOMException {
- iNode.setNodeValue(nodeValue);
- }
-
- public void setPrefix(String prefix) throws DOMException {
- iNode.setPrefix(prefix);
- }
-
- public void setTextContent(String textContent) throws DOMException {
- iNode.setTextContent(textContent);
- }
-
- public Object setUserData(String key, Object data, UserDataHandler handler) {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFNodeListImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFNodeListImpl.java
deleted file mode 100644
index 8f88358..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFNodeListImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFNodeList;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-class ODFNodeListImpl implements ODFNodeList {
- private ODFDocumentImpl owner;
-
- private NodeList iNodeList;
-
- public ODFNodeListImpl(ODFDocumentImpl owner, NodeList iNodeList) {
- this.owner = owner;
- this.iNodeList = iNodeList;
- }
-
- public Node item(int index) {
- Node iNode = iNodeList.item(index);
- if (iNode == null)
- return null;
- return owner.getODFNode(iNode);
- }
-
- public int getLength() {
- return iNodeList.getLength();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFProcessingInstructionImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFProcessingInstructionImpl.java
deleted file mode 100644
index 11615c5..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFProcessingInstructionImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFProcessingInstruction;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.ProcessingInstruction;
-
-
-public class ODFProcessingInstructionImpl extends ODFNodeImpl implements
- ODFProcessingInstruction {
-
- public ODFProcessingInstructionImpl(ODFDocument odfDoc,
- ProcessingInstruction innerProcessingInstruction) {
- super(odfDoc, innerProcessingInstruction);
- }
-
- public String getData() {
- if (iNode instanceof ProcessingInstruction) {
- return ((ProcessingInstruction) iNode).getData();
- }
- return null;
- }
-
- public String getTarget() {
- if (iNode instanceof ProcessingInstruction) {
- return ((ProcessingInstruction) iNode).getTarget();
- }
- return null;
- }
-
- public void setData(String s) throws DOMException {
- if (iNode instanceof ProcessingInstruction) {
- ((ProcessingInstruction) iNode).setData(s);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFStylableElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFStylableElementImpl.java
deleted file mode 100644
index 44718a6..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFStylableElementImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.content.IStyleListener;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.w3c.dom.Element;
-
-
-public abstract class ODFStylableElementImpl extends ODFElementImpl implements
- ODFElement, IStylable {
- protected ODFStylableElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public void setStyle(StyleElement style) {
- // TODO Auto-generated method stub
- }
-
- public StyleElement getStyle() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void addStyleListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
- }
-
- public void removeStyleListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFTextImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFTextImpl.java
deleted file mode 100644
index ab54dd0..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/base/impl/ODFTextImpl.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.base.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFText;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Text;
-
-
-class ODFTextImpl extends ODFCharacterDataImpl implements ODFText {
-
- public ODFTextImpl(ODFDocument odfDoc, Text innerText) {
- super(odfDoc, innerText);
- }
-
- public String getWholeText() {
- if (iNode instanceof Text) {
- return ((Text) iNode).getWholeText();
- }
- return null;
- }
-
- public boolean isElementContentWhitespace() {
- if (iNode instanceof Text) {
- return ((Text) iNode).isElementContentWhitespace();
- }
- return false;
- }
-
- public Text replaceWholeText(String content) throws DOMException {
- if (iNode instanceof Text) {
- return ((Text) iNode).replaceWholeText(content);
- }
- return null;
- }
-
- public Text splitText(int offset) throws DOMException {
- if (iNode instanceof Text) {
- return ((Text) iNode).splitText(offset);
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/AxisElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/AxisElement.java
deleted file mode 100644
index 3ec7863..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/AxisElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface AxisElement extends ODFElement, IStylable {
- public String getAttrChartDimension();
-
- public String getAttrChartName();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/CategoriesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/CategoriesElement.java
deleted file mode 100644
index 3de683c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/CategoriesElement.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface CategoriesElement extends ODFElement {
- public String getAttrTableCellRangeAddress();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/ChartConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/ChartConstants.java
deleted file mode 100644
index 70d09eb..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/ChartConstants.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-public final class ChartConstants {
- static public final String CHART_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:chart:1.0";
-
- static public final String ELEMENT_CHART = "chart";
-
- static public final String ELEMENT_TITLE = "title";
-
- static public final String ELEMENT_LEGEND = "legend";
-
- static public final String ELEMENT_PLOT_AREA = "plot-area";
-
- static public final String ELEMENT_AXIS = "axis";
-
- static public final String ELEMENT_CATEGORIES = "categories";
-
- static public final String ELEMENT_GRID = "grid";
-
- static public final String ELEMENT_SERIES = "series";
-
- static public final String ELEMENT_DATA_POINT = "data-point";
-
- static public final String ELEMENT_STOCK_GAIN_MARKER = "stock-gain-marker";
-
- static public final String ELEMENT_STOCK_LOSS_MARKER = "stock-loss-marker";
-
- static public final String ELEMENT_STOCK_RANGE_LINE = "stock-range-line";
-
- static public final String ELEMENT_WALL = "wall";
-
- static public final String ELEMENT_FLOOR = "floor";
-
- static public final String ATTR_DIMENSION = "dimension";
-
- static public final String ATTR_NAME = "name";
-
- static public final String ATTR_CLASS = "class";
-
- static public final String ATTR_REPEATED = "repeated";
-
- static public final String ATTR_LEGEND_POSITION = "legend-position";
-
- static public final String ATTR_DATA_SOURCE_HAS_LABELS = "data-source-has-labels";
-
- static public final String ATTR_TABLE_NUMBER_LIST = "table-number-list";
-
- static public final String ATTR_STYLE_NAME = "style-name";
-
- static public final String ATTR_JAPANESE_CANDLE_STICK = "japanese-candle-stick";
-
- static public final String ATTR_STOCK_WITH_VOLUME = "stock-with-volume";
-
- static public final String ATTR_THREE_DIMENSIONAL = "three-dimensional";
-
- static public final String ATTR_DEEP = "deep";
-
- static public final String ATTR_LINES = "lines";
-
- static public final String ATTR_INTERPOLATION = "interpolation";
-
- static public final String ATTR_SYMBOL_TYPE = "symbol-type";
-
- static public final String ATTR_VERTICAL = "vertical";
-
- static public final String ATTR_LINES_USED = "lines-used";
-
- static public final String ATTR_CONNECT_BARS = "connect-bars";
-
- static public final String ATTR_SERIES_SOURCE = "series-source";
-
- static public final String ATTR_MEAN_VALUE = "mean-value";
-
- static public final String ATTR_ERROR_MARGIN = "error-margin";
-
- static public final String ATTR_ERROR_LOWER_LIMIT = "error-lower-limit";
-
- static public final String ATTR_ERROR_UPPER_LIMIT = "error-upper-limit";
-
- static public final String ATTR_ERROR_CATEGORY = "error-category";
-
- static public final String ATTR_ERROR_PERCENTAGE = "error-percentage";
-
- static public final String ATTR_REGRESSION_TYPE = "regression-type";
-
- static public final String ATTR_DATA_LABEL_NUMBER = "data-label-number";
-
- static public final String ATTR_DATA_LABEL_TEXT = "data-label-text";
-
- static public final String ATTR_DATA_LABEL_SYMBOL = "data-label-symbol";
-
- static public final String ATTR_DISPLAY_LABEL = "display-label";
-
- static public final String ATTR_TICK_MARKS_MAJOR_INNER = "tick-marks-major-inner";
-
- static public final String ATTR_TICK_MARKS_MAJOR_OUTER = "tick-marks-major-outer";
-
- static public final String ATTR_LOGARITHMIC = "logarithmic";
-
- static public final String ATTR_TEXT_OVERLAP = "text-overlap";
-
- static public final String ATTR_LABEL_ARRANGEMENT = "label-arrangement";
-
- static public final String ATTR_VISIBLE = "visible";
-
- static public final String ATTR_ORIGIN = "origin";
-
- static public final String ATTR_GAP_WIDTH = "gap-width";
-
- static public final String ATTR_OVERLAP = "overlap";
-
- static public final String ATTR_SOLID_TYPE = "solid-type";
-
- static public final String ATTR_ATTACHED_AXIS = "attached-axis";
-
- static public final String ATTR_MINIMUM = "minimum";
-
- static public final String ATTR_MAXIMUM = "maximum";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/ChartElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/ChartElement.java
deleted file mode 100644
index 6a90fd4..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/ChartElement.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface ChartElement extends ODFElement, IStylable {
- public String getAttrSvgWidth();
-
- public String getAttrSvgHeight();
-
- public String getAttrChartClass();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/DataPointElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/DataPointElement.java
deleted file mode 100644
index f98b4a4..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/DataPointElement.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface DataPointElement extends ODFElement {
- public int getAttrChartRepeated();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/FloorElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/FloorElement.java
deleted file mode 100644
index 21b97e6..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/FloorElement.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface FloorElement extends ODFElement, IStylable {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/GridElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/GridElement.java
deleted file mode 100644
index 8b8c6dd..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/GridElement.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface GridElement extends ODFElement, IStylable {
- public String getAttrChartClass();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/LegendElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/LegendElement.java
deleted file mode 100644
index a32ec4c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/LegendElement.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface LegendElement extends ODFElement, IStylable {
- public String getAttrSvgX();
-
- public String getAttrSvgY();
-
- public String getAttrChartLegendPosition();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/PlotAreaElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/PlotAreaElement.java
deleted file mode 100644
index f41b33d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/PlotAreaElement.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface PlotAreaElement extends ODFElement, IStylable {
- public String getAttrTableCellRangeAddress();
-
- public String getAttrChartDataSourceHasLabels();
-
- public String getAttrChartTableNumberList();
-
- public String getAttrSvgX();
-
- public String getAttrSvgY();
-
- public String getAttrSvgWidth();
-
- public String getAttrSvgHeight();
-
- public String getAttrDr3dVrp();
-
- public String getAttrDr3dVpn();
-
- public String getAttrDr3dVup();
-
- public String getAttrDr3dProjection();
-
- public String getAttrDr3dDistance();
-
- public String getAttrDr3dFocalLength();
-
- public int getAttrDr3dShadowSlant();
-
- public String getAttrDr3dShadeMode();
-
- public String getAttrDr3dAmbientColor();
-
- public boolean getAttrDr3dLightingMode();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/SeriesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/SeriesElement.java
deleted file mode 100644
index d83165c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/SeriesElement.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface SeriesElement extends ODFElement, IStylable {
- public String getAttrChartAttachedAxis();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/StockGainMarkerElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/StockGainMarkerElement.java
deleted file mode 100644
index aadafe9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/StockGainMarkerElement.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface StockGainMarkerElement extends ODFElement, IStylable {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/StockLossMarkerElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/StockLossMarkerElement.java
deleted file mode 100644
index 6be88ee..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/StockLossMarkerElement.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface StockLossMarkerElement extends ODFElement, IStylable {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/StockRangeLineElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/StockRangeLineElement.java
deleted file mode 100644
index 5e04d14..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/StockRangeLineElement.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface StockRangeLineElement extends ODFElement, IStylable {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/TitleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/TitleElement.java
deleted file mode 100644
index 3ff04f2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/TitleElement.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface TitleElement extends ODFElement, IStylable, IEditable {
- public String getAttrSvgX();
-
- public String getAttrSvgY();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/WallElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/WallElement.java
deleted file mode 100644
index bdd7a71..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/WallElement.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface WallElement extends ODFElement, IStylable {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/AxisElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/AxisElementImpl.java
deleted file mode 100644
index 00f2a22..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/AxisElementImpl.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.AxisElement;
-import org.eclipse.actf.model.dom.odf.chart.ChartConstants;
-import org.w3c.dom.Element;
-
-
-class AxisElementImpl extends ODFStylableElementImpl implements AxisElement {
- private static final long serialVersionUID = 7482924035365697274L;
-
- protected AxisElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrChartDimension() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DIMENSION))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DIMENSION);
- return null;
- }
-
- public String getAttrChartName() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_NAME))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_NAME);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/CategoriesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/CategoriesElementImpl.java
deleted file mode 100644
index e872e3a..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/CategoriesElementImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.CategoriesElement;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.w3c.dom.Element;
-
-
-class CategoriesElementImpl extends ODFElementImpl implements CategoriesElement {
- private static final long serialVersionUID = 5039431012784927768L;
-
- protected CategoriesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrTableCellRangeAddress() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_CELL_RANGE_ADDRESS))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_CELL_RANGE_ADDRESS);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/ChartElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/ChartElementImpl.java
deleted file mode 100644
index f9fed94..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/ChartElementImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.ChartConstants;
-import org.eclipse.actf.model.dom.odf.chart.ChartElement;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.w3c.dom.Element;
-
-
-class ChartElementImpl extends ODFStylableElementImpl implements ChartElement {
- private static final long serialVersionUID = 8422349783806697219L;
-
- protected ChartElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrSvgWidth() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_WIDTH))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_WIDTH);
- return null;
- }
-
- public String getAttrSvgHeight() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_HEIGHT))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_HEIGHT);
- return null;
- }
-
- public String getAttrChartClass() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_CLASS))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_CLASS);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/ChartNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/ChartNodeFactory.java
deleted file mode 100644
index 914727b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/ChartNodeFactory.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.chart.ChartConstants;
-import org.w3c.dom.Element;
-
-
-public class ChartNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(ChartConstants.ELEMENT_CHART, ChartElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_TITLE, TitleElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_LEGEND, LegendElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_PLOT_AREA, PlotAreaElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_AXIS, AxisElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_CATEGORIES,
- CategoriesElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_GRID, GridElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_SERIES, SeriesElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_DATA_POINT,
- DataPointElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_STOCK_GAIN_MARKER,
- StockGainMarkerElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_STOCK_LOSS_MARKER,
- StockLossMarkerElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_STOCK_RANGE_LINE,
- StockRangeLineElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_WALL, WallElementImpl.class);
- tagMap.put(ChartConstants.ELEMENT_FLOOR, FloorElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/DataPointElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/DataPointElementImpl.java
deleted file mode 100644
index 805b24d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/DataPointElementImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.ChartConstants;
-import org.eclipse.actf.model.dom.odf.chart.DataPointElement;
-import org.w3c.dom.Element;
-
-
-class DataPointElementImpl extends ODFElementImpl implements DataPointElement {
- private static final long serialVersionUID = -7212238489251171612L;
-
- protected DataPointElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public int getAttrChartRepeated() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_REPEATED)) {
- return new Integer(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_REPEATED)).intValue();
- }
- return -1;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/FloorElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/FloorElementImpl.java
deleted file mode 100644
index 440ec84..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/FloorElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.FloorElement;
-import org.w3c.dom.Element;
-
-
-class FloorElementImpl extends ODFStylableElementImpl implements FloorElement {
- private static final long serialVersionUID = -2743316502571280037L;
-
- protected FloorElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/GridElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/GridElementImpl.java
deleted file mode 100644
index 862de40..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/GridElementImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.ChartConstants;
-import org.eclipse.actf.model.dom.odf.chart.GridElement;
-import org.w3c.dom.Element;
-
-
-class GridElementImpl extends ODFStylableElementImpl implements GridElement {
- private static final long serialVersionUID = 9015855390438998748L;
-
- protected GridElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrChartClass() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_CLASS))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_CLASS);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/LegendElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/LegendElementImpl.java
deleted file mode 100644
index edf88bf..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/LegendElementImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.ChartConstants;
-import org.eclipse.actf.model.dom.odf.chart.LegendElement;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.w3c.dom.Element;
-
-
-class LegendElementImpl extends ODFStylableElementImpl implements LegendElement {
- private static final long serialVersionUID = 2552292055359445007L;
-
- protected LegendElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrChartLegendPosition() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_LEGEND_POSITION))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_LEGEND_POSITION);
- return null;
- }
-
- public String getAttrSvgX() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI, SVGConstants.ATTR_X))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_X);
- return null;
- }
-
- public String getAttrSvgY() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI, SVGConstants.ATTR_Y))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_Y);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/PlotAreaElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/PlotAreaElementImpl.java
deleted file mode 100644
index 026f481..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/PlotAreaElementImpl.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.ChartConstants;
-import org.eclipse.actf.model.dom.odf.chart.PlotAreaElement;
-import org.eclipse.actf.model.dom.odf.dr3d.Dr3dConstants;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.w3c.dom.Element;
-
-
-class PlotAreaElementImpl extends ODFStylableElementImpl implements
- PlotAreaElement {
- private static final long serialVersionUID = -4201756033126842992L;
-
- protected PlotAreaElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrTableCellRangeAddress() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_CELL_RANGE_ADDRESS))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_CELL_RANGE_ADDRESS);
- return null;
- }
-
- public String getAttrChartDataSourceHasLabels() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DATA_SOURCE_HAS_LABELS))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DATA_SOURCE_HAS_LABELS);
- return null;
- }
-
- public String getAttrChartTableNumberList() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_TABLE_NUMBER_LIST))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_TABLE_NUMBER_LIST);
- return null;
- }
-
- public String getAttrSvgX() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI, SVGConstants.ATTR_X))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_X);
- return null;
- }
-
- public String getAttrSvgY() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI, SVGConstants.ATTR_Y))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_Y);
- return null;
- }
-
- public String getAttrSvgWidth() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_WIDTH))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_WIDTH);
- return null;
- }
-
- public String getAttrSvgHeight() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_HEIGHT))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_HEIGHT);
- return null;
- }
-
- public String getAttrDr3dVrp() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_VRP))
- return getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_VRP);
- return null;
- }
-
- public String getAttrDr3dVpn() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_VPN))
- return getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_VPN);
- return null;
- }
-
- public String getAttrDr3dVup() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_VUP))
- return getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_VUP);
- return null;
- }
-
- public String getAttrDr3dProjection() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_PROJECTION))
- return getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_PROJECTION);
- return null;
- }
-
- public String getAttrDr3dDistance() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_DISTANCE))
- return getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_DISTANCE);
- return null;
- }
-
- public String getAttrDr3dFocalLength() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_FOCAL_LENGTH))
- return getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_FOCAL_LENGTH);
- return null;
- }
-
- public int getAttrDr3dShadowSlant() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_SHADOW_SLANT)) {
- return new Integer(getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_SHADOW_SLANT)).intValue();
- }
- return -1;
- }
-
- public String getAttrDr3dShadeMode() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_SHADE_MODE))
- return getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_SHADE_MODE);
- return null;
- }
-
- public String getAttrDr3dAmbientColor() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_AMBIENT_COLOR))
- return getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_AMBIENT_COLOR);
- return null;
- }
-
- public boolean getAttrDr3dLightingMode() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_LIGHTING_MODE)) {
- return new Boolean(getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_LIGHTING_MODE)).booleanValue();
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/SeriesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/SeriesElementImpl.java
deleted file mode 100644
index faeb64c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/SeriesElementImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.ChartConstants;
-import org.eclipse.actf.model.dom.odf.chart.SeriesElement;
-import org.w3c.dom.Element;
-
-
-class SeriesElementImpl extends ODFStylableElementImpl implements SeriesElement {
- private static final long serialVersionUID = 8895859924207061489L;
-
- protected SeriesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrChartAttachedAxis() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ATTACHED_AXIS))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ATTACHED_AXIS);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/StockGainMarkerElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/StockGainMarkerElementImpl.java
deleted file mode 100644
index 3e5d118..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/StockGainMarkerElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.StockGainMarkerElement;
-import org.w3c.dom.Element;
-
-
-class StockGainMarkerElementImpl extends ODFStylableElementImpl implements
- StockGainMarkerElement {
- private static final long serialVersionUID = 94628094501082890L;
-
- protected StockGainMarkerElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/StockLossMarkerElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/StockLossMarkerElementImpl.java
deleted file mode 100644
index 6139f07..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/StockLossMarkerElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.StockLossMarkerElement;
-import org.w3c.dom.Element;
-
-
-class StockLossMarkerElementImpl extends ODFStylableElementImpl implements
- StockLossMarkerElement {
- private static final long serialVersionUID = -7652086194738893078L;
-
- protected StockLossMarkerElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/StockRangeLineElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/StockRangeLineElementImpl.java
deleted file mode 100644
index 7947aff..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/StockRangeLineElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.StockRangeLineElement;
-import org.w3c.dom.Element;
-
-
-class StockRangeLineElementImpl extends ODFStylableElementImpl implements
- StockRangeLineElement {
- private static final long serialVersionUID = 6328237457664667672L;
-
- protected StockRangeLineElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/TitleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/TitleElementImpl.java
deleted file mode 100644
index 6131fbf..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/TitleElementImpl.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.TitleElement;
-import org.eclipse.actf.model.dom.odf.content.IEditListener;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.w3c.dom.Element;
-
-
-class TitleElementImpl extends ODFStylableElementImpl implements TitleElement {
- private static final long serialVersionUID = 4722975487761185402L;
-
- protected TitleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrSvgX() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI, SVGConstants.ATTR_X))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_X);
- return null;
- }
-
- public String getAttrSvgY() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI, SVGConstants.ATTR_Y))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_Y);
- return null;
- }
-
- public Object getValue() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setValue(Object data) {
- // TODO Auto-generated method stub
-
- }
-
- public void remove() {
- // TODO Auto-generated method stub
-
- }
-
- public void insert(IEditable data) {
- // TODO Auto-generated method stub
-
- }
-
- public void addEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/WallElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/WallElementImpl.java
deleted file mode 100644
index cea581c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/chart/impl/WallElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.chart.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.WallElement;
-import org.w3c.dom.Element;
-
-
-class WallElementImpl extends ODFStylableElementImpl implements WallElement {
- private static final long serialVersionUID = -8689660934999539135L;
-
- protected WallElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IEditListener.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IEditListener.java
deleted file mode 100644
index db1eed3..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IEditListener.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.content;
-
-public interface IEditListener {
- public void onEdit(IEditable target, String topic);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IEditable.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IEditable.java
deleted file mode 100644
index 2d5c07c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IEditable.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.content;
-
-public interface IEditable {
- public Object getValue();
-
- public void setValue(Object data);
-
- public void remove();
-
- public void insert(IEditable data);
-
- public void addEditListener(IEditListener observer, String topic);
-
- public void removeEditListener(IEditListener observer, String topic);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IStylable.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IStylable.java
deleted file mode 100644
index dbaf19c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IStylable.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.content;
-
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-
-public interface IStylable {
- public void setStyle(StyleElement style);
-
- public StyleElement getStyle();
-
- public void addStyleListener(IStyleListener listener, String topic);
-
- public void removeStyleListener(IStyleListener listener, String topic);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IStyleListener.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IStyleListener.java
deleted file mode 100644
index 1776919..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/content/IStyleListener.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.content;
-
-public interface IStyleListener {
- public void onStyle(IStylable target, String topic);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/Dr3dConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/Dr3dConstants.java
deleted file mode 100644
index 746a0c0..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/Dr3dConstants.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.dr3d;
-
-public final class Dr3dConstants {
- static public final String DR3D_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0";
-
- static public final String ELEMENT_LIGHT = "light";
-
- static public final String ELEMENT_SCENE = "scene";
-
- static public final String ATTR_DIFFUSE_COLOR = "diffuse-color";
-
- static public final String ATTR_DIRECTION = "direction";
-
- static public final String ATTR_ENABLED = "enabled";
-
- static public final String ATTR_SPECULAR = "specular";
-
- static public final String ATTR_VRP = "vrp";
-
- static public final String ATTR_VPN = "vpn";
-
- static public final String ATTR_VUP = "vup";
-
- static public final String ATTR_PROJECTION = "projection";
-
- static public final String ATTR_DISTANCE = "distance";
-
- static public final String ATTR_FOCAL_LENGTH = "focal-length";
-
- static public final String ATTR_SHADOW_SLANT = "shadow-slant";
-
- static public final String ATTR_SHADE_MODE = "shade-mode";
-
- static public final String ATTR_AMBIENT_COLOR = "ambient-color";
-
- static public final String ATTR_LIGHTING_MODE = "lighting-mode";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/LightElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/LightElement.java
deleted file mode 100644
index a7b8b7e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/LightElement.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.dr3d;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface LightElement extends ODFElement {
- public String getAttrDr3dDiffuseColor();
-
- public String getAttrDr3dDirection();
-
- public boolean getAttrDr3dEnabled();
-
- public boolean getAttrDr3dSpecular();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/SceneElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/SceneElement.java
deleted file mode 100644
index ed21336..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/SceneElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.dr3d;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface SceneElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/impl/Dr3dNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/impl/Dr3dNodeFactory.java
deleted file mode 100644
index 68bca15..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/impl/Dr3dNodeFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.dr3d.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.dr3d.Dr3dConstants;
-import org.w3c.dom.Element;
-
-
-public class Dr3dNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(Dr3dConstants.ELEMENT_LIGHT, LightElementImpl.class);
- tagMap.put(Dr3dConstants.ELEMENT_SCENE, SceneElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/impl/LightElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/impl/LightElementImpl.java
deleted file mode 100644
index 8e9eca3..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/impl/LightElementImpl.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.dr3d.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.dr3d.Dr3dConstants;
-import org.eclipse.actf.model.dom.odf.dr3d.LightElement;
-import org.w3c.dom.Element;
-
-
-class LightElementImpl extends ODFElementImpl implements LightElement {
- private static final long serialVersionUID = -6265631982423831275L;
-
- protected LightElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrDr3dDiffuseColor() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_DIFFUSE_COLOR))
- return getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_DIFFUSE_COLOR);
- return null;
- }
-
- public String getAttrDr3dDirection() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_DIRECTION))
- return getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_DIRECTION);
- return null;
- }
-
- public boolean getAttrDr3dEnabled() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_ENABLED)) {
- return new Boolean(getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_ENABLED)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrDr3dSpecular() {
- if (hasAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_SPECULAR)) {
- return new Boolean(getAttributeNS(Dr3dConstants.DR3D_NAMESPACE_URI,
- Dr3dConstants.ATTR_SPECULAR)).booleanValue();
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/impl/SceneElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/impl/SceneElementImpl.java
deleted file mode 100644
index 7d380d7..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/dr3d/impl/SceneElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.dr3d.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.dr3d.SceneElement;
-import org.w3c.dom.Element;
-
-
-class SceneElementImpl extends DrawingObjectElementImpl implements SceneElement {
- private static final long serialVersionUID = -7063216214438153965L;
-
- protected SceneElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/AreaCircleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/AreaCircleElement.java
deleted file mode 100644
index fb2665a..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/AreaCircleElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-public interface AreaCircleElement extends ImageMapAreaElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/AreaPolygonElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/AreaPolygonElement.java
deleted file mode 100644
index 7c6feca..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/AreaPolygonElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-public interface AreaPolygonElement extends ImageMapAreaElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/AreaRectangleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/AreaRectangleElement.java
deleted file mode 100644
index 3d2dacb..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/AreaRectangleElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-public interface AreaRectangleElement extends ImageMapAreaElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/CaptionElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/CaptionElement.java
deleted file mode 100644
index 63d8e1f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/CaptionElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface CaptionElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/CircleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/CircleElement.java
deleted file mode 100644
index 85bdd76..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/CircleElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface CircleElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ConnectorElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ConnectorElement.java
deleted file mode 100644
index 85188d9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ConnectorElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface ConnectorElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ControlElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ControlElement.java
deleted file mode 100644
index 9398124..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ControlElement.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-import org.eclipse.actf.model.dom.odf.form.FixedTextElement;
-import org.eclipse.actf.model.dom.odf.form.FormControlElement;
-
-
-public interface ControlElement extends DrawingObjectElement {
- public String getAttrDrawControl();
-
- public FormControlElement getFormControlElement();
-
- public FixedTextElement getFormLabelFixedTextElement();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/CustomShapeElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/CustomShapeElement.java
deleted file mode 100644
index 24322b7..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/CustomShapeElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface CustomShapeElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/DrawConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/DrawConstants.java
deleted file mode 100644
index e351eaa..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/DrawConstants.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-public final class DrawConstants {
- static public final String DRAW_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0";
-
- static public final String ELEMENT_PAGE = "page";
-
- static public final String ELEMENT_FRAME = "frame";
-
- static public final String ELEMENT_OBJECT = "object";
-
- static public final String ELEMENT_OBJECT_OLE = "object-ole";
-
- static public final String ELEMENT_IMAGE = "image";
-
- static public final String ELEMENT_GRADIENT = "gradient";
-
- static public final String ELEMENT_HATCH = "hatch";
-
- static public final String ELEMENT_FILL_IMAGE = "fill-image";
-
- static public final String ELEMENT_OPACITY = "opacity";
-
- static public final String ELEMENT_STROKE_DASH = "stroke-dash";
-
- static public final String ELEMENT_IMAGE_MAP = "image-map";
-
- static public final String ELEMENT_AREA_CIRCLE = "area-circle";
-
- static public final String ELEMENT_AREA_POLYGON = "area-polygon";
-
- static public final String ELEMENT_AREA_RECTANGLE = "area-rectangle";
-
- static public final String ELEMENT_RECT = "rect";
-
- static public final String ELEMENT_LINE = "line";
-
- static public final String ELEMENT_POLYLINE = "polyline";
-
- static public final String ELEMENT_POLYGON = "polygon";
-
- static public final String ELEMENT_REGULAR_POLYGON = "regular-polygon";
-
- static public final String ELEMENT_PATH = "path";
-
- static public final String ELEMENT_CIRCLE = "circle";
-
- static public final String ELEMENT_ELLIPSE = "ellipse";
-
- static public final String ELEMENT_G = "g";
-
- static public final String ELEMENT_PAGE_THUMBNAIL = "page-thumbnail";
-
- static public final String ELEMENT_MEASURE = "measure";
-
- static public final String ELEMENT_CAPTION = "caption";
-
- static public final String ELEMENT_CONNECTOR = "connector";
-
- static public final String ELEMENT_CONTROL = "control";
-
- static public final String ELEMENT_CUSTOM_SHAPE = "custom-shape";
-
- static public final String ELEMENT_TEXT_BOX = "text-box";
-
- static public final String ATTR_Z_INDEX = "z-index";
-
- static public final String ATTR_NOTIFY_ON_UPDATE_OF_RANGES = "notify-on-update-of-ranges";
-
- static public final String ATTR_STROKE = "stroke";
-
- static public final String ATTR_STROKE_DASH = "stroke-dash";
-
- static public final String ATTR_MARKER_START_WIDTH = "marker-start-width";
-
- static public final String ATTR_MARKER_END_WIDTH = "marker-end-width";
-
- static public final String ATTR_OPACITY = "opacity";
-
- static public final String ATTR_OPACITY_NAME = "opacity-name";
-
- static public final String ATTR_FILL = "fill";
-
- static public final String ATTR_FILL_COLOR = "fill-color";
-
- static public final String ATTR_FILL_GRADIENT_NAME = "fill-gradient-name";
-
- static public final String ATTR_GRADIENT_STEP_COUNT = "gradient-step-count";
-
- static public final String ATTR_FILL_IMAGE_NAME = "fill-image-name";
-
- static public final String ATTR_FILL_IMAGE_WIDTH = "fill-image-width";
-
- static public final String ATTR_FILL_IMAGE_HEIGHT = "fill-image-height";
-
- static public final String ATTR_FILL_IMAGE_REF_POINT_X = "fill-image-ref-point-x";
-
- static public final String ATTR_FILL_IMAGE_REF_POINT_Y = "fill-image-ref-point-y";
-
- static public final String ATTR_FILL_IMAGE_REF_POINT = "fill-image-ref-point";
-
- static public final String ATTR_TILE_REPEAT_OFFSET = "tile-repeat-offset";
-
- static public final String ATTR_NAME = "name";
-
- static public final String ATTR_ID = "id";
-
- static public final String ATTR_DISPLAY_NAME = "display-name";
-
- static public final String ATTR_STYLE = "style";
-
- static public final String ATTR_STYLE_NAME = "style-name";
-
- static public final String ATTR_MASTER_PAGE_NAME = "master-page-name";
-
- static public final String ATTR_START_COLOR = "start-color";
-
- static public final String ATTR_END_COLOR = "end-color";
-
- static public final String ATTR_START_INTENSITY = "start-intensity";
-
- static public final String ATTR_END_INTENSITY = "end-intensity";
-
- static public final String ATTR_ANGLE = "angle";
-
- static public final String ATTR_BORDER = "border";
-
- static public final String ATTR_COLOR = "color";
-
- static public final String ATTR_DISTANCE = "distance";
-
- static public final String ATTR_ROTATION = "rotation";
-
- static public final String ATTR_START = "start";
-
- static public final String ATTR_END = "end";
-
- static public final String ATTR_DOTS1 = "dots1";
-
- static public final String ATTR_DOTS1_LENGTH = "dots1-length";
-
- static public final String ATTR_DOTS2 = "dots2";
-
- static public final String ATTR_DOTS2_LENGTH = "dots2-length";
-
- static public final String ATTR_CX = "cx";
-
- static public final String ATTR_CY = "cy";
-
- static public final String ATTR_BACKGROUND_SIZE = "background-size";
-
- static public final String ATTR_CONTROL = "control";
-
- static public final String ATTR_CAPTION_ID = "caption-id";
-
- static public final String ATTR_NAV_ORDER = "nav-order";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/EllipseElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/EllipseElement.java
deleted file mode 100644
index 3d08a10..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/EllipseElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface EllipseElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/FillImageElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/FillImageElement.java
deleted file mode 100644
index 824d3c7..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/FillImageElement.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface FillImageElement extends ODFElement {
- public String getAttrDrawName();
-
- public String getAttrXLinkHref();
-
- public String getAttrXLinkType();
-
- public String getAttrXLinkShow();
-
- public String getAttrXLinkActuate();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/FrameElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/FrameElement.java
deleted file mode 100644
index 46077e0..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/FrameElement.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-
-public interface FrameElement extends DrawingObjectElement {
- public String getAttrTableEndCellAddress();
-
- public String getAttrTableEndX();
-
- public String getAttrTableEndY();
-
- public int getAttrDrawZIndex();
-
- public String getAttrSvgWidth();
-
- public String getAttrSvgHeight();
-
- public String getAttrSvgX();
-
- public String getAttrSvgY();
-
- public long getContentSize();
-
- public Iterator getChildIterator();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/GElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/GElement.java
deleted file mode 100644
index b8d1138..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/GElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface GElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/GradientElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/GradientElement.java
deleted file mode 100644
index feca024..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/GradientElement.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface GradientElement extends ODFElement {
- public String getAttrDrawName();
-
- public String getAttrDrawDisplayName();
-
- public String getAttrDrawStyle();
-
- public String getAttrDrawStartColor();
-
- public String getAttrDrawEndColor();
-
- public String getAttrDrawCx();
-
- public String getAttrDrawCy();
-
- public String getAttrDrawStartIntensity();
-
- public String getAttrDrawEndIntensity();
-
- public int getAttrDrawAngle();
-
- public String getAttrDrawBorder();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/HatchElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/HatchElement.java
deleted file mode 100644
index 64221ca..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/HatchElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface HatchElement extends ODFElement {
- public String getAttrDrawName();
-
- public String getAttrDrawDisplayName();
-
- public String getAttrDrawStyle();
-
- public String getAttrDrawColor();
-
- public String getAttrDrawDistance();
-
- public String getAttrDrawRotation();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ImageElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ImageElement.java
deleted file mode 100644
index 60c14e8..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ImageElement.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.EmbedDrawingObjectElement;
-
-public interface ImageElement extends EmbedDrawingObjectElement {
- String getAttrXlinkHref();
-
- String getAttrXlinkType();
-
- String getAttrXlinkShow();
-
- String getAttrXlinkActuate();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ImageMapAreaElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ImageMapAreaElement.java
deleted file mode 100644
index 8399547..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ImageMapAreaElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface ImageMapAreaElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ImageMapElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ImageMapElement.java
deleted file mode 100644
index c319617..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ImageMapElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.EmbedDrawingObjectElement;
-import org.w3c.dom.NodeList;
-
-
-public interface ImageMapElement extends EmbedDrawingObjectElement {
- public ImageElement getImageElements();
-
- public NodeList getAreaElements();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/LineElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/LineElement.java
deleted file mode 100644
index def611b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/LineElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface LineElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/MeasureElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/MeasureElement.java
deleted file mode 100644
index 19df43c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/MeasureElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface MeasureElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ObjectElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ObjectElement.java
deleted file mode 100644
index cccb0af..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ObjectElement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.EmbedDrawingObjectElement;
-
-public interface ObjectElement extends EmbedDrawingObjectElement {
- public String getAttrDrawNotifyOnUpdateOfRanges();
-
- public void setAttrXlinkHref(String href);
-
- public String getAttrXlinkHref();
-
- public String getAttrXlinkType();
-
- public String getAttrXlinkShow();
-
- public String getAttrXlinkActuate();
-
- public boolean isPresentationTable();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ObjectOleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ObjectOleElement.java
deleted file mode 100644
index 5a95e79..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/ObjectOleElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.EmbedDrawingObjectElement;
-
-public interface ObjectOleElement extends EmbedDrawingObjectElement {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/OpacityElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/OpacityElement.java
deleted file mode 100644
index df74c7c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/OpacityElement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface OpacityElement extends ODFElement {
- public String getAttrDrawName();
-
- public String getAttrDrawDisplayName();
-
- public String getAttrDrawStyle();
-
- public String getAttrDrawStart();
-
- public String getAttrDrawEnd();
-
- public int getAttrDrawAngle();
-
- public String getAttrDrawBorder();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PageElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PageElement.java
deleted file mode 100644
index b21c17b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PageElement.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.presentation.NotesElement;
-import org.w3c.dom.NodeList;
-
-
-public interface PageElement extends ODFElement {
- public ODFElement createObject(long x, long y, long width, long height);
-
- public String getAttrDrawName();
-
- public String getAttrDrawStyleName();
-
- public String getAttrDrawMasterPageName();
-
- public String getAttrDrawNavOrder();
-
- public int getPageIndex();
-
- public List<ODFElement> getChildNodesInNavOrder();
-
- public NodeList getDrawingObjectElements();
-
- public NotesElement getPresentationNotesElement();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PageThumbnailElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PageThumbnailElement.java
deleted file mode 100644
index 945c175..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PageThumbnailElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface PageThumbnailElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PathElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PathElement.java
deleted file mode 100644
index 6d7ed7a..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PathElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface PathElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PolygonElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PolygonElement.java
deleted file mode 100644
index 8586c62..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PolygonElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface PolygonElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PolylineElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PolylineElement.java
deleted file mode 100644
index a12b7af..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/PolylineElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface PolylineElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/RectElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/RectElement.java
deleted file mode 100644
index 00ae41b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/RectElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface RectElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/RegularPolygonElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/RegularPolygonElement.java
deleted file mode 100644
index 7e1dc9e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/RegularPolygonElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-
-public interface RegularPolygonElement extends DrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/StrokeDashElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/StrokeDashElement.java
deleted file mode 100644
index 7423ec2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/StrokeDashElement.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface StrokeDashElement extends ODFElement {
- public String getAttrDrawName();
-
- public String getAttrDrawDisplayName();
-
- public String getAttrDrawStyle();
-
- public int getAttrDrawDots1();
-
- public String getAttrDrawDots1Length();
-
- public int getAttrDrawDots2();
-
- public String getAttrDrawDots2Length();
-
- public String getAttrDrawDistance();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/TextBoxElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/TextBoxElement.java
deleted file mode 100644
index ce83cbc..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/TextBoxElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw;
-
-import org.eclipse.actf.model.dom.odf.base.EmbedDrawingObjectElement;
-
-public interface TextBoxElement extends EmbedDrawingObjectElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/AreaCircleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/AreaCircleElementImpl.java
deleted file mode 100644
index 6d00add..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/AreaCircleElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.draw.AreaCircleElement;
-import org.w3c.dom.Element;
-
-
-class AreaCircleElementImpl extends ImageMapAreaElementImpl implements
- AreaCircleElement {
- private static final long serialVersionUID = 4963823752873198010L;
-
- protected AreaCircleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/AreaPolygonElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/AreaPolygonElementImpl.java
deleted file mode 100644
index 9bb89e3..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/AreaPolygonElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.draw.AreaPolygonElement;
-import org.w3c.dom.Element;
-
-
-class AreaPolygonElementImpl extends ImageMapAreaElementImpl implements
- AreaPolygonElement {
- private static final long serialVersionUID = -7787852406360330911L;
-
- protected AreaPolygonElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/AreaRectangleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/AreaRectangleElementImpl.java
deleted file mode 100644
index fb9a47b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/AreaRectangleElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.draw.AreaRectangleElement;
-import org.w3c.dom.Element;
-
-
-class AreaRectangleElementImpl extends ImageMapAreaElementImpl implements
- AreaRectangleElement {
- private static final long serialVersionUID = 2649141873537166703L;
-
- protected AreaRectangleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/CaptionElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/CaptionElementImpl.java
deleted file mode 100644
index 6d62c67..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/CaptionElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.CaptionElement;
-import org.w3c.dom.Element;
-
-
-class CaptionElementImpl extends DrawingObjectElementImpl implements
- CaptionElement {
- private static final long serialVersionUID = 5273342296877500912L;
-
- protected CaptionElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/CircleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/CircleElementImpl.java
deleted file mode 100644
index 24b013b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/CircleElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.CircleElement;
-import org.w3c.dom.Element;
-
-
-class CircleElementImpl extends DrawingObjectElementImpl implements
- CircleElement {
- private static final long serialVersionUID = 7244652338038985691L;
-
- protected CircleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ConnectorElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ConnectorElementImpl.java
deleted file mode 100644
index df4c961..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ConnectorElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.ConnectorElement;
-import org.w3c.dom.Element;
-
-
-class ConnectorElementImpl extends DrawingObjectElementImpl implements
- ConnectorElement {
- private static final long serialVersionUID = -336123720038047678L;
-
- protected ConnectorElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ControlElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ControlElementImpl.java
deleted file mode 100644
index 22e307c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ControlElementImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.ControlElement;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.form.FixedTextElement;
-import org.eclipse.actf.model.dom.odf.form.FormConstants;
-import org.eclipse.actf.model.dom.odf.form.FormControlElement;
-import org.eclipse.actf.model.dom.odf.office.OfficeConstants;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-
-class ControlElementImpl extends DrawingObjectElementImpl implements
- ControlElement {
- private static final long serialVersionUID = -4483584669064968195L;
-
- protected ControlElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrDrawControl() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_CONTROL))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_CONTROL);
- return null;
- }
-
- public FormControlElement getFormControlElement() {
- NodeList nl = XPathUtil.evalXPathNodeList(this,
- "ancestor::*/*[namespace-uri()='"
- + OfficeConstants.OFFICE_NAMESPACE_URI
- + "' and local-name()='"
- + OfficeConstants.ELEMENT_FORMS
- + "']/*[namespace-uri()='"
- + FormConstants.FORM_NAMESPACE_URI
- + "' and local-name()='" + FormConstants.ELEMENT_FORM
- + "']/*[attribute::*[namespace-uri()='"
- + FormConstants.FORM_NAMESPACE_URI
- + "' and local-name()='id']='" + getAttrDrawControl()
- + "']");
-
- if ((nl != null) && (nl.getLength() == 1)) {
- Element control = (Element) nl.item(0);
- if (control instanceof FormControlElement) {
- return (FormControlElement) control;
- } else {
- new ODFException(
- "draw:id should specify the id of FormControlElement")
- .printStackTrace();
- System.err.println("namespace : " + control.getNamespaceURI());
- System.err.println("localname : " + control.getLocalName());
- System.err
- .println("text content : " + control.getTextContent());
- }
- } else if ((nl != null) && (nl.getLength() > 1)) {
- new ODFException(
- "draw:control should not have more thant one form:property element")
- .printStackTrace();
- }
- return null;
- }
-
- public FixedTextElement getFormLabelFixedTextElement() {
- String drawControl = getAttrDrawControl();
- NodeList nl = XPathUtil.evalXPathNodeList(this,
- "ancestor::*/*[namespace-uri()='"
- + OfficeConstants.OFFICE_NAMESPACE_URI
- + "' and local-name()='"
- + OfficeConstants.ELEMENT_FORMS
- + "']/*[namespace-uri()='"
- + FormConstants.FORM_NAMESPACE_URI
- + "' and local-name()='" + FormConstants.ELEMENT_FORM
- + "']/*[namespace-uri()='"
- + FormConstants.FORM_NAMESPACE_URI
- + "' and local-name()='"
- + FormConstants.ELEMENT_FIXED_TEXT
- + "'][attribute::*[namespace-uri()='"
- + FormConstants.FORM_NAMESPACE_URI
- + "' and local-name()='" + FormConstants.ATTR_FOR
- + "']='" + drawControl + "']");
- if ((nl != null) && (nl.getLength() == 1)) {
- Element text = (Element) nl.item(0);
- if (text instanceof FixedTextElement) {
- return (FixedTextElement) text;
- }
- } else if ((nl != null) && (nl.getLength() > 1)) {
- new ODFException(
- "draw:control should not have more thant one form label field element")
- .printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/CustomShapeElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/CustomShapeElementImpl.java
deleted file mode 100644
index 454ddfb..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/CustomShapeElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.CustomShapeElement;
-import org.w3c.dom.Element;
-
-
-class CustomShapeElementImpl extends DrawingObjectElementImpl implements
- CustomShapeElement {
- private static final long serialVersionUID = 3355707968192152084L;
-
- protected CustomShapeElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/DrawNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/DrawNodeFactory.java
deleted file mode 100644
index 663a570..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/DrawNodeFactory.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.w3c.dom.Element;
-
-
-public class DrawNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(DrawConstants.ELEMENT_AREA_CIRCLE,
- AreaCircleElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_AREA_POLYGON,
- AreaPolygonElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_AREA_RECTANGLE,
- AreaRectangleElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_CAPTION, CaptionElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_CIRCLE, CircleElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_CONNECTOR, ConnectorElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_CONTROL, ControlElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_CUSTOM_SHAPE,
- CustomShapeElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_ELLIPSE, EllipseElementImpl.class);
- tagMap
- .put(DrawConstants.ELEMENT_FILL_IMAGE,
- FillImageElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_FRAME, FrameElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_G, GElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_GRADIENT, GradientElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_HATCH, HatchElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_IMAGE, ImageElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_IMAGE_MAP, ImageMapElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_LINE, LineElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_MEASURE, MeasureElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_OBJECT, ObjectElementImpl.class);
- tagMap
- .put(DrawConstants.ELEMENT_OBJECT_OLE,
- ObjectOleElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_OPACITY, OpacityElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_PAGE, PageElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_PAGE_THUMBNAIL,
- PageThumbnailElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_PATH, PathElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_POLYGON, PolygonElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_POLYLINE, PolylineElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_RECT, RectElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_REGULAR_POLYGON,
- RegularPolygonElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_STROKE_DASH,
- StrokeDashElementImpl.class);
- tagMap.put(DrawConstants.ELEMENT_TEXT_BOX, TextBoxElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/EllipseElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/EllipseElementImpl.java
deleted file mode 100644
index 652f4ee..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/EllipseElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.EllipseElement;
-import org.w3c.dom.Element;
-
-
-class EllipseElementImpl extends DrawingObjectElementImpl implements
- EllipseElement {
- private static final long serialVersionUID = -446305436785106554L;
-
- protected EllipseElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/FillImageElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/FillImageElementImpl.java
deleted file mode 100644
index 40fbc2d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/FillImageElementImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.FillImageElement;
-import org.eclipse.actf.model.dom.odf.xlink.XLinkConstants;
-import org.w3c.dom.Element;
-
-
-class FillImageElementImpl extends ODFElementImpl implements FillImageElement {
- private static final long serialVersionUID = 5874806534330621667L;
-
- protected FillImageElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrDrawName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME);
- return null;
- }
-
- public String getAttrDrawDisplayName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISPLAY_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISPLAY_NAME);
- return null;
- }
-
- public String getAttrXLinkHref() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF);
- return null;
- }
-
- public String getAttrXLinkType() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_TYPE))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_TYPE);
- return null;
- }
-
- public String getAttrXLinkShow() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_SHOW))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_SHOW);
- return null;
- }
-
- public String getAttrXLinkActuate() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_ACTUATE))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_ACTUATE);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/FrameElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/FrameElementImpl.java
deleted file mode 100644
index 9dfd647..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/FrameElementImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.FrameElement;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-class FrameElementImpl extends DrawingObjectElementImpl implements FrameElement {
- private static final long serialVersionUID = 1022779482608752448L;
-
- protected FrameElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrTableEndCellAddress() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_END_CELL_ADDRESS))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_END_CELL_ADDRESS);
- return null;
- }
-
- public String getAttrTableEndX() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_END_X))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_END_X);
- return null;
- }
-
- public String getAttrTableEndY() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_END_Y))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_END_Y);
- return null;
- }
-
- public int getAttrDrawZIndex() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_Z_INDEX)) {
- return new Integer(getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_Z_INDEX)).intValue();
- }
- return -1;
- }
-
- public String getAttrSvgWidth() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_WIDTH))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_WIDTH);
- return null;
- }
-
- public String getAttrSvgHeight() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_HEIGHT))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_HEIGHT);
- return null;
- }
-
- public String getAttrSvgX() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI, SVGConstants.ATTR_X))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_X);
- return null;
- }
-
- public String getAttrSvgY() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI, SVGConstants.ATTR_Y))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_Y);
- return null;
- }
-
- private List<Node> getChildElements() {
- List<Node> list = new Vector<Node>();
- NodeList nl = this.getChildNodes();
- for (int i = 0; i < nl.getLength(); i++) {
- Node child = nl.item(i);
- if (child instanceof ODFElement) {
- list.add(child);
- }
- }
- return list;
- }
-
- public long getContentSize() {
- return getChildElements().size();
- }
-
- public Iterator getChildIterator() {
- return getChildElements().iterator();
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/GElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/GElementImpl.java
deleted file mode 100644
index 7dcdde9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/GElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.GElement;
-import org.w3c.dom.Element;
-
-
-class GElementImpl extends DrawingObjectElementImpl implements GElement {
- private static final long serialVersionUID = 4958486700746176202L;
-
- protected GElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/GradientElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/GradientElementImpl.java
deleted file mode 100644
index 8d173d9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/GradientElementImpl.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.GradientElement;
-import org.w3c.dom.Element;
-
-
-class GradientElementImpl extends ODFElementImpl implements GradientElement {
- private static final long serialVersionUID = 6232361241398332303L;
-
- protected GradientElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrDrawName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME);
- return null;
- }
-
- public String getAttrDrawDisplayName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISPLAY_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISPLAY_NAME);
- return null;
- }
-
- public String getAttrDrawStyle() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE);
- return null;
- }
-
- public String getAttrDrawStartColor() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_START_COLOR))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_START_COLOR);
- return null;
- }
-
- public String getAttrDrawEndColor() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_END_COLOR))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_END_COLOR);
- return null;
- }
-
- public String getAttrDrawStartIntensity() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_START_INTENSITY))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_START_INTENSITY);
- return null;
- }
-
- public String getAttrDrawEndIntensity() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_END_INTENSITY))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_END_INTENSITY);
- return null;
- }
-
- public int getAttrDrawAngle() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_ANGLE)) {
- return new Integer(getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_ANGLE)).intValue();
- }
- return -1;
- }
-
- public String getAttrDrawBorder() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_BORDER))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_BORDER);
- return null;
- }
-
- public String getAttrDrawCx() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_CX))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_CX);
- return null;
- }
-
- public String getAttrDrawCy() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_CY))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_CY);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/HatchElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/HatchElementImpl.java
deleted file mode 100644
index 1537fe5..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/HatchElementImpl.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.HatchElement;
-import org.w3c.dom.Element;
-
-
-class HatchElementImpl extends ODFElementImpl implements HatchElement {
- private static final long serialVersionUID = -389854646796770368L;
-
- protected HatchElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrDrawName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME);
- return null;
- }
-
- public String getAttrDrawDisplayName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISPLAY_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISPLAY_NAME);
- return null;
- }
-
- public String getAttrDrawStyle() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE);
- return null;
- }
-
- public String getAttrDrawColor() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_COLOR))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_COLOR);
- return null;
- }
-
- public String getAttrDrawDistance() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISTANCE))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISTANCE);
- return null;
- }
-
- public String getAttrDrawRotation() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_ROTATION))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_ROTATION);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ImageElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ImageElementImpl.java
deleted file mode 100644
index 90a2355..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ImageElementImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.EmbedDrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.ImageElement;
-import org.eclipse.actf.model.dom.odf.xlink.XLinkConstants;
-import org.w3c.dom.Element;
-
-
-class ImageElementImpl extends EmbedDrawingObjectElementImpl implements
- ImageElement {
- private static final long serialVersionUID = -2572794068793718946L;
-
- protected ImageElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrXlinkHref() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF);
- return null;
- }
-
- public String getAttrXlinkType() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_TYPE))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_TYPE);
- return null;
- }
-
- public String getAttrXlinkShow() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_SHOW))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_SHOW);
- return null;
- }
-
- public String getAttrXlinkActuate() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_ACTUATE))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_ACTUATE);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ImageMapAreaElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ImageMapAreaElementImpl.java
deleted file mode 100644
index 1620aae..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ImageMapAreaElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.ImageMapAreaElement;
-import org.w3c.dom.Element;
-
-
-abstract class ImageMapAreaElementImpl extends DrawingObjectElementImpl
- implements ImageMapAreaElement {
-
- protected ImageMapAreaElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ImageMapElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ImageMapElementImpl.java
deleted file mode 100644
index 5ffc9ba..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ImageMapElementImpl.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.EmbedDrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.FrameElement;
-import org.eclipse.actf.model.dom.odf.draw.ImageElement;
-import org.eclipse.actf.model.dom.odf.draw.ImageMapElement;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-
-class ImageMapElementImpl extends EmbedDrawingObjectElementImpl implements
- ImageMapElement {
- private static final long serialVersionUID = -8706135729383317676L;
-
- protected ImageMapElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public ImageElement getImageElements() {
- FrameElement frame = getFrameElement();
- if (frame != null) {
- NodeList nl = XPathUtil.evalXPathNodeList(this,
- "./*[namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='"
- + DrawConstants.ELEMENT_IMAGE + "']");
- if ((nl != null) && (nl.getLength() == 1))
- return (ImageElement) nl.item(0);
- if ((nl != null) && (nl.getLength() > 1)) {
- new ODFException(
- "draw:image has more than one text:sequence elements.")
- .printStackTrace();
- }
- }
- return null;
- }
-
- public NodeList getAreaElements() {
- return XPathUtil.evalXPathNodeList(this, "./*[" + "(namespace-uri()='"
- + DrawConstants.DRAW_NAMESPACE_URI + "' and local-name()='"
- + DrawConstants.ELEMENT_AREA_CIRCLE + "')"
- + " or (namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_AREA_POLYGON
- + "')" + " or (namespace-uri()='"
- + DrawConstants.DRAW_NAMESPACE_URI + "' and local-name()='"
- + DrawConstants.ELEMENT_AREA_RECTANGLE + "')" + "]");
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/LineElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/LineElementImpl.java
deleted file mode 100644
index 6a7f1a4..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/LineElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.LineElement;
-import org.w3c.dom.Element;
-
-
-class LineElementImpl extends DrawingObjectElementImpl implements LineElement {
- private static final long serialVersionUID = -1079121618633159362L;
-
- protected LineElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/MeasureElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/MeasureElementImpl.java
deleted file mode 100644
index bf42aef..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/MeasureElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.MeasureElement;
-import org.w3c.dom.Element;
-
-
-class MeasureElementImpl extends DrawingObjectElementImpl implements
- MeasureElement {
- private static final long serialVersionUID = -7007401856298737603L;
-
- protected MeasureElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ObjectElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ObjectElementImpl.java
deleted file mode 100644
index 160662c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ObjectElementImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants;
-import org.eclipse.actf.model.dom.odf.ODFParser;
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.EmbedDrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.ObjectElement;
-import org.eclipse.actf.model.dom.odf.office.BodyElement;
-import org.eclipse.actf.model.dom.odf.office.DocumentContentElement;
-import org.eclipse.actf.model.dom.odf.xlink.XLinkConstants;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-
-class ObjectElementImpl extends EmbedDrawingObjectElementImpl implements
- ObjectElement {
- private static final long serialVersionUID = 3713511152465032919L;
-
- protected ObjectElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public void setAttrXlinkHref(String href) {
- if (href == null) {
- removeAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF);
- return;
- }
- setAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF, href.trim());
- }
-
- public String getAttrDrawNotifyOnUpdateOfRanges() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NOTIFY_ON_UPDATE_OF_RANGES))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NOTIFY_ON_UPDATE_OF_RANGES);
- return null;
- }
-
- public String getAttrXlinkHref() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF);
- return null;
- }
-
- public String getAttrXlinkType() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_TYPE))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_TYPE);
- return null;
- }
-
- public String getAttrXlinkShow() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_SHOW))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_SHOW);
- return null;
- }
-
- public String getAttrXlinkActuate() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_ACTUATE))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_ACTUATE);
- return null;
- }
-
- public boolean isPresentationTable() {
- ODFDocument doc = (ODFDocument) this.getOwnerDocument();
- DocumentContentElement content = (DocumentContentElement) doc
- .getDocumentElement();
- ContentType type = content.getBodyElement().getContent()
- .getContentType();
- if (type != ContentType.PRESENTATION)
- return false;
-
- String fileUrl = doc.getURL();
- String objUrl = this.getAttrXlinkHref();
- if (objUrl.startsWith("./")) {
- objUrl = objUrl.substring(2);
- }
- objUrl = objUrl + "/" + ODFConstants.ODF_CONTENT_FILENAME;
-
- ODFParser parser = new ODFParser();
- Document objDoc = parser.getDocument(fileUrl, objUrl);
- if (objDoc == null)
- return false;
-
- Element objRoot = objDoc.getDocumentElement();
- if (!(objRoot instanceof DocumentContentElement))
- return false;
- BodyElement objBody = ((DocumentContentElement) objRoot)
- .getBodyElement();
- if (objBody == null)
- return false;
- ContentBaseElement objContentBase = objBody.getContent();
- if ((objContentBase != null)
- && (objContentBase.getContentType() == ContentType.SPREADSHEET))
- return true;
-
- return false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ObjectOleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ObjectOleElementImpl.java
deleted file mode 100644
index c94c0e9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/ObjectOleElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.EmbedDrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.ObjectOleElement;
-import org.w3c.dom.Element;
-
-
-public class ObjectOleElementImpl extends EmbedDrawingObjectElementImpl
- implements ObjectOleElement {
- private static final long serialVersionUID = -8535979658908095507L;
-
- protected ObjectOleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/OpacityElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/OpacityElementImpl.java
deleted file mode 100644
index d355b58..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/OpacityElementImpl.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.OpacityElement;
-import org.w3c.dom.Element;
-
-
-class OpacityElementImpl extends ODFElementImpl implements OpacityElement {
- private static final long serialVersionUID = -5695526535859019948L;
-
- protected OpacityElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrDrawName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME);
- return null;
- }
-
- public String getAttrDrawDisplayName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISPLAY_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISPLAY_NAME);
- return null;
- }
-
- public String getAttrDrawStyle() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE);
- return null;
- }
-
- public String getAttrDrawStart() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_START))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_START);
- return null;
- }
-
- public String getAttrDrawEnd() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_END))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_END);
- return null;
- }
-
- public int getAttrDrawAngle() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_ANGLE)) {
- return new Integer(getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_ANGLE)).intValue();
- }
- return -1;
- }
-
- public String getAttrDrawBorder() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_BORDER))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_BORDER);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PageElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PageElementImpl.java
deleted file mode 100644
index 173b28c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PageElementImpl.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.dr3d.Dr3dConstants;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.PageElement;
-import org.eclipse.actf.model.dom.odf.office.BodyElement;
-import org.eclipse.actf.model.dom.odf.office.DocumentContentElement;
-import org.eclipse.actf.model.dom.odf.presentation.NotesElement;
-import org.eclipse.actf.model.dom.odf.presentation.PresentationConstants;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-class PageElementImpl extends ODFElementImpl implements PageElement {
- private static final long serialVersionUID = 8198841362223795490L;
-
- private ContentBaseElement contentElement = null;
-
- protected PageElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public ODFElement createObject(long x, long y, long width, long height) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public int getPageIndex() {
- if (odfDoc == null)
- return -1;
-
- Element root = odfDoc.getDocumentElement();
- if (root instanceof DocumentContentElement) {
- BodyElement body = ((DocumentContentElement) root).getBodyElement();
- contentElement = body.getContent();
- }
-
- if (contentElement == null)
- return -1;
-
- NodeList list = XPathUtil.evalXPathNodeList(contentElement,
- "./*[namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_PAGE
- + "']");
- for (int i = 0; i < list.getLength(); i++) {
- if (list.item(i).equals(this)) {
- return i;
- }
- }
-
- return -1;
- }
-
- public String getAttrDrawName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME);
- return null;
- }
-
- public String getAttrDrawStyleName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE_NAME);
- return null;
- }
-
- public String getAttrDrawMasterPageName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_MASTER_PAGE_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_MASTER_PAGE_NAME);
- return null;
- }
-
- public String getAttrDrawNavOrder() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAV_ORDER))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAV_ORDER);
- return null;
- }
-
- private class NavOrderComparator implements Comparator<ODFElement> {
- /*
- * private boolean isTitleShape(ODFElement shape) { try { if(
- * "title"==shape.getAttributeNS(PresentationConstants.PRESENTATION_NAMESPACE_URI,
- * PresentationConstants.ATTR_CLASS) ) { return true; } }
- * catch(Exception e) {} return false; }
- */
-
- private int getNavOrder(ODFElement shape, String navOrders) {
- String id = shape.getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_ID);
- if (id != null) {
- int index = navOrders.indexOf(id);
- if (index >= 0) {
- return index;
- }
- }
- return navOrders.length();
- }
-
- private int getZOrder(ODFElement shape) {
- Node parent = shape.getParentNode();
- if (!(parent instanceof PageElement))
- return -1;
-
- int index = 0;
- Node preSib = shape.getPreviousSibling();
- while (preSib != null) {
- if (preSib instanceof ODFElement)
- index++;
- preSib = preSib.getPreviousSibling();
- }
- return index;
- }
-
- public int compare(ODFElement a, ODFElement b) {
- /*
- * if( isTitleShape(a) ) { return -1; }
- */
- String navOrders = getAttrDrawNavOrder();
- if (navOrders != null) {
- int oDelta = getNavOrder(a, navOrders)
- - getNavOrder(b, navOrders);
- if (oDelta != 0) {
- return oDelta;
- }
- }
- int oDelta = getZOrder(a) - getZOrder(b);
- if (oDelta != 0) {
- return oDelta;
- }
-
- return 0;
- }
- }
-
- public List<ODFElement> getChildNodesInNavOrder() {
- List<ODFElement> children = new ArrayList<ODFElement>();
- NodeList nl = getChildNodes();
- for (int i = 0; i < nl.getLength(); i++) {
- if (nl.item(i) instanceof ODFElement) {
- children.add((ODFElement) nl.item(i));
- }
- }
- String navOrder = getAttrDrawNavOrder();
- if (navOrder == null)
- return children;
-
- Collections.sort(children, new NavOrderComparator());
- return children;
- }
-
- /*
- * get drawing elements listed below "draw:rect" "draw:line" "draw:polyline"
- * "draw:polygon" "draw:regular-polygon" "draw:path" "draw:circle"
- * "draw:ellipse" "draw:g" "draw:page-thumbnail" "draw:measure"
- * "draw:caption" "draw:connector" "draw:custom-shape" "dr3d:scene"
- */
- public NodeList getDrawingObjectElements() {
- return XPathUtil.evalXPathNodeList(this, "./*[(namespace-uri()='"
- + DrawConstants.DRAW_NAMESPACE_URI + "' and local-name()='"
- + DrawConstants.ELEMENT_RECT + "') or" + "(namespace-uri()='"
- + DrawConstants.DRAW_NAMESPACE_URI + "' and local-name()='"
- + DrawConstants.ELEMENT_LINE + "') or" + "(namespace-uri()='"
- + DrawConstants.DRAW_NAMESPACE_URI + "' and local-name()='"
- + DrawConstants.ELEMENT_POLYLINE + "') or"
- + "(namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_POLYGON
- + "') or" + "(namespace-uri()='"
- + DrawConstants.DRAW_NAMESPACE_URI + "' and local-name()='"
- + DrawConstants.ELEMENT_REGULAR_POLYGON + "') or"
- + "(namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_PATH + "') or"
- + "(namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_CIRCLE
- + "') or" + "(namespace-uri()='"
- + DrawConstants.DRAW_NAMESPACE_URI + "' and local-name()='"
- + DrawConstants.ELEMENT_ELLIPSE + "') or"
- + "(namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_G + "') or"
- + "(namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_PAGE_THUMBNAIL
- + "') or" + "(namespace-uri()='"
- + DrawConstants.DRAW_NAMESPACE_URI + "' and local-name()='"
- + DrawConstants.ELEMENT_MEASURE + "') or"
- + "(namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_CAPTION
- + "') or" + "(namespace-uri()='"
- + DrawConstants.DRAW_NAMESPACE_URI + "' and local-name()='"
- + DrawConstants.ELEMENT_CONNECTOR + "') or"
- + "(namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_CUSTOM_SHAPE
- + "') or" + "(namespace-uri()='"
- + Dr3dConstants.DR3D_NAMESPACE_URI + "' and local-name()='"
- + Dr3dConstants.ELEMENT_SCENE + "')]");
- }
-
- public NotesElement getPresentationNotesElement() {
- NodeList nl = XPathUtil.evalXPathNodeList(this, "./*[namespace-uri()='"
- + PresentationConstants.PRESENTATION_NAMESPACE_URI
- + "' and local-name()='" + PresentationConstants.ELEMENT_NOTES
- + "']");
- if ((nl != null) && (nl.getLength() == 1))
- return (NotesElement) nl.item(0);
- else if ((nl != null) && (nl.getLength() > 1)) {
- new ODFException(
- "draw:page has more than one presentation:notes element")
- .printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PageThumbnailElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PageThumbnailElementImpl.java
deleted file mode 100644
index 6e58671..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PageThumbnailElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.PageThumbnailElement;
-import org.w3c.dom.Element;
-
-
-class PageThumbnailElementImpl extends DrawingObjectElementImpl implements
- PageThumbnailElement {
- private static final long serialVersionUID = 313739212890994454L;
-
- protected PageThumbnailElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PathElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PathElementImpl.java
deleted file mode 100644
index 6b247b4..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PathElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.PathElement;
-import org.w3c.dom.Element;
-
-
-class PathElementImpl extends DrawingObjectElementImpl implements PathElement {
- private static final long serialVersionUID = -6539492491551958761L;
-
- protected PathElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PolygonElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PolygonElementImpl.java
deleted file mode 100644
index b8ec620..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PolygonElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.PolygonElement;
-import org.w3c.dom.Element;
-
-
-class PolygonElementImpl extends DrawingObjectElementImpl implements
- PolygonElement {
- private static final long serialVersionUID = 4421024344163453662L;
-
- protected PolygonElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PolylineElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PolylineElementImpl.java
deleted file mode 100644
index c80cdce..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/PolylineElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.PolylineElement;
-import org.w3c.dom.Element;
-
-
-class PolylineElementImpl extends DrawingObjectElementImpl implements
- PolylineElement {
- private static final long serialVersionUID = -8226387058202684107L;
-
- protected PolylineElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/RectElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/RectElementImpl.java
deleted file mode 100644
index 54a3606..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/RectElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.RectElement;
-import org.w3c.dom.Element;
-
-
-class RectElementImpl extends DrawingObjectElementImpl implements RectElement {
- private static final long serialVersionUID = -19931317614839221L;
-
- protected RectElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/RegularPolygonElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/RegularPolygonElementImpl.java
deleted file mode 100644
index 97a28aa..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/RegularPolygonElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.DrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.RegularPolygonElement;
-import org.w3c.dom.Element;
-
-
-class RegularPolygonElementImpl extends DrawingObjectElementImpl implements
- RegularPolygonElement {
- private static final long serialVersionUID = 1240251135665737519L;
-
- protected RegularPolygonElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/StrokeDashElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/StrokeDashElementImpl.java
deleted file mode 100644
index 047f171..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/StrokeDashElementImpl.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.StrokeDashElement;
-import org.w3c.dom.Element;
-
-
-class StrokeDashElementImpl extends ODFElementImpl implements StrokeDashElement {
- private static final long serialVersionUID = 4210037532835480557L;
-
- protected StrokeDashElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrDrawName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME);
- return null;
- }
-
- public String getAttrDrawDisplayName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISPLAY_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISPLAY_NAME);
- return null;
- }
-
- public String getAttrDrawStyle() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE);
- return null;
- }
-
- public int getAttrDrawDots1() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DOTS1)) {
- return new Integer(getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DOTS1)).intValue();
- }
- return -1;
- }
-
- public String getAttrDrawDots1Length() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DOTS1_LENGTH))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DOTS1_LENGTH);
- return null;
- }
-
- public int getAttrDrawDots2() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DOTS2)) {
- return new Integer(getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DOTS2)).intValue();
- }
- return -1;
- }
-
- public String getAttrDrawDots2Length() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DOTS2_LENGTH))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DOTS2_LENGTH);
- return null;
- }
-
- public String getAttrDrawDistance() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISTANCE))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_DISTANCE);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/TextBoxElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/TextBoxElementImpl.java
deleted file mode 100644
index 805b289..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/draw/impl/TextBoxElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.draw.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.EmbedDrawingObjectElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.TextBoxElement;
-import org.w3c.dom.Element;
-
-
-class TextBoxElementImpl extends EmbedDrawingObjectElementImpl implements
- TextBoxElement {
- private static final long serialVersionUID = -1318323395910861218L;
-
- protected TextBoxElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ButtonElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ButtonElement.java
deleted file mode 100644
index dac29f9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ButtonElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface ButtonElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/CheckboxElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/CheckboxElement.java
deleted file mode 100644
index 9aa79cf..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/CheckboxElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface CheckboxElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ColumnElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ColumnElement.java
deleted file mode 100644
index 26b4c28..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ColumnElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface ColumnElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ComboboxElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ComboboxElement.java
deleted file mode 100644
index a2448ec..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ComboboxElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface ComboboxElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/DateElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/DateElement.java
deleted file mode 100644
index 4d40e05..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/DateElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface DateElement extends ODFElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FixedTextElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FixedTextElement.java
deleted file mode 100644
index 02f78c1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FixedTextElement.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface FixedTextElement extends FormControlElement {
- public String getAttrFormFor();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormConstants.java
deleted file mode 100644
index dbf54d1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormConstants.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public final class FormConstants {
- static public final String FORM_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:form:1.0";
-
- static public final String ELEMENT_BUTTON = "button";
-
- static public final String ELEMENT_CHECKBOX = "checkbox";
-
- static public final String ELEMENT_COLUMN = "column";
-
- static public final String ELEMENT_COMBOBOX = "combobox";
-
- static public final String ELEMENT_DATE = "date";
-
- static public final String ELEMENT_FIXED_TEXT = "fixed-text";
-
- static public final String ELEMENT_FORMATTED_TEXT = "formatted-text";
-
- static public final String ELEMENT_FORM = "form";
-
- static public final String ELEMENT_FRAME = "frame";
-
- static public final String ELEMENT_ITEM = "item";
-
- static public final String ELEMENT_LISTBOX = "listbox";
-
- static public final String ELEMENT_NUMBER = "number";
-
- static public final String ELEMENT_OPTION = "option";
-
- static public final String ELEMENT_PROPERTY = "property";
-
- static public final String ELEMENT_RADIO = "radio";
-
- static public final String ELEMENT_TEXTAREA = "textarea";
-
- static public final String ELEMENT_TEXT = "text";
-
- static public final String ATTR_AUTOMATIC_FOCUS = "automatic-focus";
-
- static public final String ATTR_APPLY_DESIGN_MODE = "apply-design-mode";
-
- static public final String ATTR_LABEL = "label";
-
- static public final String ATTR_TAB_INDEX = "tab-index";
-
- static public final String ATTR_TAB_STOP = "tab-stop";
-
- static public final String ATTR_FOR = "for";
-
- static public final String ATTR_CONTROL_IMPLEMENTATION = "control-implementation";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormControlElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormControlElement.java
deleted file mode 100644
index b349e73..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormControlElement.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface FormControlElement extends ODFElement {
- public String getAttrFormLabel();
-
- public String getAttrFormTabIndex();
-
- public boolean getAttrFormTabStop();
-
- public String getAttrFormControlImplementation();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormElement.java
deleted file mode 100644
index f13a529..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface FormElement extends ODFElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormattedTextElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormattedTextElement.java
deleted file mode 100644
index 9113620..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FormattedTextElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface FormattedTextElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FrameElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FrameElement.java
deleted file mode 100644
index e7c9899..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/FrameElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface FrameElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ItemElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ItemElement.java
deleted file mode 100644
index fe514cd..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ItemElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface ItemElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ListboxElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ListboxElement.java
deleted file mode 100644
index d801d77..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/ListboxElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface ListboxElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/NumberElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/NumberElement.java
deleted file mode 100644
index 896f1fe..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/NumberElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface NumberElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/OptionElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/OptionElement.java
deleted file mode 100644
index 199535f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/OptionElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface OptionElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/PropertyElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/PropertyElement.java
deleted file mode 100644
index 75231fc..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/PropertyElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface PropertyElement extends ODFElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/RadioElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/RadioElement.java
deleted file mode 100644
index 862fe85..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/RadioElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface RadioElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/TextElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/TextElement.java
deleted file mode 100644
index 89c5f81..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/TextElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface TextElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/TextareaElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/TextareaElement.java
deleted file mode 100644
index ed50df7..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/TextareaElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form;
-
-public interface TextareaElement extends FormControlElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ButtonElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ButtonElementImpl.java
deleted file mode 100644
index b884227..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ButtonElementImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.ButtonElement;
-import org.w3c.dom.Element;
-
-
-class ButtonElementImpl extends FormControlElementImpl implements ButtonElement {
- private static final long serialVersionUID = -8975552924744372406L;
-
- protected ButtonElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/CheckboxElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/CheckboxElementImpl.java
deleted file mode 100644
index 0cac038..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/CheckboxElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.CheckboxElement;
-import org.w3c.dom.Element;
-
-
-class CheckboxElementImpl extends FormControlElementImpl implements
- CheckboxElement {
- private static final long serialVersionUID = -3370558641238069015L;
-
- protected CheckboxElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ColumnElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ColumnElementImpl.java
deleted file mode 100644
index 4acdbd1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ColumnElementImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.ColumnElement;
-import org.w3c.dom.Element;
-
-
-class ColumnElementImpl extends FormControlElementImpl implements ColumnElement {
- private static final long serialVersionUID = -8825143949761925303L;
-
- protected ColumnElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ComboboxElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ComboboxElementImpl.java
deleted file mode 100644
index 266366a..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ComboboxElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.ComboboxElement;
-import org.w3c.dom.Element;
-
-
-class ComboboxElementImpl extends FormControlElementImpl implements
- ComboboxElement {
- private static final long serialVersionUID = 3203112618953361636L;
-
- protected ComboboxElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/DateElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/DateElementImpl.java
deleted file mode 100644
index 76e1519..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/DateElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.form.DateElement;
-import org.w3c.dom.Element;
-
-
-class DateElementImpl extends ODFElementImpl implements DateElement {
- private static final long serialVersionUID = 7663575572121990119L;
-
- protected DateElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FixedTextElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FixedTextElementImpl.java
deleted file mode 100644
index fe2f1b0..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FixedTextElementImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.FixedTextElement;
-import org.eclipse.actf.model.dom.odf.form.FormConstants;
-import org.w3c.dom.Element;
-
-
-class FixedTextElementImpl extends FormControlElementImpl implements
- FixedTextElement {
- private static final long serialVersionUID = -4686476250005638294L;
-
- protected FixedTextElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrFormFor() {
- if (hasAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_FOR))
- return getAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_FOR);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormControlElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormControlElementImpl.java
deleted file mode 100644
index efaf793..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormControlElementImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.form.FormConstants;
-import org.eclipse.actf.model.dom.odf.form.FormControlElement;
-import org.w3c.dom.Element;
-
-
-abstract class FormControlElementImpl extends ODFElementImpl implements
- FormControlElement {
- protected FormControlElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrFormLabel() {
- if (hasAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_LABEL))
- return getAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_LABEL);
- return null;
- }
-
- public String getAttrFormTabIndex() {
- if (hasAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_TAB_INDEX))
- return getAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_TAB_INDEX);
- return null;
- }
-
- public boolean getAttrFormTabStop() {
- if (hasAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_TAB_INDEX)) {
- return new Boolean(getAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_TAB_STOP)).booleanValue();
- }
- return false;
- }
-
- public String getAttrFormControlImplementation() {
- if (hasAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_CONTROL_IMPLEMENTATION))
- return getAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_CONTROL_IMPLEMENTATION);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormElementImpl.java
deleted file mode 100644
index 6185e6e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.form.FormElement;
-import org.w3c.dom.Element;
-
-
-class FormElementImpl extends ODFElementImpl implements FormElement {
- private static final long serialVersionUID = -6846544543373236257L;
-
- protected FormElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormNodeFactory.java
deleted file mode 100644
index 357c82e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormNodeFactory.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.form.FormConstants;
-import org.w3c.dom.Element;
-
-
-public class FormNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(FormConstants.ELEMENT_BUTTON, ButtonElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_CHECKBOX, CheckboxElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_COLUMN, ColumnElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_COMBOBOX, ComboboxElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_DATE, DateElementImpl.class);
- tagMap
- .put(FormConstants.ELEMENT_FIXED_TEXT,
- FixedTextElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_FORMATTED_TEXT,
- FormattedTextElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_FORM, FormElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_FRAME, FrameElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_ITEM, ItemElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_LISTBOX, ListboxElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_NUMBER, NumberElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_OPTION, OptionElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_PROPERTY, PropertyElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_RADIO, RadioElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_TEXTAREA, TextareaElementImpl.class);
- tagMap.put(FormConstants.ELEMENT_TEXT, TextElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormattedTextElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormattedTextElementImpl.java
deleted file mode 100644
index bab39e5..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FormattedTextElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.FormattedTextElement;
-import org.w3c.dom.Element;
-
-
-class FormattedTextElementImpl extends FormControlElementImpl implements
- FormattedTextElement {
- private static final long serialVersionUID = -1130995199483752922L;
-
- protected FormattedTextElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FrameElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FrameElementImpl.java
deleted file mode 100644
index 3917810..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/FrameElementImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.FrameElement;
-import org.w3c.dom.Element;
-
-
-class FrameElementImpl extends FormControlElementImpl implements FrameElement {
- private static final long serialVersionUID = -192728642147953013L;
-
- protected FrameElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ItemElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ItemElementImpl.java
deleted file mode 100644
index d3607dc..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ItemElementImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.ItemElement;
-import org.w3c.dom.Element;
-
-
-class ItemElementImpl extends FormControlElementImpl implements ItemElement {
- private static final long serialVersionUID = -4502206989276422459L;
-
- protected ItemElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ListboxElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ListboxElementImpl.java
deleted file mode 100644
index f55ce00..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/ListboxElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.ListboxElement;
-import org.w3c.dom.Element;
-
-
-class ListboxElementImpl extends FormControlElementImpl implements
- ListboxElement {
- private static final long serialVersionUID = 2155057252305487547L;
-
- protected ListboxElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/NumberElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/NumberElementImpl.java
deleted file mode 100644
index d3715f3..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/NumberElementImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.NumberElement;
-import org.w3c.dom.Element;
-
-
-class NumberElementImpl extends FormControlElementImpl implements NumberElement {
- private static final long serialVersionUID = -4331706550769402156L;
-
- protected NumberElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/OptionElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/OptionElementImpl.java
deleted file mode 100644
index f6cdf18..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/OptionElementImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.OptionElement;
-import org.w3c.dom.Element;
-
-
-class OptionElementImpl extends FormControlElementImpl implements OptionElement {
- private static final long serialVersionUID = 995679446122524750L;
-
- protected OptionElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/PropertyElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/PropertyElementImpl.java
deleted file mode 100644
index 5fb24ae..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/PropertyElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.form.PropertyElement;
-import org.w3c.dom.Element;
-
-
-class PropertyElementImpl extends ODFElementImpl implements PropertyElement {
- private static final long serialVersionUID = 1939606030618545442L;
-
- protected PropertyElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/RadioElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/RadioElementImpl.java
deleted file mode 100644
index f80dd1a..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/RadioElementImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.RadioElement;
-import org.w3c.dom.Element;
-
-
-class RadioElementImpl extends FormControlElementImpl implements RadioElement {
- private static final long serialVersionUID = -6734285918714281454L;
-
- protected RadioElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/TextElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/TextElementImpl.java
deleted file mode 100644
index db1a21d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/TextElementImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.TextElement;
-import org.w3c.dom.Element;
-
-
-class TextElementImpl extends FormControlElementImpl implements TextElement {
- private static final long serialVersionUID = 2295461323202362491L;
-
- protected TextElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/TextareaElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/TextareaElementImpl.java
deleted file mode 100644
index 8fac97b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/form/impl/TextareaElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.form.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.form.TextareaElement;
-import org.w3c.dom.Element;
-
-
-class TextareaElementImpl extends FormControlElementImpl implements
- TextareaElement {
- private static final long serialVersionUID = 9194270798796181250L;
-
- protected TextareaElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/format/FormatConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/format/FormatConstants.java
deleted file mode 100644
index 3b50eb3..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/format/FormatConstants.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.format;
-
-public final class FormatConstants {
- static public final String FORMAT_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0";
-
- static public final String ATTR_BACKGROUND_COLOR = "background-color";
-
- static public final String ATTR_BREAK_BEFORE = "break-before";
-
- static public final String ATTR_FONT_FAMILY = "font-family";
-
- static public final String ATTR_FONT_SIZE = "font-size";
-
- static public final String ATTR_FONT_STYLE = "font-style";
-
- static public final String ATTR_FONT_WEIGHT = "font-weight";
-
- static public final String ATTR_COLOR = "color";
-
- static public final String ATTR_MARGIN_TOP = "margin-top";
-
- static public final String ATTR_MARGIN_BOTTOM = "margin-bottom";
-
- static public final String ATTR_MARGIN_LEFT = "margin-left";
-
- static public final String ATTR_MARGIN_RIGHT = "margin-right";
-
- static public final String ATTR_PAGE_WIDTH = "page-width";
-
- static public final String ATTR_PAGE_HEIGHT = "page-height";
-
- static public final String ATTR_BORDER = "border";
-
- static public final String ATTR_BORDER_TOP = "border-top";
-
- static public final String ATTR_BORDER_BOTTOM = "border-bottom";
-
- static public final String ATTR_BORDER_LEFT = "border-left";
-
- static public final String ATTR_BORDER_RIGHT = "border-right";
-
- static public final String ATTR_PADDING = "padding";
-
- static public final String ATTR_TEXT_ALIGN = "text-align";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/manifest/ManifestConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/manifest/ManifestConstants.java
deleted file mode 100644
index 2f7c294..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/manifest/ManifestConstants.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.manifest;
-
-public final class ManifestConstants {
- static public final String MANIFEST_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0";
-
- static public final String ELEMENT_ENCRYPTION_DATA = "encryption-data";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/NumberConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/NumberConstants.java
deleted file mode 100644
index 18db4b1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/NumberConstants.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.number;
-
-public final class NumberConstants {
- static public final String NUMBER_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0";
-
- static public final String ELEMENT_NUMBER = "number";
-
- static public final String ELEMENT_TEXT = "text";
-
- static public final String ELEMENT_NUMBER_STYLE = "number-style";
-
- static public final String ATTR_MIN_INTEGER_DIGITS = "min-integer-digits";
-
- static public final String ATTR_DECIMAL_PLACES = "decimal-places";
-
- static public final String ATTR_GROUPING = "grouping";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/NumberElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/NumberElement.java
deleted file mode 100644
index eaaaaed..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/NumberElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.number;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface NumberElement extends ODFElement {
- public int getAttrNumberMinIntegerDigits();
-
- public int getAttrNumberDecimalPlaces();
-
- public boolean getAttrNumberGrouping();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/NumberStyleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/NumberStyleElement.java
deleted file mode 100644
index 339263e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/NumberStyleElement.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.number;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface NumberStyleElement extends ODFElement {
- public String getAttrStyleName();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/TextElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/TextElement.java
deleted file mode 100644
index 7258c9d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/TextElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.number;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface TextElement extends ODFElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/NumberElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/NumberElementImpl.java
deleted file mode 100644
index a156cdd..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/NumberElementImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.number.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.number.NumberConstants;
-import org.eclipse.actf.model.dom.odf.number.NumberElement;
-import org.w3c.dom.Element;
-
-
-class NumberElementImpl extends ODFElementImpl implements NumberElement {
- private static final long serialVersionUID = -7712632967403051489L;
-
- protected NumberElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public int getAttrNumberMinIntegerDigits() {
- if (hasAttributeNS(NumberConstants.NUMBER_NAMESPACE_URI,
- NumberConstants.ATTR_MIN_INTEGER_DIGITS)) {
- return new Integer(getAttributeNS(
- NumberConstants.NUMBER_NAMESPACE_URI,
- NumberConstants.ATTR_MIN_INTEGER_DIGITS)).intValue();
- }
- return -1;
- }
-
- public int getAttrNumberDecimalPlaces() {
- if (hasAttributeNS(NumberConstants.NUMBER_NAMESPACE_URI,
- NumberConstants.ATTR_DECIMAL_PLACES)) {
- return new Integer(getAttributeNS(
- NumberConstants.NUMBER_NAMESPACE_URI,
- NumberConstants.ATTR_DECIMAL_PLACES)).intValue();
- }
- return -1;
- }
-
- public boolean getAttrNumberGrouping() {
- if (hasAttributeNS(NumberConstants.NUMBER_NAMESPACE_URI,
- NumberConstants.ATTR_GROUPING)) {
- return new Boolean(getAttributeNS(
- NumberConstants.NUMBER_NAMESPACE_URI,
- NumberConstants.ATTR_GROUPING)).booleanValue();
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/NumberNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/NumberNodeFactory.java
deleted file mode 100644
index d06792a..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/NumberNodeFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.number.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.number.NumberConstants;
-import org.w3c.dom.Element;
-
-
-public class NumberNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(NumberConstants.ELEMENT_NUMBER, NumberElementImpl.class);
- tagMap.put(NumberConstants.ELEMENT_TEXT, TextElementImpl.class);
- tagMap.put(NumberConstants.ELEMENT_NUMBER_STYLE,
- NumberStyleElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/NumberStyleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/NumberStyleElementImpl.java
deleted file mode 100644
index 8a0d97e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/NumberStyleElementImpl.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.number.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.number.NumberStyleElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.w3c.dom.Element;
-
-
-class NumberStyleElementImpl extends ODFElementImpl implements
- NumberStyleElement {
- private static final long serialVersionUID = -6996192017442148098L;
-
- protected NumberStyleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrStyleName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME);
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/TextElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/TextElementImpl.java
deleted file mode 100644
index dcdf996..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/number/impl/TextElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.number.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.number.TextElement;
-import org.w3c.dom.Element;
-
-
-class TextElementImpl extends ODFElementImpl implements TextElement {
- private static final long serialVersionUID = 6440502586761722593L;
-
- protected TextElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/AutomaticStylesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/AutomaticStylesElement.java
deleted file mode 100644
index 0e9ff9e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/AutomaticStylesElement.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-
-
-public interface AutomaticStylesElement extends ODFElement {
- public StyleElement getStyleElementByName(String name);
-
- public long getStyleElementSize();
-
- public StyleElement getStyleElement(long index);
-
- public void addStyleElement(StyleElement element);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/BodyElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/BodyElement.java
deleted file mode 100644
index 59b53cc..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/BodyElement.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface BodyElement extends ODFElement {
- public ContentBaseElement getContent();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/ChartElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/ChartElement.java
deleted file mode 100644
index 902c3fb..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/ChartElement.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.chart.LegendElement;
-import org.eclipse.actf.model.dom.odf.chart.PlotAreaElement;
-import org.eclipse.actf.model.dom.odf.chart.TitleElement;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-
-
-public interface ChartElement extends ODFElement {
- public org.eclipse.actf.model.dom.odf.chart.ChartElement getChartChartElement();
-
- public TitleElement getChartTitleElement();
-
- public PlotAreaElement getChartPlotAreaElement();
-
- public LegendElement getChartLegendElement();
-
- public TableElement getChartTableElement();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/DocumentContentElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/DocumentContentElement.java
deleted file mode 100644
index 2434b9d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/DocumentContentElement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-
-
-public interface DocumentContentElement extends ODFElement {
- public double getAttrOfficeVersion();
-
- public BodyElement getBodyElement();
-
- public void save(String uri);
-
- public StyleElement createStyle(String family);
-
- public FontFaceDeclsElement getFontFaceDeclsElement();
-
- public AutomaticStylesElement getAutomaticStylesElement();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/DocumentStylesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/DocumentStylesElement.java
deleted file mode 100644
index b3775bf..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/DocumentStylesElement.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface DocumentStylesElement extends ODFElement {
- double getAttrOfficeVersion();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/DrawingElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/DrawingElement.java
deleted file mode 100644
index e055f65..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/DrawingElement.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.draw.PageElement;
-
-
-public interface DrawingElement extends ContentBaseElement {
- public PageElement getPage(long idx);
-
- public long getPageSize();
-
- public PageElement createPage(long idx);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/FontFaceDeclsElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/FontFaceDeclsElement.java
deleted file mode 100644
index 5d062a1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/FontFaceDeclsElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface FontFaceDeclsElement extends ODFElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/FormsElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/FormsElement.java
deleted file mode 100644
index 6e90a70..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/FormsElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface FormsElement extends ODFElement {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/MasterStylesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/MasterStylesElement.java
deleted file mode 100644
index df7dcc7..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/MasterStylesElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface MasterStylesElement extends ODFElement {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/OfficeConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/OfficeConstants.java
deleted file mode 100644
index 160ea12..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/OfficeConstants.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-public final class OfficeConstants {
- static public final String OFFICE_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
-
- static public final String ELEMENT_DOCUMENT_CONTENT = "document-content";
-
- static public final String ELEMENT_DOCUMENT_STYLES = "document-styles";
-
- static public final String ELEMENT_AUTOMATIC_STYLES = "automatic-styles";
-
- static public final String ELEMENT_BODY = "body";
-
- static public final String ELEMENT_TEXT = "text";
-
- static public final String ELEMENT_PRESENTATION = "presentation";
-
- static public final String ELEMENT_SPREADSHEET = "spreadsheet";
-
- static public final String ELEMENT_DRAWING = "drawing";
-
- static public final String ELEMENT_CHART = "chart";
-
- static public final String ELEMENT_FONT_FACE_DECLS = "font-face-decls";
-
- static public final String ELEMENT_FORMS = "forms";
-
- static public final String ELEMENT_MASTER_STYLES = "master-styles";
-
- static public final String ATTR_VERSION = "version";
-
- static public final String ATTR_VALUE_TYPE = "value-type";
-
- static public final String ATTR_VALUE = "value";
-
- static public final String ATTR_STYLE_SOURCE = "style-source";
-
- static public final String ATTR_MENUBAR_VISIBLE = "menubar-visible";
-
- static public final String ATTR_OBJECTBAR_VISIBLE = "objectbar-visible";
-
- static public final String ATTR_TOOLBAR_VISIBLE = "toolbar-visible";
-
- static public final String ATTR_FUNCTIONBAR_VISIBLE = "functionbar-visible";
-
- static public final String ATTR_STATUSBAR_VISIBLE = "statusbar-visible";
-
- static public final String ATTR_ROW_COLUMN_HEADER_VISIBLE = "row-column-header-visible";
-
- static public final String ATTR_FORMULABAR_TOGGLE = "formulabar-toggle";
-
- static public final String ATTR_HYPERLINKBAR_TOGGLE = "hyperlinkbar-toggle";
-
- static public final String ATTR_TITLE = "title";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/PresentationElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/PresentationElement.java
deleted file mode 100644
index 6f3f4bd..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/PresentationElement.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-public interface PresentationElement extends DrawingElement {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/SpreadSheetElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/SpreadSheetElement.java
deleted file mode 100644
index 608b9f2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/SpreadSheetElement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-
-
-public interface SpreadSheetElement extends ContentBaseElement {
- public boolean getAttrTableStructureProtected();
-
- public TableElement getTable(long idx);
-
- public TableElement getTableByName(String name);
-
- public long getTableSize();
-
- public TableElement createTable(long idx, String name);
-
- public TableElement getActiveTable();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/TextElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/TextElement.java
deleted file mode 100644
index e0fc1fb..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/TextElement.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office;
-
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-import org.eclipse.actf.model.dom.odf.range.TextRange;
-
-
-public interface TextElement extends ContentBaseElement, ITextElementContainer {
- TextRange select(long seltopx, long seltopy, long selendx, long selendy);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/AutomaticStylesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/AutomaticStylesElementImpl.java
deleted file mode 100644
index 51d87a9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/AutomaticStylesElementImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.office.AutomaticStylesElement;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.w3c.dom.Element;
-
-
-class AutomaticStylesElementImpl extends ODFElementImpl implements
- AutomaticStylesElement {
- private static final long serialVersionUID = 3389268071502737826L;
-
- protected AutomaticStylesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public StyleElement getStyleElementByName(String name) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getStyleElementSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public StyleElement getStyleElement(long index) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void addStyleElement(StyleElement element) {
- // TODO Auto-generated method stub
-
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/BodyElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/BodyElementImpl.java
deleted file mode 100644
index 79c7f5b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/BodyElementImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.office.BodyElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-
-class BodyElementImpl extends ODFElementImpl implements BodyElement {
- private static final long serialVersionUID = -3847937030086999653L;
-
- static private final List<Class> validBodyRootElement = new Vector<Class>();
- static {
- validBodyRootElement.add(DrawingElementImpl.class);
- validBodyRootElement.add(SpreadSheetElementImpl.class);
- validBodyRootElement.add(ChartElementImpl.class);
- }
-
- protected BodyElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public ContentBaseElement getContent() {
- NodeList children = getChildNodes();
- if ((children != null) && (children.getLength() != 0)) {
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof ContentBaseElement)
- return (ContentBaseElement) children.item(i);
- }
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/ChartElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/ChartElementImpl.java
deleted file mode 100644
index 8cced35..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/ChartElementImpl.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.LegendElement;
-import org.eclipse.actf.model.dom.odf.chart.PlotAreaElement;
-import org.eclipse.actf.model.dom.odf.chart.TitleElement;
-import org.eclipse.actf.model.dom.odf.office.ChartElement;
-import org.eclipse.actf.model.dom.odf.range.IContentRange;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-
-class ChartElementImpl extends ODFElementImpl implements ChartElement {
- private static final long serialVersionUID = 8537717378251071515L;
-
- protected ChartElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public org.eclipse.actf.model.dom.odf.chart.ChartElement getChartChartElement() {
- NodeList children = getChildNodes();
- if ((children != null) && (children.getLength() != 0)) {
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof org.eclipse.actf.model.dom.odf.chart.ChartElement)
- return (org.eclipse.actf.model.dom.odf.chart.ChartElement) children
- .item(i);
- }
- }
- return null;
- }
-
- public TitleElement getChartTitleElement() {
- org.eclipse.actf.model.dom.odf.chart.ChartElement chartChartElemnt = getChartChartElement();
- NodeList children = chartChartElemnt.getChildNodes();
- if ((children != null) && (children.getLength() != 0)) {
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof TitleElement)
- return (TitleElement) children.item(i);
- }
- }
- return null;
- }
-
- public PlotAreaElement getChartPlotAreaElement() {
- org.eclipse.actf.model.dom.odf.chart.ChartElement chartChartElemnt = getChartChartElement();
- NodeList children = chartChartElemnt.getChildNodes();
- if ((children != null) && (children.getLength() != 0)) {
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof PlotAreaElement)
- return (PlotAreaElement) children.item(i);
- }
- }
- return null;
- }
-
- public LegendElement getChartLegendElement() {
- org.eclipse.actf.model.dom.odf.chart.ChartElement chartChartElemnt = getChartChartElement();
- NodeList children = chartChartElemnt.getChildNodes();
- if ((children != null) && (children.getLength() != 0)) {
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof LegendElement)
- return (LegendElement) children.item(i);
- }
- }
- return null;
- }
-
- public TableElement getChartTableElement() {
- org.eclipse.actf.model.dom.odf.chart.ChartElement chartChartElemnt = getChartChartElement();
- NodeList children = chartChartElemnt.getChildNodes();
- if ((children != null) && (children.getLength() != 0)) {
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof TableElement)
- return (TableElement) children.item(i);
- }
- }
- return null;
- }
-
- public ContentType getContentType() {
- return ContentType.CHART;
- }
-
- public IContentRange createRange() {
- // TODO Auto-generated method stub
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/DocumentContentElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/DocumentContentElementImpl.java
deleted file mode 100644
index 5f50e3e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/DocumentContentElementImpl.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.office.AutomaticStylesElement;
-import org.eclipse.actf.model.dom.odf.office.BodyElement;
-import org.eclipse.actf.model.dom.odf.office.DocumentContentElement;
-import org.eclipse.actf.model.dom.odf.office.FontFaceDeclsElement;
-import org.eclipse.actf.model.dom.odf.office.OfficeConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-
-class DocumentContentElementImpl extends ODFElementImpl implements
- DocumentContentElement {
- private static final long serialVersionUID = -6010974975405611664L;
-
- protected DocumentContentElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public double getAttrOfficeVersion() {
- if (hasAttributeNS(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_VERSION)) {
- return new Double(getAttributeNS(
- OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_VERSION)).doubleValue();
- }
- return -1.0;
- }
-
- public FontFaceDeclsElement getFontFaceDeclsElement() {
- NodeList children = getChildNodes();
- if ((children != null) && (children.getLength() != 0)) {
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof FontFaceDeclsElement) {
- return (FontFaceDeclsElement) children.item(i);
- }
- }
- }
- return null;
- }
-
- public AutomaticStylesElement getAutomaticStylesElement() {
- NodeList children = getChildNodes();
- if ((children != null) && (children.getLength() != 0)) {
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof AutomaticStylesElement) {
- return (AutomaticStylesElement) children.item(i);
- }
- }
- }
- return null;
- }
-
- public BodyElement getBodyElement() {
- NodeList body = XPathUtil.evalXPathNodeList(this,
- "./*[namespace-uri()='" + OfficeConstants.OFFICE_NAMESPACE_URI
- + "' and local-name()='" + OfficeConstants.ELEMENT_BODY
- + "']");
- if ((body == null) || (body.getLength() != 1)) {
- new ODFException("ODF document must have one office:body element")
- .printStackTrace();
- return null;
- }
- return (BodyElement) body.item(0);
- }
-
- public void save(String uri) {
- // TODO Auto-generated method stub
-
- }
-
- public StyleElement createStyle(String family) {
- // TODO Auto-generated method stub
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/DocumentStylesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/DocumentStylesElementImpl.java
deleted file mode 100644
index e258a00..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/DocumentStylesElementImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.office.DocumentStylesElement;
-import org.eclipse.actf.model.dom.odf.office.OfficeConstants;
-import org.w3c.dom.Element;
-
-
-class DocumentStylesElementImpl extends ODFElementImpl implements
- DocumentStylesElement {
- private static final long serialVersionUID = 5125587112923168320L;
-
- protected DocumentStylesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public double getAttrOfficeVersion() {
- if (hasAttributeNS(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_VERSION)) {
- return new Double(getAttributeNS(
- OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_VERSION)).doubleValue();
- }
- return -1.0;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/DrawingElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/DrawingElementImpl.java
deleted file mode 100644
index 8ff82a1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/DrawingElementImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.PageElement;
-import org.eclipse.actf.model.dom.odf.office.DrawingElement;
-import org.eclipse.actf.model.dom.odf.range.IContentRange;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-
-class DrawingElementImpl extends ODFElementImpl implements DrawingElement {
- private static final long serialVersionUID = -1324161975256395109L;
-
- protected DrawingElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public ContentType getContentType() {
- return ContentType.DRAW;
- }
-
- public IContentRange createRange() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public PageElement getPage(long idx) {
- NodeList nl = XPathUtil.evalXPathNodeList(this, "./*[namespace-uri()='"
- + DrawConstants.DRAW_NAMESPACE_URI + "' and local-name()='"
- + DrawConstants.ELEMENT_PAGE + "']");
- if ((idx < 0) || (idx >= nl.getLength())) {
- new ODFException("invalid page index").printStackTrace();
- return null;
- }
- return (PageElement) nl.item((int) idx);
- }
-
- public long getPageSize() {
- return XPathUtil.evalXPathNodeList(
- this,
- "./*[namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_PAGE
- + "']").getLength();
- }
-
- public PageElement createPage(long idx) {
- // TODO Auto-generated method stub
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/FontFaceDeclsElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/FontFaceDeclsElementImpl.java
deleted file mode 100644
index f92c76f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/FontFaceDeclsElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.office.FontFaceDeclsElement;
-import org.w3c.dom.Element;
-
-
-class FontFaceDeclsElementImpl extends ODFElementImpl implements
- FontFaceDeclsElement {
- private static final long serialVersionUID = 5773282340673673019L;
-
- protected FontFaceDeclsElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/FormsElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/FormsElementImpl.java
deleted file mode 100644
index c55f288..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/FormsElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.office.FormsElement;
-import org.w3c.dom.Element;
-
-
-class FormsElementImpl extends ODFElementImpl implements FormsElement {
- private static final long serialVersionUID = 908029860325580897L;
-
- protected FormsElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/MasterStylesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/MasterStylesElementImpl.java
deleted file mode 100644
index c722870..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/MasterStylesElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.office.MasterStylesElement;
-import org.w3c.dom.Element;
-
-
-class MasterStylesElementImpl extends ODFElementImpl implements
- MasterStylesElement {
- private static final long serialVersionUID = -2552892516205715295L;
-
- protected MasterStylesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/OfficeNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/OfficeNodeFactory.java
deleted file mode 100644
index cf0567a..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/OfficeNodeFactory.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.office.OfficeConstants;
-import org.w3c.dom.Element;
-
-
-public class OfficeNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(OfficeConstants.ELEMENT_AUTOMATIC_STYLES,
- AutomaticStylesElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_BODY, BodyElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_CHART, ChartElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_DOCUMENT_CONTENT,
- DocumentContentElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_DOCUMENT_STYLES,
- DocumentStylesElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_DRAWING, DrawingElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_FONT_FACE_DECLS,
- FontFaceDeclsElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_FORMS, FormsElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_MASTER_STYLES,
- MasterStylesElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_PRESENTATION,
- PresentationElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_SPREADSHEET,
- SpreadSheetElementImpl.class);
- tagMap.put(OfficeConstants.ELEMENT_TEXT, TextElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/PresentationElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/PresentationElementImpl.java
deleted file mode 100644
index 5418d31..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/PresentationElementImpl.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.office.PresentationElement;
-import org.w3c.dom.Element;
-
-
-class PresentationElementImpl extends DrawingElementImpl implements
- PresentationElement {
- private static final long serialVersionUID = -2326886317013939141L;
-
- protected PresentationElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public ContentType getContentType() {
- return ContentType.PRESENTATION;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/SpreadSheetElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/SpreadSheetElementImpl.java
deleted file mode 100644
index 48b155e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/SpreadSheetElementImpl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.office.SpreadSheetElement;
-import org.eclipse.actf.model.dom.odf.range.IContentRange;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-
-class SpreadSheetElementImpl extends ODFElementImpl implements
- SpreadSheetElement {
- private static final long serialVersionUID = -1698659854810052305L;
-
- protected SpreadSheetElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public ContentType getContentType() {
- return ContentType.SPREADSHEET;
- }
-
- public IContentRange createRange() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean getAttrTableStructureProtected() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STRUCTURE_PROTECTED)) {
- return new Boolean(getAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STRUCTURE_PROTECTED)).booleanValue();
- }
- return false;
- }
-
- public TableElement getTable(long idx) {
- NodeList nl = getElementsByTagNameNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ELEMENT_TABLE);
- return (TableElement) nl.item((int) idx);
- }
-
- public TableElement getTableByName(String name) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getTableSize() {
- NodeList nl = getElementsByTagNameNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ELEMENT_TABLE);
- return nl.getLength();
- }
-
- public TableElement createTable(long idx, String name) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public TableElement getActiveTable() {
- // TODO Auto-generated method stub
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/TextElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/TextElementImpl.java
deleted file mode 100644
index 64b5cca..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/office/impl/TextElementImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.office.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.office.TextElement;
-import org.eclipse.actf.model.dom.odf.range.IContentRange;
-import org.eclipse.actf.model.dom.odf.range.TextRange;
-import org.eclipse.actf.model.dom.odf.range.impl.ITextElementContainerUtil;
-import org.w3c.dom.Element;
-
-
-class TextElementImpl extends ODFElementImpl implements TextElement {
- private static final long serialVersionUID = -7728910075988439163L;
-
- protected TextElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public TextRange select(long seltopx, long seltopy, long selendx,
- long selendy) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public ContentType getContentType() {
- return ContentType.WRITE;
- }
-
- public IContentRange createRange() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getContentSize() {
- return ITextElementContainerUtil.getContentSize(this);
- }
-
- public Iterator getChildIterator() {
- return ITextElementContainerUtil.getChildIterator(this);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/NotesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/NotesElement.java
deleted file mode 100644
index c33e14d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/NotesElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.presentation;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-
-public interface NotesElement extends ODFElement, IStylable, IEditable,
- ITextElementContainer {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/PresentationConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/PresentationConstants.java
deleted file mode 100644
index 3f2c149..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/PresentationConstants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.presentation;
-
-public final class PresentationConstants {
- static public final String PRESENTATION_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0";
-
- static public final String ELEMENT_NOTES = "notes";
-
- static public final String ATTR_DISPLAY_HEADER = "display-header";
-
- static public final String ATTR_DISPLAY_FOOTER = "display-footer";
-
- static public final String ATTR_DISPLAY_PAGE_NUMBER = "display-page-number";
-
- static public final String ATTR_DISPLAY_DATE_TIME = "display-date-time";
-
- static public final String ATTR_CLASS = "class";
-
- static public final String ATTR_CLASS_VALUE_NOTES = "notes";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/impl/NotesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/impl/NotesElementImpl.java
deleted file mode 100644
index 8a875e2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/impl/NotesElementImpl.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.presentation.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IEditListener;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.presentation.NotesElement;
-import org.w3c.dom.Element;
-
-
-class NotesElementImpl extends ODFStylableElementImpl implements NotesElement {
- private static final long serialVersionUID = 7810292508884604322L;
-
- protected NotesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public Object getValue() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setValue(Object data) {
- // TODO Auto-generated method stub
-
- }
-
- public void remove() {
- // TODO Auto-generated method stub
-
- }
-
- public void insert(IEditable data) {
- // TODO Auto-generated method stub
-
- }
-
- public void addEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public long getContentSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public Iterator getChildIterator() {
- // TODO Auto-generated method stub
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/impl/PresentationNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/impl/PresentationNodeFactory.java
deleted file mode 100644
index b3dd3e8..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/presentation/impl/PresentationNodeFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.presentation.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.presentation.PresentationConstants;
-import org.w3c.dom.Element;
-
-
-public class PresentationNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(PresentationConstants.ELEMENT_NOTES, NotesElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/CellRange.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/CellRange.java
deleted file mode 100644
index 0439538..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/CellRange.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.range;
-
-import org.eclipse.actf.model.dom.odf.table.TableCellElement;
-
-public interface CellRange extends IContentRange {
- public void setCellRange(long left, long top, long right, long bottom);
-
- public TableCellElement getCell(long column, long row);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/IContentCursor.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/IContentCursor.java
deleted file mode 100644
index fb06b23..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/IContentCursor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.range;
-
-public interface IContentCursor {
- public void focus(IContentRange range);
-
- public IContentRange getSelection();
-
- public void next();
-
- public void prev();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/IContentRange.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/IContentRange.java
deleted file mode 100644
index 82c57fa..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/IContentRange.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.range;
-
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-public interface IContentRange extends IEditable, IStylable {
- String getType();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/ITextElementContainer.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/ITextElementContainer.java
deleted file mode 100644
index 03d07b2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/ITextElementContainer.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.range;
-
-import java.util.Iterator;
-
-public interface ITextElementContainer {
- public long getContentSize();
-
- public Iterator getChildIterator();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/TableCellRange.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/TableCellRange.java
deleted file mode 100644
index 770bc69..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/TableCellRange.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.range;
-
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-
-public interface TableCellRange extends CellRange {
- TableElement getTable();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/TextRange.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/TextRange.java
deleted file mode 100644
index 4b7d89d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/TextRange.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.range;
-
-public interface TextRange extends IContentRange, ITextElementContainer {
- TextRange select(long seltopx, long seltopy, long selendx, long selendy);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/impl/ITextElementContainerUtil.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/impl/ITextElementContainerUtil.java
deleted file mode 100644
index b9b031f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/range/impl/ITextElementContainerUtil.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.range.impl;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-public final class ITextElementContainerUtil {
-
- private static List getChildList(Element el) {
- List<Node> list = new Vector<Node>();
- NodeList nl = el.getChildNodes();
- for (int i = 0; i < nl.getLength(); i++) {
- Node child = nl.item(i);
- if (child instanceof ITextElementContainer) {
- list.add(child);
- }
- }
- return list;
- }
-
- public static long getContentSize(Element el) {
- return getChildList(el).size();
- }
-
- public static Iterator getChildIterator(Element el) {
- return getChildList(el).iterator();
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/ChartPropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/ChartPropertiesElement.java
deleted file mode 100644
index 1ec15f9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/ChartPropertiesElement.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface ChartPropertiesElement extends StylePropertiesBase {
- public String getAttrStyleDirection();
-
- public boolean getAttrChartJapaneseCandleStick();
-
- public boolean getAttrChartStockWithVolume();
-
- public boolean getAttrChartThreeDimensional();
-
- public boolean getAttrChartDeep();
-
- public boolean getAttrChartLines();
-
- public String getAttrChartInterpolation();
-
- public String getAttrChartSymbolType();
-
- public boolean getAttrChartVertical();
-
- public int getAttrChartLinesUsed();
-
- public boolean getAttrChartConnectBars();
-
- public String getAttrChartSeriesSource();
-
- public boolean getAttrChartMeanValue();
-
- public double getAttrChartErrorMargin();
-
- public double getAttrChartErrorLowerLimit();
-
- public double getAttrChartErrorUpperLimit();
-
- public String getAttrChartErrorCategory();
-
- public double getAttrChartErrorPercentage();
-
- public String getAttrChartRegressionType();
-
- public String getAttrChartDataLabelNumber();
-
- public boolean getAttrChartDataLabelText();
-
- public boolean getAttrChartDataLabelSymbol();
-
- public boolean getAttrChartDisplayLabel();
-
- public boolean getAttrChartTickMarksMajorInner();
-
- public boolean getAttrChartTickMarksMajorOuter();
-
- public boolean getAttrChartLogarithmic();
-
- public boolean getAttrChartTextOverlap();
-
- public boolean getAttrTextLineBreak();
-
- public String getAttrChartLabelArrangement();
-
- public boolean getAttrChartVisible();
-
- public int getAttrChartGapWidth();
-
- public int getAttrChartOverlap();
-
- public String getAttrChartSolidType();
-
- public double getAttrChartOrigin();
-
- public double getAttrChartMinimum();
-
- public double getAttrChartMaximum();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/DefaultStyleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/DefaultStyleElement.java
deleted file mode 100644
index 5465dfd..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/DefaultStyleElement.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface DefaultStyleElement extends StyleElement {
- String getAttrStyleFamily();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/DrawingPagePropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/DrawingPagePropertiesElement.java
deleted file mode 100644
index 921cd98..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/DrawingPagePropertiesElement.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface DrawingPagePropertiesElement extends StylePropertiesBase {
- public boolean getAttrPresentationDisplayHeader();
-
- public boolean getAttrPresentationDisplayFooter();
-
- public boolean getAttrPresentationDisplayPageNumber();
-
- public boolean getAttrPresentationDisplayDateTime();
-
- public String getAttrDrawBackgroundSize();
-
- public String getAttrDrawFill();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/FontFaceElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/FontFaceElement.java
deleted file mode 100644
index 8724a54..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/FontFaceElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface FontFaceElement extends StylePropertiesBase {
- public String getAttrStyleName();
-
- public String getAttrSvgFontFamily();
-
- public String getAttrSvgFontFamilyGeneric();
-
- public String getAttrStyleFontPitch();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/GraphicPropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/GraphicPropertiesElement.java
deleted file mode 100644
index d2361d0..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/GraphicPropertiesElement.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-import org.eclipse.actf.model.dom.odf.draw.GradientElement;
-import org.eclipse.actf.model.dom.odf.draw.OpacityElement;
-
-public interface GraphicPropertiesElement extends StylePropertiesBase {
- public String getAttrDrawStroke();
-
- public String getAttrDrawStrokeDash();
-
- public String getAttrSvgStrokeWidth();
-
- public String getAttrSvgStrokeColor();
-
- public String getAttrDrawMarkerStartWidth();
-
- public String getAttrDrawMarkerEndWidth();
-
- public String getAttrSvgStrokeOpacity();
-
- public String getAttrDrawOpacity();
-
- public OpacityElement getAttrDrawOpacityName();
-
- public String getAttrDrawFill();
-
- public String getAttrDrawFillColor();
-
- public GradientElement getAttrDrawFillGradientName();
-
- public int getAttrDrawGradientStepCount();
-
- public String getAttrDrawFillImageName();
-
- public String getAttrDrawFillImageWidth();
-
- public String getAttrDrawFillImageHeight();
-
- public String getAttrStyleRepeat();
-
- public String getAttrDrawFillImageRefPointX();
-
- public String getAttrDrawFillImageRefPointY();
-
- public String getAttrDrawFillImageRefPoint();
-
- public String getAttrDrawTileRepeatOffset();
-
- public String getAttrStyleHorizontalPos();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/ListLevelPropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/ListLevelPropertiesElement.java
deleted file mode 100644
index 922f960..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/ListLevelPropertiesElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface ListLevelPropertiesElement extends StylePropertiesBase {
- public String getAttrSpaceBefore();
-
- public void setAttrSpaceBefore(String length);
-
- public String getAttrLabelWidth();
-
- public void setAttrLabelWidth(String width);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/MapElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/MapElement.java
deleted file mode 100644
index d8cca41..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/MapElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface MapElement extends ODFElement {
- public String getAttrStyleCondition();
-
- public String getAttrStyleApplyStyleName();
-
- public String getAttrStyleBaseCellAddress();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/MasterPageElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/MasterPageElement.java
deleted file mode 100644
index 36babbc..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/MasterPageElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface MasterPageElement extends ODFElement {
- public String getAttrStyleName();
-
- public String getAttrStylePageLayoutName();
-
- public String getAttrDrawStyleName();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/PageLayoutElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/PageLayoutElement.java
deleted file mode 100644
index 58042f2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/PageLayoutElement.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface PageLayoutElement extends ODFElement {
- public String getAttrStyleName();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/PageLayoutPropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/PageLayoutPropertiesElement.java
deleted file mode 100644
index 7b995d7..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/PageLayoutPropertiesElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface PageLayoutPropertiesElement extends StylePropertiesBase {
- public String getAttrFormatMarginTop();
-
- public String getAttrFormatMarginBottom();
-
- public String getAttrFormatMarginLeft();
-
- public String getAttrFormatMarginRight();
-
- public String getAttrFormatPageWidth();
-
- public String getAttrFormatPageHeight();
-
- public String getAttrStylePrintOrientation();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/ParagraphPropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/ParagraphPropertiesElement.java
deleted file mode 100644
index d89a911..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/ParagraphPropertiesElement.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface ParagraphPropertiesElement extends StylePropertiesBase {
- public TabStopsElement getTabStopsElement();
-
- public String getAttrFormatLineHeight();
-
- public void setAttrFormatLineHeight(String height);
-
- public String getAttrStyleLineHeightAtLeast();
-
- public void setAttrStyleLineHeightAtLeast(String height);
-
- public String getAttrFormatTextAlign();
-
- public void setAttrFormatTextAlign(String align);
-
- public String getAttrStyleVerticalAlign();
-
- public void setAttrStyleVerticalAlign(String align);
-
- public String getAttrFormatMarginLeft();
-
- public String getAttrFormatMarginRight();
-
- public String getAttrFormatMarginTop();
-
- public String getAttrFormatMarginBottom();
-
- public String getAttrFormatBackgroundColor();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/StyleConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/StyleConstants.java
deleted file mode 100644
index 63aa67b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/StyleConstants.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public final class StyleConstants {
- static public final String STYLE_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:style:1.0";
-
- static public final String ELEMENT_DEFAULT_STYLE = "default-style";
-
- static public final String ELEMENT_STYLE = "style";
-
- static public final String ELEMENT_TABLE_PROPERTIES = "table-properties";
-
- static public final String ELEMENT_TABLE_COLUMN_PROPERTIES = "table-column-properties";
-
- static public final String ELEMENT_TABLE_ROW_PROPERTIES = "table-row-properties";
-
- static public final String ELEMENT_TABLE_CELL_PROPERTIES = "table-cell-properties";
-
- static public final String ELEMENT_FONT_FACE = "font-face";
-
- static public final String ELEMENT_TEXT_PROPERTIES = "text-properties";
-
- static public final String ELEMENT_CHART_PROPERTIES = "chart-properties";
-
- static public final String ELEMENT_GRAPHIC_PROPERTIES = "graphic-properties";
-
- static public final String ELEMENT_PARAGRAPH_PROPERTIES = "paragraph-properties";
-
- static public final String ELEMENT_PAGE_LAYOUT = "page-layout";
-
- static public final String ELEMENT_PAGE_LAYOUT_PROPERTIES = "page-layout-properties";
-
- static public final String ELEMENT_DRAWING_PAGE_PROPERTIES = "drawing-page-properties";
-
- static public final String ELEMENT_MASTER_PAGE = "master-page";
-
- static public final String ELEMENT_MAP = "map";
-
- static public final String ATTR_NAME = "name";
-
- static public final String ATTR_DIRECTION = "direction";
-
- static public final String ATTR_FONT_PITCH = "font-pitch";
-
- static public final String ATTR_FAMILY = "family";
-
- static public final String ATTR_MASTER_PAGE_NAME = "master-page-name";
-
- static public final String ATTR_PARENT_STYLE_NAME = "parent-style-name";
-
- static public final String ATTR_DATA_STYLE_NAME = "data-style-name";
-
- static public final String ATTR_PAGE_LAYOUT_NAME = "page-layout-name";
-
- static public final String ATTR_COLUMN_WIDTH = "column-width";
-
- static public final String ATTR_USE_OPTIMAL_COLUMN_WIDTH = "use-optimal-column-width";
-
- static public final String ATTR_WRITING_MODE = "writing-mode";
-
- static public final String ATTR_ROW_HEIGHT = "row-height";
-
- static public final String ATTR_USE_OPTIMAL_ROW_HEIGHT = "use-optimal-row-height";
-
- static public final String ATTR_FONT_NAME = "font-name";
-
- static public final String ATTR_FONT_FAMILY_GENERIC = "font-family-generic";
-
- static public final String ATTR_FONT_FAMILY_ASIAN = "font-family-asian";
-
- static public final String ATTR_FONT_PITCH_ASIAN = "font-pitch-asian";
-
- static public final String ATTR_FONT_SIZE_ASIAN = "font-size-asian";
-
- static public final String ATTR_FONT_FAMILY_COMPLEX = "font-family-complex";
-
- static public final String ATTR_FONT_PITCH_COMPLEX = "font-pitch-complex";
-
- static public final String ATTR_FONT_SIZE_COMPLEX = "font-size-complex";
-
- static public final String ATTR_REPEAT = "repeat";
-
- static public final String ATTR_PRINT_ORIENTATION = "print-orientation";
-
- static public final String ATTR_SHADOW = "shadow";
-
- static public final String ATTR_CONDITION = "condition";
-
- static public final String ATTR_APPLY_STYLE_NAME = "apply-style-name";
-
- static public final String ATTR_BASE_CELL_ADDRESS = "base-cell-address";
-
- static public final String ATTR_TEXT_UNDERLINE_STYLE = "text-underline-style";
-
- static public final String ATTR_TEXT_POSITION = "text-position";
-
- static public final String ATTR_NUM_FORMAT = "num-format";
-
- static public final String ATTR_NUM_PREFIX = "num-prefix";
-
- static public final String ATTR_NUM_SUFFIX = "num-suffix";
-
- static public final String ATTR_WIDTH = "width";
-
- static public final String ATTR_VERTICAL_ALIGN = "vertical-align";
-
- static public final String ATTR_HORIZONTAL_POS = "horizontal-pos";
-
- static public final String ATTR_CELL_PROTECT = "cell-protect";
-
- static public final int CELL_PROTECT_VALUE_NOT_DEFINED = 0;
-
- static public final int CELL_PROTECT_VALUE_NONE = 1;
-
- static public final int CELL_PROTECT_VALUE_PROTECTED = 2;
-
- static public final int CELL_PROTECT_VALUE_HIDDEN = 3;
-
- static public final int CELL_PROTECT_VALUE_HIDDEN_AND_PROTECTED = 4;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/StyleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/StyleElement.java
deleted file mode 100644
index 992783c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/StyleElement.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStyleListener;
-
-
-public interface StyleElement extends ODFElement {
- public String getAttrStyleMasterPageName();
-
- public String getAttrStyleParentStyleName();
-
- public String getAttrStyleDataStyleName();
-
- public StyleElement createChild(String family);
-
- public String getFamily();
-
- public String getName();
-
- public void setName(String name);
-
- public StylePropertiesBase getPropertyElement(long idx);
-
- public long getPropertySize();
-
- public void putPropertyElement(StylePropertiesBase property);
-
- public void addListener(IStyleListener listener, String topic);
-
- public void removeListener(IStyleListener listener, String topic);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/StylePropertiesBase.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/StylePropertiesBase.java
deleted file mode 100644
index 7fdd6c9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/StylePropertiesBase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface StylePropertiesBase extends ODFElement {
- public String getType();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TabStopElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TabStopElement.java
deleted file mode 100644
index f3d5a67..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TabStopElement.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface TabStopElement extends StylePropertiesBase {
- public String getAttrPosition();
-
- public void setAttrPosition();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TabStopsElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TabStopsElement.java
deleted file mode 100644
index 1f42d8d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TabStopsElement.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface TabStopsElement extends StylePropertiesBase {
- public long getSize();
-
- public TabStopElement getTabStopElement(long idx);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TableCellPropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TableCellPropertiesElement.java
deleted file mode 100644
index 62603a4..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TableCellPropertiesElement.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface TableCellPropertiesElement extends StylePropertiesBase {
- public String getAttrFormatBackgroundColor();
-
- public String getAttrFormatBorder();
-
- public String getAttrFormatBorderTop();
-
- public String getAttrFormatBorderBottom();
-
- public String getAttrFormatBorderLeft();
-
- public String getAttrFormatBorderRight();
-
- public String getAttrFormatPadding();
-
- public String getAttrStyleShadow();
-
- public int getAttrStyleCellProtect();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TableColumnPropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TableColumnPropertiesElement.java
deleted file mode 100644
index 42e369d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TableColumnPropertiesElement.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface TableColumnPropertiesElement extends StylePropertiesBase {
- public String getAttrFormatBreakBefore();
-
- public String getAttrStyleColumnWidth();
-
- public boolean getAttrStyleUseOptimalColumnWidth();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TablePropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TablePropertiesElement.java
deleted file mode 100644
index e950da0..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TablePropertiesElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface TablePropertiesElement extends StylePropertiesBase {
- public boolean getAttrTableDisplay();
-
- public String getAttrStyleWidth();
-
- public String getAttrStyleWritingMode();
-
- public String getAttrTableBorderModel();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TableRowPropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TableRowPropertiesElement.java
deleted file mode 100644
index 15b5069..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TableRowPropertiesElement.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface TableRowPropertiesElement extends StylePropertiesBase {
- public String getAttrStyleRowHeight();
-
- public String getAttrFormatBreakBefore();
-
- public boolean getAttrStyleUseOptimalRowHeight();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TextPropertiesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TextPropertiesElement.java
deleted file mode 100644
index e44888a..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/TextPropertiesElement.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style;
-
-public interface TextPropertiesElement extends StylePropertiesBase {
- public String getAttrStyleFontName();
-
- public String getAttrStyleFontFamilyGeneric();
-
- public String getAttrStyleFontPitch();
-
- public String getAttrStyleFontFamilyAsian();
-
- public String getAttrStyleFontPitchAsian();
-
- public String getAttrStyleFontSizeAsian();
-
- public String getAttrStyleFontFamilyComplex();
-
- public String getAttrStyleFontPitchComplex();
-
- public String getAttrStyleFontSizeComplex();
-
- public String getAttrStyleTextUnderlineStyle();
-
- public String getAttrStyleTextPosition();
-
- public String getAttrFormatFontFamily();
-
- public String getAttrFormatFontSize();
-
- public String getAttrFormatFontStyle();
-
- public String getAttrFormatFontWeight();
-
- public String getAttrFormatColor();
-
- public String getAttrFormatBackgroundColor();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/ChartPropertiesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/ChartPropertiesElementImpl.java
deleted file mode 100644
index 7296211..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/ChartPropertiesElementImpl.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.chart.ChartConstants;
-import org.eclipse.actf.model.dom.odf.style.ChartPropertiesElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.w3c.dom.Element;
-
-
-class ChartPropertiesElementImpl extends ODFElementImpl implements
- ChartPropertiesElement {
- private static final long serialVersionUID = 5381557644775039533L;
-
- protected ChartPropertiesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrStyleDirection() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_DIRECTION))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_DIRECTION);
- return null;
- }
-
- public boolean getAttrChartJapaneseCandleStick() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_JAPANESE_CANDLE_STICK)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_JAPANESE_CANDLE_STICK)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrChartStockWithVolume() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_STOCK_WITH_VOLUME)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_STOCK_WITH_VOLUME)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrChartThreeDimensional() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_THREE_DIMENSIONAL)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_THREE_DIMENSIONAL)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrChartDeep() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DEEP)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DEEP)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrChartLines() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_LINES)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_LINES)).booleanValue();
- }
- return false;
- }
-
- public String getAttrChartInterpolation() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_INTERPOLATION))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_INTERPOLATION);
- return null;
- }
-
- public String getAttrChartSymbolType() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_SYMBOL_TYPE))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_SYMBOL_TYPE);
- return null;
- }
-
- public boolean getAttrChartVertical() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_VERTICAL)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_VERTICAL)).booleanValue();
- }
- return false;
- }
-
- public int getAttrChartLinesUsed() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_LINES_USED)) {
- return new Integer(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_LINES_USED)).intValue();
- }
- return -1;
- }
-
- public boolean getAttrChartConnectBars() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_CONNECT_BARS)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_CONNECT_BARS)).booleanValue();
- }
- return false;
- }
-
- public String getAttrChartSeriesSource() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_SERIES_SOURCE))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_SERIES_SOURCE);
- return null;
- }
-
- public boolean getAttrChartMeanValue() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_MEAN_VALUE)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_MEAN_VALUE)).booleanValue();
- }
- return false;
- }
-
- public double getAttrChartErrorMargin() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ERROR_MARGIN)) {
- return new Double(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ERROR_MARGIN)).doubleValue();
- }
- return -1.0;
- }
-
- public double getAttrChartErrorLowerLimit() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ERROR_LOWER_LIMIT)) {
- return new Double(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ERROR_LOWER_LIMIT)).doubleValue();
- }
- return -1.0;
- }
-
- public double getAttrChartErrorUpperLimit() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ERROR_UPPER_LIMIT)) {
- return new Double(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ERROR_UPPER_LIMIT)).doubleValue();
- }
- return -1.0;
- }
-
- public String getAttrChartErrorCategory() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ERROR_CATEGORY))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ERROR_CATEGORY);
- return null;
- }
-
- public double getAttrChartErrorPercentage() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ERROR_PERCENTAGE)) {
- return new Double(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ERROR_PERCENTAGE)).doubleValue();
- }
- return -1.0;
- }
-
- public String getAttrChartRegressionType() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_REGRESSION_TYPE))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_REGRESSION_TYPE);
- return null;
- }
-
- public String getAttrChartDataLabelNumber() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DATA_LABEL_NUMBER))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DATA_LABEL_NUMBER);
- return null;
- }
-
- public boolean getAttrChartDataLabelText() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DATA_LABEL_TEXT)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DATA_LABEL_TEXT)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrChartDataLabelSymbol() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DATA_LABEL_SYMBOL)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DATA_LABEL_SYMBOL)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrChartDisplayLabel() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DISPLAY_LABEL)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_DISPLAY_LABEL)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrChartTickMarksMajorInner() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_TICK_MARKS_MAJOR_INNER)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_TICK_MARKS_MAJOR_INNER)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrChartTickMarksMajorOuter() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_TICK_MARKS_MAJOR_OUTER)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_TICK_MARKS_MAJOR_OUTER)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrChartLogarithmic() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_LOGARITHMIC)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_LOGARITHMIC)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrChartTextOverlap() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_TEXT_OVERLAP)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_TEXT_OVERLAP)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrTextLineBreak() {
- if (hasAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_LINE_BREAK)) {
- return new Boolean(getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_LINE_BREAK)).booleanValue();
- }
- return false;
- }
-
- public String getAttrChartLabelArrangement() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_LABEL_ARRANGEMENT))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_LABEL_ARRANGEMENT);
- return null;
- }
-
- public boolean getAttrChartVisible() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_VISIBLE)) {
- return new Boolean(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_VISIBLE)).booleanValue();
- }
- return false;
- }
-
- public int getAttrChartGapWidth() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_GAP_WIDTH)) {
- return new Integer(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_GAP_WIDTH)).intValue();
- }
- return -1;
- }
-
- public int getAttrChartOverlap() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_OVERLAP)) {
- return new Integer(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_OVERLAP)).intValue();
- }
- return -1;
- }
-
- public String getAttrChartSolidType() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_SOLID_TYPE))
- return getAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_SOLID_TYPE);
- return null;
- }
-
- public double getAttrChartOrigin() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ORIGIN)) {
- return new Double(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_ORIGIN)).doubleValue();
- }
- return -1.0;
- }
-
- public double getAttrChartMinimum() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_MINIMUM)) {
- return new Double(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_MINIMUM)).doubleValue();
- }
- return -1.0;
- }
-
- public double getAttrChartMaximum() {
- if (hasAttributeNS(ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_MAXIMUM)) {
- return new Double(getAttributeNS(
- ChartConstants.CHART_NAMESPACE_URI,
- ChartConstants.ATTR_MAXIMUM)).doubleValue();
- }
- return -1.0;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/DefaultStyleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/DefaultStyleElementImpl.java
deleted file mode 100644
index f11c6ab..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/DefaultStyleElementImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.style.DefaultStyleElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.w3c.dom.Element;
-
-
-class DefaultStyleElementImpl extends StyleElementImpl implements
- DefaultStyleElement {
- private static final long serialVersionUID = 1269236169007110333L;
-
- protected DefaultStyleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrStyleFamily() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FAMILY))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FAMILY);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/DrawingPagePropertiesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/DrawingPagePropertiesElementImpl.java
deleted file mode 100644
index d7db9cf..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/DrawingPagePropertiesElementImpl.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.presentation.PresentationConstants;
-import org.eclipse.actf.model.dom.odf.style.DrawingPagePropertiesElement;
-import org.w3c.dom.Element;
-
-
-class DrawingPagePropertiesElementImpl extends ODFElementImpl implements
- DrawingPagePropertiesElement {
- private static final long serialVersionUID = -3812620868676549011L;
-
- protected DrawingPagePropertiesElementImpl(ODFDocument odfDoc,
- Element element) {
- super(odfDoc, element);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean getAttrPresentationDisplayHeader() {
- if (hasAttributeNS(PresentationConstants.PRESENTATION_NAMESPACE_URI,
- PresentationConstants.ATTR_DISPLAY_HEADER)) {
- return new Boolean(getAttributeNS(
- PresentationConstants.PRESENTATION_NAMESPACE_URI,
- PresentationConstants.ATTR_DISPLAY_HEADER)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrPresentationDisplayFooter() {
- if (hasAttributeNS(PresentationConstants.PRESENTATION_NAMESPACE_URI,
- PresentationConstants.ATTR_DISPLAY_FOOTER)) {
- return new Boolean(getAttributeNS(
- PresentationConstants.PRESENTATION_NAMESPACE_URI,
- PresentationConstants.ATTR_DISPLAY_FOOTER)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrPresentationDisplayPageNumber() {
- if (hasAttributeNS(PresentationConstants.PRESENTATION_NAMESPACE_URI,
- PresentationConstants.ATTR_DISPLAY_PAGE_NUMBER)) {
- return new Boolean(getAttributeNS(
- PresentationConstants.PRESENTATION_NAMESPACE_URI,
- PresentationConstants.ATTR_DISPLAY_PAGE_NUMBER))
- .booleanValue();
- }
- return false;
- }
-
- public boolean getAttrPresentationDisplayDateTime() {
- if (hasAttributeNS(PresentationConstants.PRESENTATION_NAMESPACE_URI,
- PresentationConstants.ATTR_DISPLAY_DATE_TIME)) {
- return new Boolean(getAttributeNS(
- PresentationConstants.PRESENTATION_NAMESPACE_URI,
- PresentationConstants.ATTR_DISPLAY_DATE_TIME))
- .booleanValue();
- }
- return false;
- }
-
- public String getAttrDrawBackgroundSize() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_BACKGROUND_SIZE))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_BACKGROUND_SIZE);
- return null;
- }
-
- public String getAttrDrawFill() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/FontFaceElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/FontFaceElementImpl.java
deleted file mode 100644
index df58f06..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/FontFaceElementImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.style.FontFaceElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.w3c.dom.Element;
-
-
-class FontFaceElementImpl extends ODFElementImpl implements FontFaceElement {
- private static final long serialVersionUID = 6886236663919077061L;
-
- protected FontFaceElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrStyleName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME);
- return null;
- }
-
- public String getAttrSvgFontFamily() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_FONT_FAMILY))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_FONT_FAMILY);
- return null;
- }
-
- public String getAttrSvgFontFamilyGeneric() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_FONT_FAMILY_GENERIC))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_FONT_FAMILY_GENERIC);
- return null;
- }
-
- public String getAttrStyleFontPitch() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_PITCH))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_PITCH);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/GraphicPropertiesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/GraphicPropertiesElementImpl.java
deleted file mode 100644
index fd3ba69..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/GraphicPropertiesElementImpl.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.FillImageElement;
-import org.eclipse.actf.model.dom.odf.draw.GradientElement;
-import org.eclipse.actf.model.dom.odf.draw.OpacityElement;
-import org.eclipse.actf.model.dom.odf.style.GraphicPropertiesElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.w3c.dom.Element;
-
-
-class GraphicPropertiesElementImpl extends ODFElementImpl implements
- GraphicPropertiesElement {
- private static final long serialVersionUID = 5150171870087297027L;
-
- protected GraphicPropertiesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrDrawStroke() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STROKE))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STROKE);
- return null;
- }
-
- public String getAttrDrawStrokeDash() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STROKE_DASH))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STROKE_DASH);
- return null;
- }
-
- public String getAttrSvgStrokeWidth() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_STROKE_WIDTH))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_STROKE_WIDTH);
- return null;
- }
-
- public String getAttrSvgStrokeColor() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_STROKE_COLOR))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_STROKE_COLOR);
- return null;
- }
-
- public String getAttrDrawMarkerStartWidth() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_MARKER_START_WIDTH))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_MARKER_START_WIDTH);
- return null;
- }
-
- public String getAttrDrawMarkerEndWidth() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_MARKER_END_WIDTH))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_MARKER_END_WIDTH);
- return null;
- }
-
- public String getAttrSvgStrokeOpacity() {
- if (hasAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_STROKE_OPACITY))
- return getAttributeNS(SVGConstants.SVG_NAMESPACE_URI,
- SVGConstants.ATTR_STROKE_OPACITY);
- return null;
- }
-
- public String getAttrDrawOpacity() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_OPACITY))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_OPACITY);
- return null;
- }
-
- public OpacityElement getAttrDrawOpacityName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_OPACITY_NAME)) {
- String str = getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_OPACITY_NAME);
- ODFElement opacityElement = findElementByAttrValueFromStyleDoc(
- DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ELEMENT_OPACITY,
- DrawConstants.DRAW_NAMESPACE_URI, DrawConstants.ATTR_NAME,
- str);
- if ((opacityElement != null)
- && (opacityElement instanceof OpacityElement)) {
- return (OpacityElement) opacityElement;
- }
- }
- return null;
- }
-
- public String getAttrDrawFill() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL);
- return null;
- }
-
- public GradientElement getAttrDrawFillGradientName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_GRADIENT_NAME)) {
- String str = getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_GRADIENT_NAME);
- ODFElement fillGradientElement = findElementByAttrValueFromStyleDoc(
- DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ELEMENT_GRADIENT,
- DrawConstants.DRAW_NAMESPACE_URI, DrawConstants.ATTR_NAME,
- str);
- if ((fillGradientElement != null)
- && (fillGradientElement instanceof GradientElement)) {
- return (GradientElement) fillGradientElement;
- }
- }
- return null;
- }
-
- public int getAttrDrawGradientStepCount() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_GRADIENT_STEP_COUNT)) {
- return new Integer(getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_GRADIENT_STEP_COUNT)).intValue();
- }
- return -1;
- }
-
- public String getAttrDrawFillColor() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_COLOR))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_COLOR);
- return null;
- }
-
- public String getAttrDrawFillImageName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_NAME)) {
- String str = getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_NAME);
- ODFElement fillImageElement = findElementByAttrValueFromStyleDoc(
- DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ELEMENT_FILL_IMAGE,
- DrawConstants.DRAW_NAMESPACE_URI, DrawConstants.ATTR_NAME,
- str);
- if ((fillImageElement != null)
- && (fillImageElement instanceof FillImageElement)) {
- return ((FillImageElement) fillImageElement).getAttrXLinkHref()
- .toString();
- }
- }
- return null;
- }
-
- public String getAttrDrawFillImageWidth() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_WIDTH))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_WIDTH);
- return null;
- }
-
- public String getAttrDrawFillImageHeight() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_HEIGHT))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_HEIGHT);
- return null;
- }
-
- public String getAttrStyleRepeat() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_REPEAT))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_REPEAT);
- return null;
- }
-
- public String getAttrDrawFillImageRefPointX() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_REF_POINT_X))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_REF_POINT_X);
- return null;
- }
-
- public String getAttrDrawFillImageRefPointY() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_REF_POINT_Y))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_REF_POINT_Y);
- return null;
- }
-
- public String getAttrDrawFillImageRefPoint() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_REF_POINT))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_FILL_IMAGE_REF_POINT);
- return null;
- }
-
- public String getAttrDrawTileRepeatOffset() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_TILE_REPEAT_OFFSET))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_TILE_REPEAT_OFFSET);
- return null;
- }
-
- public String getAttrStyleHorizontalPos() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_HORIZONTAL_POS))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_HORIZONTAL_POS);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/MapElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/MapElementImpl.java
deleted file mode 100644
index f66df3b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/MapElementImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.style.MapElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.w3c.dom.Element;
-
-
-class MapElementImpl extends ODFElementImpl implements MapElement {
- private static final long serialVersionUID = -8596788527165196410L;
-
- protected MapElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrStyleCondition() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_CONDITION))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_CONDITION);
- return null;
- }
-
- public String getAttrStyleApplyStyleName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_APPLY_STYLE_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_APPLY_STYLE_NAME);
- return null;
- }
-
- public String getAttrStyleBaseCellAddress() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_BASE_CELL_ADDRESS))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_BASE_CELL_ADDRESS);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/MasterPageElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/MasterPageElementImpl.java
deleted file mode 100644
index ffacb1d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/MasterPageElementImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.style.MasterPageElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.w3c.dom.Element;
-
-
-class MasterPageElementImpl extends ODFElementImpl implements MasterPageElement {
- private static final long serialVersionUID = 6719584731864895848L;
-
- protected MasterPageElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrStyleName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME);
- return null;
- }
-
- public String getAttrStylePageLayoutName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_PAGE_LAYOUT_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_PAGE_LAYOUT_NAME);
- return null;
- }
-
- public String getAttrDrawStyleName() {
- if (hasAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE_NAME))
- return getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_STYLE_NAME);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/PageLayoutElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/PageLayoutElementImpl.java
deleted file mode 100644
index 8172400..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/PageLayoutElementImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.style.PageLayoutElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.w3c.dom.Element;
-
-
-class PageLayoutElementImpl extends ODFElementImpl implements PageLayoutElement {
- private static final long serialVersionUID = 2353952707698473250L;
-
- protected PageLayoutElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrStyleName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/PageLayoutPropertiesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/PageLayoutPropertiesElementImpl.java
deleted file mode 100644
index ba23552..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/PageLayoutPropertiesElementImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.format.FormatConstants;
-import org.eclipse.actf.model.dom.odf.style.PageLayoutPropertiesElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.w3c.dom.Element;
-
-
-class PageLayoutPropertiesElementImpl extends ODFElementImpl implements
- PageLayoutPropertiesElement {
- private static final long serialVersionUID = 8910766683962119790L;
-
- protected PageLayoutPropertiesElementImpl(ODFDocument odfDoc,
- Element element) {
- super(odfDoc, element);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrFormatMarginTop() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_TOP))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_TOP);
- return null;
- }
-
- public String getAttrFormatMarginBottom() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_BOTTOM))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_BOTTOM);
- return null;
- }
-
- public String getAttrFormatMarginLeft() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_LEFT))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_LEFT);
- return null;
- }
-
- public String getAttrFormatMarginRight() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_RIGHT))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_RIGHT);
- return null;
- }
-
- public String getAttrFormatPageWidth() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_PAGE_WIDTH))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_PAGE_WIDTH);
- return null;
- }
-
- public String getAttrFormatPageHeight() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_PAGE_HEIGHT))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_PAGE_HEIGHT);
- return null;
- }
-
- public String getAttrStylePrintOrientation() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_PRINT_ORIENTATION))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_PRINT_ORIENTATION);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/ParagraphPropertiesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/ParagraphPropertiesElementImpl.java
deleted file mode 100644
index 80eccd7..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/ParagraphPropertiesElementImpl.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.format.FormatConstants;
-import org.eclipse.actf.model.dom.odf.style.ParagraphPropertiesElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.TabStopsElement;
-import org.w3c.dom.Element;
-
-
-class ParagraphPropertiesElementImpl extends ODFElementImpl implements
- ParagraphPropertiesElement {
- private static final long serialVersionUID = -5647687285573197891L;
-
- protected ParagraphPropertiesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrFormatLineHeight() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrStyleLineHeightAtLeast() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrFormatTextAlign() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_TEXT_ALIGN))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_TEXT_ALIGN);
- return null;
- }
-
- public String getAttrStyleVerticalAlign() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_VERTICAL_ALIGN))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_VERTICAL_ALIGN);
- return null;
- }
-
- public TabStopsElement getTabStopsElement() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setAttrFormatLineHeight(String height) {
- // TODO Auto-generated method stub
-
- }
-
- public void setAttrStyleLineHeightAtLeast(String height) {
- // TODO Auto-generated method stub
- }
-
- public void setAttrFormatTextAlign(String align) {
- if (align != null)
- setAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_VERTICAL_ALIGN, align);
- }
-
- public void setAttrStyleVerticalAlign(String align) {
- if (align != null)
- setAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_TEXT_ALIGN, align);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrFormatMarginLeft() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_LEFT))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_LEFT);
- return null;
- }
-
- public String getAttrFormatMarginRight() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_RIGHT))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_RIGHT);
- return null;
- }
-
- public String getAttrFormatMarginTop() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_TOP))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_TOP);
- return null;
- }
-
- public String getAttrFormatMarginBottom() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_BOTTOM))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_MARGIN_BOTTOM);
- return null;
- }
-
- public String getAttrFormatBackgroundColor() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BACKGROUND_COLOR))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BACKGROUND_COLOR);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/StyleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/StyleElementImpl.java
deleted file mode 100644
index 8f95822..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/StyleElementImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IStyleListener;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.eclipse.actf.model.dom.odf.style.StylePropertiesBase;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-public class StyleElementImpl extends ODFElementImpl implements StyleElement {
- private static final long serialVersionUID = 9075754119248346645L;
-
- protected StyleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public StyleElement createChild(String family) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getFamily() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FAMILY))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FAMILY);
- return null;
- }
-
- public String getName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME);
- return null;
- }
-
- public void setName(String name) {
- setAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME, name);
- }
-
- public StylePropertiesBase getPropertyElement(long idx) {
- int count = 0;
- NodeList nl = getChildNodes();
- for (int i = 0; i < nl.getLength(); i++) {
- Node node = nl.item(i);
- if (node instanceof StylePropertiesBase) {
- if (idx == count)
- return (StylePropertiesBase) node;
- count++;
- }
- }
- return null;
- }
-
- public long getPropertySize() {
- int count = 0;
- NodeList nl = getChildNodes();
- for (int i = 0; i < nl.getLength(); i++) {
- Node node = nl.item(i);
- if (node instanceof StylePropertiesBase) {
- count++;
- }
- }
- return count;
- }
-
- public void putPropertyElement(StylePropertiesBase property) {
- // TODO Auto-generated method stub
-
- }
-
- public void addListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public String getAttrStyleMasterPageName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_MASTER_PAGE_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_MASTER_PAGE_NAME);
- return null;
- }
-
- public String getAttrStyleParentStyleName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_PARENT_STYLE_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_PARENT_STYLE_NAME);
- return null;
- }
-
- public String getAttrStyleDataStyleName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_DATA_STYLE_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_DATA_STYLE_NAME);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/StyleNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/StyleNodeFactory.java
deleted file mode 100644
index f5275aa..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/StyleNodeFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.w3c.dom.Element;
-
-
-public class StyleNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(StyleConstants.ELEMENT_DEFAULT_STYLE,
- DefaultStyleElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_STYLE, StyleElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_TABLE_PROPERTIES,
- TablePropertiesElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_TABLE_COLUMN_PROPERTIES,
- TableColumnPropertiesElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_TABLE_ROW_PROPERTIES,
- TableRowPropertiesElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_TABLE_CELL_PROPERTIES,
- TableCellPropertiesElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_FONT_FACE, FontFaceElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_TEXT_PROPERTIES,
- TextPropertiesElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_CHART_PROPERTIES,
- ChartPropertiesElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_GRAPHIC_PROPERTIES,
- GraphicPropertiesElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_PARAGRAPH_PROPERTIES,
- ParagraphPropertiesElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_PAGE_LAYOUT,
- PageLayoutElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_PAGE_LAYOUT_PROPERTIES,
- PageLayoutPropertiesElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_DRAWING_PAGE_PROPERTIES,
- DrawingPagePropertiesElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_MASTER_PAGE,
- MasterPageElementImpl.class);
- tagMap.put(StyleConstants.ELEMENT_MAP, MapElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TableCellPropertiesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TableCellPropertiesElementImpl.java
deleted file mode 100644
index 36f8667..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TableCellPropertiesElementImpl.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.format.FormatConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.TableCellPropertiesElement;
-import org.w3c.dom.Element;
-
-
-class TableCellPropertiesElementImpl extends ODFElementImpl implements
- TableCellPropertiesElement {
- private static final long serialVersionUID = -6598063189899180220L;
-
- protected TableCellPropertiesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrFormatBackgroundColor() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BACKGROUND_COLOR))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BACKGROUND_COLOR);
- return null;
- }
-
- public String getAttrFormatBorder() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BORDER))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BORDER);
- return null;
- }
-
- public String getAttrFormatBorderTop() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BORDER_TOP))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BORDER_TOP);
- return null;
- }
-
- public String getAttrFormatBorderBottom() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BORDER_BOTTOM))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BORDER_BOTTOM);
- return null;
- }
-
- public String getAttrFormatBorderLeft() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BORDER_LEFT))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BORDER_LEFT);
- return null;
- }
-
- public String getAttrFormatBorderRight() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BORDER_RIGHT))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BORDER_RIGHT);
- return null;
- }
-
- public String getAttrFormatPadding() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_PADDING))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_PADDING);
- return null;
- }
-
- public String getAttrStyleShadow() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_SHADOW))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_SHADOW);
- return null;
- }
-
- static private final String CELL_PROTECT_VALUE_NONE = "none";
-
- static private final String CELL_PROTECT_VALUE_PROTECTED = "protected";
-
- static private final String CELL_PROTECT_VALUE_FORMULA_HIDDEN = "formula-hidden";
-
- static private final String CELL_PROTECT_VALUE_HIDDEN_AND_PROTECTED = "hidden-and-protected";
-
- public int getAttrStyleCellProtect() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_CELL_PROTECT)) {
- String str = getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_CELL_PROTECT);
- if (str.equals(CELL_PROTECT_VALUE_NONE)) {
- return StyleConstants.CELL_PROTECT_VALUE_NONE;
- } else if (str.equals(CELL_PROTECT_VALUE_HIDDEN_AND_PROTECTED)) {
- return StyleConstants.CELL_PROTECT_VALUE_HIDDEN_AND_PROTECTED;
- } else {
- int val = StyleConstants.CELL_PROTECT_VALUE_NOT_DEFINED;
- String[] values = str.split(" ");
- for (int i = 0; i < values.length; i++) {
- if (values[i].equals(CELL_PROTECT_VALUE_PROTECTED)) {
- if (val == StyleConstants.CELL_PROTECT_VALUE_HIDDEN)
- val = StyleConstants.CELL_PROTECT_VALUE_HIDDEN_AND_PROTECTED;
- else
- val = StyleConstants.CELL_PROTECT_VALUE_PROTECTED;
- } else if (values[i]
- .equals(CELL_PROTECT_VALUE_FORMULA_HIDDEN)) {
- if (val == StyleConstants.CELL_PROTECT_VALUE_PROTECTED)
- val = StyleConstants.CELL_PROTECT_VALUE_HIDDEN_AND_PROTECTED;
- else
- val = StyleConstants.CELL_PROTECT_VALUE_HIDDEN;
- }
- }
- return val;
- }
- }
- return StyleConstants.CELL_PROTECT_VALUE_NOT_DEFINED;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TableColumnPropertiesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TableColumnPropertiesElementImpl.java
deleted file mode 100644
index 2cc30c8..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TableColumnPropertiesElementImpl.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.format.FormatConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.TableColumnPropertiesElement;
-import org.w3c.dom.Element;
-
-
-class TableColumnPropertiesElementImpl extends ODFElementImpl implements
- TableColumnPropertiesElement {
- private static final long serialVersionUID = -4691982278363837610L;
-
- protected TableColumnPropertiesElementImpl(ODFDocument odfDoc,
- Element element) {
- super(odfDoc, element);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrFormatBreakBefore() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BREAK_BEFORE))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BREAK_BEFORE);
- return null;
- }
-
- public String getAttrStyleColumnWidth() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_COLUMN_WIDTH))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_COLUMN_WIDTH);
- return null;
- }
-
- public boolean getAttrStyleUseOptimalColumnWidth() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_USE_OPTIMAL_COLUMN_WIDTH)) {
- return new Boolean(getAttributeNS(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_USE_OPTIMAL_COLUMN_WIDTH))
- .booleanValue();
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TablePropertiesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TablePropertiesElementImpl.java
deleted file mode 100644
index 368c462..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TablePropertiesElementImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.TablePropertiesElement;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.w3c.dom.Element;
-
-
-class TablePropertiesElementImpl extends ODFElementImpl implements
- TablePropertiesElement {
- private static final long serialVersionUID = 6683381119135165L;
-
- protected TablePropertiesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean getAttrTableDisplay() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_DISPLAY)) {
- return new Boolean(getAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_DISPLAY)).booleanValue();
- }
- return false;
- }
-
- public String getAttrStyleWidth() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_WIDTH))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_WIDTH);
- return null;
- }
-
- public String getAttrStyleWritingMode() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_WRITING_MODE))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_WRITING_MODE);
- return null;
- }
-
- public String getAttrTableBorderModel() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_BORDER_MODEL))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_BORDER_MODEL);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TableRowPropertiesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TableRowPropertiesElementImpl.java
deleted file mode 100644
index 807d539..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TableRowPropertiesElementImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.format.FormatConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.TableRowPropertiesElement;
-import org.w3c.dom.Element;
-
-
-class TableRowPropertiesElementImpl extends ODFElementImpl implements
- TableRowPropertiesElement {
- private static final long serialVersionUID = -5351217882394300961L;
-
- protected TableRowPropertiesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrStyleRowHeight() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_ROW_HEIGHT))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_ROW_HEIGHT);
- return null;
- }
-
- public String getAttrFormatBreakBefore() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BREAK_BEFORE))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BREAK_BEFORE);
- return null;
- }
-
- public boolean getAttrStyleUseOptimalRowHeight() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_USE_OPTIMAL_ROW_HEIGHT)) {
- return new Boolean(getAttributeNS(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_USE_OPTIMAL_ROW_HEIGHT)).booleanValue();
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TextPropertiesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TextPropertiesElementImpl.java
deleted file mode 100644
index 242fdc1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/style/impl/TextPropertiesElementImpl.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.style.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.format.FormatConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.TextPropertiesElement;
-import org.w3c.dom.Element;
-
-
-class TextPropertiesElementImpl extends ODFElementImpl implements
- TextPropertiesElement {
- private static final long serialVersionUID = -5248765049107368279L;
-
- protected TextPropertiesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAttrStyleFontName() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_NAME))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_NAME);
- return null;
- }
-
- public String getAttrFormatFontSize() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_FONT_SIZE))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_FONT_SIZE);
- return null;
- }
-
- public String getAttrFormatFontStyle() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_FONT_STYLE))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_FONT_STYLE);
- return null;
- }
-
- public String getAttrFormatFontWeight() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_FONT_WEIGHT))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_FONT_WEIGHT);
- return null;
- }
-
- public String getAttrFormatColor() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_COLOR))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_COLOR);
- return null;
- }
-
- public String getAttrFormatBackgroundColor() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BACKGROUND_COLOR))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_BACKGROUND_COLOR);
- return null;
- }
-
- public String getAttrFormatFontFamily() {
- if (hasAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_FONT_FAMILY))
- return getAttributeNS(FormatConstants.FORMAT_NAMESPACE_URI,
- FormatConstants.ATTR_FONT_FAMILY);
- return null;
- }
-
- public String getAttrStyleFontFamilyGeneric() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_FAMILY_GENERIC))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_FAMILY_GENERIC);
- return null;
- }
-
- public String getAttrStyleFontPitch() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_PITCH))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_PITCH);
- return null;
- }
-
- public String getAttrStyleFontFamilyAsian() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_FAMILY_ASIAN))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_FAMILY_ASIAN);
- return null;
- }
-
- public String getAttrStyleFontPitchAsian() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_PITCH_ASIAN))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_PITCH_ASIAN);
- return null;
- }
-
- public String getAttrStyleFontSizeAsian() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_SIZE_ASIAN))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_SIZE_ASIAN);
- return null;
- }
-
- public String getAttrStyleFontFamilyComplex() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_FAMILY_COMPLEX))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_FAMILY_COMPLEX);
- return null;
- }
-
- public String getAttrStyleFontPitchComplex() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_PITCH_COMPLEX))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_PITCH_COMPLEX);
- return null;
- }
-
- public String getAttrStyleFontSizeComplex() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_SIZE_COMPLEX))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_FONT_SIZE_COMPLEX);
- return null;
- }
-
- public String getAttrStyleTextUnderlineStyle() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_TEXT_UNDERLINE_STYLE))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_TEXT_UNDERLINE_STYLE);
- return null;
- }
-
- public String getAttrStyleTextPosition() {
- if (hasAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_TEXT_POSITION))
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_TEXT_POSITION);
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/DescElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/DescElement.java
deleted file mode 100644
index a4ec30b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/DescElement.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.svg;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-
-
-public interface DescElement extends ODFElement, IEditable {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/SVGConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/SVGConstants.java
deleted file mode 100644
index e2640f8..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/SVGConstants.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.svg;
-
-public final class SVGConstants {
- static public final String SVG_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0";
-
- static public final String ELEMENT_TITLE = "title";
-
- static public final String ELEMENT_DESC = "desc";
-
- static public final String ATTR_WIDTH = "width";
-
- static public final String ATTR_HEIGHT = "height";
-
- static public final String ATTR_X = "x";
-
- static public final String ATTR_Y = "y";
-
- static public final String ATTR_FONT_FAMILY = "font-family";
-
- static public final String ATTR_FONT_FAMILY_GENERIC = "font-family-generic";
-
- static public final String ATTR_STROKE_WIDTH = "stroke-width";
-
- static public final String ATTR_STROKE_COLOR = "stroke-color";
-
- static public final String ATTR_STROKE_OPACITY = "stroke-opacity";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/TitleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/TitleElement.java
deleted file mode 100644
index ba26dec..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/TitleElement.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.svg;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-
-
-public interface TitleElement extends ODFElement, IEditable {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/impl/DescElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/impl/DescElementImpl.java
deleted file mode 100644
index f81a891..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/impl/DescElementImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.svg.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IEditListener;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.svg.DescElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-
-class DescElementImpl extends ODFElementImpl implements DescElement {
- private static final long serialVersionUID = -7102253537020078757L;
-
- protected DescElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public Object getValue() {
- NodeList children = getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child instanceof Text) {
- return ((Text) child).getData();
- }
- }
- return null;
- }
-
- public void setValue(Object data) {
- // TODO Auto-generated method stub
-
- }
-
- public void remove() {
- // TODO Auto-generated method stub
-
- }
-
- public void insert(IEditable data) {
- // TODO Auto-generated method stub
-
- }
-
- public void addEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/impl/SVGNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/impl/SVGNodeFactory.java
deleted file mode 100644
index 39f29f9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/impl/SVGNodeFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.svg.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.w3c.dom.Element;
-
-
-public class SVGNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(SVGConstants.ELEMENT_TITLE, TitleElementImpl.class);
- tagMap.put(SVGConstants.ELEMENT_DESC, DescElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/impl/TitleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/impl/TitleElementImpl.java
deleted file mode 100644
index a0c9ec3..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/svg/impl/TitleElementImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.svg.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IEditListener;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.svg.TitleElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-
-class TitleElementImpl extends ODFElementImpl implements TitleElement {
- private static final long serialVersionUID = -8770608864411728680L;
-
- protected TitleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public Object getValue() {
- NodeList children = getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child instanceof Text) {
- return ((Text) child).getData();
- }
- }
- return null;
- }
-
- public void setValue(Object data) {
- // TODO Auto-generated method stub
-
- }
-
- public void remove() {
- // TODO Auto-generated method stub
-
- }
-
- public void insert(IEditable data) {
- // TODO Auto-generated method stub
-
- }
-
- public void addEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/CoveredTableCellElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/CoveredTableCellElement.java
deleted file mode 100644
index de4a181..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/CoveredTableCellElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-
-public interface CoveredTableCellElement extends ODFElement, IStylable,
- ITextElementContainer {
-
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableCellElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableCellElement.java
deleted file mode 100644
index a68683c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableCellElement.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-
-public interface TableCellElement extends ODFElement, IStylable,
- ITextElementContainer {
- public String getAttrTableStyleName();
-
- public String getAttrOfficeValue();
-
- public String getAttrOfficeValueType();
-
- public String getAttrTableFormula();
-
- public int getAttrTableNumberColumnsRepeated();
-
- public int getAttrTableNumberColumnsSpanned();
-
- public int getTableIndex();
-
- public TableElement getTableElement();
-
- public int getTableColIndex();
-
- public int getTableRowIndex();
-
- public int getTableColSize();
-
- public int getTableRowSize();
-
- public void setValue(String value);
-
- public String getValue();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableColumnElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableColumnElement.java
deleted file mode 100644
index 33c56f7..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableColumnElement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface TableColumnElement extends ODFElement, IStylable {
- public String getAttrTableStyleName();
-
- public int getAttrTableNumberColumnsRepeated();
-
- public String getAttrTableDefaultCellStyleName();
-
- public int getTableIndex();
-
- public TableElement getTableElement();
-
- public int getTableColumnIndex();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableColumnsElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableColumnsElement.java
deleted file mode 100644
index b6fa3aa..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableColumnsElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface TableColumnsElement extends ODFElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableConstants.java
deleted file mode 100644
index d287262..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableConstants.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table;
-
-public final class TableConstants {
- static public final String TABLE_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
-
- static public final String ELEMENT_TABLE = "table";
-
- static public final String ELEMENT_TABLE_ROW = "table-row";
-
- static public final String ELEMENT_TABLE_COLUMN = "table-column";
-
- static public final String ELEMENT_TABLE_CELL = "table-cell";
-
- static public final String ELEMENT_COVERED_TABLE_CELL = "covered-table-cell";
-
- static public final String ELEMENT_TABLE_HEADER_COLUMNS = "table-header-columns";
-
- static public final String ELEMENT_TABLE_HEADER_ROWS = "table-header-rows";
-
- static public final String ELEMENT_TABLE_ROWS = "table-rows";
-
- static public final String ELEMENT_TABLE_COLUMNS = "table-columns";
-
- static public final String ATTR_STYLE_NAME = "style-name";
-
- static public final String ATTR_CELL_RANGE_ADDRESS = "cell-range-address";
-
- static public final String ATTR_END_CELL_ADDRESS = "end-cell-address";
-
- static public final String ATTR_END_X = "end-cell-x";
-
- static public final String ATTR_END_Y = "end-cell-y";
-
- static public final String ATTR_DISPLAY = "display";
-
- static public final String ATTR_FORMULA = "formula";
-
- static public final String ATTR_NUMBER_ROWS_REPEATED = "number-rows-repeated";
-
- static public final String ATTR_NUMBER_COLUMNS_REPEATED = "number-columns-repeated";
-
- static public final String ATTR_NUMBER_COLUMNS_SPANNED = "number-columns-spanned";
-
- static public final String ATTR_DEFAULT_CELL_STYLE_NAME = "default-cell-style-name";
-
- static public final String ATTR_NAME = "name";
-
- static public final String ATTR_ATTR_PRINT = "attr-print";
-
- static public final String ATTR_BORDER_MODEL = "border-model";
-
- static public final String ATTR_STRUCTURE_PROTECTED = "structure-protected";
-
- static public final String ATTR_PROTECTED = "protected";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableElement.java
deleted file mode 100644
index 151a978..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableElement.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table;
-
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-import org.eclipse.actf.model.dom.odf.text.SequenceElement;
-import org.w3c.dom.NodeList;
-
-
-public interface TableElement extends ODFElement, IStylable,
- ITextElementContainer {
- public String getAttrTableStyleName();
-
- public String getAttrTableName();
-
- public boolean getAttrTableAttrPrint();
-
- public boolean getAttrTableProtected();
-
- public ContentBaseElement getContent();
-
- public int getTableIndex();
-
- public TableColumnElement getTableColumnChild(int column);
-
- public TableRowElement getTableRowChild(int row);
-
- public int getTableColumnSize();
-
- public List getTableColumnChildren();
-
- public int getTableRowSize();
-
- public List getTableRowChildren();
-
- public boolean hasTableCellStyle(int column, int row);
-
- public TableRowElement appendNewTableRowElement();
-
- public NodeList getTableHeaderColumns();
-
- public NodeList getTableHeaderRows();
-
- public SequenceElement getTextSequenceElement();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableHeaderColumnsElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableHeaderColumnsElement.java
deleted file mode 100644
index 410b7b6..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableHeaderColumnsElement.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table;
-
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-
-public interface TableHeaderColumnsElement extends ODFElement {
- public int getTableIndex();
-
- public TableElement getTableElement();
-
- public List getTableColumChildren();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableHeaderRowsElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableHeaderRowsElement.java
deleted file mode 100644
index 9b14443..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableHeaderRowsElement.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table;
-
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-
-public interface TableHeaderRowsElement extends ODFElement {
- public int getTableIndex();
-
- public TableElement getTableElement();
-
- public List getTableRowChildren();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableRowElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableRowElement.java
deleted file mode 100644
index a72bdfb..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableRowElement.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table;
-
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-
-public interface TableRowElement extends ODFElement, IStylable,
- ITextElementContainer {
- public String getAttrTableStyleName();
-
- public int getAttrTableNumberRowsRepeated();
-
- public int getTableIndex();
-
- public int getRowIndex();
-
- public TableElement getTableElement();
-
- public List getTableCellChildren();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableRowsElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableRowsElement.java
deleted file mode 100644
index 53afb6d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/TableRowsElement.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table;
-
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-
-public interface TableRowsElement extends ODFElement {
- public List getTableRowChildren();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/CoveredTableCellElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/CoveredTableCellElementImpl.java
deleted file mode 100644
index 304014c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/CoveredTableCellElementImpl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IStyleListener;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.eclipse.actf.model.dom.odf.table.CoveredTableCellElement;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.w3c.dom.Element;
-
-
-class CoveredTableCellElementImpl extends ODFStylableElementImpl implements
- CoveredTableCellElement {
- private static final long serialVersionUID = -7373283588048632663L;
-
- protected CoveredTableCellElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public void setStyle(StyleElement style) {
- // TODO Auto-generated method stub
-
- }
-
- public StyleElement getStyle() {
- Element root = getOwnerDocument().getDocumentElement();
- if (root instanceof ODFElementImpl) {
- String styleName = getAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME);
- ODFElement elem = ((ODFElementImpl) root).findElementByAttrValue(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_STYLE,
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME, styleName);
- if ((elem != null) && (elem instanceof StyleElement))
- return (StyleElement) elem;
- }
- return null;
- }
-
- public void addStyleListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeStyleListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public Iterator getChildIterator() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getContentSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableCellElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableCellElementImpl.java
deleted file mode 100644
index ad8f7b8..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableCellElementImpl.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table.impl;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IStyleListener;
-import org.eclipse.actf.model.dom.odf.office.OfficeConstants;
-import org.eclipse.actf.model.dom.odf.range.impl.ITextElementContainerUtil;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.eclipse.actf.model.dom.odf.table.TableCellElement;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.eclipse.actf.model.dom.odf.table.TableRowElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-class TableCellElementImpl extends ODFStylableElementImpl implements
- TableCellElement {
- private static final long serialVersionUID = -4617536939760820397L;
-
- protected TableCellElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrTableStyleName() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME);
- return null;
- }
-
- public int getTableIndex() {
- TableElement tableElement = getTableElement();
- return tableElement.getTableIndex();
- }
-
- public TableElement getTableElement() {
- TableElement tableElement = null;
-
- Node parent = getParentNode();
- while (parent != null) {
- if (parent instanceof TableElement) {
- tableElement = (TableElement) parent;
- break;
- }
- parent = parent.getParentNode();
- }
-
- return tableElement;
- }
-
- public int getTableColIndex() {
- TableElement tableElement = getTableElement();
- if (tableElement == null)
- return -1;
-
- List rowList = tableElement.getTableRowChildren();
- if (rowList == null)
- return -1;
-
- for (int i = 0; i < rowList.size(); i++) {
- TableRowElement row = (TableRowElement) rowList.get(i);
- List cellList = row.getTableCellChildren();
- if (cellList != null) {
- for (int j = 0; j < cellList.size(); j++) {
- if (cellList.get(j).equals(this)) {
- return j;
- }
- }
- }
- }
-
- return -1;
- }
-
- public int getTableRowIndex() {
- TableElement tableElement = getTableElement();
- if (tableElement == null)
- return -1;
-
- List rowList = tableElement.getTableRowChildren();
- if (rowList == null)
- return -1;
-
- for (int i = 0; i < rowList.size(); i++) {
- TableRowElement row = (TableRowElement) rowList.get(i);
- List cellList = row.getTableCellChildren();
- if (cellList != null) {
- for (int j = 0; j < cellList.size(); j++) {
- if (cellList.get(j).equals(this)) {
- return i;
- }
- }
- }
- }
-
- return -1;
- }
-
- public int getTableColSize() {
- TableElement tableElement = getTableElement();
- if (tableElement == null)
- return -1;
-
- List rowList = tableElement.getTableRowChildren();
- if (rowList == null)
- return -1;
-
- for (int i = 0; i < rowList.size(); i++) {
- TableRowElement row = (TableRowElement) rowList.get(i);
- List cellList = row.getTableCellChildren();
- if (cellList != null) {
- for (int j = 0; j < cellList.size(); j++) {
- if (cellList.get(j).equals(this)) {
- return cellList.size();
- }
- }
- }
- }
- return -1;
- }
-
- public int getTableRowSize() {
- TableElement tableElement = getTableElement();
- if (tableElement == null)
- return -1;
-
- List rowList = tableElement.getTableRowChildren();
- if (rowList == null)
- return -1;
-
- return rowList.size();
- }
-
- public String getAttrOfficeValue() {
- if (hasAttributeNS(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_VALUE))
- return getAttributeNS(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_VALUE);
- return null;
- }
-
- public String getAttrOfficeValueType() {
- if (hasAttributeNS(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_VALUE_TYPE))
- return getAttributeNS(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_VALUE_TYPE);
- return null;
- }
-
- public String getAttrTableFormula() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_FORMULA))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_FORMULA);
- return null;
- }
-
- public int getAttrTableNumberColumnsRepeated() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_COLUMNS_REPEATED)) {
- return new Integer(getAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_COLUMNS_REPEATED)).intValue();
- }
- return -1;
- }
-
- public int getAttrTableNumberColumnsSpanned() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_COLUMNS_SPANNED)) {
- return new Integer(getAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_COLUMNS_SPANNED)).intValue();
- }
- return -1;
- }
-
- public void setValue(String value) {
- setAttributeNS(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_VALUE, value);
- }
-
- public String getValue() {
- return getAttrOfficeValue();
- }
-
- public void setStyle(StyleElement style) {
- // TODO Auto-generated method stub
-
- }
-
- public StyleElement getStyle() {
- Element root = getOwnerDocument().getDocumentElement();
- if (root instanceof ODFElementImpl) {
- String styleName = getAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME);
- ODFElement elem = ((ODFElementImpl) root).findElementByAttrValue(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_STYLE,
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME, styleName);
- if ((elem != null) && (elem instanceof StyleElement))
- return (StyleElement) elem;
- }
- return null;
- }
-
- public void addStyleListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeStyleListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public long getContentSize() {
- return ITextElementContainerUtil.getContentSize(this);
- }
-
- public Iterator getChildIterator() {
- return ITextElementContainerUtil.getChildIterator(this);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableColumnElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableColumnElementImpl.java
deleted file mode 100644
index cac4db9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableColumnElementImpl.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IStyleListener;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.eclipse.actf.model.dom.odf.table.TableColumnElement;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-class TableColumnElementImpl extends ODFStylableElementImpl implements
- TableColumnElement {
- private static final long serialVersionUID = -6481432496309846401L;
-
- protected TableColumnElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrTableStyleName() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME);
- return null;
- }
-
- public int getAttrTableNumberColumnsRepeated() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_COLUMNS_REPEATED)) {
- return new Integer(getAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_COLUMNS_REPEATED)).intValue();
- }
- return -1;
- }
-
- public String getAttrTableDefaultCellStyleName() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_DEFAULT_CELL_STYLE_NAME))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_DEFAULT_CELL_STYLE_NAME);
- return null;
- }
-
- public int getTableIndex() {
- TableElement table = getTableElement();
- if (table == null)
- return -1;
- return table.getTableIndex();
- }
-
- public TableElement getTableElement() {
- TableElement tableElement = null;
-
- Node parent = getParentNode();
- while (parent != null) {
- if (parent instanceof TableElement) {
- tableElement = (TableElement) parent;
- break;
- }
- parent = parent.getParentNode();
- }
- return tableElement;
- }
-
- public int getTableColumnIndex() {
- int columnStartIndex = 0;
- NodeList list = getTableElement().getElementsByTagNameNS(
- TableConstants.TABLE_NAMESPACE_URI, "table-column");
- for (int i = 0; i < list.getLength(); i++) {
- if (list.item(i).equals(this)) {
- return columnStartIndex;
- }
- if (((TableColumnElement) list.item(i)).hasAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_COLUMNS_REPEATED)) {
- columnStartIndex += ((TableColumnElement) list.item(i))
- .getAttrTableNumberColumnsRepeated();
- } else {
- columnStartIndex++;
- }
- }
- return -1;
- }
-
- public void setStyle(StyleElement style) {
- // TODO Auto-generated method stub
-
- }
-
- public StyleElement getStyle() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void addStyleListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeStyleListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
-
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableColumnsElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableColumnsElementImpl.java
deleted file mode 100644
index 1f8a245..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableColumnsElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.table.TableColumnsElement;
-import org.w3c.dom.Element;
-
-
-class TableColumnsElementImpl extends ODFElementImpl implements
- TableColumnsElement {
- private static final long serialVersionUID = -6548394022463575540L;
-
- protected TableColumnsElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableElementImpl.java
deleted file mode 100644
index 2378739..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableElementImpl.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table.impl;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.office.BodyElement;
-import org.eclipse.actf.model.dom.odf.office.DocumentContentElement;
-import org.eclipse.actf.model.dom.odf.range.impl.ITextElementContainerUtil;
-import org.eclipse.actf.model.dom.odf.table.TableCellElement;
-import org.eclipse.actf.model.dom.odf.table.TableColumnElement;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.eclipse.actf.model.dom.odf.table.TableHeaderColumnsElement;
-import org.eclipse.actf.model.dom.odf.table.TableHeaderRowsElement;
-import org.eclipse.actf.model.dom.odf.table.TableRowElement;
-import org.eclipse.actf.model.dom.odf.table.TableRowsElement;
-import org.eclipse.actf.model.dom.odf.text.SequenceElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-class TableElementImpl extends ODFStylableElementImpl implements TableElement {
- private static final long serialVersionUID = -1072814785496953249L;
-
- protected TableElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrTableName() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NAME))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NAME);
- return null;
- }
-
- public String getAttrTableStyleName() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME);
- return null;
- }
-
- public boolean getAttrTableAttrPrint() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_ATTR_PRINT)) {
- return new Boolean(getAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_ATTR_PRINT)).booleanValue();
- }
- return false;
- }
-
- public boolean getAttrTableProtected() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_PROTECTED)) {
- return new Boolean(getAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_PROTECTED)).booleanValue();
- }
- return false;
- }
-
- public int getTableIndex() {
- NodeList list = getContent().getElementsByTagNameNS(
- TableConstants.TABLE_NAMESPACE_URI, "table");
- for (int i = 0; i < list.getLength(); i++) {
- if (list.item(i).equals(this)) {
- return i;
- }
- }
- return -1;
- }
-
- public TableColumnElement getTableColumnChild(int column) {
- NodeList children = getChildNodes();
- if (children != null) {
- for (int i = 0, count = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof TableColumnElement) {
- if (count == column)
- return (TableColumnElement) children.item(i);
- count++;
- }
- }
- }
- return null;
- }
-
- public TableRowElement getTableRowChild(int row) {
- NodeList children = getChildNodes();
- if (children != null) {
- for (int i = 0, count = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof TableRowElement) {
- if (count == row)
- return (TableRowElement) children.item(i);
- count++;
- }
- }
- }
- return null;
- }
-
- public int getTableColumnSize() {
- int size = 0;
- NodeList children = getChildNodes();
- if (children != null) {
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child instanceof TableColumnElement) {
- int len = ((TableColumnElement) child)
- .getAttrTableNumberColumnsRepeated();
- if (len > 0)
- size += len;
- else
- size++;
- } else if ((child instanceof TableHeaderColumnsElement)
- || (child instanceof TableColumnElement)) {
- NodeList grandChildren = child.getChildNodes();
- for (int j = 0; j < grandChildren.getLength(); j++) {
- Node grandChild = grandChildren.item(j);
- if (grandChild instanceof TableColumnElement) {
- int len = ((TableColumnElement) grandChild)
- .getAttrTableNumberColumnsRepeated();
- if (len > 0)
- size += len;
- else
- size++;
- }
- }
- }
- }
- }
- return size;
- }
-
- public List getTableColumnChildren() {
- List<Node> colList = null;
- NodeList children = getChildNodes();
- if (children != null) {
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child instanceof TableColumnElement) {
- if (colList == null)
- colList = new Vector<Node>();
- colList.add(child);
- } else if ((child instanceof TableHeaderColumnsElement)
- || (child instanceof TableColumnElement)) {
- NodeList grandChildren = child.getChildNodes();
- for (int j = 0; j < grandChildren.getLength(); j++) {
- Node grandChild = grandChildren.item(j);
- if (grandChild instanceof TableColumnElement) {
- if (colList == null)
- colList = new Vector<Node>();
- colList.add(grandChild);
- }
- }
- }
- }
- }
- return colList;
- }
-
- public int getTableRowSize() {
- int size = 0;
- NodeList children = getChildNodes();
- if (children != null) {
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child instanceof TableRowElement) {
- int len = ((TableRowElement) child)
- .getAttrTableNumberRowsRepeated();
- if (len > 0)
- size += len;
- else
- size++;
- } else if ((child instanceof TableHeaderRowsElement)
- || (child instanceof TableRowElement)) {
- NodeList grandChildren = child.getChildNodes();
- for (int j = 0; j < grandChildren.getLength(); j++) {
- Node grandChild = grandChildren.item(j);
- if (grandChild instanceof TableRowElement) {
- int len = ((TableRowElement) grandChild)
- .getAttrTableNumberRowsRepeated();
- if (len > 0)
- size += len;
- else
- size++;
- }
- }
- }
- }
- }
- return size;
- }
-
- public List getTableRowChildren() {
- List<Node> rowList = null;
- NodeList children = getChildNodes();
- if (children != null) {
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof TableRowElement) {
- if (rowList == null)
- rowList = new Vector<Node>();
- rowList.add(children.item(i));
- } else if ((children.item(i) instanceof TableHeaderRowsElement)
- || (children.item(i) instanceof TableRowsElement)) {
- NodeList grandChildren = children.item(i).getChildNodes();
- for (int j = 0; j < grandChildren.getLength(); j++) {
- if (grandChildren.item(j) instanceof TableRowElement) {
- if (rowList == null)
- rowList = new Vector<Node>();
- rowList.add(grandChildren.item(j));
- }
- }
- }
- }
- }
- return rowList;
- }
-
- public ContentBaseElement getContent() {
- if (odfDoc == null)
- return null;
- ContentBaseElement contentElement = null;
-
- Element root = odfDoc.getDocumentElement();
- if (root instanceof DocumentContentElement) {
- BodyElement body = ((DocumentContentElement) root).getBodyElement();
- contentElement = body.getContent();
- }
-
- return contentElement;
- }
-
- public boolean hasTableCellStyle(int column, int row) {
- TableRowElement rowElement = getTableRowChild(row);
- List cellElems = rowElement.getTableCellChildren();
- for (int i = 0, colCount = 0; i < cellElems.size(); i++) {
- TableCellElement cellElem = (TableCellElement) cellElems.get(i);
- if (cellElem.hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_COLUMNS_REPEATED)) {
- colCount += cellElem.getAttrTableNumberColumnsRepeated();
- } else {
- colCount++;
- }
- if (colCount - 1 >= column)
- return cellElem.hasAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME);
- }
- return false;
- }
-
- public TableRowElement appendNewTableRowElement() {
- String tablePrefix = this
- .lookupPrefix(TableConstants.TABLE_NAMESPACE_URI);
- TableRowElement rowElement = (TableRowElement) getOwnerDocument()
- .createElement(
- tablePrefix + ":" + TableConstants.ELEMENT_TABLE_ROW);
- return (TableRowElement) this.appendChild(rowElement);
- }
-
- public NodeList getTableHeaderColumns() {
- return XPathUtil.evalXPathNodeList(this, "./*[namespace-uri()='"
- + TableConstants.TABLE_NAMESPACE_URI + "' and local-name()='"
- + TableConstants.ELEMENT_TABLE_HEADER_COLUMNS + "']");
- }
-
- public NodeList getTableHeaderRows() {
- return XPathUtil.evalXPathNodeList(this, "./*[namespace-uri()='"
- + TableConstants.TABLE_NAMESPACE_URI + "' and local-name()='"
- + TableConstants.ELEMENT_TABLE_HEADER_ROWS + "']");
- }
-
- public SequenceElement getTextSequenceElement() {
- NodeList fnl = XPathUtil.evalXPathNodeList(this,
- "following-sibling::*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='" + TextConstants.ELEMENT_P
- + "'][1]" + "/*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='"
- + TextConstants.ELEMENT_SEQUENCE + "']");
- if ((fnl != null) && (fnl.getLength() == 1))
- return (SequenceElement) fnl.item(0);
- if ((fnl != null) && (fnl.getLength() > 1)) {
- new ODFException(
- "draw:image has more than one text:sequence elements.")
- .printStackTrace();
- }
-
- NodeList pnl = XPathUtil.evalXPathNodeList(this,
- "preceding-sibling::*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='" + TextConstants.ELEMENT_P
- + "'][1]" + "/*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='"
- + TextConstants.ELEMENT_SEQUENCE + "']");
- if ((pnl != null) && (pnl.getLength() == 1))
- return (SequenceElement) pnl.item(0);
- if ((pnl != null) && (pnl.getLength() > 1)) {
- new ODFException(
- "draw:image has more than one text:sequence elements.")
- .printStackTrace();
- }
- return null;
- }
-
- public long getContentSize() {
- return ITextElementContainerUtil.getContentSize(this);
- }
-
- public Iterator getChildIterator() {
- return ITextElementContainerUtil.getChildIterator(this);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableHeaderColumnsElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableHeaderColumnsElementImpl.java
deleted file mode 100644
index b843e4e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableHeaderColumnsElementImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table.impl;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.table.TableColumnElement;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.eclipse.actf.model.dom.odf.table.TableHeaderColumnsElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-class TableHeaderColumnsElementImpl extends ODFElementImpl implements
- TableHeaderColumnsElement {
- private static final long serialVersionUID = -2836780502407580629L;
-
- protected TableHeaderColumnsElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public int getTableIndex() {
- return getTableElement().getTableIndex();
- }
-
- public TableElement getTableElement() {
- TableElement tableElement = null;
-
- Node parent = getParentNode();
- while (parent != null) {
- if (parent instanceof TableElement) {
- tableElement = (TableElement) parent;
- break;
- }
- parent = parent.getParentNode();
- }
- return tableElement;
- }
-
- public List getTableColumChildren() {
- List<Node> columnList = null;
-
- NodeList children = getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof TableColumnElement) {
- if (columnList == null)
- columnList = new Vector<Node>();
- columnList.add(children.item(i));
- }
- }
-
- return columnList;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableHeaderRowsElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableHeaderRowsElementImpl.java
deleted file mode 100644
index 887ffff..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableHeaderRowsElementImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table.impl;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.eclipse.actf.model.dom.odf.table.TableHeaderRowsElement;
-import org.eclipse.actf.model.dom.odf.table.TableRowElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-class TableHeaderRowsElementImpl extends ODFElementImpl implements
- TableHeaderRowsElement {
- private static final long serialVersionUID = 8078924819161617838L;
-
- protected TableHeaderRowsElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public int getTableIndex() {
- return getTableElement().getTableIndex();
- }
-
- public TableElement getTableElement() {
- TableElement tableElement = null;
-
- Node parent = getParentNode();
- while (parent != null) {
- if (parent instanceof TableElement) {
- tableElement = (TableElement) parent;
- break;
- }
- parent = parent.getParentNode();
- }
- return tableElement;
- }
-
- public List getTableRowChildren() {
- List<Node> rowList = null;
-
- NodeList children = getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof TableRowElement) {
- if (rowList == null)
- rowList = new Vector<Node>();
- rowList.add(children.item(i));
- }
- }
-
- return rowList;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableNodeFactory.java
deleted file mode 100644
index 14552c4..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableNodeFactory.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.w3c.dom.Element;
-
-
-public class TableNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(TableConstants.ELEMENT_TABLE, TableElementImpl.class);
- tagMap.put(TableConstants.ELEMENT_TABLE_ROW, TableRowElementImpl.class);
- tagMap.put(TableConstants.ELEMENT_TABLE_COLUMN,
- TableColumnElementImpl.class);
- tagMap.put(TableConstants.ELEMENT_TABLE_CELL,
- TableCellElementImpl.class);
- tagMap.put(TableConstants.ELEMENT_COVERED_TABLE_CELL,
- CoveredTableCellElementImpl.class);
- tagMap.put(TableConstants.ELEMENT_TABLE_HEADER_COLUMNS,
- TableHeaderColumnsElementImpl.class);
- tagMap.put(TableConstants.ELEMENT_TABLE_HEADER_ROWS,
- TableHeaderRowsElementImpl.class);
- tagMap.put(TableConstants.ELEMENT_TABLE_ROWS,
- TableRowsElementImpl.class);
- tagMap.put(TableConstants.ELEMENT_TABLE_COLUMNS,
- TableColumnsElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableRowElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableRowElementImpl.java
deleted file mode 100644
index 9e2e55f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableRowElementImpl.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table.impl;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IStyleListener;
-import org.eclipse.actf.model.dom.odf.range.impl.ITextElementContainerUtil;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.eclipse.actf.model.dom.odf.table.TableCellElement;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.eclipse.actf.model.dom.odf.table.TableRowElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-class TableRowElementImpl extends ODFStylableElementImpl implements
- TableRowElement {
- private static final long serialVersionUID = 4515268211599720829L;
-
- protected TableRowElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrTableStyleName() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME))
- return getAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STYLE_NAME);
- return null;
- }
-
- public int getAttrTableNumberRowsRepeated() {
- if (hasAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_ROWS_REPEATED)) {
- return new Integer(getAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_ROWS_REPEATED)).intValue();
- }
- return -1;
- }
-
- public int getTableIndex() {
- TableElement tableElement = getTableElement();
- return tableElement.getTableIndex();
- }
-
- public int getRowIndex() {
- TableElement tableElement = getTableElement();
- if (tableElement == null)
- return -1;
-
- NodeList list = tableElement.getElementsByTagNameNS(
- TableConstants.TABLE_NAMESPACE_URI, "table-row");
- if (list == null)
- return -1;
-
- for (int i = 0; i < list.getLength(); i++) {
- if (list.item(i).equals(this)) {
- return i;
- }
- }
- return -1;
- }
-
- public TableElement getTableElement() {
- TableElement tableElement = null;
-
- Node parent = getParentNode();
- while (parent != null) {
- if (parent instanceof TableElement) {
- tableElement = (TableElement) parent;
- break;
- }
- parent = parent.getParentNode();
- }
-
- return tableElement;
- }
-
- public List getTableCellChildren() {
- List<Node> cellList = null;
-
- NodeList children = getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof TableCellElement) {
- if (cellList == null)
- cellList = new Vector<Node>();
- cellList.add(children.item(i));
- }
- }
-
- return cellList;
- }
-
- public void setStyle(StyleElement style) {
- // TODO Auto-generated method stub
-
- }
-
- public StyleElement getStyle() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void addStyleListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeStyleListener(IStyleListener listener, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public long getContentSize() {
- return ITextElementContainerUtil.getContentSize(this);
- }
-
- public Iterator getChildIterator() {
- return ITextElementContainerUtil.getChildIterator(this);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableRowsElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableRowsElementImpl.java
deleted file mode 100644
index 6ae1304..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/table/impl/TableRowsElementImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.table.impl;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.table.TableRowElement;
-import org.eclipse.actf.model.dom.odf.table.TableRowsElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-class TableRowsElementImpl extends ODFElementImpl implements TableRowsElement {
- private static final long serialVersionUID = 4890512236727973374L;
-
- protected TableRowsElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public List getTableRowChildren() {
- List<Node> rowList = null;
-
- NodeList children = getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i) instanceof TableRowElement) {
- if (rowList == null)
- rowList = new Vector<Node>();
- rowList.add(children.item(i));
- }
- }
-
- return rowList;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/AElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/AElement.java
deleted file mode 100644
index eeb97c0..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/AElement.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-
-public interface AElement extends IEditable, ODFElement, ITextElementContainer,
- ITextContent {
- public String getAttrOfficeTitle();
-
- public String getType();
-
- public void setType(String typename);
-
- public String getHref();
-
- public void setHref(String url);
-
- public ODFElement getHrefElement();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/AlphabeticalIndexElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/AlphabeticalIndexElement.java
deleted file mode 100644
index bb97013..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/AlphabeticalIndexElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-public interface AlphabeticalIndexElement extends ITextElementContainer {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/AlphabeticalIndexSourceElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/AlphabeticalIndexSourceElement.java
deleted file mode 100644
index a924a39..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/AlphabeticalIndexSourceElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface AlphabeticalIndexSourceElement extends ODFElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/BookmarkElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/BookmarkElement.java
deleted file mode 100644
index 9337c50..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/BookmarkElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface BookmarkElement extends ODFElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ChangeElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ChangeElement.java
deleted file mode 100644
index 4e3f3e8..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ChangeElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface ChangeElement extends ODFElement {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ChangeEndElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ChangeEndElement.java
deleted file mode 100644
index bd09fa5..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ChangeEndElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface ChangeEndElement extends ODFElement {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ChangeStartElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ChangeStartElement.java
deleted file mode 100644
index 4035aaf..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ChangeStartElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface ChangeStartElement extends ODFElement {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/HElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/HElement.java
deleted file mode 100644
index 2beb568..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/HElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-
-public interface HElement extends ODFElement, IStylable, IEditable,
- ITextElementContainer {
- public int getAttrTextOutlineLevel();
-
- public boolean getAttrTextRestartNumbering();
-
- public int getAttrTextStartValue();
-
- public boolean getAttrTextIsListHeader();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ITextContent.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ITextContent.java
deleted file mode 100644
index ff18fbb..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ITextContent.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-public interface ITextContent {
- public String getType();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/IndexBodyElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/IndexBodyElement.java
deleted file mode 100644
index 5aeeda0..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/IndexBodyElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-public interface IndexBodyElement extends ITextElementContainer {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/IndexTitleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/IndexTitleElement.java
deleted file mode 100644
index c882281..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/IndexTitleElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-public interface IndexTitleElement extends ITextElementContainer {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListElement.java
deleted file mode 100644
index ed52a2d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListElement.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-
-
-public interface ListElement extends ODFElement, IStylable,
- ITextElementContainer {
- public long getSize();
-
- public ListItemElement getItem(long idx);
-
- public void appendItem(ListItemElement item);
-
- public void insertBefore(ListItemElement item, long idx);
-
- public long getListLevel();
-
- public ListElement getTopLevelListElement();
-
- public StyleElement getListLevelStyleElement();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListHeaderElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListHeaderElement.java
deleted file mode 100644
index de46579..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListHeaderElement.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-
-public interface ListHeaderElement extends ODFElement, IStylable,
- ITextElementContainer {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListItemElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListItemElement.java
deleted file mode 100644
index d705880..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListItemElement.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-
-public interface ListItemElement extends ODFElement, IStylable,
- ITextElementContainer {
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListLevelStyleBulletElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListLevelStyleBulletElement.java
deleted file mode 100644
index fd8a72f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListLevelStyleBulletElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-
-public interface ListLevelStyleBulletElement extends StyleElement {
- public long getAttrLevel();
-
- public String getAttrBulletChar();
-
- public void setAttrBulletChar(String character);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListLevelStyleNumberElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListLevelStyleNumberElement.java
deleted file mode 100644
index 6c79ea5..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListLevelStyleNumberElement.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-
-public interface ListLevelStyleNumberElement extends StyleElement {
- public long getAttrLevel();
-
- public String getAttrNumFormat();
-
- public String getAttrNumPrefix();
-
- public String getAttrNumSuffix();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListStyleElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListStyleElement.java
deleted file mode 100644
index b365b4a..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/ListStyleElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-
-public interface ListStyleElement extends StyleElement {
- public long getListLevelStyleBulletSize();
-
- public ListLevelStyleBulletElement getListLevelStyleBullet(long idx);
-
- public void appendListLeverStyleBullet(ListLevelStyleBulletElement elem);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/PElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/PElement.java
deleted file mode 100644
index b9f2b38..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/PElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-
-public interface PElement extends ODFElement, IStylable, IEditable,
- ITextContent, ITextElementContainer {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/PageNumberElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/PageNumberElement.java
deleted file mode 100644
index 10d7c30..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/PageNumberElement.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface PageNumberElement extends ODFElement, IStylable {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SElement.java
deleted file mode 100644
index be6d875..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SElement.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface SElement extends ODFElement {
- public int getAttrTextC();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SectionElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SectionElement.java
deleted file mode 100644
index c4d192c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SectionElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-
-public interface SectionElement extends ODFElement, IStylable, IEditable,
- ITextContent, ITextElementContainer {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SequenceElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SequenceElement.java
deleted file mode 100644
index bc13c71..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SequenceElement.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface SequenceElement extends ODFElement, IStylable, IEditable {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SpanElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SpanElement.java
deleted file mode 100644
index a3a5c6a..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/SpanElement.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-
-
-public interface SpanElement extends ODFElement, IStylable {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TabElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TabElement.java
deleted file mode 100644
index 1797a17..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TabElement.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface TabElement extends ODFElement {
- public int getAttrTextTabRef();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TableOfContentElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TableOfContentElement.java
deleted file mode 100644
index ef80ca1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TableOfContentElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.range.ITextElementContainer;
-
-public interface TableOfContentElement extends ITextElementContainer {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TableOfContentSourceElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TableOfContentSourceElement.java
deleted file mode 100644
index 2d83bd3..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TableOfContentSourceElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface TableOfContentSourceElement extends ODFElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TextConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TextConstants.java
deleted file mode 100644
index f190151..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TextConstants.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-public final class TextConstants {
- static public final String TEXT_NAMESPACE_URI = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
-
- static public final String ELEMENT_A = "a";
-
- static public final String ELEMENT_ALPHABETICAL_INDEX = "alphabetical-index";
-
- static public final String ELEMENT_ALPHABETICAL_INDEX_SOURCE = "alphabetical-index-source";
-
- static public final String ELEMENT_BOOKMARK = "bookmark";
-
- static public final String ELEMENT_H = "h";
-
- static public final String ELEMENT_INDEX_BODY = "index-body";
-
- static public final String ELEMENT_INDEX_TITLE = "index-title";
-
- static public final String ELEMENT_LIST = "list";
-
- static public final String ELEMENT_LIST_ITEM = "list-item";
-
- static public final String ELEMENT_LIST_LEVEL_STYLE_BULLET = "list-level-style-bullet";
-
- static public final String ELEMENT_LIST_LEVEL_STYLE_NUMBER = "list-level-style-number";
-
- static public final String ELEMENT_LIST_STYLE = "list-style";
-
- static public final String ELEMENT_LIST_HEADER = "list-header";
-
- static public final String ELEMENT_P = "p";
-
- static public final String ELEMENT_S = "s";
-
- static public final String ELEMENT_SECTION = "section";
-
- static public final String ELEMENT_SPAN = "span";
-
- static public final String ELEMENT_SEQUENCE = "sequence";
-
- static public final String ELEMENT_TAB = "tab";
-
- static public final String ELEMENT_TABLE_OF_CONTENT = "table-of-content";
-
- static public final String ELEMENT_TABLE_OF_CONTENT_SOURCE = "table-of-content-source";
-
- static public final String ELEMENT_TRACKED_CHANGES = "tracked-changes";
-
- static public final String ELEMENT_CHANGE = "change";
-
- static public final String ELEMENT_CHANGE_START = "change-start";
-
- static public final String ELEMENT_CHANGE_END = "change-end";
-
- static public final String ELEMENT_PAGE_NUMBER = "page-number";
-
- static public final String ATTR_NAME = "name";
-
- static public final String ATTR_ID = "id";
-
- static public final String ATTR_STYLE_NAME = "style-name";
-
- static public final String ATTR_LINE_BREAK = "line-break";
-
- static public final String ATTR_OUTLINE_LEVEL = "outline-level";
-
- static public final String ATTR_RESTART_NUMBERING = "restart-numbering";
-
- static public final String ATTR_START_VALUE = "start-value";
-
- static public final String ATTR_IS_LIST_HEADER = "is-list-header";
-
- static public final String ATTR_C = "c";
-
- static public final String ATTR_TAB_REF = "tab-ref";
-
- static public final String ATTR_LEVEL = "level";
-
- static public final String ATTR_FORMULA = "formula";
-
- static public final String ATTR_DISPLAY = "display";
-
- static public final String ATTR_DISPLAY_VALUE_NONE = "none";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TrackedChangesElement.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TrackedChangesElement.java
deleted file mode 100644
index 8023b2e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/TrackedChangesElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-public interface TrackedChangesElement extends ODFElement {
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/AElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/AElementImpl.java
deleted file mode 100644
index e2cd84e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/AElementImpl.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IEditListener;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.office.OfficeConstants;
-import org.eclipse.actf.model.dom.odf.range.impl.ITextElementContainerUtil;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.eclipse.actf.model.dom.odf.text.AElement;
-import org.eclipse.actf.model.dom.odf.text.BookmarkElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.eclipse.actf.model.dom.odf.xlink.XLinkConstants;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-
-class AElementImpl extends ODFElementImpl implements AElement {
- private static final long serialVersionUID = 884129871818293857L;
-
- protected AElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public String getAttrOfficeTitle() {
- if (hasAttributeNS(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_TITLE))
- return getAttributeNS(OfficeConstants.OFFICE_NAMESPACE_URI,
- OfficeConstants.ATTR_TITLE);
- return null;
- }
-
- public String getType() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_TYPE))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_TYPE);
- return null;
- }
-
- public void setType(String typename) {
- setAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_TYPE, typename);
- }
-
- public String getHref() {
- if (hasAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF))
- return getAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF);
- return null;
- }
-
- public void setHref(String url) {
- setAttributeNS(XLinkConstants.XLINK_NAMESPACE_URI,
- XLinkConstants.ATTR_HREF, url);
- }
-
- public Object getValue() {
- return this.getTextContent();
- }
-
- public void setValue(Object data) {
- if (data instanceof String) {
- this.setTextContent((String) data);
- } else {
- new ODFException("invalid object for text:a setValue function.")
- .printStackTrace();
- }
- }
-
- public void remove() {
- // TODO Auto-generated method stub
- }
-
- public void insert(IEditable data) {
- // TODO Auto-generated method stub
- }
-
- public void addEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
- }
-
- public void removeEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
- }
-
- public long getContentSize() {
- return ITextElementContainerUtil.getContentSize(this);
- }
-
- public Iterator getChildIterator() {
- return ITextElementContainerUtil.getChildIterator(this);
- }
-
- /*
- * Internal link literal is not defined in ODF spec. This function might not
- * be compatible with OpenOffice.
- */
- public ODFElement getHrefElement() {
- String type = getType();
- if (XLinkConstants.LINK_TYPE_SIMPLE.equals(type)) {
- String href = getHref();
- if ((href.startsWith("#")) && (href.endsWith("|outline"))) { // link
- // for
- // header
- String outlineContents = href.substring(1, href.length() - 8);
- // calculate list level of heading element
- // if level==1, it is not included within list structure
- int level = 0;
- while (true) {
- int indexEndPos = outlineContents.indexOf('.');
- if (indexEndPos == -1)
- break;
- try {
- String prefixnum = outlineContents.substring(0,
- indexEndPos);
- new Integer(prefixnum).intValue();
- outlineContents = outlineContents.substring(2).trim();
- } catch (Exception e) {
- break;
- }
- level++;
- }
-
- // search heading element from list structure, if list level is
- // more than 1
- if (level > 1) {
- NodeList nl = XPathUtil.evalXPathNodeList(
- getOwnerDocument().getDocumentElement(),
- ".//*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='"
- + TextConstants.ELEMENT_H
- + "'][attribute::*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='"
- + TextConstants.ATTR_OUTLINE_LEVEL + "']='"
- + level + "']");
- if (nl != null) {
- for (int i = 0; i < nl.getLength(); i++) {
- ODFElement elem = (ODFElement) nl.item(i);
- String content = elem.getTextContent();
- if ((content != null)
- && (outlineContents.equals(content.trim()))) {
- return elem;
- }
- }
- }
- }
-
- // search heading element from heading elements which are not
- // included in list structure
- NodeList hElemList = XPathUtil.evalXPathNodeList(
- getOwnerDocument().getDocumentElement(),
- ".//*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='"
- + TextConstants.ELEMENT_H + "']"
- + "[parent::*[namespace-uri()!='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' or local-name()!='"
- + TextConstants.ELEMENT_LIST_ITEM
- + "'][namespace-uri()!='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' or local-name()!='"
- + TextConstants.ELEMENT_LIST_HEADER + "']]");
- int indexEndPos = href.indexOf('.');
- if (indexEndPos != -1) {
- int index = -1;
- outlineContents = href.substring(indexEndPos + 1,
- href.length() - 8).trim();
- try {
- index = new Integer(href.substring(1, indexEndPos))
- .intValue() - 1;
- } catch (Exception e) {
- }
- if (index != -1) {
- if ((hElemList != null)
- && (hElemList.getLength() > index)) {
- ODFElement elem = (ODFElement) hElemList
- .item(index);
- String content = elem.getTextContent();
- if ((content != null)
- && (outlineContents.equals(content.trim()))) {
- return elem;
- }
- }
- }
- }
-
- // if href URI does not start with number, or link target cannot
- // be found,
- // search heading element by its text content
- outlineContents = href.substring(1, href.length() - 8);
- for (int i = 0; i < hElemList.getLength(); i++) {
- ODFElement elem = (ODFElement) hElemList.item(i);
- String content = elem.getTextContent();
- if ((content != null)
- && (outlineContents.equals(content.trim()))) {
- return elem;
- }
- }
- } else if ((href.startsWith("#")) && (href.endsWith("|graphic"))) { // link
- // for
- // graphic
- // object
- String drawName = href.substring(1, href.length() - 8);
- return findElementByAttrValue(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ELEMENT_FRAME,
- DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME, drawName);
- } else if ((href.startsWith("#")) && (href.endsWith("|table"))) { // link
- // for
- // table
- String tableName = href.substring(1, href.length() - 6);
- return findElementByAttrValue(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ELEMENT_TABLE,
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NAME, tableName);
- } else if ((href.startsWith("#")) && (href.endsWith("|frame"))) { // link
- // for
- // frame
- String frameName = href.substring(1, href.length() - 6);
- return findElementByAttrValue(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ELEMENT_FRAME,
- DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME, frameName);
- } else if ((href.startsWith("#")) && (href.endsWith("|ole"))) { // link
- // for
- // OLE
- // object
- String oleName = href.substring(1, href.length() - 4);
- return findElementByAttrValue(DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ELEMENT_FRAME,
- DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ATTR_NAME, oleName);
- } else if ((href.startsWith("#")) && (href.endsWith("|region"))) { // link
- // for
- // section,
- // or
- // table
- // of
- // contents
- String regionName = href.substring(1, href.length() - 7);
- ODFElement elem = findElementByAttrValue(
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ELEMENT_SECTION,
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_NAME, regionName);
- if (elem != null)
- return elem;
- elem = findElementByAttrValue(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ELEMENT_TABLE_OF_CONTENT,
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_NAME, regionName);
- if (elem != null)
- return elem;
- elem = findElementByAttrValue(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ELEMENT_INDEX_TITLE,
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_NAME, regionName);
- if (elem != null)
- return elem;
- } else if (href.startsWith("#")) { // link for bookmark
- String bookmarkName = href.substring(1);
- ODFElement elem = findElementByAttrValue(
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ELEMENT_BOOKMARK,
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_NAME, bookmarkName);
- if (elem instanceof BookmarkElement)
- return elem;
- }
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/AlphabeticalIndexElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/AlphabeticalIndexElementImpl.java
deleted file mode 100644
index 6f310a3..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/AlphabeticalIndexElementImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.AlphabeticalIndexElement;
-import org.w3c.dom.Element;
-
-
-class AlphabeticalIndexElementImpl extends ODFElementImpl implements
- AlphabeticalIndexElement {
- private static final long serialVersionUID = 2575148179105155904L;
-
- protected AlphabeticalIndexElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public long getContentSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public Iterator getChildIterator() {
- // TODO Auto-generated method stub
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/AlphabeticalIndexSourceElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/AlphabeticalIndexSourceElementImpl.java
deleted file mode 100644
index a67d3c1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/AlphabeticalIndexSourceElementImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.TableOfContentSourceElement;
-import org.w3c.dom.Element;
-
-
-class AlphabeticalIndexSourceElementImpl extends ODFElementImpl implements
- TableOfContentSourceElement {
- private static final long serialVersionUID = 8858891354572254338L;
-
- protected AlphabeticalIndexSourceElementImpl(ODFDocument odfDoc,
- Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/BookmarkElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/BookmarkElementImpl.java
deleted file mode 100644
index 68956be..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/BookmarkElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.BookmarkElement;
-import org.w3c.dom.Element;
-
-
-class BookmarkElementImpl extends ODFElementImpl implements BookmarkElement {
- private static final long serialVersionUID = 8423348084606604442L;
-
- protected BookmarkElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ChangeElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ChangeElementImpl.java
deleted file mode 100644
index b44d389..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ChangeElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.ChangeElement;
-import org.w3c.dom.Element;
-
-
-class ChangeElementImpl extends ODFElementImpl implements ChangeElement {
- private static final long serialVersionUID = 921467331518199499L;
-
- public ChangeElementImpl(ODFDocument odfDoc, Element iElement) {
- super(odfDoc, iElement);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ChangeEndElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ChangeEndElementImpl.java
deleted file mode 100644
index 88c3647..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ChangeEndElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.ChangeStartElement;
-import org.w3c.dom.Element;
-
-
-class ChangeEndElementImpl extends ODFElementImpl implements ChangeStartElement {
- private static final long serialVersionUID = -952363399650602770L;
-
- public ChangeEndElementImpl(ODFDocument odfDoc, Element iElement) {
- super(odfDoc, iElement);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ChangeStartElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ChangeStartElementImpl.java
deleted file mode 100644
index 17936f8..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ChangeStartElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.ChangeStartElement;
-import org.w3c.dom.Element;
-
-
-class ChangeStartElementImpl extends ODFElementImpl implements
- ChangeStartElement {
- private static final long serialVersionUID = 3936676175359033988L;
-
- public ChangeStartElementImpl(ODFDocument odfDoc, Element iElement) {
- super(odfDoc, iElement);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/HElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/HElementImpl.java
deleted file mode 100644
index 5b5c02b..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/HElementImpl.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IEditListener;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.range.impl.ITextElementContainerUtil;
-import org.eclipse.actf.model.dom.odf.text.HElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.w3c.dom.Element;
-
-
-class HElementImpl extends ODFStylableElementImpl implements HElement {
- private static final long serialVersionUID = -2763953514136052510L;
-
- protected HElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public int getAttrTextOutlineLevel() {
- if (hasAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_OUTLINE_LEVEL))
- return new Integer(getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_OUTLINE_LEVEL)).intValue();
- return -1;
- }
-
- public boolean getAttrTextRestartNumbering() {
- if (hasAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_RESTART_NUMBERING))
- return new Boolean(getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_RESTART_NUMBERING)).booleanValue();
- return false;
- }
-
- public int getAttrTextStartValue() {
- if (hasAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_START_VALUE))
- return new Integer(getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_START_VALUE)).intValue();
- return -1;
- }
-
- public boolean getAttrTextIsListHeader() {
- if (hasAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_IS_LIST_HEADER))
- return new Boolean(getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_IS_LIST_HEADER)).booleanValue();
- return false;
- }
-
- public Object getValue() {
- return this.getTextContent();
- }
-
- public void setValue(Object data) {
- if (data instanceof String) {
- this.setTextContent((String) data);
- } else {
- new ODFException("invalid object for text:h setValue function.")
- .printStackTrace();
- }
- }
-
- public void remove() {
- // TODO Auto-generated method stub
-
- }
-
- public void insert(IEditable data) {
- // TODO Auto-generated method stub
-
- }
-
- public void addEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public long getContentSize() {
- return ITextElementContainerUtil.getContentSize(this);
- }
-
- public Iterator getChildIterator() {
- return ITextElementContainerUtil.getChildIterator(this);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/IndexBodyElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/IndexBodyElementImpl.java
deleted file mode 100644
index ec6229d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/IndexBodyElementImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.IndexBodyElement;
-import org.w3c.dom.Element;
-
-
-class IndexBodyElementImpl extends ODFElementImpl implements IndexBodyElement {
- private static final long serialVersionUID = -808947675700354225L;
-
- protected IndexBodyElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public long getContentSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public Iterator getChildIterator() {
- // TODO Auto-generated method stub
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/IndexTitleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/IndexTitleElementImpl.java
deleted file mode 100644
index dff29c7..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/IndexTitleElementImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.IndexTitleElement;
-import org.w3c.dom.Element;
-
-
-class IndexTitleElementImpl extends ODFElementImpl implements IndexTitleElement {
- private static final long serialVersionUID = 3921864828143875463L;
-
- protected IndexTitleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public long getContentSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public Iterator getChildIterator() {
- // TODO Auto-generated method stub
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListElementImpl.java
deleted file mode 100644
index 9342383..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListElementImpl.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.eclipse.actf.model.dom.odf.text.ListElement;
-import org.eclipse.actf.model.dom.odf.text.ListItemElement;
-import org.eclipse.actf.model.dom.odf.text.ListLevelStyleBulletElement;
-import org.eclipse.actf.model.dom.odf.text.ListLevelStyleNumberElement;
-import org.eclipse.actf.model.dom.odf.text.ListStyleElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-class ListElementImpl extends ODFStylableElementImpl implements ListElement {
- private static final long serialVersionUID = -1816073361921569606L;
-
- protected ListElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public long getSize() {
- return XPathUtil.evalXPathNodeList(
- this,
- "./*[namespace-uri()='" + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='list-item']").getLength();
- }
-
- public ListItemElement getItem(long idx) {
- NodeList nodeList = XPathUtil.evalXPathNodeList(this,
- "./*[namespace-uri()='" + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='list-item'][" + (idx + 1) + "]");
- if ((nodeList != null) && (nodeList.getLength() == 1)
- && (nodeList.item(0) instanceof ListItemElement))
- return (ListItemElement) nodeList.item(0);
- return null;
- }
-
- public StyleElement getStyle() {
- ListElement topLevelList = getTopLevelListElement();
- String styleName = topLevelList
- .getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_STYLE_NAME);
- ODFElement elem = findElementByAttrValue(
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ELEMENT_LIST_STYLE,
- StyleConstants.STYLE_NAMESPACE_URI, StyleConstants.ATTR_NAME,
- styleName);
- if ((elem != null) && (elem instanceof ListStyleElement))
- return (StyleElement) elem;
- return null;
- }
-
- public void appendItem(ListItemElement item) {
- // TODO Auto-generated method stub
-
- }
-
- public void insertBefore(ListItemElement item, long idx) {
- // TODO Auto-generated method stub
-
- }
-
- public long getContentSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public Iterator getChildIterator() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getListLevel() {
- long level = 1;
- ListElement topListElem = this;
- while (true) {
- Node parent = topListElem.getParentNode();
- Node gparent = null;
- if (parent != null)
- gparent = parent.getParentNode();
- if ((parent != null) && (parent instanceof ListItemElement)
- && (gparent != null) && (gparent instanceof ListElement)) {
- topListElem = (ListElement) gparent;
- level++;
- } else {
- break;
- }
- }
- return level;
- }
-
- public ListElement getTopLevelListElement() {
- ListElement topListElem = this;
- while (true) {
- Node parent = topListElem.getParentNode();
- Node gparent = null;
- if (parent != null)
- gparent = parent.getParentNode();
- if ((parent != null) && (parent instanceof ListItemElement)
- && (gparent != null) && (gparent instanceof ListElement)) {
- topListElem = (ListElement) gparent;
- } else {
- break;
- }
- }
- return topListElem;
- }
-
- public StyleElement getListLevelStyleElement() {
- long level = getListLevel();
- StyleElement style = getStyle();
- if (style == null)
- return null;
- NodeList children = style.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child instanceof StyleElement) {
- if ((child instanceof ListLevelStyleBulletElement)
- && (((ListLevelStyleBulletElement) child)
- .getAttrLevel() == level)) {
- return (StyleElement) child;
- } else if ((child instanceof ListLevelStyleNumberElement)
- && (((ListLevelStyleNumberElement) child)
- .getAttrLevel() == level)) {
- return (StyleElement) child;
- }
- }
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListHeaderElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListHeaderElementImpl.java
deleted file mode 100644
index 7d914c2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListHeaderElementImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.text.ListHeaderElement;
-import org.w3c.dom.Element;
-
-
-class ListHeaderElementImpl extends ODFStylableElementImpl implements
- ListHeaderElement {
- private static final long serialVersionUID = 3391591722352859831L;
-
- protected ListHeaderElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public Iterator getChildIterator() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getContentSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListItemElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListItemElementImpl.java
deleted file mode 100644
index d6021fe..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListItemElementImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.text.ListItemElement;
-import org.w3c.dom.Element;
-
-
-class ListItemElementImpl extends ODFStylableElementImpl implements
- ListItemElement {
- private static final long serialVersionUID = -235632604670123015L;
-
- protected ListItemElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public long getContentSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public Iterator getChildIterator() {
- // TODO Auto-generated method stub
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListLevelStyleBulletElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListLevelStyleBulletElementImpl.java
deleted file mode 100644
index 06a17ea..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListLevelStyleBulletElementImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.style.impl.StyleElementImpl;
-import org.eclipse.actf.model.dom.odf.text.ListLevelStyleBulletElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.w3c.dom.Element;
-
-
-class ListLevelStyleBulletElementImpl extends StyleElementImpl implements
- ListLevelStyleBulletElement {
- private static final long serialVersionUID = -5280300696409997886L;
-
- protected ListLevelStyleBulletElementImpl(ODFDocument odfDoc,
- Element element) {
- super(odfDoc, element);
- }
-
- public long getAttrLevel() {
- return new Integer(getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_LEVEL)).intValue();
- }
-
- public String getAttrBulletChar() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setAttrBulletChar(String character) {
- // TODO Auto-generated method stub
-
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListLevelStyleNumberElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListLevelStyleNumberElementImpl.java
deleted file mode 100644
index b289d02..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListLevelStyleNumberElementImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.impl.StyleElementImpl;
-import org.eclipse.actf.model.dom.odf.text.ListLevelStyleNumberElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.w3c.dom.Element;
-
-
-class ListLevelStyleNumberElementImpl extends StyleElementImpl implements
- ListLevelStyleNumberElement {
- private static final long serialVersionUID = 1887105389434803256L;
-
- protected ListLevelStyleNumberElementImpl(ODFDocument odfDoc,
- Element element) {
- super(odfDoc, element);
- }
-
- public long getAttrLevel() {
- return new Integer(getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_LEVEL)).intValue();
- }
-
- public String getAttrNumFormat() {
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NUM_FORMAT);
- }
-
- public String getAttrNumPrefix() {
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NUM_PREFIX);
- }
-
- public String getAttrNumSuffix() {
- return getAttributeNS(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NUM_SUFFIX);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListStyleElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListStyleElementImpl.java
deleted file mode 100644
index 133dd3e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/ListStyleElementImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.style.impl.StyleElementImpl;
-import org.eclipse.actf.model.dom.odf.text.ListLevelStyleBulletElement;
-import org.eclipse.actf.model.dom.odf.text.ListStyleElement;
-import org.w3c.dom.Element;
-
-
-class ListStyleElementImpl extends StyleElementImpl implements ListStyleElement {
- private static final long serialVersionUID = 8829467892638490058L;
-
- protected ListStyleElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public long getListLevelStyleBulletSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public ListLevelStyleBulletElement getListLevelStyleBullet(long idx) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void appendListLeverStyleBullet(ListLevelStyleBulletElement elem) {
- // TODO Auto-generated method stub
-
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/PElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/PElementImpl.java
deleted file mode 100644
index c8ff8ac..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/PElementImpl.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IEditListener;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.range.impl.ITextElementContainerUtil;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.eclipse.actf.model.dom.odf.text.PElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.w3c.dom.Element;
-
-
-class PElementImpl extends ODFStylableElementImpl implements PElement {
- private static final long serialVersionUID = -8044542053180348600L;
-
- protected PElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public StyleElement getStyle() {
- String styleName = getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_STYLE_NAME);
- ODFElement style = findElementByAttrValue(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_STYLE,
- StyleConstants.STYLE_NAMESPACE_URI, StyleConstants.ATTR_NAME,
- styleName);
- if ((style != null) && (style instanceof StyleElement))
- return (StyleElement) style;
- return null;
- }
-
- public Object getValue() {
- return this.getTextContent();
- }
-
- public void setValue(Object data) {
- if (data instanceof String) {
- this.setTextContent((String) data);
- } else {
- new ODFException("invalid object for text:p setValue function.")
- .printStackTrace();
- }
- }
-
- public void remove() {
- // TODO Auto-generated method stub
-
- }
-
- public void insert(IEditable data) {
- // TODO Auto-generated method stub
-
- }
-
- public void addEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getContentSize() {
- return ITextElementContainerUtil.getContentSize(this);
- }
-
- public Iterator getChildIterator() {
- return ITextElementContainerUtil.getChildIterator(this);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/PageNumberElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/PageNumberElementImpl.java
deleted file mode 100644
index c1746ec..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/PageNumberElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.text.PageNumberElement;
-import org.w3c.dom.Element;
-
-
-class PageNumberElementImpl extends ODFStylableElementImpl implements
- PageNumberElement {
- private static final long serialVersionUID = 6064683920068812847L;
-
- protected PageNumberElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SElementImpl.java
deleted file mode 100644
index 598f397..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SElementImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.SElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.w3c.dom.Element;
-
-
-class SElementImpl extends ODFElementImpl implements SElement {
- private static final long serialVersionUID = 1865243428016460368L;
-
- protected SElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public int getAttrTextC() {
- if (hasAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_C))
- return new Integer(getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_C)).intValue();
- return -1;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SectionElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SectionElementImpl.java
deleted file mode 100644
index 2bdb326..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SectionElementImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IEditListener;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.text.SectionElement;
-import org.w3c.dom.Element;
-
-
-class SectionElementImpl extends ODFStylableElementImpl implements
- SectionElement {
- private static final long serialVersionUID = 6798818985841796544L;
-
- protected SectionElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public void addEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public Object getValue() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void insert(IEditable data) {
- // TODO Auto-generated method stub
-
- }
-
- public void remove() {
- // TODO Auto-generated method stub
-
- }
-
- public void removeEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void setValue(Object data) {
- // TODO Auto-generated method stub
-
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Iterator getChildIterator() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public long getContentSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SequenceElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SequenceElementImpl.java
deleted file mode 100644
index 06c61c1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SequenceElementImpl.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IEditListener;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.text.SequenceElement;
-import org.w3c.dom.Element;
-
-
-class SequenceElementImpl extends ODFStylableElementImpl implements
- SequenceElement {
- private static final long serialVersionUID = 1475929066534021515L;
-
- protected SequenceElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public Object getValue() {
- return this.getTextContent();
- }
-
- public void setValue(Object data) {
- // TODO validate style:num-format attribute
- if (data instanceof String) {
- this.setTextContent((String) data);
- } else {
- new ODFException("invalid object for text:p setValue function.")
- .printStackTrace();
- }
- }
-
- public void remove() {
- // TODO Auto-generated method stub
-
- }
-
- public void insert(IEditable data) {
- // TODO Auto-generated method stub
-
- }
-
- public void addEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-
- public void removeEditListener(IEditListener observer, String topic) {
- // TODO Auto-generated method stub
-
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SpanElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SpanElementImpl.java
deleted file mode 100644
index 38f73ee..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/SpanElementImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFStylableElementImpl;
-import org.eclipse.actf.model.dom.odf.text.SpanElement;
-import org.w3c.dom.Element;
-
-
-class SpanElementImpl extends ODFStylableElementImpl implements SpanElement {
- private static final long serialVersionUID = -3219161236654846361L;
-
- protected SpanElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TabElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TabElementImpl.java
deleted file mode 100644
index d5243c9..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TabElementImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.TabElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.w3c.dom.Element;
-
-
-class TabElementImpl extends ODFElementImpl implements TabElement {
- private static final long serialVersionUID = -4280963398860880199L;
-
- protected TabElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public int getAttrTextTabRef() {
- if (hasAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_TAB_REF))
- return new Integer(getAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_TAB_REF)).intValue();
- return -1;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TableOfContentElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TableOfContentElementImpl.java
deleted file mode 100644
index ef878a2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TableOfContentElementImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.TableOfContentElement;
-import org.w3c.dom.Element;
-
-
-class TableOfContentElementImpl extends ODFElementImpl implements
- TableOfContentElement {
- private static final long serialVersionUID = 2882485268559410342L;
-
- protected TableOfContentElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-
- public long getContentSize() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public Iterator getChildIterator() {
- // TODO Auto-generated method stub
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TableOfContentSourceElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TableOfContentSourceElementImpl.java
deleted file mode 100644
index 251a9f5..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TableOfContentSourceElementImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.TableOfContentSourceElement;
-import org.w3c.dom.Element;
-
-
-class TableOfContentSourceElementImpl extends ODFElementImpl implements
- TableOfContentSourceElement {
- private static final long serialVersionUID = 8858891354572254338L;
-
- protected TableOfContentSourceElementImpl(ODFDocument odfDoc,
- Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TextNodeFactory.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TextNodeFactory.java
deleted file mode 100644
index 8fa482e..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TextNodeFactory.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.AbstractODFNodeFactory;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.w3c.dom.Element;
-
-
-public class TextNodeFactory extends AbstractODFNodeFactory {
- private static final Map<String, Class> tagMap = new HashMap<String, Class>();
-
- static {
- tagMap.put(TextConstants.ELEMENT_A, AElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_ALPHABETICAL_INDEX,
- AlphabeticalIndexElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_ALPHABETICAL_INDEX_SOURCE,
- AlphabeticalIndexSourceElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_BOOKMARK, BookmarkElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_H, HElementImpl.class);
- tagMap
- .put(TextConstants.ELEMENT_INDEX_BODY,
- IndexBodyElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_INDEX_TITLE,
- IndexTitleElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_LIST, ListElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_LIST_ITEM, ListItemElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_LIST_LEVEL_STYLE_BULLET,
- ListLevelStyleBulletElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_LIST_LEVEL_STYLE_NUMBER,
- ListLevelStyleNumberElementImpl.class);
- tagMap
- .put(TextConstants.ELEMENT_LIST_STYLE,
- ListStyleElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_LIST_HEADER,
- ListHeaderElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_P, PElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_S, SElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_SECTION, SectionElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_SEQUENCE, SequenceElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_SPAN, SpanElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_TAB, TabElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_TABLE_OF_CONTENT,
- TableOfContentElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_TABLE_OF_CONTENT_SOURCE,
- TableOfContentSourceElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_TRACKED_CHANGES,
- TrackedChangesElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_CHANGE, ChangeElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_CHANGE_START,
- ChangeStartElementImpl.class);
- tagMap
- .put(TextConstants.ELEMENT_CHANGE_END,
- ChangeEndElementImpl.class);
- tagMap.put(TextConstants.ELEMENT_PAGE_NUMBER,
- PageNumberElementImpl.class);
- }
-
- public static Element createElement(ODFDocument odfDoc, String tagName,
- Element element) {
- Class cs = (Class) tagMap.get(tagName);
- if (null == cs) {
- return null;
- }
-
- try {
- return (Element) findElementConstractor(cs).newInstance(
- new Object[] { odfDoc, element });
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TrackedChangesElementImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TrackedChangesElementImpl.java
deleted file mode 100644
index 5e0a37d..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/text/impl/TrackedChangesElementImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.text.impl;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.text.TrackedChangesElement;
-import org.w3c.dom.Element;
-
-
-class TrackedChangesElementImpl extends ODFElementImpl implements
- TrackedChangesElement {
- private static final long serialVersionUID = -8864940949975504037L;
-
- protected TrackedChangesElementImpl(ODFDocument odfDoc, Element element) {
- super(odfDoc, element);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/ODFFileUtils.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/ODFFileUtils.java
deleted file mode 100644
index 14af549..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/ODFFileUtils.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants;
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-
-public class ODFFileUtils {
- public static boolean isODFFile(String sUrl) {
- if (sUrl == null)
- return false;
-
- return sUrl.endsWith(ODFConstants.ODT_SUFFIX)
- || sUrl.endsWith(ODFConstants.ODS_SUFFIX)
- || sUrl.endsWith(ODFConstants.ODP_SUFFIX);
- }
-
- public static ContentType getODFFileType(String sUrl) {
- if (sUrl == null)
- return ContentType.NONE;
-
- if (sUrl.endsWith(ODFConstants.ODT_SUFFIX))
- return ContentType.WRITE;
- else if (sUrl.endsWith(ODFConstants.ODS_SUFFIX))
- return ContentType.SPREADSHEET;
- else if (sUrl.endsWith(ODFConstants.ODP_SUFFIX))
- return ContentType.PRESENTATION;
-
- return ContentType.NONE;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/ODFWriter.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/ODFWriter.java
deleted file mode 100644
index 5d7b655..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/ODFWriter.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants;
-import org.eclipse.actf.model.dom.odf.OdfPlugin;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.core.runtime.IPath;
-
-
-public class ODFWriter {
- private void addFileToZip(ZipOutputStream zos, String inputDir, File file)
- throws IOException, Exception {
- if (file.isDirectory()) {
- String entry = file.getPath();
- entry = entry.substring(inputDir.length() + 1);
- entry = entry.replaceAll("\\\\", "/");
- ZipEntry target = new ZipEntry(entry + "/");
- target.setSize(0);
- zos.putNextEntry(target);
- zos.closeEntry();
-
- File[] fileList = file.listFiles();
- for (int i = 0; i < fileList.length; i++) {
- addFileToZip(zos, inputDir, fileList[i]);
- }
- } else {
- BufferedInputStream bis = new BufferedInputStream(
- new FileInputStream(file));
- String entry = file.getPath();
- entry = entry.substring(inputDir.length() + 1);
- entry = entry.replaceAll("\\\\", "/");
- ZipEntry target = new ZipEntry(entry);
- zos.putNextEntry(target);
- byte buf[] = new byte[1024];
- int count;
- while ((count = bis.read(buf, 0, 1024)) != -1) {
- zos.write(buf, 0, count);
- }
- bis.close();
- zos.closeEntry();
- }
- }
-
- public List<String> unzipODFFile(String odfName, String outputDir) {
- List<String> outputFileList = new ArrayList<String>();
- ZipInputStream zis = null;
- FileOutputStream fos = null;
-
- URL url = null;
- try {
- url = new URL(odfName);
- } catch (MalformedURLException e) {
- }
-
- try {
- if (url != null) {
- zis = new ZipInputStream(new FileInputStream(new File(url.toURI())));
- } else {
- zis = new ZipInputStream(new FileInputStream(odfName));
- }
- ZipEntry zent = null;
- String fileName = null;
- while ((zent = zis.getNextEntry()) != null) {
- fileName = zent.getName();
- if (fileName.contains("/")) {
- int lastIndex = fileName.lastIndexOf("/");
- File dir = new File(outputDir + File.separator
- + fileName.substring(0, lastIndex));
- if (!dir.exists()) {
- dir.mkdirs();
- }
- }
- if (!fileName.endsWith("/")) {
- BufferedInputStream bis = new BufferedInputStream(zis);
- String outputFile = outputDir + File.separator + fileName;
- outputFileList.add(outputFile);
- fos = new FileOutputStream(outputFile);
- try {
- byte[] buffer = new byte[8192];
- int size;
- while ((size = bis.read(buffer)) != -1) {
- fos.write(buffer, 0, size);
- }
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- fos.close();
- }
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- try {
- zis.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return outputFileList;
- }
-
- public void createODFFile(String inputDir, String outputODFName) {
- File inputDirFile = new File(inputDir);
- if (inputDirFile.isDirectory()) {
- URL url = null;
- try {
- url = new URL(outputODFName);
- } catch (MalformedURLException e) {
- }
-
- try {
- File zipFile = null;
- if (url != null) {
- zipFile = new File(url.toURI());
- } else {
- zipFile = new File(outputODFName);
- }
-
- File[] fileList = inputDirFile.listFiles();
- ZipOutputStream zos = new ZipOutputStream(new FileOutputStream( zipFile));
- for (int i = 0; i < fileList.length; i++) {
- addFileToZip(zos, inputDir, fileList[i]);
- }
- zos.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- private boolean rmDir(File deletedDir) {
- File[] files = deletedDir.listFiles();
- if (files != null)
- for (int i = 0; i < files.length; i++) {
- if (!rmDir(files[i]))
- return false;
- }
- return deletedDir.delete();
- }
-
- /*
- * ODFDocument doc -- modified content.xml String outFile -- output ODF file
- */
- public void saveODFFile(ODFDocument doc, String outFile) {
- String inFile = doc.getURL();
-
- // create tmp directory
- IPath tmpDir = OdfPlugin.getDefault().getStateLocation().append("tmp");
- File tmpDirFile = tmpDir.toFile();
- tmpDirFile.mkdir();
- String tmpDirPath = tmpDirFile.getPath();
-
- // unzip ODF file
- ODFWriter odfWriter = new ODFWriter();
- odfWriter.unzipODFFile(inFile, tmpDirPath);
-
- // save content.xml
- try {
- FileOutputStream writer = new FileOutputStream(tmpDirPath
- + System.getProperty("file.separator")
- + ODFConstants.ODF_CONTENT_FILENAME);
- TransformerFactory tFactory = TransformerFactory.newInstance();
- Source source = new DOMSource(doc);
- Result target = new StreamResult(writer);
- if (source != null) {
- try {
- tFactory.newTransformer().transform(source, target);
- } catch (TransformerConfigurationException e) {
- e.printStackTrace();
- } catch (TransformerException e) {
- e.printStackTrace();
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- }
- }
- writer.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- // save ODF file
- odfWriter.createODFFile(tmpDirPath, outFile);
-
- // remove tmp directory
- rmDir(tmpDirFile);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/AccessibilityFixEngine.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/AccessibilityFixEngine.java
deleted file mode 100644
index 58f2ad1..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/AccessibilityFixEngine.java
+++ /dev/null
@@ -1,588 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util.accessibility;
-
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectBaseElement;
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-import org.eclipse.actf.model.dom.odf.base.EmbedDrawingObjectElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IStylable;
-import org.eclipse.actf.model.dom.odf.draw.ControlElement;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.FrameElement;
-import org.eclipse.actf.model.dom.odf.draw.TextBoxElement;
-import org.eclipse.actf.model.dom.odf.form.FormConstants;
-import org.eclipse.actf.model.dom.odf.form.FormControlElement;
-import org.eclipse.actf.model.dom.odf.office.DocumentContentElement;
-import org.eclipse.actf.model.dom.odf.office.OfficeConstants;
-import org.eclipse.actf.model.dom.odf.office.SpreadSheetElement;
-import org.eclipse.actf.model.dom.odf.presentation.NotesElement;
-import org.eclipse.actf.model.dom.odf.presentation.PresentationConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.eclipse.actf.model.dom.odf.style.StylePropertiesBase;
-import org.eclipse.actf.model.dom.odf.style.TableCellPropertiesElement;
-import org.eclipse.actf.model.dom.odf.svg.SVGConstants;
-import org.eclipse.actf.model.dom.odf.table.CoveredTableCellElement;
-import org.eclipse.actf.model.dom.odf.table.TableCellElement;
-import org.eclipse.actf.model.dom.odf.table.TableColumnElement;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.eclipse.actf.model.dom.odf.table.TableRowElement;
-import org.eclipse.actf.model.dom.odf.text.PElement;
-import org.eclipse.actf.model.dom.odf.text.SequenceElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-
-public class AccessibilityFixEngine {
- private double odfVersion = -1.0;
-
- public AccessibilityFixEngine() {
- }
-
- public AccessibilityFixEngine(double odfVersion) {
- this.odfVersion = odfVersion;
- }
-
- public boolean fixShortDesc(ODFElement target, String shortDesc) {
- if ((shortDesc == null) || (shortDesc.length() == 0))
- return false;
-
- if (target instanceof DrawingObjectBaseElement) {
- ODFElement shortDescElem = null;
- if (odfVersion != -1.0) {
- shortDescElem = ((DrawingObjectBaseElement) target)
- .getShortDescElement(odfVersion);
- } else {
- shortDescElem = ((DrawingObjectBaseElement) target)
- .getShortDescElement();
- }
-
- if (shortDescElem == null) {
- Document doc = target.getOwnerDocument();
- if (doc instanceof ODFDocument) {
- Element newElem = null;
- ODFDocument odfDoc = ((ODFDocument) doc);
- String svgPrefix = target
- .lookupPrefix(SVGConstants.SVG_NAMESPACE_URI);
- if (svgPrefix == null)
- return false;
-
- if ((odfVersion == 1.0)
- || ((odfVersion == -1.0) && (odfDoc.getODFVersion() == 1.0))) {
- newElem = doc.createElement(svgPrefix + ":"
- + SVGConstants.ELEMENT_DESC);
- newElem.setTextContent(shortDesc);
- } else if ((odfVersion > 1.0)
- || ((odfVersion == -1.0) && (odfDoc.getODFVersion() > 1.0))) {
- newElem = doc.createElement(svgPrefix + ":"
- + SVGConstants.ELEMENT_TITLE);
- newElem.setTextContent(shortDesc);
- }
-
- if (newElem != null) {
- if (target instanceof EmbedDrawingObjectElement) {
- Element parent = (Element) target.getParentNode();
- parent.appendChild(newElem);
- return true;
- } else if (target instanceof DrawingObjectElement) {
- target.appendChild(newElem);
- return true;
- }
- }
- }
- } else {
- shortDescElem.setTextContent(shortDesc);
- return true;
- }
- }
- return false;
- }
-
- public boolean fixLongDesc(ODFElement target, String longDesc) {
- if ((longDesc == null) || (longDesc.length() == 0))
- return false;
-
- if (target instanceof DrawingObjectBaseElement) {
- ODFElement longDescElem = null;
- if (odfVersion != -1.0) {
- longDescElem = ((DrawingObjectBaseElement) target)
- .getLongDescElement(odfVersion);
- } else {
- longDescElem = ((DrawingObjectBaseElement) target)
- .getLongDescElement();
- }
-
- if (longDescElem == null) {
- Document doc = target.getOwnerDocument();
- if (doc instanceof ODFDocument) {
- Element newElem = null;
- ODFDocument odfDoc = ((ODFDocument) doc);
- Element parent = (Element) target.getParentNode();
-
- if ((odfVersion > 1.0)
- || ((odfVersion == -1.0) && (odfDoc.getODFVersion() > 1.0))) {
- String svgPrefix = target
- .lookupPrefix(SVGConstants.SVG_NAMESPACE_URI);
- if (svgPrefix == null)
- return false;
-
- newElem = doc.createElement(svgPrefix + ":"
- + SVGConstants.ELEMENT_DESC);
- newElem.setTextContent(longDesc);
- }
-
- if (newElem != null) {
- if (target instanceof EmbedDrawingObjectElement) {
- parent.appendChild(newElem);
- return true;
- } else if (target instanceof DrawingObjectElement) {
- target.appendChild(newElem);
- return true;
- }
- }
- }
- } else {
- longDescElem.setTextContent(longDesc);
- return true;
- }
- }
- return false;
- }
-
- private void expandRepeatedTableRow(TableRowElement row) {
- int repeat = row.getAttrTableNumberRowsRepeated();
- if (repeat != -1) {
- Node rowParent = row.getParentNode();
- row.removeAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_ROWS_REPEATED);
- for (int i = 0; i < repeat - 1; i++) {
- TableRowElement cloneRow = (TableRowElement) row
- .cloneNode(false);
- rowParent.insertBefore(cloneRow, row);
- }
- }
- }
-
- public boolean fixTableRowHeader(ODFElement target, int headerNum) {
- if (target instanceof TableElement) {
- NodeList testnl = ((TableElement) target).getTableHeaderRows();
- if ((testnl != null) && (testnl.getLength() > 0))
- return false;
-
- Document doc = target.getOwnerDocument();
- if (doc instanceof ODFDocument) {
- String tablePrefix = target
- .lookupPrefix(TableConstants.TABLE_NAMESPACE_URI);
- if (tablePrefix == null)
- return false;
-
- Element headerRow = doc.createElement(tablePrefix + ":"
- + TableConstants.ELEMENT_TABLE_HEADER_ROWS);
-
- List rowList = ((TableElement) target).getTableRowChildren();
- for (int i = 0; i < rowList.size(); i++) {
- expandRepeatedTableRow((TableRowElement) rowList.get(i));
- }
-
- rowList = ((TableElement) target).getTableRowChildren();
- if ((rowList.size() == 0) || (headerNum > rowList.size()))
- return false;
-
- Node newHeaderRow = target.insertBefore(headerRow,
- (Node) rowList.get(0));
- for (int i = 0; i < headerNum; i++) {
- TableRowElement row = (TableRowElement) rowList.get(i);
- newHeaderRow.appendChild(row);
- }
- return true;
- }
- }
- return false;
- }
-
- private void expandRepeatedTableColumn(TableColumnElement col) {
- int repeat = col.getAttrTableNumberColumnsRepeated();
- if (repeat != -1) {
- Node colParent = col.getParentNode();
- col.removeAttributeNS(TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_NUMBER_COLUMNS_REPEATED);
- for (int i = 0; i < repeat - 1; i++) {
- TableColumnElement cloneCol = (TableColumnElement) col
- .cloneNode(false);
- colParent.insertBefore(cloneCol, col);
- }
- }
- }
-
- public boolean fixTableColumnHeader(ODFElement target, int headerNum) {
- if (target instanceof TableElement) {
- NodeList testnl = ((TableElement) target).getTableHeaderColumns();
- if ((testnl != null) && (testnl.getLength() > 0))
- return false;
-
- Document doc = target.getOwnerDocument();
- if (doc instanceof ODFDocument) {
- String tablePrefix = target
- .lookupPrefix(TableConstants.TABLE_NAMESPACE_URI);
- if (tablePrefix == null)
- return false;
-
- Element headerColumn = doc.createElement(tablePrefix + ":"
- + TableConstants.ELEMENT_TABLE_HEADER_COLUMNS);
-
- List colList = ((TableElement) target).getTableColumnChildren();
- for (int i = 0; i < colList.size(); i++) {
- expandRepeatedTableColumn((TableColumnElement) colList
- .get(i));
- }
-
- colList = ((TableElement) target).getTableColumnChildren();
- if ((colList.size() == 0) || (headerNum > colList.size()))
- return false;
-
- Node newHeaderColumn = target.insertBefore(headerColumn,
- (Node) colList.get(0));
- for (int i = 0; i < headerNum; i++) {
- TableColumnElement col = (TableColumnElement) colList
- .get(i);
- newHeaderColumn.appendChild(col);
- }
- return true;
- }
- }
- return false;
- }
-
- public boolean fixTableCaption(ODFElement target, String caption) {
- if ((caption == null) || (caption.length() == 0))
- return false;
-
- if (target instanceof TableElement) {
- SequenceElement test = ((TableElement) target)
- .getTextSequenceElement();
- if (test != null)
- return false;
-
- Document doc = target.getOwnerDocument();
- if (doc instanceof ODFDocument) {
- // add text:p element next to table:table element
- Element newPElem = null;
- String textPrefix = target
- .lookupPrefix(TextConstants.TEXT_NAMESPACE_URI);
- if (textPrefix == null)
- return false;
- String stylePrefix = target
- .lookupPrefix(StyleConstants.STYLE_NAMESPACE_URI);
- if (stylePrefix == null)
- return false;
-
- Element pElem = doc.createElement(textPrefix + ":"
- + TextConstants.ELEMENT_P);
- pElem.setAttribute(textPrefix + ":"
- + TextConstants.ATTR_STYLE_NAME, "Table");
- Node parent = target.getParentNode();
- Node nextNode = target.getNextSibling();
- if (nextNode == null) {
- newPElem = (Element) parent.appendChild(pElem);
- } else {
- newPElem = (Element) parent.insertBefore(pElem, nextNode);
- }
-
- if (newPElem != null) {
- newPElem.appendChild(doc.createTextNode("Table "));
-
- // set content of text:p element
- Element seqElem = doc.createElement(textPrefix + ":"
- + TextConstants.ELEMENT_SEQUENCE);
- seqElem.setAttribute(textPrefix + ":"
- + TextConstants.ATTR_NAME, "Table");
- seqElem.setAttribute(textPrefix + ":"
- + TextConstants.ATTR_FORMULA, "ooow:Table+1");
- seqElem.setAttribute(stylePrefix + ":"
- + StyleConstants.ATTR_NUM_FORMAT, "1");
- newPElem.appendChild(seqElem);
- Text captionText = doc.createTextNode(" : " + caption);
- newPElem.appendChild(captionText);
-
- return true;
- }
- }
- }
- return false;
- }
-
- public boolean isFormLabelFixCapable(ODFElement target) {
- final String CONTROL_IMPL_CHECKBOX = "com.sun.star.form.component.CheckBox";
- final String CONTROL_IMPL_OPTIONBUTTON = "com.sun.star.form.component.OptionButton";
- final String CONTROL_IMPL_PUSHBUTTON = "com.sun.star.form.component.PushButton";
- final String CONTROL_IMPL_RADIOBUTTON = "com.sun.star.form.component.RadioButton";
- final String CONTROL_IMPL_GROUPBOX = "com.sun.star.form.component.GroupBox";
-
- if (target instanceof ControlElement) {
- FormControlElement formControl = ((ControlElement) target)
- .getFormControlElement();
- String controlImpl = formControl.getAttrFormControlImplementation();
- if ((controlImpl.endsWith(CONTROL_IMPL_CHECKBOX))
- || (controlImpl.endsWith(CONTROL_IMPL_OPTIONBUTTON))
- || (controlImpl.endsWith(CONTROL_IMPL_PUSHBUTTON))
- || (controlImpl.endsWith(CONTROL_IMPL_RADIOBUTTON))
- || (controlImpl.endsWith(CONTROL_IMPL_GROUPBOX)))
- return true;
- }
- return false;
- }
-
- public boolean fixFormLabel(ODFElement target, String label) {
- if ((label == null) || (label.length() == 0))
- return false;
-
- if (target instanceof ControlElement) {
- FormControlElement formControl = ((ControlElement) target)
- .getFormControlElement();
- if (formControl.hasAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_LABEL)) {
- formControl.removeAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_LABEL);
- }
- String formPrefix = formControl.getPrefix();
- formControl.setAttribute(formPrefix + ":"
- + FormConstants.ATTR_LABEL, label);
- return true;
- }
- return false;
- }
-
- public boolean fixFormTabStop(ODFElement target, boolean tabStop) {
- if (target instanceof ControlElement) {
- FormControlElement formControl = ((ControlElement) target)
- .getFormControlElement();
- if (formControl.hasAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_TAB_STOP)) {
- formControl.removeAttributeNS(FormConstants.FORM_NAMESPACE_URI,
- FormConstants.ATTR_TAB_STOP);
- }
- String formPrefix = formControl.getPrefix();
- formControl.setAttribute(formPrefix + ":"
- + FormConstants.ATTR_TAB_STOP, new Boolean(tabStop)
- .toString());
- return true;
- }
- return false;
- }
-
- public boolean isInvisibleElement(ODFElement elem) {
- NodeList nl = XPathUtil
- .evalXPathNodeList(elem, "./ancestor::*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='"
- + TextConstants.ELEMENT_SECTION + "']"
- + "[attribute::*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='" + TextConstants.ATTR_DISPLAY
- + "']='" + TextConstants.ATTR_DISPLAY_VALUE_NONE + "']");
- if ((nl != null) && (nl.getLength() > 0))
- return true;
- return false;
- }
-
- public String getInvisibleSectionName(ODFElement elem) {
- NodeList nl = XPathUtil
- .evalXPathNodeList(elem, "./ancestor::*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='"
- + TextConstants.ELEMENT_SECTION + "']"
- + "[attribute::*[namespace-uri()='"
- + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='" + TextConstants.ATTR_DISPLAY
- + "']='" + TextConstants.ATTR_DISPLAY_VALUE_NONE + "']");
- if ((nl != null) && (nl.getLength() > 0)) {
- if (nl.item(0) instanceof Element) {
- Element section = (Element) nl.item(0);
- if (section.hasAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_NAME)) {
- return section.getAttributeNS(
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_NAME);
- }
- }
- }
- return null;
- }
-
- public boolean isProtectedElement(ODFElement target) {
- ContentType type = ContentType.NONE;
- Element content = target.getOwnerDocument().getDocumentElement();
- if (content instanceof DocumentContentElement) {
- type = ((DocumentContentElement) content).getBodyElement()
- .getContent().getContentType();
- }
- if (type != ContentType.SPREADSHEET)
- return false;
-
- if (target instanceof SpreadSheetElement) {
- SpreadSheetElement spreadsheet = (SpreadSheetElement) target;
- return spreadsheet.getAttrTableStructureProtected();
- } else if (target instanceof TableElement) {
- TableElement table = (TableElement) target;
- return table.getAttrTableProtected();
- } else {
- SpreadSheetElement spreadsheet = null;
- TableElement table = null;
- IStylable cell = null;
-
- if ((target instanceof TableCellElement)
- || (target instanceof CoveredTableCellElement)) {
- cell = (IStylable) target;
- } else {
- NodeList cellList = XPathUtil.evalXPathNodeList(target,
- "./ancestor::*[(namespace-uri()='"
- + TableConstants.TABLE_NAMESPACE_URI
- + "' and local-name()='"
- + TableConstants.ELEMENT_TABLE_CELL + "')"
- + " or (namespace-uri()='"
- + TableConstants.TABLE_NAMESPACE_URI
- + "' and local-name()='"
- + TableConstants.ELEMENT_COVERED_TABLE_CELL
- + "')]");
- if ((cellList != null) && (cellList.getLength() == 1)) {
- Node node = cellList.item(0);
- if ((node instanceof TableCellElement)
- || (node instanceof CoveredTableCellElement)) {
- cell = (IStylable) node;
- }
- }
- }
- if (cell == null)
- return false;
-
- NodeList tableList = XPathUtil.evalXPathNodeList(target,
- "./ancestor::*[namespace-uri()='"
- + TableConstants.TABLE_NAMESPACE_URI
- + "' and local-name()='"
- + TableConstants.ELEMENT_TABLE + "']"
- + "[parent::*[namespace-uri()='"
- + OfficeConstants.OFFICE_NAMESPACE_URI
- + "' and local-name()='"
- + OfficeConstants.ELEMENT_SPREADSHEET + "']]");
- if ((tableList != null) && (tableList.getLength() == 1)) {
- Node node = tableList.item(0);
- if (node instanceof TableElement) {
- table = (TableElement) node;
- }
- }
- if (table == null)
- return false;
-
- Node tableParent = table.getParentNode();
- if (tableParent instanceof SpreadSheetElement) {
- spreadsheet = (SpreadSheetElement) tableParent;
- }
- if (spreadsheet == null)
- return false;
-
- if (spreadsheet.getAttrTableStructureProtected()
- || table.getAttrTableProtected()) {
- int cellProtect = StyleConstants.CELL_PROTECT_VALUE_NOT_DEFINED;
-
- StyleElement styleElem = cell.getStyle();
- if (styleElem != null) {
- for (int i = 0; i < styleElem.getPropertySize(); i++) {
- StylePropertiesBase prop = styleElem
- .getPropertyElement(i);
- if (prop instanceof TableCellPropertiesElement) {
- TableCellPropertiesElement cellProp = (TableCellPropertiesElement) prop;
- cellProtect = cellProp.getAttrStyleCellProtect();
- }
- }
- }
-
- if ((cellProtect == StyleConstants.CELL_PROTECT_VALUE_PROTECTED)
- || (cellProtect == StyleConstants.CELL_PROTECT_VALUE_HIDDEN_AND_PROTECTED)) {
- return true;
- } else if (cellProtect == StyleConstants.CELL_PROTECT_VALUE_NOT_DEFINED) {
- if (table.hasAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_PROTECTED))
- return table.getAttrTableProtected();
- if (spreadsheet.hasAttributeNS(
- TableConstants.TABLE_NAMESPACE_URI,
- TableConstants.ATTR_STRUCTURE_PROTECTED))
- return spreadsheet.getAttrTableStructureProtected();
- }
- }
- }
- return false;
- }
-
- public void setSpeakerNotesContent(NotesElement notes, String content) {
- String[] contentList = content.split("\n");
-
- NodeList frameList = notes.getElementsByTagNameNS(
- DrawConstants.DRAW_NAMESPACE_URI, DrawConstants.ELEMENT_FRAME);
- if ((frameList == null) || (frameList.getLength() <= 0))
- return;
-
- FrameElement notesFrame = null;
- for (int i = 0; i < frameList.getLength(); i++) {
- Node node = frameList.item(i);
- if (node instanceof FrameElement) {
- FrameElement frame = (FrameElement) node;
- String presentationClass = frame.getAttributeNS(
- PresentationConstants.PRESENTATION_NAMESPACE_URI,
- PresentationConstants.ATTR_CLASS);
- if ((presentationClass != null)
- && (presentationClass
- .equals(PresentationConstants.ATTR_CLASS_VALUE_NOTES))) {
- notesFrame = frame;
- }
- }
- }
- if (notesFrame == null)
- return;
-
- NodeList textBoxList = notesFrame.getElementsByTagNameNS(
- DrawConstants.DRAW_NAMESPACE_URI,
- DrawConstants.ELEMENT_TEXT_BOX);
- if ((textBoxList == null) || (textBoxList.getLength() != 1))
- return;
-
- Document doc = notes.getOwnerDocument();
- TextBoxElement textBox = (TextBoxElement) textBoxList.item(0);
- NodeList pList = textBox.getElementsByTagNameNS(
- TextConstants.TEXT_NAMESPACE_URI, TextConstants.ELEMENT_P);
-
- for (int i = 0; i < contentList.length; i++) {
- PElement pElem = null;
- if ((i == 0) && (pList != null) && (pList.getLength() == 1)) {
- pElem = (PElement) pList.item(0);
- } else {
- pElem = (PElement) doc.createElementNS(
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ELEMENT_P);
- }
- textBox.appendChild(pElem);
-
- Text text = doc.createTextNode(contentList[i]);
- pElem.appendChild(text);
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/ScreenReaderSimulator.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/ScreenReaderSimulator.java
deleted file mode 100644
index 01dbe24..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/ScreenReaderSimulator.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util.accessibility;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.util.converter.TextExtractor;
-
-
-public interface ScreenReaderSimulator extends TextExtractor {
- void setDocument(ODFDocument document);
-
- void setElement(ODFElement element);
-
- String getCurrentElementContent();
-
- String getElementContent(ODFElement elem);
-
- String getDocumentContent();
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/SimulatorCreator.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/SimulatorCreator.java
deleted file mode 100644
index f541e71..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/SimulatorCreator.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util.accessibility;
-
-import org.eclipse.actf.model.dom.odf.util.accessibility.impl.ScreenReaderSimulatorImpl;
-
-public class SimulatorCreator {
- static public ScreenReaderSimulator createSimulatorController() {
- return (ScreenReaderSimulator) (new ScreenReaderSimulatorImpl());
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/impl/ScreenReaderSimulatorImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/impl/ScreenReaderSimulatorImpl.java
deleted file mode 100644
index 9b2c8f4..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/accessibility/impl/ScreenReaderSimulatorImpl.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util.accessibility.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.draw.PageElement;
-import org.eclipse.actf.model.dom.odf.office.BodyElement;
-import org.eclipse.actf.model.dom.odf.office.DocumentContentElement;
-import org.eclipse.actf.model.dom.odf.office.PresentationElement;
-import org.eclipse.actf.model.dom.odf.office.SpreadSheetElement;
-import org.eclipse.actf.model.dom.odf.office.TextElement;
-import org.eclipse.actf.model.dom.odf.presentation.NotesElement;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.eclipse.actf.model.dom.odf.util.accessibility.ScreenReaderSimulator;
-import org.eclipse.actf.model.dom.odf.util.converter.impl.TextExtractorImpl;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-public class ScreenReaderSimulatorImpl implements ScreenReaderSimulator {
- private ODFElement curElem = null;
-
- private TextExtractorImpl textExtractor;
-
- public ScreenReaderSimulatorImpl() {
- textExtractor = new TextExtractorImpl();
- }
-
- public void setDocument(ODFDocument document) {
- this.curElem = (ODFElement) document.getDocumentElement();
- this.textExtractor.setDocument(document, this);
- }
-
- public void setElement(ODFElement element) {
- this.curElem = element;
- this.textExtractor.setDocument(
- (ODFDocument) element.getOwnerDocument(), this);
- }
-
- // for Notes8, Notes8 save document by ODF 1.1 schema,
- // but odf:version is set as 1.0
- // if specify odf:version by this function,
- // do not use odf:version defined in each ODF file
- public void setOdfVersion(double odfVersion) {
- this.textExtractor.setOdfVersion(odfVersion);
- }
-
- private void writePageElementContent(Writer writer, PageElement page) {
- /*
- * NodeList children = page.getChildNodes(); for (int j=0; j<children.getLength();
- * j++) { Node child = children.item(j);
- */
- List<ODFElement> children = page.getChildNodesInNavOrder();
- for (int j = 0; j < children.size(); j++) {
- Node child = children.get(j);
- if ((child instanceof ODFElement)
- && (!(child instanceof NotesElement))) {
- String str = getElementContent((ODFElement) child);
- if (str != null) {
- try {
- writer.write(str);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- }
- }
-
- public boolean extractContent(Writer writer, File dir, ODFElement elem,
- boolean enableStyle) {
- return textExtractor.extractContent(writer, dir, (ODFElement) elem,
- enableStyle);
- }
-
- public String getElementContent(ODFElement elem) {
- setElement(elem);
-
- StringWriter writer = new StringWriter();
-
- if (elem instanceof PageElement) {
- writePageElementContent(writer, (PageElement) elem);
- } else {
- extractContent(writer, null, (ODFElement) elem, false);
- }
-
- String str = "";
- try {
- writer.flush();
- writer.close();
- str = writer.toString();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return str;
- }
-
- public String getCurrentElementContent() {
- return getElementContent(curElem);
- }
-
- private String getTextDocumentContent(TextElement textElem) {
- StringWriter writer = new StringWriter();
- for (Iterator iter = textElem.getChildIterator(); iter.hasNext();) {
- Element child = (Element) iter.next();
- if (child instanceof ODFElement) {
- String str = getElementContent((ODFElement) child);
- if (str != null)
- writer.write(str);
- }
- }
- String str = "";
- try {
- writer.flush();
- writer.close();
- str = writer.toString();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return str;
- }
-
- private String getSpreadsheetDocumentContent(SpreadSheetElement spreadElem) {
- StringWriter writer = new StringWriter();
- for (int i = 0; i < spreadElem.getTableSize(); i++) {
- TableElement table = spreadElem.getTable(i);
- String str = getElementContent(table);
- if (str != null)
- writer.write(str + System.getProperty("line.separator"));
- }
- String str = "";
- try {
- writer.flush();
- writer.close();
- str = writer.toString();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return str;
- }
-
- private String getPresentationDocumentContent(PresentationElement presenElem) {
- StringWriter writer = new StringWriter();
- for (int i = 0; i < presenElem.getPageSize(); i++) {
- PageElement page = presenElem.getPage(i);
- NotesElement notes = page.getPresentationNotesElement();
- writer.write("Page ");
- writer.write(i + 1);
- writer.write(System.getProperty("line.separator"));
- writer.write(getElementContent(page));
- writer.write(System.getProperty("line.separator"));
- writer.write("--------------------------------------");
- writer.write(System.getProperty("line.separator"));
- writer.write("Speaker Notes");
- writer.write(System.getProperty("line.separator"));
- writer.write(getElementContent(notes));
- }
- String str = "";
- try {
- writer.flush();
- writer.close();
- str = writer.toString();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return str;
- }
-
- public String getDocumentContent() {
- if (curElem == null)
- return null;
- Element root = curElem.getOwnerDocument().getDocumentElement();
- if (root instanceof DocumentContentElement) {
- BodyElement body = ((DocumentContentElement) root).getBodyElement();
- ContentBaseElement content = body.getContent();
- ContentType type = content.getContentType();
- if ((type.equals(ContentType.WRITE))
- && (content instanceof TextElement)) {
- return getTextDocumentContent((TextElement) content);
- } else if (type.equals(ContentType.SPREADSHEET)
- && (content instanceof SpreadSheetElement)) {
- return getSpreadsheetDocumentContent((SpreadSheetElement) content);
- } else if (type.equals(ContentType.PRESENTATION)
- && (content instanceof PresentationElement)) {
- return getPresentationDocumentContent((PresentationElement) content);
- } else {
- new ODFException("invalid content element").printStackTrace();
- }
- } else {
- new ODFException("invalid odf document").printStackTrace();
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/ODFConverter.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/ODFConverter.java
deleted file mode 100644
index 9af854c..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/ODFConverter.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util.converter;
-
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-
-public interface ODFConverter extends TextExtractor {
- public static final String OUTPUT_ATTR_ODF_CONTENT_ID = "actf-odf-content-id";
-
- public static final String OUTPUT_ATTR_ODF_TAGNAME = "odf-tagname";
-
- void setDocument(ODFDocument document);
-
- void convertDocument(String fileName, boolean enableStyle);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/ODFConverterCreator.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/ODFConverterCreator.java
deleted file mode 100644
index 42a291f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/ODFConverterCreator.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util.converter;
-
-import org.eclipse.actf.model.dom.odf.util.converter.impl.HTMLConverter;
-
-public class ODFConverterCreator {
- static public ODFConverter createHTMLConverter() {
- return (ODFConverter) (new HTMLConverter());
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/ODFConverterUtils.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/ODFConverterUtils.java
deleted file mode 100644
index 2bc2aa8..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/ODFConverterUtils.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util.converter;
-
-public class ODFConverterUtils {
- public static String convertXMLCharacter(String val) {
- String newVal = val.replaceAll("&", "&");
- newVal = newVal.replaceAll("<", "<");
- newVal = newVal.replaceAll(">", ">");
- return newVal;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/TextExtractor.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/TextExtractor.java
deleted file mode 100644
index 074f1ce..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/TextExtractor.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util.converter;
-
-import java.io.File;
-import java.io.Writer;
-
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-
-
-public interface TextExtractor {
- boolean extractContent(Writer writer, File dir, ODFElement elem,
- boolean enableStyle);
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/impl/HTMLConverter.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/impl/HTMLConverter.java
deleted file mode 100644
index 4beb94f..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/impl/HTMLConverter.java
+++ /dev/null
@@ -1,851 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util.converter.impl;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.ODFException;
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.ContentBaseElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.base.impl.ODFElementImpl;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.draw.FrameElement;
-import org.eclipse.actf.model.dom.odf.draw.ImageElement;
-import org.eclipse.actf.model.dom.odf.draw.PageElement;
-import org.eclipse.actf.model.dom.odf.draw.TextBoxElement;
-import org.eclipse.actf.model.dom.odf.office.BodyElement;
-import org.eclipse.actf.model.dom.odf.office.DocumentContentElement;
-import org.eclipse.actf.model.dom.odf.office.PresentationElement;
-import org.eclipse.actf.model.dom.odf.office.SpreadSheetElement;
-import org.eclipse.actf.model.dom.odf.office.TextElement;
-import org.eclipse.actf.model.dom.odf.presentation.NotesElement;
-import org.eclipse.actf.model.dom.odf.style.DefaultStyleElement;
-import org.eclipse.actf.model.dom.odf.style.FontFaceElement;
-import org.eclipse.actf.model.dom.odf.style.GraphicPropertiesElement;
-import org.eclipse.actf.model.dom.odf.style.ParagraphPropertiesElement;
-import org.eclipse.actf.model.dom.odf.style.StyleConstants;
-import org.eclipse.actf.model.dom.odf.style.StyleElement;
-import org.eclipse.actf.model.dom.odf.style.TableCellPropertiesElement;
-import org.eclipse.actf.model.dom.odf.style.TableColumnPropertiesElement;
-import org.eclipse.actf.model.dom.odf.style.TablePropertiesElement;
-import org.eclipse.actf.model.dom.odf.style.TextPropertiesElement;
-import org.eclipse.actf.model.dom.odf.table.TableCellElement;
-import org.eclipse.actf.model.dom.odf.table.TableColumnElement;
-import org.eclipse.actf.model.dom.odf.table.TableColumnsElement;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.eclipse.actf.model.dom.odf.table.TableHeaderRowsElement;
-import org.eclipse.actf.model.dom.odf.table.TableRowElement;
-import org.eclipse.actf.model.dom.odf.text.AElement;
-import org.eclipse.actf.model.dom.odf.text.ChangeElement;
-import org.eclipse.actf.model.dom.odf.text.ChangeEndElement;
-import org.eclipse.actf.model.dom.odf.text.ChangeStartElement;
-import org.eclipse.actf.model.dom.odf.text.HElement;
-import org.eclipse.actf.model.dom.odf.text.ListElement;
-import org.eclipse.actf.model.dom.odf.text.ListItemElement;
-import org.eclipse.actf.model.dom.odf.text.ListLevelStyleBulletElement;
-import org.eclipse.actf.model.dom.odf.text.ListLevelStyleNumberElement;
-import org.eclipse.actf.model.dom.odf.text.ListStyleElement;
-import org.eclipse.actf.model.dom.odf.text.PElement;
-import org.eclipse.actf.model.dom.odf.text.SElement;
-import org.eclipse.actf.model.dom.odf.text.SequenceElement;
-import org.eclipse.actf.model.dom.odf.text.SpanElement;
-import org.eclipse.actf.model.dom.odf.text.TabElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.eclipse.actf.model.dom.odf.util.converter.ODFConverter;
-import org.eclipse.actf.model.dom.odf.xlink.XLinkConstants;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-public class HTMLConverter implements ODFConverter {
- private static final String HTML_ENCODING = "UTF8";
-
- private static final String ODF_CSS_FILE = "ODF.css";
-
- private static final String HTML_HEADER = "<html><head><META http-equiv='Content-Type' content='text/html; charset=UTF-8'/>"
- + "<meta content='text/html; charset=UTF-8' http-equiv='Content-type'/><title></title>"
- + "<link rel='stylesheet' type='text/css' href='"
- + ODF_CSS_FILE
- + "'/></head>";
-
- private double odfVersion = -1.0;
-
- private ODFElement curElem = null;
-
- private TextExtractorImpl textExtractor;
-
- public HTMLConverter() {
- textExtractor = new TextExtractorImpl();
- }
-
- public void setDocument(ODFDocument document) {
- this.curElem = (ODFElement) document.getDocumentElement();
- this.textExtractor.setDocument(document, this);
- }
-
- // for Notes8, Notes8 save document by ODF 1.1 schema,
- // but odf:version is set as 1.0
- // if specify odf:version by this function,
- // do not use odf:version defined in each ODF file
- public void setOdfVersion(double odfVersion) {
- this.odfVersion = odfVersion;
- this.textExtractor.setOdfVersion(odfVersion);
- }
-
- private String getHTMLTagName(ODFElement elem) {
- if (elem instanceof ImageElement) {
- return "img";
- } else if (elem instanceof HElement) {
- int level = ((HElement) elem).getAttrTextOutlineLevel();
- if (level > 6)
- level = 6;
- return "h" + level;
- } else if (elem instanceof ListElement) {
- StyleElement style = ((ListElement) elem)
- .getListLevelStyleElement();
- if (style != null) {
- if (style instanceof ListLevelStyleBulletElement) {
- return "ul";
- } else if (style instanceof ListLevelStyleNumberElement) {
- return "ol";
- }
- }
- } else if (elem instanceof TableCellElement) {
- Node parent = elem.getParentNode();
- Node gparent = null;
- if (parent != null)
- gparent = parent.getParentNode();
- if ((parent != null) && (parent instanceof TableRowElement)
- && (gparent != null)
- && (gparent instanceof TableHeaderRowsElement)) {
- return "th";
- } else {
- return "td";
- }
- }
-
- String tagName = null;
- if (elem instanceof PElement)
- tagName = "p";
- if (elem instanceof AElement)
- tagName = "a";
- if (elem instanceof SpanElement)
- tagName = "span";
- if (elem instanceof TabElement)
- tagName = "span";
- if (elem instanceof SequenceElement)
- tagName = "span";
- if (elem instanceof SElement)
- tagName = "span";
- if (elem instanceof ListItemElement)
- tagName = "li";
- if (elem instanceof TableElement)
- tagName = "table";
- if (elem instanceof TableHeaderRowsElement)
- tagName = "thead";
- if (elem instanceof TableRowElement)
- tagName = "tr";
- if (elem instanceof TableColumnsElement)
- tagName = "colgroup";
- if (elem instanceof TableColumnElement)
- tagName = "col";
- if (elem instanceof ChangeElement)
- tagName = "span";
- if (elem instanceof ChangeStartElement)
- tagName = "span";
- if (elem instanceof ChangeEndElement)
- tagName = "span";
- if (tagName == null)
- tagName = "div";
- return tagName;
- }
-
- private String getStyleClassName(ODFElement elem) {
- String styleClassName = null;
- if (elem instanceof ListElement) {
- ListElement topListElem = ((ListElement) elem)
- .getTopLevelListElement();
- long level = ((ListElement) elem).getListLevel();
- styleClassName = topListElem.getAttributeNS(
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_STYLE_NAME)
- + level;
- } else {
- NamedNodeMap attrs = elem.getAttributes();
- for (int i = 0; i < attrs.getLength(); i++) {
- Node attr = attrs.item(i);
- if ("style-name".equals(attr.getLocalName())) {
- if (styleClassName == null)
- styleClassName = new String();
- else
- styleClassName += " ";
- styleClassName += attr.getNodeValue();
- }
- }
- }
- return styleClassName;
- }
-
- public boolean extractContent(Writer writer, File dir, ODFElement elem,
- boolean enableStyle) {
- String htmlTag = getHTMLTagName(elem);
- // write tag name
- if (htmlTag != null) {
- try {
- writer.write("<" + htmlTag + " " + OUTPUT_ATTR_ODF_TAGNAME
- + "='" + elem.getTagName() + "' id='"
- + elem.getAttribute(OUTPUT_ATTR_ODF_CONTENT_ID)
- + "' name='"
- + elem.getAttribute(OUTPUT_ATTR_ODF_CONTENT_ID) + "' "
- + OUTPUT_ATTR_ODF_CONTENT_ID + "='"
- + elem.getAttribute(OUTPUT_ATTR_ODF_CONTENT_ID) + "'");
- } catch (IOException e) {
- e.printStackTrace();
- }
- if (enableStyle) {
- String styleClassName = getStyleClassName(elem);
- if (styleClassName != null) {
- try {
- writer.write(" class='" + styleClassName + "'");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- if (elem instanceof ImageElement) {
- String href = ((ImageElement) elem).getAttrXlinkHref();
- if (!href.startsWith("http://") && !href.startsWith("https://")
- && !href.startsWith("file://")
- && !href.startsWith("chrome://")) {
- textExtractor.extractEmbedFile(elem, dir, href);
- }
- try {
- writer.write(" src='" + href + "'");
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- ODFElement odfElem = null;
- if (this.odfVersion != -1.0) {
- odfElem = ((ImageElement) elem)
- .getShortDescElement(odfVersion);
- } else {
- odfElem = ((ImageElement) elem).getShortDescElement();
- }
-
- if (odfElem != null) {
- String altText = (String) ((IEditable) odfElem).getValue();
- if (altText != null) {
- try {
- writer.write(" alt='" + altText + "'");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- } else {
- FrameElement frameElem = ((ImageElement) elem)
- .getFrameElement();
- if (frameElem != null) {
- TextBoxElement captionElem = null;
- if (odfVersion != -1.0) {
- captionElem = frameElem
- .getBoundCaptionTextBoxElement(odfVersion);
- } else {
- captionElem = frameElem
- .getBoundCaptionTextBoxElement();
- }
-
- if (captionElem != null) {
- String captionText = captionElem.getTextContent();
- if (captionText != null) {
- try {
- writer.write(" alt=''");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- String width = frameElem.getAttrSvgWidth();
- if (width == null)
- width = "auto";
- String height = frameElem.getAttrSvgHeight();
- if (height == null)
- height = "auto";
- try {
- writer.write(" style='width:" + width + ";height:"
- + height + ";'");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- } else if (elem instanceof AElement) {
- String type = ((AElement) elem).getType();
- if (XLinkConstants.LINK_TYPE_SIMPLE.equals(type)) {
- String href = ((AElement) elem).getHref();
- if (href.startsWith("#")) {
- ODFElement linkElem = ((AElement) elem)
- .getHrefElement();
- if (linkElem != null) {
- try {
- writer
- .write(" href='#"
- + linkElem
- .getAttribute(ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID)
- + "'");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- } else {
- try {
- writer.write(" href='" + href + "'");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- } else if (elem instanceof TableColumnElement) {
- int repeat = ((TableColumnElement) elem)
- .getAttrTableNumberColumnsRepeated();
- if (repeat > 1) {
- try {
- writer.write(">");
- writer.write("</" + htmlTag + ">\n");
- for (int i = 1; i < repeat; i++)
- writer.write("<" + htmlTag + "/>\n");
- } catch (IOException e) {
- e.printStackTrace();
- }
- return false;
- }
- } else if (elem instanceof TableCellElement) {
- int span = ((TableCellElement) elem)
- .getAttrTableNumberColumnsSpanned();
- if (span > 1) {
- try {
- writer.write(" colspan='" + span + "'");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- int repeat = ((TableCellElement) elem)
- .getAttrTableNumberColumnsRepeated();
- if (repeat > 1) {
- try {
- writer.write(">");
- writer.write("</" + htmlTag + ">\n");
- for (int i = 1; i < repeat; i++)
- writer.write("<" + htmlTag + "/>\n");
- } catch (IOException e) {
- e.printStackTrace();
- }
- return false;
- }
- }
-
- try {
- writer.write(">");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- boolean addedTextContent = textExtractor.extractContent(writer, dir,
- elem, enableStyle);
-
- // write close tag
- if (htmlTag != null) {
- try {
- writer.write("</" + htmlTag + ">\n");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- return addedTextContent;
- }
-
- private void convertTextDoc(PrintWriter writer, File dir,
- TextElement textElem, boolean enableStyle) {
- for (Iterator iter = textElem.getChildIterator(); iter.hasNext();) {
- ODFElement child = (ODFElement) iter.next();
- extractContent(writer, dir, child, enableStyle);
- }
- }
-
- private void convertSpreadsheetDoc(PrintWriter writer, File dir,
- SpreadSheetElement spreadElem, boolean enableStyle) {
- for (int i = 0; i < spreadElem.getTableSize(); i++) {
- TableElement table = spreadElem.getTable(i);
- writer.write("<h1>" + table.getAttrTableName() + "</h1>");
- extractContent(writer, dir, table, enableStyle);
- }
- }
-
- private void convertPresentationDoc(PrintWriter writer, File dir,
- PresentationElement presenElem, boolean enableStyle) {
- for (int i = 0; i < presenElem.getPageSize(); i++) {
- PageElement page = presenElem.getPage(i);
- writer.write("<div" + " " + OUTPUT_ATTR_ODF_TAGNAME + "='"
- + page.getTagName() + "' id='"
- + page.getAttribute(OUTPUT_ATTR_ODF_CONTENT_ID)
- + "' name='"
- + page.getAttribute(OUTPUT_ATTR_ODF_CONTENT_ID) + "' "
- + OUTPUT_ATTR_ODF_CONTENT_ID + "='"
- + page.getAttribute(OUTPUT_ATTR_ODF_CONTENT_ID)
- + "'><h1>Page " + (i + 1) + "</h1>");
- /*
- * NodeList children = page.getChildNodes(); for (int j = 0; j <
- * children.getLength(); j++) { Node child = children.item(j);
- */
- List<ODFElement> children = page.getChildNodesInNavOrder();
- for (int j = 0; j < children.size(); j++) {
- Node child = children.get(j);
- if ((child instanceof ODFElement)
- && (!(child instanceof NotesElement))) {
- extractContent(writer, dir, (ODFElement) child, enableStyle);
- }
- }
- NotesElement notesElem = page.getPresentationNotesElement();
- if (notesElem != null) {
- writer.write("<h2>Notes of Page " + (i + 1) + "</h2>");
- extractContent(writer, dir, (ODFElement) notesElem, enableStyle);
- }
- writer.write("</div>");
- }
- }
-
- private void convertDocument(PrintWriter writer, File dir,
- boolean enableStyle) {
- if (curElem == null)
- return;
- Element root = curElem.getOwnerDocument().getDocumentElement();
- if (root instanceof DocumentContentElement) {
- writer.write(HTML_HEADER);
- writer.write("<body>");
-
- BodyElement body = ((DocumentContentElement) root).getBodyElement();
- ContentBaseElement content = body.getContent();
- ContentType type = content.getContentType();
- if ((type.equals(ContentType.WRITE))
- && (content instanceof TextElement)) {
- convertTextDoc(writer, dir, (TextElement) content, enableStyle);
- } else if (type.equals(ContentType.SPREADSHEET)
- && (content instanceof SpreadSheetElement)) {
- convertSpreadsheetDoc(writer, dir,
- (SpreadSheetElement) content, enableStyle);
- } else if (type.equals(ContentType.PRESENTATION)
- && (content instanceof PresentationElement)) {
- convertPresentationDoc(writer, dir,
- (PresentationElement) content, enableStyle);
- } else {
- new ODFException("invalid content element").printStackTrace();
- }
-
- writer.write("</body></html>");
- } else {
- new ODFException("invalid odf document").printStackTrace();
- }
- return;
- }
-
- private void writeCssValueByTextPropertiesElement(PrintWriter writer,
- StyleElement styleElem) {
- NodeList textProps = styleElem.getElementsByTagNameNS(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_TEXT_PROPERTIES);
- for (int i = 0; i < textProps.getLength(); i++) {
- TextPropertiesElement prop = (TextPropertiesElement) textProps
- .item(i);
- String fontName = prop.getAttrStyleFontName();
- if (fontName != null) {
- ODFElement fontFaceElem = ((ODFElementImpl) styleElem)
- .findElementByAttrValue(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_FONT_FACE,
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME, fontName);
- if (fontFaceElem == null) {
- fontFaceElem = ((ODFElementImpl) styleElem)
- .findElementByAttrValueFromStyleDoc(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_FONT_FACE,
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME, fontName);
- }
- if (fontFaceElem != null) {
- String fontFamily = ((FontFaceElement) fontFaceElem)
- .getAttrSvgFontFamily();
- writer.write("font-family:" + fontFamily + ";");
- }
- }
- String fontSize = prop.getAttrFormatFontSize();
- if (fontSize != null) {
- writer.write("font-size:" + fontSize + ";");
- }
- String fontColor = prop.getAttrFormatColor();
- if (fontColor != null) {
- writer.write("color:" + fontColor + ";");
- }
- String backgroundColor = prop.getAttrFormatBackgroundColor();
- if (backgroundColor != null) {
- writer.write("background-color:" + backgroundColor + ";");
- }
- String fontWeight = prop.getAttrFormatFontWeight();
- if ((fontWeight != null) && (fontWeight.equals("bold"))) {
- writer.write("font-weight:bold;");
- }
- String fontStyle = prop.getAttrFormatFontStyle();
- if ((fontStyle != null) && (fontStyle.equals("italic"))) {
- writer.write("font-style:italic;");
- }
- String underLineStyle = prop.getAttrStyleTextUnderlineStyle();
- if ((underLineStyle != null) && (underLineStyle.equals("solid"))) {
- writer.write("text-decoration:underline;");
- }
- String textPosition = prop.getAttrStyleTextPosition();
- if (textPosition != null) {
- String[] textPositionVals = textPosition.split(" ");
- if (textPositionVals.length == 2) {
- if (textPositionVals[0].equals("super")) {
- writer.write("vertical-align:super;");
- } else if (textPositionVals[0].equals("sub")) {
- writer.write("vertical-align:sub;");
- }
- writer.write("font-size:" + textPositionVals[1] + ";");
- }
- }
- }
- }
-
- private void writeCssValueByParagraphPropertiesElement(PrintWriter writer,
- StyleElement styleElem) {
- NodeList paraProps = styleElem.getElementsByTagNameNS(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_PARAGRAPH_PROPERTIES);
- for (int i = 0; i < paraProps.getLength(); i++) {
- ParagraphPropertiesElement prop = (ParagraphPropertiesElement) paraProps
- .item(i);
- String backgroundColor = prop.getAttrFormatBackgroundColor();
- if (backgroundColor != null) {
- writer.write("background-color:" + backgroundColor + ";");
- }
- String textAlign = prop.getAttrFormatTextAlign();
- if (textAlign != null) {
- writer.write("text-align:" + textAlign + ";");
- }
- String verticalAlign = prop.getAttrStyleVerticalAlign();
- if (verticalAlign != null) {
- writer.write("vertical-align:" + verticalAlign + ";");
- }
- String marginLeft = prop.getAttrFormatMarginLeft();
- if (marginLeft != null) {
- writer.write("margin-left:" + marginLeft + ";");
- }
- String marginRight = prop.getAttrFormatMarginRight();
- if (marginRight != null) {
- writer.write("margin-right:" + marginRight + ";");
- }
- String marginTop = prop.getAttrFormatMarginTop();
- if (marginTop != null) {
- writer.write("margin-top:" + marginTop + ";");
- }
- String marginBottom = prop.getAttrFormatMarginBottom();
- if (marginBottom != null) {
- writer.write("margin-bottom:" + marginBottom + ";");
- }
- }
- }
-
- private void writeCssValueByGraphicPropertiesElement(PrintWriter writer,
- StyleElement styleElem) {
- NodeList graphicProps = styleElem.getElementsByTagNameNS(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_GRAPHIC_PROPERTIES);
- for (int i = 0; i < graphicProps.getLength(); i++) {
- GraphicPropertiesElement prop = (GraphicPropertiesElement) graphicProps
- .item(i);
- String horizontalPos = prop.getAttrStyleHorizontalPos();
- if (horizontalPos != null) {
- if (horizontalPos.equals("left")) {
- writer.write("text-align:left;");
- } else if (horizontalPos.equals("center")) {
- writer.write("text-align:center;");
- } else if (horizontalPos.equals("right")) {
- writer.write("text-align:right;");
- }
- }
- }
- }
-
- private void writeCssValueByTablePropertiesElement(PrintWriter writer,
- StyleElement styleElem) {
- NodeList tableProps = styleElem.getElementsByTagNameNS(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_TABLE_PROPERTIES);
- for (int i = 0; i < tableProps.getLength(); i++) {
- TablePropertiesElement prop = (TablePropertiesElement) tableProps
- .item(i);
- String width = prop.getAttrStyleWidth();
- if (width != null) {
- writer.write("width:" + width + ";");
- }
- String borderModel = prop.getAttrTableBorderModel();
- if (borderModel != null) {
- if (borderModel.equals("collapsing")) {
- writer.write("border-collapse:collapse;");
- } else if (borderModel.equals("separating")) {
- writer.write("border-collapse:separate;");
- }
- }
- }
- }
-
- private void writeCssValueByTableColumnPropertiesElement(
- PrintWriter writer, StyleElement styleElem) {
- NodeList tableColProps = styleElem.getElementsByTagNameNS(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_TABLE_COLUMN_PROPERTIES);
- for (int i = 0; i < tableColProps.getLength(); i++) {
- TableColumnPropertiesElement prop = (TableColumnPropertiesElement) tableColProps
- .item(i);
- String width = prop.getAttrStyleColumnWidth();
- if (width != null) {
- writer.write("width:" + width + ";");
- }
- }
- }
-
- private void writeCssValueByTableCellPropertiesElement(PrintWriter writer,
- StyleElement styleElem) {
- NodeList tableCellProps = styleElem.getElementsByTagNameNS(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_TABLE_CELL_PROPERTIES);
- for (int i = 0; i < tableCellProps.getLength(); i++) {
- TableCellPropertiesElement prop = (TableCellPropertiesElement) tableCellProps
- .item(i);
- String border = prop.getAttrFormatBorder();
- if (border != null) {
- writer.write("border:" + border + ";");
- }
- String borderLeft = prop.getAttrFormatBorderLeft();
- if (borderLeft != null) {
- writer.write("border-left:" + borderLeft + ";");
- }
- String borderRight = prop.getAttrFormatBorderRight();
- if (borderRight != null) {
- writer.write("border-right:" + borderRight + ";");
- }
- String borderTop = prop.getAttrFormatBorderTop();
- if (borderTop != null) {
- writer.write("border-top:" + borderTop + ";");
- }
- String borderBottom = prop.getAttrFormatBorderBottom();
- if (borderBottom != null) {
- writer.write("border-bottom:" + borderBottom + ";");
- }
- String backgroundColor = prop.getAttrFormatBackgroundColor();
- if (backgroundColor != null) {
- writer.write("background-color:" + backgroundColor + ";");
- }
- String padding = prop.getAttrFormatPadding();
- if (padding != null) {
- writer.write("padding:" + padding + ";");
- }
- }
- }
-
- private void writeCssValueByStyleStyleElement(PrintWriter writer,
- StyleElement styleElem) {
- String parentStyleName = styleElem.getAttrStyleParentStyleName();
- if (parentStyleName != null) {
- ODFElement parentStyle = ((ODFElementImpl) styleElem)
- .findElementByAttrValue(StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_STYLE,
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME, parentStyleName);
- if (parentStyle == null) {
- parentStyle = ((ODFElementImpl) styleElem)
- .findElementByAttrValueFromStyleDoc(
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ELEMENT_STYLE,
- StyleConstants.STYLE_NAMESPACE_URI,
- StyleConstants.ATTR_NAME, parentStyleName);
- }
- if (parentStyle != null) {
- writeCssValueByStyleStyleElement(writer,
- (StyleElement) parentStyle);
- }
- }
-
- writeCssValueByTextPropertiesElement(writer, styleElem);
- writeCssValueByParagraphPropertiesElement(writer, styleElem);
- writeCssValueByGraphicPropertiesElement(writer, styleElem);
- writeCssValueByTablePropertiesElement(writer, styleElem);
- writeCssValueByTableColumnPropertiesElement(writer, styleElem);
- writeCssValueByTableCellPropertiesElement(writer, styleElem);
- }
-
- private void writeCssByStyleDefaultStyleElement(PrintWriter writer,
- ODFDocument doc) {
- Element root = doc.getDocumentElement();
- NodeList styleDefaultStyleList = XPathUtil.evalXPathNodeList(root,
- ".//*[namespace-uri()='" + StyleConstants.STYLE_NAMESPACE_URI
- + "' and local-name()='"
- + StyleConstants.ELEMENT_DEFAULT_STYLE + "']");
- for (int i = 0; i < styleDefaultStyleList.getLength(); i++) {
- DefaultStyleElement styleElem = (DefaultStyleElement) styleDefaultStyleList
- .item(i);
- String styleFamily = styleElem.getAttrStyleFamily();
- if (styleFamily != null) {
- if (styleFamily.equals("paragraph")) {
- writer.write("p {");
- } else if (styleFamily.equals("table")) {
- writer.write("table {");
- } else if (styleFamily.equals("table-row")) {
- writer.write("tr {");
- } else {
- writer.write("." + styleFamily + " {");
- }
- writeCssValueByStyleStyleElement(writer, styleElem);
- writer.write("}\n");
- }
- }
- }
-
- private void writeCssByStyleStyleElement(PrintWriter writer, ODFDocument doc) {
- Element root = doc.getDocumentElement();
- NodeList styleStyleList = XPathUtil.evalXPathNodeList(root,
- ".//*[namespace-uri()='" + StyleConstants.STYLE_NAMESPACE_URI
- + "' and local-name()='" + StyleConstants.ELEMENT_STYLE
- + "']");
- for (int i = 0; i < styleStyleList.getLength(); i++) {
- StyleElement styleElem = (StyleElement) styleStyleList.item(i);
- String styleName = styleElem.getName();
- styleName = styleName.replaceAll("\\.", "\\\\\\.");
- writer.write("." + styleName + " {");
- writeCssValueByStyleStyleElement(writer, styleElem);
- writer.write("}\n");
- }
- }
-
- private void writeCssByListStyleElement(PrintWriter writer, ODFDocument doc) {
- Element root = doc.getDocumentElement();
- NodeList listStyleList = XPathUtil.evalXPathNodeList(root,
- ".//*[namespace-uri()='" + TextConstants.TEXT_NAMESPACE_URI
- + "' and local-name()='"
- + TextConstants.ELEMENT_LIST_STYLE + "']");
- for (int i = 0; i < listStyleList.getLength(); i++) {
- ListStyleElement styleElem = (ListStyleElement) listStyleList
- .item(i);
- String styleName = styleElem.getName();
- styleName = styleName.replaceAll("\\.", "\\\\\\.");
- NodeList nl = styleElem.getElementsByTagNameNS(
- TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ELEMENT_LIST_LEVEL_STYLE_NUMBER);
- for (int j = 0; j < nl.getLength(); j++) {
- ListLevelStyleNumberElement styleNumElem = (ListLevelStyleNumberElement) nl
- .item(j);
- writer.write("." + styleName + styleNumElem.getAttrLevel()
- + " {");
- String format = styleNumElem.getAttrNumFormat();
- if (format.equals("1")) {
- writer.write("list-style-type:decimal;");
- } else if (format.equals("i")) {
- writer.write("list-style-type:lower-roman;");
- } else if (format.equals("I")) {
- writer.write("list-style-type:upper-roman;");
- } else if (format.equals("a")) {
- writer.write("list-style-type:lower-alpha;");
- } else if (format.equals("A")) {
- writer.write("list-style-type:upper-alpha;");
- }
- writer.write("}\n");
- }
- }
- }
-
- private void writeCssFile(String fileName) {
- File file = new File(fileName);
- try {
- FileOutputStream fos = new FileOutputStream(file);
- OutputStreamWriter osw = new OutputStreamWriter(fos, HTML_ENCODING);
- PrintWriter pw = new PrintWriter(osw);
-
- ODFDocument styleDoc = ((ODFDocument) curElem.getOwnerDocument())
- .getStyleDocument();
- // write default css style by using styles.xml
- writeCssByStyleDefaultStyleElement(pw, styleDoc);
-
- // write css style by using styles.xml
- writeCssByStyleStyleElement(pw, styleDoc);
-
- // write css style by using content.xml
- ODFDocument contentDoc = (ODFDocument) curElem.getOwnerDocument();
- writeCssByStyleStyleElement(pw, (ODFDocument) curElem
- .getOwnerDocument());
-
- // write additional css style for list structure
- writeCssByListStyleElement(pw, contentDoc);
-
- pw.flush();
- pw.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (UnsupportedEncodingException e) {
- e.printStackTrace();
- }
- }
-
- public void convertDocument(String fileName, boolean enableStyle) {
- File file = new File(fileName);
- String dirName = file.getParent();
- File dir = new File(dirName);
- if (!dir.exists())
- dir.mkdirs();
-
- if (enableStyle) {
- String cssFileName = dirName + System.getProperty("file.separator")
- + ODF_CSS_FILE;
- writeCssFile(cssFileName);
- }
-
- try {
- FileOutputStream fos = new FileOutputStream(file);
- OutputStreamWriter osw = new OutputStreamWriter(fos, HTML_ENCODING);
- PrintWriter pw = new PrintWriter(osw);
- convertDocument(pw, dir, enableStyle);
- pw.flush();
- pw.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (UnsupportedEncodingException e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/impl/TextExtractorImpl.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/impl/TextExtractorImpl.java
deleted file mode 100644
index 217a268..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/util/converter/impl/TextExtractorImpl.java
+++ /dev/null
@@ -1,509 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.util.converter.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Iterator;
-
-import org.eclipse.actf.model.dom.odf.ODFParser;
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectBaseElement;
-import org.eclipse.actf.model.dom.odf.base.EmbedDrawingObjectElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.content.IEditable;
-import org.eclipse.actf.model.dom.odf.dr3d.SceneElement;
-import org.eclipse.actf.model.dom.odf.draw.CaptionElement;
-import org.eclipse.actf.model.dom.odf.draw.CircleElement;
-import org.eclipse.actf.model.dom.odf.draw.ConnectorElement;
-import org.eclipse.actf.model.dom.odf.draw.ControlElement;
-import org.eclipse.actf.model.dom.odf.draw.CustomShapeElement;
-import org.eclipse.actf.model.dom.odf.draw.EllipseElement;
-import org.eclipse.actf.model.dom.odf.draw.FrameElement;
-import org.eclipse.actf.model.dom.odf.draw.GElement;
-import org.eclipse.actf.model.dom.odf.draw.ImageElement;
-import org.eclipse.actf.model.dom.odf.draw.ImageMapAreaElement;
-import org.eclipse.actf.model.dom.odf.draw.ImageMapElement;
-import org.eclipse.actf.model.dom.odf.draw.LineElement;
-import org.eclipse.actf.model.dom.odf.draw.ObjectElement;
-import org.eclipse.actf.model.dom.odf.draw.PageThumbnailElement;
-import org.eclipse.actf.model.dom.odf.draw.PolygonElement;
-import org.eclipse.actf.model.dom.odf.draw.PolylineElement;
-import org.eclipse.actf.model.dom.odf.draw.RectElement;
-import org.eclipse.actf.model.dom.odf.draw.RegularPolygonElement;
-import org.eclipse.actf.model.dom.odf.draw.TextBoxElement;
-import org.eclipse.actf.model.dom.odf.form.FixedTextElement;
-import org.eclipse.actf.model.dom.odf.form.FormControlElement;
-import org.eclipse.actf.model.dom.odf.table.TableCellElement;
-import org.eclipse.actf.model.dom.odf.text.PElement;
-import org.eclipse.actf.model.dom.odf.text.PageNumberElement;
-import org.eclipse.actf.model.dom.odf.text.SElement;
-import org.eclipse.actf.model.dom.odf.text.TabElement;
-import org.eclipse.actf.model.dom.odf.text.TextConstants;
-import org.eclipse.actf.model.dom.odf.text.TrackedChangesElement;
-import org.eclipse.actf.model.dom.odf.util.converter.ODFConverterUtils;
-import org.eclipse.actf.model.dom.odf.util.converter.TextExtractor;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-
-public class TextExtractorImpl implements TextExtractor {
- public static final String IMAGE_NO_ALT = "[image]";
-
- public static final String IMAGEMAP_NO_ALT = "[imagemap]";
-
- public static final String OBJECT_NO_ALT = "[object]";
-
- public static final String OBJECT_TABLE = "[table]";
-
- public static final String TEXTBOX_NO_ALT = "[text box]";
-
- public static final String CAPTION_NO_ALT = "[caption]";
-
- public static final String CIRCLE_NO_ALT = "[circle]";
-
- public static final String CONNECTOR_NO_ALT = "[connector]";
-
- public static final String CUSTOMSHAPE_NO_ALT = "[custom shape]";
-
- public static final String ELLIPSE_NO_ALT = "[ellipse]";
-
- public static final String FRAME_NO_ALT = "[frame]";
-
- public static final String G_NO_ALT = "[group]";
-
- public static final String IMAGEMAPAREA_NO_ALT = "[imagemap area]";
-
- public static final String LINE_NO_ALT = "[line]";
-
- public static final String POLYGON_NO_ALT = "[polygon]";
-
- public static final String POLYLINE_NO_ALT = "[polygon line]";
-
- public static final String RECT_NO_ALT = "[rectangle]";
-
- public static final String REGULARPOLYGON_NO_ALT = "[polygon]";
-
- public static final String SCENE_NO_ALT = "[3D shape]";
-
- public static final String UNKNOWNSHAPE_NO_ALT = "[graphic shape]";
-
- private TextExtractor converter;
-
- private double odfVersion = -1.0;
-
- private ODFElement curElem = null;
-
- public void setDocument(ODFDocument document, TextExtractor converter) {
- this.curElem = (ODFElement) document.getDocumentElement();
- this.converter = converter;
- }
-
- // for Notes8, Notes8 save document by ODF 1.1 schema,
- // but odf:version is set as 1.0
- // if specify odf:version by this function,
- // do not use odf:version defined in each ODF file
- public void setOdfVersion(double odfVersion) {
- this.odfVersion = odfVersion;
- }
-
- private boolean writeControlElementContent(Writer writer,
- ControlElement elem) {
- FormControlElement form = ((ControlElement) elem)
- .getFormControlElement();
- if (form != null) {
- try {
- if (!(form instanceof FixedTextElement)) {
- writer.write("[form control]");
- }
-
- String formLabel = form.getAttrFormLabel();
- if (formLabel != null) {
- if (!(form instanceof FixedTextElement)) {
- writer.write(" ");
- }
- writer.write(formLabel);
- }
- return true;
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return false;
- }
-
- private boolean writeFrameElementContent(Writer writer, File dir,
- FrameElement elem, boolean enableStyle) {
- boolean addedTextContent = false;
- Iterator iter = ((FrameElement) elem).getChildIterator();
- if (iter.hasNext()) {
- ODFElement firstContent = (ODFElement) iter.next();
- if (firstContent != null) {
- addedTextContent |= converter.extractContent(writer, dir,
- firstContent, enableStyle);
- if (iter.hasNext()) {
- // if this frame has image map
- ODFElement secondContent = (ODFElement) iter.next();
- if ((secondContent != null)
- && (secondContent instanceof ImageMapElement)) {
- addedTextContent |= converter.extractContent(writer,
- dir, secondContent, enableStyle);
- }
- }
- }
- }
- return addedTextContent;
- }
-
- private boolean writeImageMapElementContent(Writer writer, File dir,
- ImageMapElement elem, boolean enableStyle) {
- boolean addedTextContent = false;
- NodeList nl = ((ImageMapElement) elem).getAreaElements();
- for (int i = 0; i < nl.getLength(); i++) {
- addedTextContent |= converter.extractContent(writer, dir,
- (ImageMapAreaElement) nl.item(i), enableStyle);
- }
- return addedTextContent;
- }
-
- private boolean writeTextBoxElementContent(Writer writer, File dir,
- TextBoxElement elem, boolean enableStyle) {
- boolean addedTextContent = false;
- NodeList children = elem.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child instanceof Text) {
- String str = ((Text) child).getData().trim();
- if (str.length() != 0) {
- str = ODFConverterUtils.convertXMLCharacter(str);
- try {
- writer.write(str);
- } catch (IOException e) {
- e.printStackTrace();
- }
- addedTextContent = true;
- }
- } else if (child instanceof ODFElement) {
- addedTextContent |= converter.extractContent(writer, dir,
- (ODFElement) child, enableStyle);
- }
- }
- return addedTextContent;
- }
-
- private boolean writeTabElementContent(Writer writer, TabElement elem) {
- try {
- writer.write("\t");
- } catch (IOException e) {
- e.printStackTrace();
- }
- return true;
- }
-
- private boolean writeSElementContent(Writer writer, SElement elem) {
- if (elem.hasAttributeNS(TextConstants.TEXT_NAMESPACE_URI,
- TextConstants.ATTR_C)) {
- int c = ((SElement) elem).getAttrTextC();
- if (c > 0) {
- String value = "";
- for (int i = 0; i < c; i++)
- value += " ";
- try {
- writer.write(value);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- } else {
- try {
- writer.write(" ");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return true;
- }
-
- private boolean writeCustomShapeElementContent(Writer writer, File dir,
- CustomShapeElement elem, boolean enableStyle) {
- boolean addedTextContent = false;
- NodeList pList = elem.getElementsByTagNameNS(
- TextConstants.TEXT_NAMESPACE_URI, TextConstants.ELEMENT_P);
- if ((pList != null) && (pList.getLength() != 0)) { // if this custom
- // shape is caption
- for (int i = 0; i < pList.getLength(); i++) {
- Node pElem = pList.item(i);
- String content = pElem.getTextContent();
- if ((content != null) && (content.length() > 0)) {
- addedTextContent |= converter.extractContent(writer, dir,
- (ODFElement) pList.item(i), enableStyle);
- }
- }
- }
-
- if (!addedTextContent) {
- IEditable shortDesc = null;
- if (odfVersion != -1.0) {
- shortDesc = (IEditable) ((DrawingObjectBaseElement) elem)
- .getShortDescElement(odfVersion);
- } else {
- shortDesc = (IEditable) ((DrawingObjectBaseElement) elem)
- .getShortDescElement();
- }
-
- if (shortDesc == null) {
- ODFDocument doc = (ODFDocument) elem.getOwnerDocument();
- if ((doc.getODFVersion() > 1.0)
- || ((odfVersion != -1.0) && (odfVersion > 1.0))) {
- try {
- writer.write(CUSTOMSHAPE_NO_ALT);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- addedTextContent = true;
- } else {
- String str = (String) shortDesc.getValue();
- if (str != null) {
- try {
- writer.write(str);
- } catch (IOException e) {
- e.printStackTrace();
- }
- addedTextContent = true;
- }
- }
- }
- return addedTextContent;
- }
-
- private boolean writeDrawingObjectBaseElementContent(Writer writer,
- File dir, DrawingObjectBaseElement elem, boolean enableStyle) {
- boolean addedTextContent = false;
- if (elem instanceof ImageElement)
- return false;
- if (elem instanceof PageThumbnailElement)
- return false;
-
- NodeList pList = elem.getElementsByTagNameNS(
- TextConstants.TEXT_NAMESPACE_URI, TextConstants.ELEMENT_P);
- if ((pList != null) && (pList.getLength() != 0)) { // if this custom
- // shape is caption
- for (int i = 0; i < pList.getLength(); i++) {
- Node pElem = pList.item(i);
- String content = pElem.getTextContent();
- if ((content != null) && (content.length() > 0)) {
- addedTextContent |= converter.extractContent(writer, dir,
- (ODFElement) pList.item(i), enableStyle);
- }
- }
- }
-
- if (!addedTextContent) {
- IEditable shortDesc = null;
- if (odfVersion != -1.0) {
- shortDesc = (IEditable) ((DrawingObjectBaseElement) elem)
- .getShortDescElement(odfVersion);
- } else {
- shortDesc = (IEditable) ((DrawingObjectBaseElement) elem)
- .getShortDescElement();
- }
-
- if (shortDesc == null) {
- ODFDocument doc = (ODFDocument) elem.getOwnerDocument();
- if ((elem instanceof EmbedDrawingObjectElement)
- || ((doc.getODFVersion() > 1.0) || ((odfVersion != -1.0) && (odfVersion > 1.0)))) {
- try {
- if (elem instanceof ImageElement)
- writer.write(IMAGE_NO_ALT);
- else if (elem instanceof ImageMapElement)
- writer.write(IMAGEMAP_NO_ALT);
- else if (elem instanceof ObjectElement) {
- if (((ObjectElement) elem).isPresentationTable())
- writer.write(OBJECT_TABLE);
- else
- writer.write(OBJECT_NO_ALT);
- } else if (elem instanceof CaptionElement)
- writer.write(CAPTION_NO_ALT);
- else if (elem instanceof TextBoxElement)
- writer.write(TEXTBOX_NO_ALT);
- else if (elem instanceof CircleElement)
- writer.write(CIRCLE_NO_ALT);
- else if (elem instanceof ConnectorElement)
- writer.write(CONNECTOR_NO_ALT);
- else if (elem instanceof CustomShapeElement)
- writer.write(CUSTOMSHAPE_NO_ALT);
- else if (elem instanceof EllipseElement)
- writer.write(ELLIPSE_NO_ALT);
- else if (elem instanceof FrameElement)
- writer.write(FRAME_NO_ALT);
- else if (elem instanceof GElement)
- writer.write(G_NO_ALT);
- else if (elem instanceof ImageMapAreaElement)
- writer.write(IMAGEMAPAREA_NO_ALT);
- else if (elem instanceof LineElement)
- writer.write(LINE_NO_ALT);
- else if (elem instanceof PolygonElement)
- writer.write(POLYGON_NO_ALT);
- else if (elem instanceof PolylineElement)
- writer.write(POLYLINE_NO_ALT);
- else if (elem instanceof RectElement)
- writer.write(RECT_NO_ALT);
- else if (elem instanceof RegularPolygonElement)
- writer.write(REGULARPOLYGON_NO_ALT);
- else if (elem instanceof SceneElement)
- writer.write(SCENE_NO_ALT);
- else
- writer.write(UNKNOWNSHAPE_NO_ALT);
-
- writer.write(System.getProperty("line.separator"));
- } catch (IOException e) {
- e.printStackTrace();
- }
- addedTextContent = true;
- }
- } else {
- String str = (String) shortDesc.getValue();
- if (str != null) {
- try {
- writer.write(str);
- } catch (IOException e) {
- e.printStackTrace();
- }
- addedTextContent = true;
- }
- }
- }
- return addedTextContent;
- }
-
- private boolean writeTableCellElementContent(Writer writer, File dir,
- TableCellElement elem, boolean enableStyle) {
- boolean addedToCell = writeODFElementContent(writer, dir,
- (ODFElement) elem, enableStyle);
- if (!addedToCell) {
- try {
- writer.write(" ");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return true;
- }
-
- private boolean writeODFElementContent(Writer writer, File dir,
- ODFElement elem, boolean enableStyle) {
- boolean addedTextContent = false;
- NodeList children = elem.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child instanceof Text) {
- String str = ((Text) child).getData().trim();
- if (str.length() != 0) {
- str = ODFConverterUtils.convertXMLCharacter(str);
- try {
- writer.write(str);
- } catch (IOException e) {
- e.printStackTrace();
- }
- addedTextContent = true;
- }
- } else if (child instanceof ODFElement) {
- addedTextContent |= converter.extractContent(writer, dir,
- (ODFElement) child, enableStyle);
- }
- }
- return addedTextContent;
- }
-
- public void extractEmbedFile(ODFElement elem, File dir, String href) {
- if (dir == null)
- return;
-
- String outputFileName = dir.getAbsolutePath()
- + System.getProperty("file.separator") + href;
- File outputFile = new File(outputFileName);
-
- String outputDirName = outputFile.getParent();
- File outputDir = new File(outputDirName);
- if (!outputDir.exists())
- outputDir.mkdirs();
-
- ODFParser parser = new ODFParser();
- Document doc = curElem.getOwnerDocument();
- if (doc instanceof ODFDocument) {
- parser.extractFile(((ODFDocument) doc).getURL(), href,
- outputFileName);
- }
- }
-
- public boolean extractContent(Writer writer, File dir, ODFElement elem,
- boolean enableStyle) {
- // write odf content
- boolean addedTextContent = false;
- if (elem instanceof TabElement) {
- addedTextContent |= writeTabElementContent(writer,
- (TabElement) elem);
- } else if (elem instanceof SElement) {
- addedTextContent |= writeSElementContent(writer, (SElement) elem);
- } else if (elem instanceof TableCellElement) {
- addedTextContent |= writeTableCellElementContent(writer, dir,
- (TableCellElement) elem, enableStyle);
- } else if ((elem instanceof TrackedChangesElement)
- || (elem instanceof PageThumbnailElement)
- || (elem instanceof ImageElement)
- || (elem instanceof PageNumberElement)) {
- // nothing to write
- } else if (elem instanceof DrawingObjectBaseElement) {
- if (elem instanceof ControlElement) {
- addedTextContent |= writeControlElementContent(writer,
- (ControlElement) elem);
- } else if (elem instanceof FrameElement) {
- addedTextContent |= writeFrameElementContent(writer, dir,
- (FrameElement) elem, enableStyle);
- } else if (elem instanceof ImageMapElement) {
- addedTextContent |= writeImageMapElementContent(writer, dir,
- (ImageMapElement) elem, enableStyle);
- } else if (elem instanceof TextBoxElement) {
- addedTextContent |= writeTextBoxElementContent(writer, dir,
- (TextBoxElement) elem, enableStyle);
- } else if (elem instanceof CustomShapeElement) {
- addedTextContent |= writeCustomShapeElementContent(writer, dir,
- (CustomShapeElement) elem, enableStyle);
- } else if (elem instanceof GElement) {
- addedTextContent |= writeODFElementContent(writer, dir,
- (ODFElement) elem, enableStyle);
- } else {
- addedTextContent |= writeDrawingObjectBaseElementContent(
- writer, dir, (DrawingObjectBaseElement) elem,
- enableStyle);
- }
- } else if (elem instanceof PElement) {
- addedTextContent |= writeODFElementContent(writer, dir,
- (ODFElement) elem, enableStyle);
- if (addedTextContent) {
- try {
- writer.write(System.getProperty("line.separator"));
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- } else {
- addedTextContent |= writeODFElementContent(writer, dir,
- (ODFElement) elem, enableStyle);
- }
-
- return addedTextContent;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/xlink/XLinkConstants.java b/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/xlink/XLinkConstants.java
deleted file mode 100644
index 1511ae2..0000000
--- a/plugins/org.eclipse.actf.model.dom.odf/src/org/eclipse/actf/model/dom/odf/xlink/XLinkConstants.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.dom.odf.xlink;
-
-public final class XLinkConstants {
- static public final String XLINK_NAMESPACE_URI = "http://www.w3.org/1999/xlink";
-
- static public final String LINK_TYPE_SIMPLE = "simple";
-
- static public final String ATTR_HREF = "href";
-
- static public final String ATTR_TYPE = "type";
-
- static public final String ATTR_SHOW = "show";
-
- static public final String ATTR_ACTUATE = "actuate";
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/.classpath b/plugins/org.eclipse.actf.model.flash.proxy/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/.cvsignore b/plugins/org.eclipse.actf.model.flash.proxy/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/.project b/plugins/org.eclipse.actf.model.flash.proxy/.project
deleted file mode 100644
index 15e419d..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.model.flash.proxy</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.model.flash.proxy/AccessibilityProxyLibrary.dll b/plugins/org.eclipse.actf.model.flash.proxy/AccessibilityProxyLibrary.dll
deleted file mode 100644
index cece337..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/AccessibilityProxyLibrary.dll
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.model.flash.proxy/META-INF/MANIFEST.MF
deleted file mode 100644
index 7937151..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF Proxy Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.model.flash.proxy;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.actf.model.flash.proxy.ProxyPlugin
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.actf.core,
- org.eclipse.actf.model.flash,
- org.eclipse.actf.ui
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.actf.model.flash.proxy
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/about.html b/plugins/org.eclipse.actf.model.flash.proxy/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/build.properties b/plugins/org.eclipse.actf.model.flash.proxy/build.properties
deleted file mode 100644
index 0cb469b..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- AccessibilityProxyLibrary.dll,\
- plugin.xml,\
- plugin.properties,\
- plugin_ja.properties,\
- icons/,\
- .,\
- templates/
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/icons/action16/clear.gif b/plugins/org.eclipse.actf.model.flash.proxy/icons/action16/clear.gif
deleted file mode 100644
index af30a42..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/icons/action16/clear.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/icons/view16/proxylogview.gif b/plugins/org.eclipse.actf.model.flash.proxy/icons/view16/proxylogview.gif
deleted file mode 100644
index 34fb3c9..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/icons/view16/proxylogview.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/.cvsignore b/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/.cvsignore
deleted file mode 100644
index 4776fff..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Debug
-Release
-*.ncb
-*.suo
-*.user
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/AccessibilityProxyLibrary.cpp b/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/AccessibilityProxyLibrary.cpp
deleted file mode 100644
index 57cb919..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/AccessibilityProxyLibrary.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-// AccessibilityProxyLibrary.cpp : Defines the entry point for the DLL application.
-//
-
-#include "stdafx.h"
-
-
-#ifdef _MANAGED
-#pragma managed(push, off)
-#endif
-
-BOOL APIENTRY DllMain( HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
-{
- return TRUE;
-}
-
-#ifdef _MANAGED
-#pragma managed(pop)
-#endif
-
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/AccessibilityProxyLibrary.sln b/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/AccessibilityProxyLibrary.sln
deleted file mode 100644
index 5bda7d2..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/AccessibilityProxyLibrary.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AccessibilityProxyLibrary", "AccessibilityProxyLibrary.vcproj", "{81DBD23B-DBC9-46B8-B823-ADDB0496ABB5}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {81DBD23B-DBC9-46B8-B823-ADDB0496ABB5}.Debug|Win32.ActiveCfg = Debug|Win32
- {81DBD23B-DBC9-46B8-B823-ADDB0496ABB5}.Debug|Win32.Build.0 = Debug|Win32
- {81DBD23B-DBC9-46B8-B823-ADDB0496ABB5}.Release|Win32.ActiveCfg = Release|Win32
- {81DBD23B-DBC9-46B8-B823-ADDB0496ABB5}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/AccessibilityProxyLibrary.vcproj b/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/AccessibilityProxyLibrary.vcproj
deleted file mode 100644
index 3f2668f..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/AccessibilityProxyLibrary.vcproj
+++ /dev/null
@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="shift_jis"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="AccessibilityProxyLibrary"
- ProjectGUID="{81DBD23B-DBC9-46B8-B823-ADDB0496ABB5}"
- RootNamespace="AccessibilityProxyLibrary"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;ACCESSIBILITYPROXYLIBRARY_EXPORTS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="wininet.lib"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;ACCESSIBILITYPROXYLIBRARY_EXPORTS"
- RuntimeLibrary="0"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="wininet.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\AccessibilityProxyLibrary.cpp"
- >
- </File>
- <File
- RelativePath=".\org_eclipse_actf_model_flash_proxy_internal_WinInet.cpp"
- >
- </File>
- <File
- RelativePath=".\stdafx.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\stdafx.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- <File
- RelativePath=".\ReadMe.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/org_eclipse_actf_model_flash_proxy_internal_WinInet.cpp b/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/org_eclipse_actf_model_flash_proxy_internal_WinInet.cpp
deleted file mode 100644
index fe89cf2..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/org_eclipse_actf_model_flash_proxy_internal_WinInet.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-#include "stdafx.h"
-#include "org_eclipse_actf_model_flash_proxy_internal_WinInet.h"
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_InternetOpenW
- (JNIEnv *env, jclass that, jint lpszAgent, jint dwAccessType, jint lpszProxy, jint lpszProxyBypass, jint dwFlags)
-{
- return (jint)InternetOpenW((LPWSTR)lpszAgent, dwAccessType, (LPWSTR)lpszProxy, (LPWSTR)lpszProxyBypass, dwFlags);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_InternetCloseHandle
- (JNIEnv *env, jclass that, jint hInternet)
-{
- return InternetCloseHandle((HINTERNET)hInternet);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_InternetSetOptionW
- (JNIEnv *env, jclass that, jint hInternet, jint dwOption, jint lpBuffer, jint dwBufferLength)
-{
- return InternetSetOptionW((HINTERNET)hInternet, dwOption, (LPVOID)lpBuffer, dwBufferLength);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_InternetQueryOptionW
- (JNIEnv *env, jclass that, jint hInternet, jint dwOption, jint lpBuffer, jintArray lpdwBufferLength)
-{
- jint *lpNativeLength = NULL;
- if( lpdwBufferLength ) {
- lpNativeLength = env->GetIntArrayElements(lpdwBufferLength,NULL);
- }
- jboolean rc = InternetQueryOptionW((HINTERNET)hInternet, dwOption, (LPVOID)lpBuffer, (LPDWORD)lpNativeLength);
- if( lpdwBufferLength && lpNativeLength ) {
- env->ReleaseIntArrayElements(lpdwBufferLength,lpNativeLength,0);
- }
- return rc;
-}
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_FindFirstUrlCacheEntryW
- (JNIEnv *env, jclass that, jint lpszUrlSearchPattern, jint lpFirstCacheEntryInfo, jintArray lpcbCacheEntryInfo)
-{
- jint *lpNativeLength = NULL;
- if( lpcbCacheEntryInfo ) {
- lpNativeLength = env->GetIntArrayElements(lpcbCacheEntryInfo,NULL);
- }
- HANDLE handle = FindFirstUrlCacheEntryW((LPWSTR)lpszUrlSearchPattern, (LPINTERNET_CACHE_ENTRY_INFOW)lpFirstCacheEntryInfo, (LPDWORD)lpNativeLength);
- if( lpcbCacheEntryInfo && lpNativeLength ) {
- env->ReleaseIntArrayElements(lpcbCacheEntryInfo,lpNativeLength,0);
- }
- return (jint)handle;
-}
-
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_FindNextUrlCacheEntryW
- (JNIEnv *env, jclass that, jint hEnumHandle, jint lpNextCacheEntryInfo, jintArray lpcbCacheEntryInfo)
-{
- jint *lpNativeLength = NULL;
- if( lpcbCacheEntryInfo ) {
- lpNativeLength = env->GetIntArrayElements(lpcbCacheEntryInfo,NULL);
- }
- BOOL rc = FindNextUrlCacheEntryW((HANDLE)hEnumHandle, (LPINTERNET_CACHE_ENTRY_INFOW)lpNextCacheEntryInfo, (LPDWORD)lpNativeLength);
- if( lpcbCacheEntryInfo && lpNativeLength ) {
- env->ReleaseIntArrayElements(lpcbCacheEntryInfo,lpNativeLength,0);
- }
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_FindCloseUrlCache
- (JNIEnv *env, jclass that, jint hEnumHandle)
-{
- return FindCloseUrlCache((HANDLE)hEnumHandle);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_DeleteUrlCacheEntryW
- (JNIEnv *env, jclass that, jint lpszUrlName)
-{
- return DeleteUrlCacheEntryW((LPWSTR)lpszUrlName);
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/org_eclipse_actf_model_flash_proxy_internal_WinInet.h b/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/org_eclipse_actf_model_flash_proxy_internal_WinInet.h
deleted file mode 100644
index 287bdcd..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/org_eclipse_actf_model_flash_proxy_internal_WinInet.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_eclipse_actf_model_flash_proxy_internal_WinInet */
-
-#ifndef _Included_org_eclipse_actf_model_flash_proxy_internal_WinInet
-#define _Included_org_eclipse_actf_model_flash_proxy_internal_WinInet
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPEN_TYPE_PRECONFIG
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPEN_TYPE_PRECONFIG 0L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPEN_TYPE_DIRECT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPEN_TYPE_DIRECT 1L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPEN_TYPE_PROXY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPEN_TYPE_PROXY 3L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY 4L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CALLBACK
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CALLBACK 1L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECT_TIMEOUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECT_TIMEOUT 2L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECT_RETRIES
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECT_RETRIES 3L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECT_BACKOFF
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECT_BACKOFF 4L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SEND_TIMEOUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SEND_TIMEOUT 5L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONTROL_SEND_TIMEOUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONTROL_SEND_TIMEOUT 5L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_RECEIVE_TIMEOUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_RECEIVE_TIMEOUT 6L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT 6L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DATA_SEND_TIMEOUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DATA_SEND_TIMEOUT 7L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DATA_RECEIVE_TIMEOUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DATA_RECEIVE_TIMEOUT 8L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_HANDLE_TYPE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_HANDLE_TYPE 9L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_LISTEN_TIMEOUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_LISTEN_TIMEOUT 11L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_READ_BUFFER_SIZE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_READ_BUFFER_SIZE 12L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_WRITE_BUFFER_SIZE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_WRITE_BUFFER_SIZE 13L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ASYNC_ID
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ASYNC_ID 15L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ASYNC_PRIORITY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ASYNC_PRIORITY 16L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PARENT_HANDLE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PARENT_HANDLE 21L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_KEEP_CONNECTION
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_KEEP_CONNECTION 22L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_REQUEST_FLAGS
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_REQUEST_FLAGS 23L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_EXTENDED_ERROR
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_EXTENDED_ERROR 24L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_OFFLINE_MODE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_OFFLINE_MODE 26L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CACHE_STREAM_HANDLE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CACHE_STREAM_HANDLE 27L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_USERNAME
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_USERNAME 28L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PASSWORD
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PASSWORD 29L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ASYNC
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ASYNC 30L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECURITY_FLAGS
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECURITY_FLAGS 31L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT 32L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DATAFILE_NAME
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DATAFILE_NAME 33L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_URL
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_URL 34L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECURITY_CERTIFICATE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECURITY_CERTIFICATE 35L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECURITY_KEY_BITNESS
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECURITY_KEY_BITNESS 36L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_REFRESH
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_REFRESH 37L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PROXY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PROXY 38L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SETTINGS_CHANGED
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SETTINGS_CHANGED 39L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_VERSION
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_VERSION 40L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_USER_AGENT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_USER_AGENT 41L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_END_BROWSER_SESSION
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_END_BROWSER_SESSION 42L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PROXY_USERNAME
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PROXY_USERNAME 43L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PROXY_PASSWORD
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PROXY_PASSWORD 44L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONTEXT_VALUE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONTEXT_VALUE 45L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECT_LIMIT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECT_LIMIT 46L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT 47L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_POLICY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_POLICY 48L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DISCONNECTED_TIMEOUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DISCONNECTED_TIMEOUT 49L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECTED_STATE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECTED_STATE 50L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_IDLE_STATE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_IDLE_STATE 51L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_OFFLINE_SEMANTICS
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_OFFLINE_SEMANTICS 52L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECONDARY_CACHE_KEY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SECONDARY_CACHE_KEY 53L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CALLBACK_FILTER
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CALLBACK_FILTER 54L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECT_TIME
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CONNECT_TIME 55L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SEND_THROUGHPUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SEND_THROUGHPUT 56L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_RECEIVE_THROUGHPUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_RECEIVE_THROUGHPUT 57L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_REQUEST_PRIORITY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_REQUEST_PRIORITY 58L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_HTTP_VERSION
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_HTTP_VERSION 59L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_RESET_URLCACHE_SESSION
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_RESET_URLCACHE_SESSION 60L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ERROR_MASK
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ERROR_MASK 62L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_FROM_CACHE_TIMEOUT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_FROM_CACHE_TIMEOUT 63L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_BYPASS_EDITED_ENTRY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_BYPASS_EDITED_ENTRY 64L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO 67L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CODEPAGE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CODEPAGE 68L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CACHE_TIMESTAMPS
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CACHE_TIMESTAMPS 69L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DISABLE_AUTODIAL
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DISABLE_AUTODIAL 70L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_MAX_CONNS_PER_SERVER
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_MAX_CONNS_PER_SERVER 73L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER 74L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PER_CONNECTION_OPTION
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PER_CONNECTION_OPTION 75L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DIGEST_AUTH_UNLOAD
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DIGEST_AUTH_UNLOAD 76L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_IGNORE_OFFLINE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_IGNORE_OFFLINE 77L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_IDENTITY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_IDENTITY 78L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_REMOVE_IDENTITY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_REMOVE_IDENTITY 79L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ALTER_IDENTITY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ALTER_IDENTITY 80L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SUPPRESS_BEHAVIOR
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SUPPRESS_BEHAVIOR 81L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_AUTODIAL_MODE
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_AUTODIAL_MODE 82L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_AUTODIAL_CONNECTION
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_AUTODIAL_CONNECTION 83L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CLIENT_CERT_CONTEXT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_CLIENT_CERT_CONTEXT 84L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_AUTH_FLAGS
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_AUTH_FLAGS 85L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_COOKIES_3RD_PARTY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_COOKIES_3RD_PARTY 86L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DISABLE_PASSPORT_AUTH
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DISABLE_PASSPORT_AUTH 87L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SEND_UTF8_SERVERNAME_TO_PROXY
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SEND_UTF8_SERVERNAME_TO_PROXY 88L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_EXEMPT_CONNECTION_LIMIT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_EXEMPT_CONNECTION_LIMIT 89L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ENABLE_PASSPORT_AUTH
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ENABLE_PASSPORT_AUTH 90L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_HIBERNATE_INACTIVE_WORKER_THREADS
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_HIBERNATE_INACTIVE_WORKER_THREADS 91L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ACTIVATE_WORKER_THREADS
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_ACTIVATE_WORKER_THREADS 92L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_RESTORE_WORKER_THREAD_DEFAULTS
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_RESTORE_WORKER_THREAD_DEFAULTS 93L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SOCKET_SEND_BUFFER_LENGTH
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_SOCKET_SEND_BUFFER_LENGTH 94L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PROXY_SETTINGS_CHANGED
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_PROXY_SETTINGS_CHANGED 95L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DATAFILE_EXT
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_OPTION_DATAFILE_EXT 96L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_FIRST_OPTION
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_FIRST_OPTION 1L
-#undef org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_LAST_OPTION
-#define org_eclipse_actf_model_flash_proxy_internal_WinInet_INTERNET_LAST_OPTION 96L
-/*
- * Class: org_eclipse_actf_model_flash_proxy_internal_WinInet
- * Method: InternetOpenW
- * Signature: (IIIII)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_InternetOpenW
- (JNIEnv *, jclass, jint, jint, jint, jint, jint);
-
-/*
- * Class: org_eclipse_actf_model_flash_proxy_internal_WinInet
- * Method: InternetCloseHandle
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_InternetCloseHandle
- (JNIEnv *, jclass, jint);
-
-/*
- * Class: org_eclipse_actf_model_flash_proxy_internal_WinInet
- * Method: InternetSetOptionW
- * Signature: (IIII)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_InternetSetOptionW
- (JNIEnv *, jclass, jint, jint, jint, jint);
-
-/*
- * Class: org_eclipse_actf_model_flash_proxy_internal_WinInet
- * Method: InternetQueryOptionW
- * Signature: (III[I)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_InternetQueryOptionW
- (JNIEnv *, jclass, jint, jint, jint, jintArray);
-
-/*
- * Class: org_eclipse_actf_model_flash_proxy_internal_WinInet
- * Method: FindFirstUrlCacheEntryW
- * Signature: (II[I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_FindFirstUrlCacheEntryW
- (JNIEnv *, jclass, jint, jint, jintArray);
-
-/*
- * Class: org_eclipse_actf_model_flash_proxy_internal_WinInet
- * Method: FindNextUrlCacheEntryW
- * Signature: (II[I)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_FindNextUrlCacheEntryW
- (JNIEnv *, jclass, jint, jint, jintArray);
-
-/*
- * Class: org_eclipse_actf_model_flash_proxy_internal_WinInet
- * Method: FindCloseUrlCache
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_FindCloseUrlCache
- (JNIEnv *, jclass, jint);
-
-/*
- * Class: org_eclipse_actf_model_flash_proxy_internal_WinInet
- * Method: DeleteUrlCacheEntryW
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_actf_model_flash_proxy_internal_WinInet_DeleteUrlCacheEntryW
- (JNIEnv *, jclass, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/stdafx.cpp b/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/stdafx.cpp
deleted file mode 100644
index 24e7522..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/stdafx.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-// stdafx.cpp : source file that includes just the standard includes
-// AccessibilityProxyLibrary.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/stdafx.h b/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/stdafx.h
deleted file mode 100644
index 24b4462..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/library_src/AccessibilityProxyLibrary/stdafx.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#pragma once
-
-// Modify the following defines if you have to target a platform prior to the ones specified below.
-// Refer to MSDN for the latest info on corresponding values for different platforms.
-#ifndef WINVER // Allow use of features specific to Windows XP or later.
-#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
-#endif
-
-#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
-#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
-#endif
-
-#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
-#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
-#endif
-
-#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
-#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
-#endif
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-// Windows Header Files:
-#include <windows.h>
-
-
-// TODO: reference additional headers your program requires here
-#include <WinInet.h>
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/plugin.properties b/plugins/org.eclipse.actf.model.flash.proxy/plugin.properties
deleted file mode 100644
index fdc3e57..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-ProxyPreferencePage.name=Flash Proxy
-ProxyLogView.name=Flash Proxy Logs
-ProxyMenu.name=&Cache
-DeleteAction.name=Clear internet cache
-DeleteAction.tip=Clear internet cache
-ProxyPreferences=Flash Proxy Preferences...
-Preferences=Preferences...
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/plugin.xml b/plugins/org.eclipse.actf.model.flash.proxy/plugin.xml
deleted file mode 100644
index 7194294..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/plugin.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension point="org.eclipse.ui.startup">
- <startup class="org.eclipse.actf.model.flash.proxy.ProxyStartup"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.actf.ui.preferences.RootPreferencePage"
- class="org.eclipse.actf.model.flash.proxy.preferences.ProxyPreferencePage"
- id="org.eclipse.actf.model.flash.proxy.preferences.ProxyPreferencePage"
- name="%ProxyPreferencePage.name"/>
- </extension>
-
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.actf.model.flash.proxy.preferences.ProxyPreferenceInitializer"/>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- class="org.eclipse.actf.model.flash.proxy.views.ProxyLogView"
- icon="icons/view16/proxylogview.gif"
- id="org.eclipse.actf.model.flash.proxy.views.ProxyLogView"
- name="%ProxyLogView.name"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- id="org.eclipse.actf.model.flash.proxy.actionSet"
- label="Proxy Action Sets">
- <action
- class="org.eclipse.actf.model.flash.proxy.actions.DeleteCacheAction"
- id="org.eclipse.actf.model.flash.proxy.actions.DeleteCacheAction"
- label="%DeleteAction.name"
- menubarPath="file/cacheGroup"
- tooltip="%DeleteAction.tip"/>
- </actionSet>
- </extension>
-
- <extension point="org.eclipse.ui.viewActions">
- <viewContribution
- id="org.eclipse.actf.model.flash.viewerContribution1"
- targetID="org.eclipse.actf.visualization.flash.ui.views.FlashDOMView">
- <action
- class="org.eclipse.actf.model.flash.proxy.actions.OpenPreferencesAction"
- id="org.eclipse.actf.model.flash.proxy.action1"
- label="%ProxyPreferences"
- menubarPath="additions"/>
- </viewContribution>
- <viewContribution
- id="org.eclipse.actf.model.flash.viewerContribution2"
- targetID="org.eclipse.actf.model.flash.proxy.views.ProxyLogView">
- <action
- class="org.eclipse.actf.model.flash.proxy.actions.OpenPreferencesAction"
- id="org.eclipse.actf.model.flash.proxy.action2"
- label="%Preferences"
- menubarPath="additions"/>
- </viewContribution>
- </extension>
-
-
-</plugin>
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/plugin_ja.properties b/plugins/org.eclipse.actf.model.flash.proxy/plugin_ja.properties
deleted file mode 100644
index 449eb08..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/plugin_ja.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-ProxyPreferencePage.name=Flash \u30d7\u30ed\u30ad\u30b7
-ProxyLogView.name=Flash \u30d7\u30ed\u30ad\u30b7 \u30ed\u30b0
-ProxyMenu.name=\u30ad\u30e3\u30c3\u30b7\u30e5(&C)
-DeleteAction.name=\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664
-DeleteAction.tip=\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664\u3057\u307e\u3059
-ProxyPreferences=Flash \u30d7\u30ed\u30ad\u30b7\u8a2d\u5b9a...
-Preferences=\u8a2d\u5b9a...
-
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/messages.properties b/plugins/org.eclipse.actf.model.flash.proxy/src/messages.properties
deleted file mode 100644
index a781a2c..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/messages.properties
+++ /dev/null
@@ -1,52 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-
-#do not translate the following messages
-NO_DELETE=|gif|jpg|jpeg|png|bmp|ico|pdf|txt|text|doc|xls|ppt|htm|html|shtml|jsp|asp|php|hta|htc|ashx|xml|css|js|vb|vbs|vbx|au|avi|mp3|aif|aiff|asf|asx|wm|wmv|wma|mid|exe|cab|zip|flv|
-#Specify url extensions to be bypassed. This is for debug purpose only.
-NO_PROXY=
-
-#translate the following messages
-proxy.clear_tip=Clear Logs
-proxy.clear=Clear
-proxy.source=Source
-proxy.global=System global
-proxy.time=Time
-proxy.type=Use HTTP Proxy For:
-proxy.none=None
-proxy.show_fine=Show trace logs
-proxy.message=Message
-proxy.copy=&Copy
-
-proxy.swfmethod=SWF bridge method:
-proxy.swfmethod.none=Do nothing.
-proxy.swfmethod.bootloader=Use an SWF bootloader.
-proxy.swfmethod.transcoder=Transcode incoming SWFs.
-
-proxy.pref_description=HTTP Proxy settings
-proxy.deleting_cache=Deleting internet cache ...
-proxy.session=This session only
-proxy.swf_version=Minimum SWF version to be handled:
-proxy.timeout=Timeout (seconds):
-proxy.port=Port (1-65535, 0=Automatic):
-
-proxy.dialog.text=Clear Internet Cache Dialog
-proxy.dialog.ok=OK
-proxy.cache_clear=Internet Cache Clear
-
-proxy.cache_confirmation1=will delete your Internet cache of Flash content\nto access the Flash content.
-proxy.cache_clear_when_startup_and_cache_clear=Clear Internet cache without comfirming (recommended)
-proxy.confirm_and_cache_clear=Clear Internet cache for this time
-proxy.confirm_and_no_operation=Do not clear the cache (Flash functionality would not work!)
-
-proxy.cache_clear_when_startup=Clear without confirming
-proxy.confirm_cache_clear=Confirm before clear
-proxy.no_cache_clear=Never clear the cache
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/messages_ja.properties b/plugins/org.eclipse.actf.model.flash.proxy/src/messages_ja.properties
deleted file mode 100644
index ebc59b1..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/messages_ja.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-proxy.clear_tip=\u30ed\u30b0\u3092\u6d88\u53bb\u3057\u307e\u3059
-proxy.clear=\u30af\u30ea\u30a2
-proxy.show_fine=\u30c8\u30ec\u30fc\u30b9\u30ed\u30b0\u3092\u8868\u793a\u3059\u308b
-proxy.source=\u30bd\u30fc\u30b9
-proxy.global=\u30b7\u30b9\u30c6\u30e0\u5168\u4f53
-proxy.time=\u6642\u523b
-proxy.type=HTTP\u30d7\u30ed\u30ad\u30b7\u9069\u7528:
-proxy.none=\u7121\u3057
-proxy.message=\u30e1\u30c3\u30bb\u30fc\u30b8
-proxy.pref_description=HTTP\u30d7\u30ed\u30ad\u30b7\u306e\u8a2d\u5b9a
-proxy.deleting_cache=\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664\u4e2d\u3067\u3059 ...
-proxy.session=\u3053\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u307f
-proxy.swf_version=\u5bfe\u8c61\u3068\u306a\u308bSWF\u306e\u6700\u4f4e\u30d0\u30fc\u30b8\u30e7\u30f3:
-proxy.timeout=\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8 (\u79d2):
-proxy.copy=\u30b3\u30d4\u30fc(&C)
-
-proxy.dialog.text=\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u524a\u9664
-proxy.dialog.ok=OK
-proxy.cache_clear=\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u524a\u9664
-
-proxy.cache_confirmation1=\u306fFlash\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u3001Flash\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\n\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002
-proxy.cache_clear_when_startup_and_cache_clear=\u78ba\u8a8d\u305b\u305a\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664\u3059\u308b\u3000\uff08\u63a8\u5968\uff09
-proxy.confirm_and_cache_clear=\u4eca\u56de\u3060\u3051\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664\u3059\u308b
-proxy.confirm_and_no_operation=\u4eca\u56de\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664\u3057\u306a\u3044\u3000\uff08Flash\u306e\u6a5f\u80fd\u304c\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\uff09
-proxy.port=\u30dd\u30fc\u30c8 (1-65535, 0=\u81ea\u52d5):
-
-proxy.cache_clear_when_startup=\u78ba\u8a8d\u305b\u305a\u306b\u524a\u9664\u3059\u308b
-proxy.confirm_cache_clear=\u524a\u9664\u3059\u308b\u524d\u306b\u78ba\u8a8d\u3059\u308b
-proxy.no_cache_clear=\u5e38\u306b\u524a\u9664\u3057\u306a\u3044
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/Messages.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/Messages.java
deleted file mode 100644
index 52458e9..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/Messages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-
-public class Messages {
- private static final String BUNDLE_NAME = "messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ProxyManager.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ProxyManager.java
deleted file mode 100644
index 6030df5..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ProxyManager.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.actf.model.flash.FlashModelPlugin;
-import org.eclipse.actf.model.flash.bridge.IWaXcoding;
-import org.eclipse.actf.model.flash.proxy.internal.INTERNET_PER_CONN_OPTION;
-import org.eclipse.actf.model.flash.proxy.internal.INTERNET_PER_CONN_OPTION_LIST;
-import org.eclipse.actf.model.flash.proxy.internal.WSTR;
-import org.eclipse.actf.model.flash.proxy.internal.WinInet;
-import org.eclipse.actf.model.flash.proxy.logs.ProxyLogHandler;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.internal.win32.OS;
-
-
-
-
-public class ProxyManager {
-
- public static boolean initLogger = false;
- public static boolean forceProxy = false;
- private static String noProxy = Messages.getString("NO_PROXY"); //$NON-NLS-1$
-
- static {
- String[] temp = Platform.getApplicationArgs();
- for( int i=0; i<temp.length; i++ ) {
- if( "-initLogger".equals(temp[i]) ) { //$NON-NLS-1$
- initLogger = true;
- }
- else if( "-forceProxy".equals(temp[i]) ) { //$NON-NLS-1$
- forceProxy = true;
- }
- else if( "-noProxy".equals(temp[i]) ) { //$NON-NLS-1$
- if( i < temp.length-1 ) {
- String nextArg = temp[i+1];
- if( nextArg.startsWith("|") && nextArg.endsWith("|") ) { //$NON-NLS-1$ //$NON-NLS-2$
- noProxy = nextArg;
- }
- }
- }
- }
- if( Platform.inDebugMode() ) {
- System.out.println("initLogger = "+initLogger); //$NON-NLS-1$
- System.out.println("forceProxy = "+forceProxy); //$NON-NLS-1$
- System.out.println("noProxy = "+noProxy); //$NON-NLS-1$
- }
- }
-
- private INTERNET_PER_CONN_OPTION_LIST savedList;
- private int savedAddress;
- private int hSession;
- private boolean needRestore = false;
- private int currentPort = 0;
- private static String PROTCOL_HTTP = "http"; //$NON-NLS-1$
- private static String PROTCOL_HTTPS = "https"; //$NON-NLS-1$
- private static String PROTCOL_FTP = "ftp"; //$NON-NLS-1$
- private static String PROTCOL_GOPHER = "gopher"; //$NON-NLS-1$
-// private static String[] PROTCOL_EXTRA = new String[]{"https","ftp","gopher"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- public ProxyManager() {
- // Save default settings
- savedList = new INTERNET_PER_CONN_OPTION_LIST(4);
- savedList.perConnOptions[0].dwOption=INTERNET_PER_CONN_OPTION.INTERNET_PER_CONN_FLAGS;
- savedList.perConnOptions[1].dwOption=INTERNET_PER_CONN_OPTION.INTERNET_PER_CONN_PROXY_SERVER;
- savedList.perConnOptions[2].dwOption=INTERNET_PER_CONN_OPTION.INTERNET_PER_CONN_PROXY_BYPASS;
- savedList.perConnOptions[3].dwOption=INTERNET_PER_CONN_OPTION.INTERNET_PER_CONN_AUTOCONFIG_URL;
- savedAddress = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, INTERNET_PER_CONN_OPTION_LIST.sizeof);
- savedList.getData(savedAddress);
- int[] pInt = new int[]{INTERNET_PER_CONN_OPTION_LIST.sizeof};
- WinInet.InternetQueryOptionW(0,WinInet.INTERNET_OPTION_PER_CONNECTION_OPTION,savedAddress,pInt);
- savedList.setData(savedAddress);
- WSTR wsAgent = new WSTR("Agent"); //$NON-NLS-1$
- hSession = WinInet.InternetOpenW(wsAgent.getAddress(),WinInet.INTERNET_OPEN_TYPE_DIRECT,0,0,0);
- wsAgent.dispose();
- }
-
- public void startProxy(int port, int swfVersion, int timeout,
- boolean swfBootloader, boolean swfTranscoder) {
- IWaXcoding waXcoding = getIWaXcoding();
- waXcoding.setPort(port);
- waXcoding.setSWFTranscodingMinimumVersion(swfVersion);
- waXcoding.setTimeout(timeout);
- waXcoding.setExternalProxyFlag(false);
- waXcoding.setSWFBootloaderFlag(swfBootloader);
- waXcoding.setSWFTranscodingFlag(swfTranscoder);
- String extProxy = getDefaultProxy(PROTCOL_HTTP);
- if( null != extProxy ) {
- int pos = extProxy.indexOf(':');
- if( -1 != pos ) {
- try {
- String extHost = extProxy.substring(0,pos);
- String portStr = extProxy.substring(pos+1);
- int extPort = Integer.parseInt(portStr);
- waXcoding.setExternalProxyFlag(true);
- waXcoding.setExternalProxy(extHost,extPort);
- if( Platform.inDebugMode() ) {
- System.out.println("Using external proxy "+extHost+":"+extPort); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } catch( Exception e ) {
- }
- }
- }
- ProxyLogHandler.configure(); // Configure our log handler
- waXcoding.start(initLogger); // Start WaXcoding without log handler
- if( !initLogger ) {
- ProxyLogHandler.resetLogLevel();
- }
- currentPort = waXcoding.getPort();
- }
-
- public void stopProxy() {
- if( 0 != currentPort ) {
- getIWaXcoding().stop();
- currentPort = 0;
- }
- }
-
- public void setInternetOptions(boolean isGlobal) {
- if( 0 != savedAddress ) {
- if( 0 == currentPort ) {
- invokeSetOption(hSession,savedAddress);
- invokeSetOption(0,savedAddress);
- needRestore = false;
- }
- else {
-// INTERNET_PER_CONN_OPTION_LIST list = new INTERNET_PER_CONN_OPTION_LIST(3);
-// list.perConnOptions[0].dwOption=INTERNET_PER_CONN_OPTION.INTERNET_PER_CONN_FLAGS;
-// list.perConnOptions[0].dwValue=INTERNET_PER_CONN_OPTION.PROXY_TYPE_PROXY | INTERNET_PER_CONN_OPTION.PROXY_TYPE_DIRECT;
-// list.perConnOptions[1].dwOption=INTERNET_PER_CONN_OPTION.INTERNET_PER_CONN_PROXY_SERVER;
-// list.perConnOptions[1].strValue.setString(getProxyString());
-// list.perConnOptions[2].dwOption=INTERNET_PER_CONN_OPTION.INTERNET_PER_CONN_PROXY_BYPASS;
-// list.perConnOptions[2].strValue.setString(null);
- INTERNET_PER_CONN_OPTION_LIST list = new INTERNET_PER_CONN_OPTION_LIST(2);
- list.perConnOptions[0].dwOption=INTERNET_PER_CONN_OPTION.INTERNET_PER_CONN_FLAGS;
- list.perConnOptions[0].dwValue=INTERNET_PER_CONN_OPTION.PROXY_TYPE_AUTO_PROXY_URL | INTERNET_PER_CONN_OPTION.PROXY_TYPE_DIRECT;
- list.perConnOptions[1].dwOption=INTERNET_PER_CONN_OPTION.INTERNET_PER_CONN_AUTOCONFIG_URL;
- list.perConnOptions[1].strValue.setString(getAutoConfigURL(isGlobal||forceProxy));
- int address = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, INTERNET_PER_CONN_OPTION_LIST.sizeof);
- list.getData(address);
- invokeSetOption(hSession, address);
- invokeSetOption(0, isGlobal ? address : savedAddress);
- needRestore = isGlobal;
- OS.GlobalFree(address);
- list.dispose();
- }
- }
- }
-
- public void dispose() {
- ProxyLogHandler.removeHandler();
- stopProxy();
- if( 0 != hSession ) {
- WinInet.InternetCloseHandle(hSession);
- }
- if( 0 != savedAddress ) {
- if( needRestore ) {
- WinInet.InternetSetOptionW(0,WinInet.INTERNET_OPTION_PER_CONNECTION_OPTION,savedAddress,INTERNET_PER_CONN_OPTION_LIST.sizeof);
- }
- OS.GlobalFree(savedAddress);
- savedList.dispose();
- }
- }
-
- private void invokeSetOption(int handle, int address) {
- WinInet.InternetSetOptionW(handle,WinInet.INTERNET_OPTION_PER_CONNECTION_OPTION,address,INTERNET_PER_CONN_OPTION_LIST.sizeof);
- WinInet.InternetSetOptionW(handle,WinInet.INTERNET_OPTION_SETTINGS_CHANGED,0,0);
- WinInet.InternetSetOptionW(handle,WinInet.INTERNET_OPTION_REFRESH,0,0);
- }
-
-// private String getProxyString() {
-// String result = PROTCOL_HTTP+"=localhost:"+currentPort; //$NON-NLS-1$
-// for( int i=0; i<PROTCOL_EXTRA.length; i++ ) {
-// String s = getDefaultProxy(PROTCOL_EXTRA[i]);
-// if( null!=s && s.length()>0 ) {
-// result += ";"+PROTCOL_EXTRA[i]+"="+s; //$NON-NLS-1$ //$NON-NLS-2$
-// }
-// }
-// return result;
-// }
-
- private String getDefaultProxy(String protocol) {
- if( 0 != (savedList.perConnOptions[0].dwValue & INTERNET_PER_CONN_OPTION.PROXY_TYPE_PROXY) ) {
- String defaultProxy = savedList.perConnOptions[1].strValue.getString();
- if( null != defaultProxy ) {
- if( -1 == defaultProxy.indexOf('=') ) {
- return defaultProxy;
- }
- Matcher m = Pattern.compile(protocol+"=(.+)").matcher(defaultProxy); //$NON-NLS-1$
- if( m.find() ) {
- String s = m.group(1);
- if( null != s ) {
- int sep = s.indexOf(';');
- return -1==sep ? s : s.substring(0,sep);
- }
- }
- }
- }
- return null;
- }
-
- private IWaXcoding getIWaXcoding() {
- return FlashModelPlugin.getDefault().getIWaXcoding();
- }
-
- private String getAutoConfigURL(boolean disableAutoProxy) {
- String pac = readPluginFile("templates/proxy.pac"); //$NON-NLS-1$
- if( null != pac ) {
- String httpProxy = getProxyString("localhost:"+currentPort); //$NON-NLS-1$
- pac = pac.replaceAll("\\$NOPROXY_EXTS\\$", disableAutoProxy ? "" : noProxy) //$NON-NLS-1$ //$NON-NLS-2$
- .replaceAll("\\$HTTP_PROXY\\$", httpProxy) //$NON-NLS-1$
- .replaceAll("\\$HTTP_DIRECT\\$", getProxyString(getDefaultProxy(PROTCOL_HTTP))) //$NON-NLS-1$
- .replaceAll("\\$HTTPS_DIRECT\\$", getProxyString(getDefaultProxy(PROTCOL_HTTPS))) //$NON-NLS-1$
- .replaceAll("\\$FTP_DIRECT\\$", getProxyString(getDefaultProxy(PROTCOL_FTP))) //$NON-NLS-1$
- .replaceAll("\\$GOPHER_DIRECT\\$", getProxyString(getDefaultProxy(PROTCOL_GOPHER))); //$NON-NLS-1$
-// System.out.println(pac);
- OutputStream os = null;
- try {
- IPath pacPath = ProxyPlugin.getDefault().getStateLocation().append("proxy.pac"); //$NON-NLS-1$
- os = new FileOutputStream(pacPath.toFile());
- OutputStreamWriter writer = new OutputStreamWriter(os, "utf-8"); //$NON-NLS-1$
- writer.write(pac);
- writer.close();
- return "file://"+pacPath.toString(); //$NON-NLS-1$
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- finally {
- if( null != os ) {
- try {
- os.close();
- }
- catch (IOException e) {
- }
- }
- }
- }
- return null;
- }
-
- private static String getProxyString(String defaultProxy) {
- return null != defaultProxy ? MessageFormat.format("PROXY {0}; DIRECT", new Object[]{defaultProxy}) : "DIRECT"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private static String readPluginFile(String path) {
- InputStream is = null;
- try {
- URL url = FileLocator.resolve(ProxyPlugin.getDefault().getBundle().getEntry(path));
- is = url.openStream();
- Reader reader = new InputStreamReader(is);
- StringBuffer sb = new StringBuffer();
- char[] buff = new char[4096];
- int result;
- while( -1 != (result=reader.read(buff)) ) {
- sb.append(buff, 0, result);
- }
- return sb.toString();
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- finally {
- if( null != is ) {
- try {
- is.close();
- }
- catch (IOException e) {
- }
- }
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ProxyPlugin.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ProxyPlugin.java
deleted file mode 100644
index 13f08e5..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ProxyPlugin.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash.proxy;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.actf.model.flash.proxy.actions.DeleteCacheAction;
-import org.eclipse.actf.model.flash.proxy.preferences.ProxyPreferenceConstants;
-import org.eclipse.actf.model.flash.proxy.ui.CacheClearDialog;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class ProxyPlugin extends AbstractUIPlugin implements IPropertyChangeListener {
-
- // The shared instance.
- private static ProxyPlugin plugin;
-
- // Proxy manager
- private static ProxyManager proxyManager = new ProxyManager();
-
- // Preferences change listeners
- private List<IPropertyChangeListener> listeners;
-
- // Images
- public static final ImageDescriptor IMAGE_CLEAR = getImageDescriptor("icons/action16/clear.gif"); //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public ProxyPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (ProxyPreferenceConstants.P_PROXY_TYPE.equals(event.getProperty())
- || ProxyPreferenceConstants.P_PROXY_SWF_METHOD.equals(event.getProperty())
- || ProxyPreferenceConstants.P_SWF_MINIMUM_VERSION.equals(event.getProperty())
- || ProxyPreferenceConstants.P_TIMEOUT.equals(event.getProperty())
- || ProxyPreferenceConstants.PROXY_PORT.equals(event.getProperty())) {
- setProxySettings();
- }
- }
- });
- setProxySettings();
- }
-
- private void setProxySettings() {
- proxyManager.stopProxy();
- String proxyType = getPreferenceStore().getString(ProxyPreferenceConstants.P_PROXY_TYPE);
- int swfVersion = getPreferenceStore().getInt(ProxyPreferenceConstants.P_SWF_MINIMUM_VERSION);
- int timeout = getPreferenceStore().getInt(ProxyPreferenceConstants.P_TIMEOUT);
- int port = getPreferenceStore().getInt(ProxyPreferenceConstants.PROXY_PORT);
- if (!ProxyPreferenceConstants.PROXY_NONE.equals(proxyType)) {
- String proxySwfMethod = getPreferenceStore().getString(ProxyPreferenceConstants.P_PROXY_SWF_METHOD);
- boolean swfBootLoader = false;
- boolean swfTranscoder = false;
- if (ProxyPreferenceConstants.PROXY_SWF_METHOD_BOOTLOADER.equals(proxySwfMethod)) {
- swfBootLoader = true;
- } else if (ProxyPreferenceConstants.PROXY_SWF_METHOD_TRANSCODER.equals(proxySwfMethod)) {
- swfTranscoder = true;
- }
- proxyManager.startProxy(port, swfVersion, timeout * 1000, swfBootLoader, swfTranscoder);
-
- }
- proxyManager.setInternetOptions(ProxyPreferenceConstants.PROXY_GLOBAL.equals(proxyType));
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- proxyManager.dispose();
- listeners = null;
- getPreferenceStore().removePropertyChangeListener(this);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static ProxyPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.actf.model.flash.proxy", path); //$NON-NLS-1$
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- for (int i = 0; i < listeners.size(); i++) {
- ((IPropertyChangeListener) listeners.get(i)).propertyChange(event);
- }
- }
-
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (null == listeners) {
- listeners = new ArrayList<IPropertyChangeListener>();
- getPreferenceStore().addPropertyChangeListener(this);
- }
- listeners.add(listener);
- }
-
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- listeners.remove(listener);
- }
-
- public static boolean cacheChecked = false;
-
- public void checkCache() {
-
- String setting = getPreferenceStore().getString(ProxyPreferenceConstants.P_CACHE_CLEAR);
-
- boolean clearCacheFlag = true && !cacheChecked;
-
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- Shell shell = window.getShell();
- if (setting.equals(ProxyPreferenceConstants.CONFIRM_WHEN_STARTUP) && !cacheChecked) {
-
- CacheClearDialog dialog = null;
-
- dialog = new CacheClearDialog(shell, Platform.getProduct().getName());
- try {
- //int result =
- dialog.open();
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- String select = dialog.getSelection();
-
- if (select.equals(ProxyPreferenceConstants.CACHE_CLEAR_WHEN_STARTUP_AND_CACHE_CLEAR)) {
- getPreferenceStore().setValue(ProxyPreferenceConstants.P_CACHE_CLEAR,
- ProxyPreferenceConstants.CACHE_CLEAR_WHEN_STARTUP);
- } else if (select.equals(ProxyPreferenceConstants.CONFIRM_AND_CACHE_CLEAR)) {
- getPreferenceStore().setValue(ProxyPreferenceConstants.P_CACHE_CLEAR,
- ProxyPreferenceConstants.CONFIRM_WHEN_STARTUP);
- } else if (select.equals(ProxyPreferenceConstants.CONFIRM_AND_NO_OPERATION)) {
- getPreferenceStore().setValue(ProxyPreferenceConstants.P_CACHE_CLEAR,
- ProxyPreferenceConstants.CONFIRM_WHEN_STARTUP);
- clearCacheFlag = false;
- }
- } else if (setting.equals(ProxyPreferenceConstants.CACHE_CLEAR_WHEN_STARTUP) && cacheChecked) {
- clearCacheFlag = false;
- } else if (setting.equals(ProxyPreferenceConstants.NO_CACHE_CLEAR)) {
- clearCacheFlag = false;
- }
-
- if (clearCacheFlag) {
- clearCache(false,window);
-// DeleteCacheAction dca = new DeleteCacheAction();
-// dca.init(window);
-// dca.run(null);
- }
- }
-
- public void clearCacheWithCheck() {
-
- String setting = getPreferenceStore().getString(ProxyPreferenceConstants.P_CACHE_CLEAR);
-
- if (setting.equals(ProxyPreferenceConstants.CACHE_CLEAR_WHEN_STARTUP)) {
- clearCache(false,null);
-// DeleteCacheAction dca = new DeleteCacheAction();
-// dca.run(null);
- }
-
- }
-
- /**
- * External interface to clear SWF cache
- * @param background
- * background processing flag
- * @param window
- * active WorkbenchWindow for progress dialog.
- * use null for silent mode.
- */
- public void clearCache(boolean background, IWorkbenchWindow window) {
- DeleteCacheAction dca = new DeleteCacheAction(background);
- dca.init(window);
- dca.run(null);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ProxyStartup.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ProxyStartup.java
deleted file mode 100644
index df46c4e..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ProxyStartup.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy;
-
-import org.eclipse.ui.IStartup;
-
-
-public class ProxyStartup implements IStartup {
-
- public void earlyStartup() {
- ProxyPlugin.getDefault();
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/actions/DeleteCacheAction.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/actions/DeleteCacheAction.java
deleted file mode 100644
index 48061f5..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/actions/DeleteCacheAction.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash.proxy.actions;
-
-import org.eclipse.actf.model.flash.proxy.Messages;
-import org.eclipse.actf.model.flash.proxy.ProxyPlugin;
-import org.eclipse.actf.model.flash.proxy.internal.WSTR;
-import org.eclipse.actf.model.flash.proxy.internal.WinInet;
-import org.eclipse.actf.ui.util.ProgressContribution;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.internal.win32.OS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-
-
-public class DeleteCacheAction implements IWorkbenchWindowActionDelegate {
-
- private static final int BUFFER_SIZE = 32 * 1024;// 4096;
-
- private IWorkbenchWindow window;
-
- private static final String NEVER_DELETE = Messages.getString("NO_DELETE"); //$NON-NLS-1$
-
- private boolean background = false;
-
- public DeleteCacheAction() {
- this(false);
- }
-
- public DeleteCacheAction(boolean background) {
- this.background = background;
- }
-
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-
- private ProgressContribution pc;
-
- private IStatusLineManager manager;
-
- public void run(IAction action) {
- try {
- ProxyPlugin.cacheChecked = true;
- ProgressMonitorDialog dialog;
-
- if (background) {
- initProgress();
- new Thread(new Runnable() {
- public void run() {
- deleteCacheEntries();
- endProgress();
- }
- }).start();
- } else {
- if (window != null) {
- dialog = new ProgressMonitorDialog(window.getShell());
- dialog.run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- int total = countCacheEntries();
- monitor.beginTask(Messages.getString("proxy.deleting_cache"), total); //$NON-NLS-1$
- deleteCacheEntries(monitor, total);
- monitor.done();
- }
- });
- } else {
- deleteCacheEntries();
- }
- }
- } catch (Exception e) {
- }
- }
-
- private void initProgress() {
- try {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- getProgressContribution();
- if (pc != null && manager != null) {
- pc.setVisible(true);
- pc.setText("Deleting Internet Cache");
- manager.update(true);
- }
- }
- });
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- private void getProgressContribution() {
- String id = ProgressContribution.PROGRESS_CONTRIBUTION_ID;
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IViewPart part = window.getActivePage().getViewReferences()[0].getView(false);
- IViewSite viewSite = part.getViewSite();
- IActionBars actionBars = viewSite.getActionBars();
- manager = actionBars.getStatusLineManager();
- pc = (ProgressContribution) manager.find(id);
- }
-
- private void endProgress() {
- try {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (pc != null && manager != null) {
- pc.setVisible(false);
- manager.update(true);
- }
- }
- });
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- public void dispose() {
- }
-
- private int countCacheEntries() {
- int count = 1;
- int pCacheEntry = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, BUFFER_SIZE);
- try {
- int[] pSize = new int[] { BUFFER_SIZE };
- OS.MoveMemory(pCacheEntry, pSize, 4);
- int hEnum = WinInet.FindFirstUrlCacheEntryW(0, pCacheEntry, pSize);
- if (0 != hEnum) {
- while (true) {
- int[] pEntries = new int[20];
- OS.MoveMemory(pEntries, pCacheEntry, 4 * pEntries.length);
- if (0 == (pEntries[3] & 0x00300000)) { // Skip Cookie & History
- String localFileName = new WSTR(pEntries[2]).getString();
- boolean skip = false;
- if (localFileName.indexOf('?') < 0) {
- int pos = localFileName.lastIndexOf('.');
- if (-1 != pos) {
- String ext = localFileName.substring(pos + 1).toLowerCase();
- skip = -1 != NEVER_DELETE.indexOf("|" + ext + "|"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- if (!skip) {
- count++;
- }
- }
- pSize[0] = BUFFER_SIZE;
- if (!WinInet.FindNextUrlCacheEntryW(hEnum, pCacheEntry, pSize)) {
- break;
- }
- }
- WinInet.FindCloseUrlCache(hEnum);
- }
- } finally {
- OS.GlobalFree(pCacheEntry);
- }
- return count;
- }
-
- private void deleteCacheEntries() {
- deleteCacheEntries(null, 0);
- }
-
- private void deleteCacheEntries(IProgressMonitor monitor, int total) {
- int count = 0;
-
- int pCacheEntry = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, BUFFER_SIZE);
- try {
- int[] pSize = new int[] { BUFFER_SIZE };
- OS.MoveMemory(pCacheEntry, pSize, 4);
- int hEnum = WinInet.FindFirstUrlCacheEntryW(0, pCacheEntry, pSize);
- if (0 != hEnum) {
- while (monitor == null || !monitor.isCanceled()) {
- int[] pEntries = new int[20];
- OS.MoveMemory(pEntries, pCacheEntry, 4 * pEntries.length);
- if (0 == (pEntries[3] & 0x00300000)) { // Skip Cookie & History
- String localFileName = new WSTR(pEntries[2]).getString();
- boolean skip = false;
- if (localFileName.indexOf('?') < 0) {
- int pos = localFileName.lastIndexOf('.');
- if (-1 != pos) {
- String ext = localFileName.substring(pos + 1).toLowerCase();
- skip = -1 != NEVER_DELETE.indexOf("|" + ext + "|"); //$NON-NLS-1$ //$NON-NLS-2$
- // if( skip ) System.out.print(ext+"|");
- }
- }
- if (!skip) {
- WSTR wsSourceUrlName = new WSTR(pEntries[1]);
-
- count++;
-
- if (monitor != null){
- monitor.subTask(wsSourceUrlName.getString());
- monitor.worked(1);
- }
-
- //System.out.println("Delete: " + localFileName); //$NON-NLS-1$
- WinInet.DeleteUrlCacheEntryW(wsSourceUrlName.getAddress());
-
- if (background && total>0) {
- changeProgress(count * 100 / total);
- }
- }
- }
- pSize[0] = BUFFER_SIZE;
- if (!WinInet.FindNextUrlCacheEntryW(hEnum, pCacheEntry, pSize)) {
- break;
- }
- }
- WinInet.FindCloseUrlCache(hEnum);
- }
- } finally {
- OS.GlobalFree(pCacheEntry);
- }
-
- }
-
- private void changeProgress(final int value) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (pc != null && manager != null) {
- pc.setValue(value);
- manager.update(true);
- }
- }
- });
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/actions/OpenPreferencesAction.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/actions/OpenPreferencesAction.java
deleted file mode 100644
index 2c903a5..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/actions/OpenPreferencesAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.actions.ActionDelegate;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-
-
-
-public class OpenPreferencesAction extends ActionDelegate implements IViewActionDelegate {
-
- IViewPart view;
-
- public void run(IAction action) {
- PreferencesUtil
- .createPreferenceDialogOn(view.getSite().getShell(), "org.eclipse.actf.model.flash.proxy.preferences.ProxyPreferencePage", null, null)
- .open();
- }
-
- public void init(IViewPart view) {
- this.view = view;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/INTERNET_PER_CONN_OPTION.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/INTERNET_PER_CONN_OPTION.java
deleted file mode 100644
index 8490404..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/INTERNET_PER_CONN_OPTION.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.internal;
-
-import org.eclipse.swt.internal.win32.OS;
-
-
-
-public class INTERNET_PER_CONN_OPTION {
- public int dwOption;
- public int dwValue;
- public WSTR strValue = new WSTR();
- public static final int sizeof = 12; // +4 for FILETIME
-
- //
- // Options used in INTERNET_PER_CONN_OPTON struct
- //
- public static final int INTERNET_PER_CONN_FLAGS = 1;
- public static final int INTERNET_PER_CONN_PROXY_SERVER = 2;
- public static final int INTERNET_PER_CONN_PROXY_BYPASS = 3;
- public static final int INTERNET_PER_CONN_AUTOCONFIG_URL = 4;
- public static final int INTERNET_PER_CONN_AUTODISCOVERY_FLAGS = 5;
- public static final int INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL = 6;
- public static final int INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS = 7;
- public static final int INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME = 8;
- public static final int INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL = 9;
-
- //
- // PER_CONN_FLAGS
- //
- public static final int PROXY_TYPE_DIRECT = 0x00000001; // direct to net
- public static final int PROXY_TYPE_PROXY = 0x00000002; // via named proxy
- public static final int PROXY_TYPE_AUTO_PROXY_URL = 0x00000004; // autoproxy URL
- public static final int PROXY_TYPE_AUTO_DETECT = 0x00000008; // use autoproxy detection
-
- //
- // Type of value
- //
- private static final int VALUE_INT = 0;
- private static final int VALUE_STRING = 1;
- private static final int VALUE_FILETIME = 2;
-
-
- public void getData(int pData) {
- if( 0 != pData ) {
- OS.MoveMemory(pData,new int[]{dwOption,0,0},4*3);
- switch( getValueType() ) {
- case VALUE_INT:
- OS.MoveMemory(pData+4,new int[]{dwValue},4);
- break;
- case VALUE_STRING:
- OS.MoveMemory(pData+4, new int[] {strValue.getAddress()}, 4);
- break;
- }
- }
- }
-
- public void setData(int pData) {
- if( 0 != pData ) {
- int[] pOption = new int[3];
- OS.MoveMemory(pOption,pData,4*pOption.length);
- dwOption = pOption[0];
- switch( getValueType() ) {
- case VALUE_INT:
- dwValue = pOption[1];
- break;
- case VALUE_STRING:
- strValue.setData(pOption[1]);
- break;
- }
- }
- }
-
- public void dispose() {
- strValue.dispose();
- }
-
- private int getValueType() {
- switch( dwOption ) {
- case INTERNET_PER_CONN_FLAGS:
- case INTERNET_PER_CONN_AUTODISCOVERY_FLAGS:
- return VALUE_INT;
- case INTERNET_PER_CONN_PROXY_SERVER:
- case INTERNET_PER_CONN_PROXY_BYPASS:
- case INTERNET_PER_CONN_AUTOCONFIG_URL:
- case INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL:
- case INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS:
- case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL:
- return VALUE_STRING;
- case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME:
- System.out.println("dwOption "+dwOption+" is not supported"); //$NON-NLS-1$ //$NON-NLS-2$
- return VALUE_FILETIME;
- }
- return -1;
- }
-
- public String toString() {
- String s;
- switch( dwOption ) {
- case INTERNET_PER_CONN_FLAGS:
- s = "INTERNET_PER_CONN_FLAGS"; //$NON-NLS-1$
- break;
- case INTERNET_PER_CONN_PROXY_SERVER:
- s = "INTERNET_PER_CONN_PROXY_SERVER"; //$NON-NLS-1$
- break;
- case INTERNET_PER_CONN_PROXY_BYPASS:
- s = "INTERNET_PER_CONN_PROXY_BYPASS"; //$NON-NLS-1$
- break;
- case INTERNET_PER_CONN_AUTOCONFIG_URL:
- s = "INTERNET_PER_CONN_AUTOCONFIG_URL"; //$NON-NLS-1$
- break;
- case INTERNET_PER_CONN_AUTODISCOVERY_FLAGS:
- s = "INTERNET_PER_CONN_AUTODISCOVERY_FLAGS"; //$NON-NLS-1$
- break;
- case INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL:
- s = "INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL"; //$NON-NLS-1$
- break;
- case INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS:
- s = "INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS"; //$NON-NLS-1$
- break;
- case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME:
- s = "INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME"; //$NON-NLS-1$
- break;
- case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL:
- s = "INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL"; //$NON-NLS-1$
- break;
- default:
- s = "INTERNET_PER_CONN_OPTION: dwOption="+dwOption; //$NON-NLS-1$
- break;
- }
- switch( getValueType() ) {
- case VALUE_INT:
- s += " dwValue="+dwValue; //$NON-NLS-1$
- break;
- case VALUE_STRING:
- s += " strValue="+strValue.getString(); //$NON-NLS-1$
- }
- return s;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/INTERNET_PER_CONN_OPTION_LIST.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/INTERNET_PER_CONN_OPTION_LIST.java
deleted file mode 100644
index 3ec34ac..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/INTERNET_PER_CONN_OPTION_LIST.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.internal;
-
-import org.eclipse.swt.internal.win32.OS;
-
-
-
-public class INTERNET_PER_CONN_OPTION_LIST {
- public WSTR wsConnection = new WSTR(); // connection name to set/query perConnOptions
- public int dwOptionCount = 0; // number of perConnOptions to set/query
- public int dwOptionError = 0; // on error, which option failed
- public INTERNET_PER_CONN_OPTION[] perConnOptions = null;
- public static final int sizeof = 20;
-
- private int optionsAddress;
-
- public INTERNET_PER_CONN_OPTION_LIST(int optionCount) {
- dwOptionCount = optionCount;
- perConnOptions = new INTERNET_PER_CONN_OPTION[dwOptionCount];
- for( int i=0; i<perConnOptions.length; i++ ) {
- perConnOptions[i] = new INTERNET_PER_CONN_OPTION();
- }
- }
-
- public void getData(int pData) {
- if( 0 != pData ) {
- if( 0 == optionsAddress ) {
- optionsAddress = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, INTERNET_PER_CONN_OPTION.sizeof*dwOptionCount);
- }
- if( null != perConnOptions ) {
- for( int i=0; i<perConnOptions.length; i++ ) {
- perConnOptions[i].getData(optionsAddress+INTERNET_PER_CONN_OPTION.sizeof*i);
- }
- }
- OS.MoveMemory(pData,new int[]{sizeof,wsConnection.getAddress(),dwOptionCount,dwOptionError,optionsAddress},4*5);
- }
- }
-
- public void setData(int pData) {
- if( 0 != pData ) {
- int[] pList = new int[5];
- OS.MoveMemory(pList,pData,4*pList.length);
- if( sizeof == pList[0] ) {
- wsConnection.setData(pList[1]);
- dwOptionCount = pList[2];
- dwOptionError = pList[3];
- optionsAddress = pList[4];
- if( null != perConnOptions ) {
- if( perConnOptions.length ==dwOptionCount ) {
- for( int i=0; i<perConnOptions.length; i++ ) {
- perConnOptions[i].setData(optionsAddress+INTERNET_PER_CONN_OPTION.sizeof*i);
- }
- }
- }
- }
- }
- }
-
- public void dispose() {
- wsConnection.dispose();
- if( null != perConnOptions ) {
- for( int i=0; i<perConnOptions.length; i++ ) {
- perConnOptions[i].dispose();
- }
- perConnOptions = null;
- }
- if( 0 != optionsAddress ) {
- OS.GlobalFree(optionsAddress);
- optionsAddress = 0;
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/WSTR.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/WSTR.java
deleted file mode 100644
index dddbd7d..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/WSTR.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.internal;
-
-import org.eclipse.swt.internal.win32.OS;
-
-
-
-public class WSTR {
-
- private int address = 0;
- private String string = null;
-
- public WSTR() {
- }
-
- public WSTR(String newString) {
- setString(newString);
- }
-
- public WSTR(int newAddress) {
- setData(newAddress);
- }
-
- public void setString(String newString) {
- dispose();
- string = newString;
- if( null != string ) {
- char[] buffer = (string + "\0").toCharArray(); //$NON-NLS-1$
- address = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT,buffer.length*2);
- OS.MoveMemory(address,buffer,buffer.length*2);
- }
- }
-
- public String getString() {
- return string;
- }
-
- public void setData(int newAddress) {
- if( address != newAddress ) {
- dispose();
- address = newAddress;
- }
- string = null;
- if( 0 != address ) {
- int size = OS.wcslen(address);
- if (size > 0) {
- char[] buffer = new char[size];
- OS.MoveMemory(buffer, address, size*2);
- string = new String(buffer);
- }
- }
-
- }
-
- public int getAddress() {
- return address;
- }
-
- public void dispose() {
- if( 0 != address ) {
- OS.GlobalFree(address);
- address = 0;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/WinInet.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/WinInet.java
deleted file mode 100644
index f2cdaf1..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/internal/WinInet.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.internal;
-
-
-public class WinInet {
-
- static {
- try {
- System.loadLibrary("AccessibilityProxyLibrary"); //$NON-NLS-1$
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- }
-
- //
- // access types for InternetOpen()
- //
- public static final int INTERNET_OPEN_TYPE_PRECONFIG = 0; // use registry configuration
- public static final int INTERNET_OPEN_TYPE_DIRECT = 1; // direct to net
- public static final int INTERNET_OPEN_TYPE_PROXY = 3; // via named proxy
- public static final int INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4; // prevent using java/script/INS
-
- //
- // perConnOptions manifests for Internet{Query|Set}Option
- //
- public static final int INTERNET_OPTION_CALLBACK = 1;
- public static final int INTERNET_OPTION_CONNECT_TIMEOUT = 2;
- public static final int INTERNET_OPTION_CONNECT_RETRIES = 3;
- public static final int INTERNET_OPTION_CONNECT_BACKOFF = 4;
- public static final int INTERNET_OPTION_SEND_TIMEOUT = 5;
- public static final int INTERNET_OPTION_CONTROL_SEND_TIMEOUT = INTERNET_OPTION_SEND_TIMEOUT;
- public static final int INTERNET_OPTION_RECEIVE_TIMEOUT = 6;
- public static final int INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT = INTERNET_OPTION_RECEIVE_TIMEOUT;
- public static final int INTERNET_OPTION_DATA_SEND_TIMEOUT = 7;
- public static final int INTERNET_OPTION_DATA_RECEIVE_TIMEOUT = 8;
- public static final int INTERNET_OPTION_HANDLE_TYPE = 9;
- public static final int INTERNET_OPTION_LISTEN_TIMEOUT = 11;
- public static final int INTERNET_OPTION_READ_BUFFER_SIZE = 12;
- public static final int INTERNET_OPTION_WRITE_BUFFER_SIZE = 13;
- public static final int INTERNET_OPTION_ASYNC_ID = 15;
- public static final int INTERNET_OPTION_ASYNC_PRIORITY = 16;
- public static final int INTERNET_OPTION_PARENT_HANDLE = 21;
- public static final int INTERNET_OPTION_KEEP_CONNECTION = 22;
- public static final int INTERNET_OPTION_REQUEST_FLAGS = 23;
- public static final int INTERNET_OPTION_EXTENDED_ERROR = 24;
- public static final int INTERNET_OPTION_OFFLINE_MODE = 26;
- public static final int INTERNET_OPTION_CACHE_STREAM_HANDLE = 27;
- public static final int INTERNET_OPTION_USERNAME = 28;
- public static final int INTERNET_OPTION_PASSWORD = 29;
- public static final int INTERNET_OPTION_ASYNC = 30;
- public static final int INTERNET_OPTION_SECURITY_FLAGS = 31;
- public static final int INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT = 32;
- public static final int INTERNET_OPTION_DATAFILE_NAME = 33;
- public static final int INTERNET_OPTION_URL = 34;
- public static final int INTERNET_OPTION_SECURITY_CERTIFICATE = 35;
- public static final int INTERNET_OPTION_SECURITY_KEY_BITNESS = 36;
- public static final int INTERNET_OPTION_REFRESH = 37;
- public static final int INTERNET_OPTION_PROXY = 38;
- public static final int INTERNET_OPTION_SETTINGS_CHANGED = 39;
- public static final int INTERNET_OPTION_VERSION = 40;
- public static final int INTERNET_OPTION_USER_AGENT = 41;
- public static final int INTERNET_OPTION_END_BROWSER_SESSION = 42;
- public static final int INTERNET_OPTION_PROXY_USERNAME = 43;
- public static final int INTERNET_OPTION_PROXY_PASSWORD = 44;
- public static final int INTERNET_OPTION_CONTEXT_VALUE = 45;
- public static final int INTERNET_OPTION_CONNECT_LIMIT = 46;
- public static final int INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT = 47;
- public static final int INTERNET_OPTION_POLICY = 48;
- public static final int INTERNET_OPTION_DISCONNECTED_TIMEOUT = 49;
- public static final int INTERNET_OPTION_CONNECTED_STATE = 50;
- public static final int INTERNET_OPTION_IDLE_STATE = 51;
- public static final int INTERNET_OPTION_OFFLINE_SEMANTICS = 52;
- public static final int INTERNET_OPTION_SECONDARY_CACHE_KEY = 53;
- public static final int INTERNET_OPTION_CALLBACK_FILTER = 54;
- public static final int INTERNET_OPTION_CONNECT_TIME = 55;
- public static final int INTERNET_OPTION_SEND_THROUGHPUT = 56;
- public static final int INTERNET_OPTION_RECEIVE_THROUGHPUT = 57;
- public static final int INTERNET_OPTION_REQUEST_PRIORITY = 58;
- public static final int INTERNET_OPTION_HTTP_VERSION = 59;
- public static final int INTERNET_OPTION_RESET_URLCACHE_SESSION = 60;
- public static final int INTERNET_OPTION_ERROR_MASK = 62;
- public static final int INTERNET_OPTION_FROM_CACHE_TIMEOUT = 63;
- public static final int INTERNET_OPTION_BYPASS_EDITED_ENTRY = 64;
- public static final int INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO = 67;
- public static final int INTERNET_OPTION_CODEPAGE = 68;
- public static final int INTERNET_OPTION_CACHE_TIMESTAMPS = 69;
- public static final int INTERNET_OPTION_DISABLE_AUTODIAL = 70;
- public static final int INTERNET_OPTION_MAX_CONNS_PER_SERVER = 73;
- public static final int INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER = 74;
- public static final int INTERNET_OPTION_PER_CONNECTION_OPTION = 75;
- public static final int INTERNET_OPTION_DIGEST_AUTH_UNLOAD = 76;
- public static final int INTERNET_OPTION_IGNORE_OFFLINE = 77;
- public static final int INTERNET_OPTION_IDENTITY = 78;
- public static final int INTERNET_OPTION_REMOVE_IDENTITY = 79;
- public static final int INTERNET_OPTION_ALTER_IDENTITY = 80;
- public static final int INTERNET_OPTION_SUPPRESS_BEHAVIOR = 81;
- public static final int INTERNET_OPTION_AUTODIAL_MODE = 82;
- public static final int INTERNET_OPTION_AUTODIAL_CONNECTION = 83;
- public static final int INTERNET_OPTION_CLIENT_CERT_CONTEXT = 84;
- public static final int INTERNET_OPTION_AUTH_FLAGS = 85;
- public static final int INTERNET_OPTION_COOKIES_3RD_PARTY = 86;
- public static final int INTERNET_OPTION_DISABLE_PASSPORT_AUTH = 87;
- public static final int INTERNET_OPTION_SEND_UTF8_SERVERNAME_TO_PROXY = 88;
- public static final int INTERNET_OPTION_EXEMPT_CONNECTION_LIMIT = 89;
- public static final int INTERNET_OPTION_ENABLE_PASSPORT_AUTH = 90;
- public static final int INTERNET_OPTION_HIBERNATE_INACTIVE_WORKER_THREADS = 91;
- public static final int INTERNET_OPTION_ACTIVATE_WORKER_THREADS = 92;
- public static final int INTERNET_OPTION_RESTORE_WORKER_THREAD_DEFAULTS = 93;
- public static final int INTERNET_OPTION_SOCKET_SEND_BUFFER_LENGTH = 94;
- public static final int INTERNET_OPTION_PROXY_SETTINGS_CHANGED = 95;
- public static final int INTERNET_OPTION_DATAFILE_EXT = 96;
- public static final int INTERNET_FIRST_OPTION = INTERNET_OPTION_CALLBACK;
- public static final int INTERNET_LAST_OPTION = INTERNET_OPTION_DATAFILE_EXT;
-
- /** Natives */
- public static final native int InternetOpenW(int lpszAgent, int dwAccessType, int lpszProxy, int lpszProxyBypass, int dwFlags);
- public static final native boolean InternetCloseHandle(int hInternet);
- public static final native boolean InternetSetOptionW(int hInternet, int dwOption, int lpBuffer, int dwBufferLength);
- public static final native boolean InternetQueryOptionW(int hInternet, int dwOption, int lpBuffer, int[] lpdwBufferLength);
-
- public static final native int FindFirstUrlCacheEntryW(int lpszUrlSearchPattern,int lpFirstCacheEntryInfo, int[] lpcbCacheEntryInfo);
- public static final native boolean FindNextUrlCacheEntryW(int hEnumHandle,int lpNextCacheEntryInfo,int[] lpcbCacheEntryInfo);
- public static final native boolean FindCloseUrlCache(int hEnumHandle);
- public static final native boolean DeleteUrlCacheEntryW(int lpszUrlName);
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/logs/ProxyLogHandler.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/logs/ProxyLogHandler.java
deleted file mode 100644
index f63ce7b..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/logs/ProxyLogHandler.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.logs;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.ConsoleHandler;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.LogManager;
-import java.util.logging.LogRecord;
-import java.util.logging.Logger;
-
-import org.eclipse.actf.model.flash.proxy.ProxyPlugin;
-import org.eclipse.actf.model.flash.proxy.views.ProxyLogView;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-
-
-public class ProxyLogHandler extends ConsoleHandler {
-
- private static List logRecordList = new ArrayList();
- private static int maxRecordCount = 1000;
- private static Handler handler = null;
- private static Logger logger = LogManager.getLogManager().getLogger(""); //$NON-NLS-1$
-
- private static Display display = ProxyPlugin.getDefault().getWorkbench().getDisplay();
- private static Level logLevel = Level.INFO;
-
- public static void configure() {
-
- // Remove current console handler
- Handler[] handlers = logger.getHandlers();
- for( int i=0; i<handlers.length; i++ ) {
- if( handlers[i] instanceof ConsoleHandler ) {
- logger.removeHandler(handlers[i]);
- }
- }
-
- // Add this class
- if( null == handler ) {
- handler = new ProxyLogHandler();
- }
- logger.addHandler(handler);
-
- // Adjust logging level
- setLogLevel(logLevel);
- }
-
- public static void removeHandler() {
- if( null != handler ) {
- Logger logger = LogManager.getLogManager().getLogger(""); //$NON-NLS-1$
- logger.removeHandler(handler);
- }
- }
-
- public static Handler getHandler() {
- return handler;
- }
-
- public void publish(LogRecord record) {
-// super.publish(record);
- if (!isLoggable(record) || display.isDisposed() ) {
- return;
- }
-
- // Add LogRecord to the list
- while( logRecordList.size() >= maxRecordCount ) {
- logRecordList.remove(0);
- }
- logRecordList.add(new ProxyLogRecord(record));
-
- // Refresh log view
- display.asyncExec(new Runnable(){
- public void run() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if( null == window ) return;
- IWorkbenchPage page = window.getActivePage();
- if( null != page ) {
- IViewPart part = page.findView(ProxyLogView.ID);
- if( part instanceof ProxyLogView ) {
- ((ProxyLogView)part).refresh();
- }
- }
- }
- });
- }
-
- public static List getLogs() {
- return logRecordList;
- }
-
- public static void clear() {
- logRecordList.clear();
- }
-
- public static void setLogLevel(Level newLevel) {
- logLevel = newLevel;
- if( null != handler ) {
- handler.setLevel(logLevel);
- logger.setLevel(logLevel);
- }
- }
-
- public static void resetLogLevel() {
- setLogLevel(logLevel);
- }
-
- public static void setMaxLogCount(int maxCount) {
- maxRecordCount = maxCount;
- }
-
- public static int getMaxLogCount() {
- return maxRecordCount;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/logs/ProxyLogRecord.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/logs/ProxyLogRecord.java
deleted file mode 100644
index 61beb2f..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/logs/ProxyLogRecord.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.logs;
-
-import java.util.logging.Level;
-import java.util.logging.LogRecord;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-
-
-public class ProxyLogRecord {
-
- private long millis;
- private Level level;
- private String message;
- private String loggerName;
- private String id;
- // private static final Pattern pattern = Pattern.compile("-(\\d+):");
- private static final Pattern pattern = Pattern.compile("\\[id:(\\d+)\\] (.*)");
-
- public ProxyLogRecord(LogRecord record) {
- millis = record.getMillis();
- level = record.getLevel();
- loggerName = record.getLoggerName();
- message = record.getMessage();
- id = "";
- if( null != message ) {
- Matcher matcher = pattern.matcher(message);
- if( matcher.find() ) {
- id= matcher.group(1);
- // message = matcher.replaceFirst(":");
- message=matcher.group(2);
- }
- if( message.length()>256 ) {
- message = message.substring(0,256)+"...";
- }
- }
- }
-
- public long getMillis() {
- return millis;
- }
-
- public Level getLevel() {
- return level;
- }
-
- public String getMessage() {
- return message;
- }
-
- public String getID() {
- return id;
- }
-
- public String getLoggerName() {
- return loggerName;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/preferences/ProxyPreferenceConstants.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/preferences/ProxyPreferenceConstants.java
deleted file mode 100644
index b0e0957..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/preferences/ProxyPreferenceConstants.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.preferences;
-
-public class ProxyPreferenceConstants {
-
- public static final String P_PROXY_TYPE = "ProxyType"; //$NON-NLS-1$
-
- public static final String PROXY_NONE = "PROXY_NONE"; //$NON-NLS-1$
- public static final String PROXY_SESSION = "PROXY_SESSION"; //$NON-NLS-1$
- public static final String PROXY_GLOBAL = "PROXY_GLOBAL"; //$NON-NLS-1$
-
- public static final String PROXY_PORT = "PROXY_PORT"; //$NON-NLS-1$
-
- public static final String P_PROXY_SWF_METHOD = "ProxySWFMethod"; //$NON-NLS-1$
-
- public static final String PROXY_SWF_METHOD_NONE = "PROXY_SWF_METHOD_NONE"; //$NON-NLS-1$
- public static final String PROXY_SWF_METHOD_BOOTLOADER = "PROXY_SWF_METHOD_BOOTLOADER"; //$NON-NLS-1$
- public static final String PROXY_SWF_METHOD_TRANSCODER = "PROXY_SWF_METHOD_TRANSCODER"; //$NON-NLS-1$
-
- public static final String P_SWF_MINIMUM_VERSION = "SWFMinimumVersion"; //$NON-NLS-1$
- public static final String P_TIMEOUT = "Timeout"; //$NON-NLS-1$
-
- public static final String P_CACHE_CLEAR = "CacheClearMode"; //$NON-NLS-1$
-
- public static final String CACHE_CLEAR_WHEN_STARTUP = "CACHE_CLEAR_WHEN_STARTUP"; //$NON-NLS-1$
-
- public static final String CONFIRM_WHEN_STARTUP = "CONFIRM_WHEN_STARTUP";
-
- public static final String NO_CACHE_CLEAR = "NO_CACHE_CLEAR"; //$NON-NLS-1$
-
- public static final String CONFIRM_AND_CACHE_CLEAR = "CONFIRM_AND_CACHE_CLEAR"; //$NON-NLS-1$
-
- public static final String CONFIRM_AND_NO_OPERATION = "CONFIRM_AND_NO_OPERATION"; //$NON-NLS-1$
-
- public static final String CACHE_CLEAR_WHEN_STARTUP_AND_CACHE_CLEAR = "CACHE_CLEAR_WHEN_STARTUP_AND_CACHE_CLEAR";
-
-
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/preferences/ProxyPreferenceInitializer.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/preferences/ProxyPreferenceInitializer.java
deleted file mode 100644
index 7dec8f2..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/preferences/ProxyPreferenceInitializer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.preferences;
-
-import org.eclipse.actf.model.flash.proxy.ProxyPlugin;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-
-public class ProxyPreferenceInitializer extends AbstractPreferenceInitializer {
-
- public void initializeDefaultPreferences() {
- IPreferenceStore store = ProxyPlugin.getDefault().getPreferenceStore();
- store.setDefault(ProxyPreferenceConstants.P_PROXY_TYPE,ProxyPreferenceConstants.PROXY_SESSION);
- store.setDefault(ProxyPreferenceConstants.P_PROXY_SWF_METHOD,ProxyPreferenceConstants.PROXY_SWF_METHOD_BOOTLOADER);
- store.setDefault(ProxyPreferenceConstants.P_SWF_MINIMUM_VERSION,5);
- store.setDefault(ProxyPreferenceConstants.P_TIMEOUT,30);
- store.setDefault(ProxyPreferenceConstants.PROXY_PORT, 0); //automatic
- store.setDefault(ProxyPreferenceConstants.P_CACHE_CLEAR, ProxyPreferenceConstants.CONFIRM_WHEN_STARTUP);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/preferences/ProxyPreferencePage.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/preferences/ProxyPreferencePage.java
deleted file mode 100644
index bbe9f3d..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/preferences/ProxyPreferencePage.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.preferences;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.actf.model.flash.proxy.Messages;
-import org.eclipse.actf.model.flash.proxy.ProxyPlugin;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.jface.preference.RadioGroupFieldEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-public class ProxyPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
-
- private List<Group> groups = new ArrayList<Group>();
-
- protected Group createFieldGroup(String name) {
- Group group = new Group(getFieldEditorParent(),SWT.NONE);
- if( null != name ) {
- group.setText(name);
- }
- GridLayout layout = new GridLayout();
- group.setLayout(layout);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- group.setLayoutData(data);
- groups.add(group);
- return group;
- }
-
- protected void adjustGridLayout() {
- super.adjustGridLayout();
- int numColumns = ((GridLayout)getFieldEditorParent().getLayout()).numColumns;
- for( int i=0; i< groups.size(); i++ ) {
- Group group = (Group)groups.get(i);
- GridLayout layout = (GridLayout)group.getLayout();
- GridData data = (GridData)group.getLayoutData();
- layout.numColumns = numColumns;
- layout.marginWidth = 5;
- layout.marginHeight = 5;
- data.horizontalSpan = numColumns;
- }
- }
-
- public ProxyPreferencePage() {
- super(GRID);
-// setDescription(Messages.getString("proxy.pref_description")); //$NON-NLS-1$
- setPreferenceStore(ProxyPlugin.getDefault().getPreferenceStore());
- }
-
- protected void createFieldEditors() {
- Group httpProxyGroup = createFieldGroup(Messages.getString("proxy.pref_description")); //$NON-NLS-1$
- addField(new RadioGroupFieldEditor(ProxyPreferenceConstants.P_PROXY_TYPE,
- Messages.getString("proxy.type"),1, //$NON-NLS-1$
- new String[][]{
- {Messages.getString("proxy.none"),ProxyPreferenceConstants.PROXY_NONE}, //$NON-NLS-1$
- {Messages.getString("proxy.session"),ProxyPreferenceConstants.PROXY_SESSION}, //$NON-NLS-1$
- {Messages.getString("proxy.global"),ProxyPreferenceConstants.PROXY_GLOBAL} }, //$NON-NLS-1$
- httpProxyGroup));
-
- if( Platform.inDebugMode() ) {
- addField(new RadioGroupFieldEditor(ProxyPreferenceConstants.P_PROXY_SWF_METHOD,
- Messages.getString("proxy.swfmethod"),1, //$NON-NLS-1$
- new String[][]{
- {Messages.getString("proxy.swfmethod.none"), ProxyPreferenceConstants.PROXY_SWF_METHOD_NONE}, //$NON-NLS-1$
- {Messages.getString("proxy.swfmethod.bootloader"), ProxyPreferenceConstants.PROXY_SWF_METHOD_BOOTLOADER}/*, //$NON-NLS-1$
- {Messages.getString("proxy.swfmethod.transcoder"), ProxyPreferenceConstants.PROXY_SWF_METHOD_TRANSCODER}*/ }, //$NON-NLS-1$
- httpProxyGroup));
- }
-
- IntegerFieldEditor port = new IntegerFieldEditor(ProxyPreferenceConstants.PROXY_PORT, Messages.getString("proxy.port"), httpProxyGroup);
- port.setValidRange(0, 65535);
- addField(port);
-
- IntegerFieldEditor timeout = new IntegerFieldEditor(ProxyPreferenceConstants.P_TIMEOUT,
- Messages.getString("proxy.timeout"),httpProxyGroup); //$NON-NLS-1$
- timeout.setValidRange(0,99);
- addField(timeout);
-
- IntegerFieldEditor version = new IntegerFieldEditor(ProxyPreferenceConstants.P_SWF_MINIMUM_VERSION,
- Messages.getString("proxy.swf_version"),httpProxyGroup); //$NON-NLS-1$
- version.setValidRange(3,99);
- addField(version);
-
-
- addField(new RadioGroupFieldEditor(ProxyPreferenceConstants.P_CACHE_CLEAR,
- Messages.getString("proxy.cache_clear"),1, //$NON-NLS-1$
- new String[][]{
- {Messages.getString("proxy.cache_clear_when_startup"), ProxyPreferenceConstants.CACHE_CLEAR_WHEN_STARTUP}, //$NON-NLS-1$
- {Messages.getString("proxy.confirm_cache_clear"), ProxyPreferenceConstants.CONFIRM_WHEN_STARTUP}, //$NON-NLS-1$
- {Messages.getString("proxy.no_cache_clear"), ProxyPreferenceConstants.NO_CACHE_CLEAR} }, //$NON-NLS-1$
- getFieldEditorParent(),true));
- }
-
- public void init(IWorkbench workbench) {
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ui/CacheClearDialog.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ui/CacheClearDialog.java
deleted file mode 100644
index c83b8c8..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/ui/CacheClearDialog.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.proxy.ui;
-
-import org.eclipse.actf.model.flash.proxy.Messages;
-import org.eclipse.actf.model.flash.proxy.ProxyPlugin;
-import org.eclipse.actf.model.flash.proxy.preferences.ProxyPreferenceConstants;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-
-public class CacheClearDialog extends Dialog {
-
- private String status;
-
- private String appName;
-
- public CacheClearDialog(Shell shell, String appName) {
- super(shell);
- this.appName = appName;
- }
-
- protected Control createDialogArea(Composite parent) {
-
- parent.getShell().setText(Messages.getString("proxy.dialog.text"));
-
- Composite composite = new Composite(parent, SWT.NULL);
-
- GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_END);
- composite.setLayoutData(gridData);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.verticalSpacing = 20;
- layout.marginWidth = 20;
- layout.marginHeight = 20;
- composite.setLayout(layout);
-
- String settings = ProxyPlugin.getDefault().getPreferenceStore().getString(
- ProxyPreferenceConstants.P_CACHE_CLEAR);
-
- Label label1 = new Label(composite, SWT.NONE | SWT.READ_ONLY);
- label1.setText(" "+appName+" "+Messages.getString("proxy.cache_confirmation1"));
-
- Font f = label1.getFont();
- Font f9b = new Font(f.getDevice(), f.getFontData()[0].getName(), 9, SWT.BOLD);
- Font f9 = new Font(f.getDevice(), f.getFontData()[0].getName(), 9, SWT.NORMAL);
- label1.setFont(f9b);
-
- new Label(composite, SWT.NONE);
-
- status = ProxyPreferenceConstants.CACHE_CLEAR_WHEN_STARTUP_AND_CACHE_CLEAR;
-
- createRadioButton(ProxyPreferenceConstants.CACHE_CLEAR_WHEN_STARTUP_AND_CACHE_CLEAR, //
- Messages.getString("proxy.cache_clear_when_startup_and_cache_clear"), composite, true).setFont(f9b);
- createRadioButton(ProxyPreferenceConstants.CONFIRM_AND_CACHE_CLEAR, //
- Messages.getString("proxy.confirm_and_cache_clear"), composite, false).setFont(f9);
- createRadioButton(ProxyPreferenceConstants.CONFIRM_AND_NO_OPERATION, //
- Messages.getString("proxy.confirm_and_no_operation"), composite, false).setFont(f9);
-
- return composite;
- }
-
- private Button createRadioButton(final String id, String text, Composite parent, boolean flag) {
- Button radio = new Button(parent, SWT.RADIO);
- radio.setText(text);
- radio.setSelection(flag);
-
- radio.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- status = id;
- }
-
- public void widgetSelected(SelectionEvent e) {
- status = id;
- }
- });
- return radio;
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- }
-
- protected void buttonPressed(int buttonId) {
- if (buttonId == IDialogConstants.OK_ID) {
- close();
- }
- }
-
- public String getSelection() {
- return status;
- }
-
- protected void handleShellCloseEvent() {
- this.status = ProxyPreferenceConstants.CONFIRM_AND_NO_OPERATION;
- super.handleShellCloseEvent();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/views/ProxyLogView.java b/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/views/ProxyLogView.java
deleted file mode 100644
index 51205a0..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/src/org/eclipse/actf/model/flash/proxy/views/ProxyLogView.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash.proxy.views;
-
-
-import java.text.MessageFormat;
-import java.util.Date;
-import java.util.logging.Level;
-
-import org.eclipse.actf.model.flash.proxy.Messages;
-import org.eclipse.actf.model.flash.proxy.ProxyPlugin;
-import org.eclipse.actf.model.flash.proxy.logs.ProxyLogHandler;
-import org.eclipse.actf.model.flash.proxy.logs.ProxyLogRecord;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-
-
-public class ProxyLogView extends ViewPart {
- public static final String ID = ProxyLogView.class.getName();
-
- private static final String[] HEADINGS = { Messages.getString("proxy.message"), "ID", Messages.getString("proxy.source"), Messages.getString("proxy.time") }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final int[] WEIGHTS = { 30, 3, 10, 5 };
- private static final int[] ALIGNMENTS = { SWT.LEFT, SWT.LEFT, SWT.LEFT, SWT.LEFT };
- private static final int ROW_MESSAGE = 0;
- private static final int ROW_ID = 1;
- private static final int ROW_SOURCE = 2;
- private static final int ROW_TIME = 3;
-
- private TableViewer viewer;
- private ProxyLogViewSorter sorter = new ProxyLogViewSorter();
-
- private Action clearAction;
- private Action showFineAction;
- private Action copyAction;
- private ViewLabelProvider labelProvider;
- private static final ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
-
- class ViewContentProvider implements IStructuredContentProvider {
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
- public void dispose() {
- }
- public Object[] getElements(Object parent) {
- return ProxyLogHandler.getLogs().toArray();
- }
- }
- class ViewLabelProvider extends LabelProvider implements ITableLabelProvider {
- public String getColumnText(Object obj, int index) {
- if( obj instanceof ProxyLogRecord ) {
- switch( index ) {
- case ROW_TIME:
- long time = ((ProxyLogRecord)obj).getMillis();
- return MessageFormat.format("{0,time}",new Object[]{new Date(time)}); //$NON-NLS-1$
- case ROW_MESSAGE:
- return ((ProxyLogRecord)obj).getMessage();
- case ROW_ID:
- return ((ProxyLogRecord)obj).getID();
- case ROW_SOURCE:
- String logger = ((ProxyLogRecord)obj).getLoggerName();
- int sep = logger.lastIndexOf('.');
- if( -1 != sep ) {
- return logger.substring(sep+1);
- }
- return logger;
- }
- }
- return getText(obj);
- }
- public Image getColumnImage(Object obj, int index) {
- if( ROW_MESSAGE==index && obj instanceof ProxyLogRecord ) {
- ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
- int level = ((ProxyLogRecord)obj).getLevel().intValue();
- if( level > Level.WARNING.intValue() ) {
- return sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
- }
- if( level > Level.INFO.intValue() ) {
- return sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK);
- }
- if( level > Level.FINE.intValue() ) {
- return sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK);
- }
- }
- return null;
- }
- }
-
- /**
- * The constructor.
- */
- public ProxyLogView() {
- }
-
- public void refresh() {
- viewer.refresh();
- }
-
- /**
- * This is a callback that will allow us
- * to create the viewer and initialize it.
- */
- public void createPartControl(Composite parent) {
- Table table = new Table(parent,SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.SINGLE | SWT.FULL_SELECTION);
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
- table.setLinesVisible(true);
- table.setHeaderVisible(true);
- for( int i=0; i<HEADINGS.length; i++ ) {
- layout.addColumnData(new ColumnWeightData(WEIGHTS[i]));
- TableColumn tc = new TableColumn(table, SWT.NONE);
- tc.setText(HEADINGS[i]);
- tc.setAlignment(ALIGNMENTS[i]);
- tc.setResizable(true);
- final int newSortingColumn = i+1;
- tc.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- if( newSortingColumn== sorter.sortingColumn ) {
- sorter.sortingColumn = -newSortingColumn;
- }
- else {
- sorter.sortingColumn = newSortingColumn;
- }
- refresh();
- }
- });
- }
-
-
-
- viewer = new TableViewer(table);
-
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(labelProvider = new ViewLabelProvider());
- viewer.setSorter(sorter);
- viewer.setInput(getViewSite());
- makeActions();
- hookContextMenu();
- contributeToActionBars();
- }
-
- private class ProxyLogViewSorter extends ViewerSorter {
- public int sortingColumn = 0;
-
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (0 != sortingColumn && viewer instanceof TableViewer) {
- IBaseLabelProvider labelProvider = ((TableViewer)viewer).getLabelProvider();
- if( labelProvider instanceof ITableLabelProvider ) {
- int columnIndex = Math.abs(sortingColumn)-1;
- String s1 = ((ITableLabelProvider)labelProvider).getColumnText(e1,columnIndex);
- String s2 = ((ITableLabelProvider)labelProvider).getColumnText(e2,columnIndex);
- int result = 0;
- switch( columnIndex ) {
- case ROW_TIME:
- result = (int)(((ProxyLogRecord)e1).getMillis()-((ProxyLogRecord)e2).getMillis());
- break;
- case ROW_MESSAGE:
- case ROW_SOURCE:
- case ROW_ID:
- result = collator.compare(s1,s2);
- break;
- }
- return sortingColumn > 0 ? result : -result;
- }
- }
- return 0;
- }
- }
-
- private void hookContextMenu() {
- MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- ProxyLogView.this.fillContextMenu(manager);
- }
- });
- Menu menu = menuMgr.createContextMenu(viewer.getControl());
- viewer.getControl().setMenu(menu);
- getSite().registerContextMenu(menuMgr, viewer);
- }
-
- private void contributeToActionBars() {
- IActionBars bars = getViewSite().getActionBars();
- fillLocalPullDown(bars.getMenuManager());
- fillLocalToolBar(bars.getToolBarManager());
- }
-
- private void fillLocalPullDown(IMenuManager manager) {
- manager.add(showFineAction);
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- private void fillContextMenu(IMenuManager manager) {
- manager.add(clearAction);
- manager.add(copyAction);
- // Other plug-ins can contribute there actions here
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- private void fillLocalToolBar(IToolBarManager manager) {
- manager.add(clearAction);
- }
-
- private void makeActions() {
- clearAction = new Action(Messages.getString("proxy.clear")) { //$NON-NLS-1$
- public void run() {
- ProxyLogHandler.clear();
- viewer.refresh();
- }
- };
- clearAction.setToolTipText(Messages.getString("proxy.clear_tip")); //$NON-NLS-1$
- clearAction.setImageDescriptor(ProxyPlugin.IMAGE_CLEAR);
-
- showFineAction = new Action(Messages.getString("proxy.show_fine"),Action.AS_CHECK_BOX) { //$NON-NLS-1$
- public void run() {
- ProxyLogHandler.setLogLevel(showFineAction.isChecked() ? Level.FINE : Level.INFO);
- }
- };
-
- copyAction = new Action(Messages.getString("proxy.copy")) { //$NON-NLS-1$
- public void run() {
- StringBuffer sb = new StringBuffer();
- for( int index=0;;index++ ) {
- Object element = viewer.getElementAt(index);
- if( null==element ) {
- break;
- }
- for( int col=0; col<HEADINGS.length; col++ ) {
- sb.append(labelProvider.getColumnText(element, col));
- sb.append(col==HEADINGS.length-1 ? "\r\n":"\t");
- }
- }
- if( sb.length()>0 ) {
- new Clipboard(Display.getCurrent()).setContents(new Object[] { sb.toString() }, new Transfer[] { TextTransfer.getInstance() });
- }
- }
- };
- copyAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash.proxy/templates/proxy.pac b/plugins/org.eclipse.actf.model.flash.proxy/templates/proxy.pac
deleted file mode 100644
index 06797ce..0000000
--- a/plugins/org.eclipse.actf.model.flash.proxy/templates/proxy.pac
+++ /dev/null
@@ -1,25 +0,0 @@
-var NO_PROXY = "$NOPROXY_EXTS$";
-
-function FindProxyForURL(url, host) {
- if( url.substring(0,5) == "http:" ) {
- if( NO_PROXY.length > 0 && url.indexOf("?") == -1 ) {
- var extPos = url.lastIndexOf(".");
- if( extPos != -1 ) {
- if( NO_PROXY.indexOf("|"+url.substring(extPos+1).toLowerCase()+"|") != -1 ) {
- return "$HTTP_DIRECT$";
- }
- }
- }
- return "$HTTP_PROXY$";
- }
- if( url.substring(0,6) == "https:" ) {
- return "$HTTPS_DIRECT$";
- }
- if( url.substring(0,4) == "ftp:" ) {
- return "$FTP_DIRECT$";
- }
- if( url.substring(0,7) == "gopher:" ) {
- return "$GOPHER_DIRECT$";
- }
- return "DIRECT";
-}
diff --git a/plugins/org.eclipse.actf.model.flash/.classpath b/plugins/org.eclipse.actf.model.flash/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.model.flash/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.model.flash/.project b/plugins/org.eclipse.actf.model.flash/.project
deleted file mode 100644
index 017837b..0000000
--- a/plugins/org.eclipse.actf.model.flash/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.model.flash</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.model.flash/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.model.flash/META-INF/MANIFEST.MF
deleted file mode 100644
index ff07c67..0000000
--- a/plugins/org.eclipse.actf.model.flash/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF Flash Model Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.model.flash
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.actf.model.flash.FlashModelPlugin
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.actf.util.httpproxy,
- org.eclipse.actf.util.win32,
- org.eclipse.actf.util.comclutch.win32
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.actf.model.flash,
- org.eclipse.actf.model.flash.as,
- org.eclipse.actf.model.flash.bridge,
- org.eclipse.actf.model.flash.util
diff --git a/plugins/org.eclipse.actf.model.flash/about.html b/plugins/org.eclipse.actf.model.flash/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.model.flash/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/Eclipse_ACTF_initializer.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/Eclipse_ACTF_initializer.as
deleted file mode 100644
index 5fc38f0..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/Eclipse_ACTF_initializer.as
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Shin SAITO, Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-// --------------------------------------------------------------------------------
-// Common Bridge Initialization Module
-// --------------------------------------------------------------------------------
-_root.Eclipse_ACTF_is_available = "true";
-_root.Eclipse_ACTF_SWF_Bridge_version = "1.1.0";
-
-// Used by RequestServer.
-_root.Eclipse_ACTF_request_args = "";
-_root.Eclipse_ACTF_response_value = "";
-_root.Eclipse_ACTF_SWF_CONTENT_ID = _global.Eclipse_ACTF_SWF_CONTENT_ID;
-// ExternalInterface.addCallback('getSwfVersion', null, Eclipse_ACTF_Controller.getSwfVersion);
-Eclipse_ACTF_RequestServer.start(_global.Eclipse_ACTF_SECRET);
-delete _global.Eclipse_ACTF_SECRET;
-
-Eclipse_ACTF_Init.initialize();
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_bridge.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_bridge.as
deleted file mode 100644
index aa3194e..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_bridge.as
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Shin SAITO, Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-// --------------------------------------------------------------------------------
-// Bridge Initialization module for SWF bootloader
-// --------------------------------------------------------------------------------
-import flash.external.ExternalInterface;
-
-var Eclipse_ACTF_DEBUG:Boolean = false;
-
-trace('SWF bridge ver 1.3.2 is loaded');
-trace('registering getSwfVersion again...');
-System.security.allowDomain('*'); // shin
-ExternalInterface.addCallback('getSwfVersion', null, Eclipse_ACTF_Controller.getSwfVersion);
-trace('done.');
-
-if (Eclipse_ACTF_DEBUG){
- var Eclipse_ACTF_lc:LocalConnection = new LocalConnection();
- var mess:String = "";
- mess = "SWF bridge ver 1.3.2" + newline + "this._url = " + this._url + newline;
-}
-
-for (prop in _global.Eclipse_ACTF_PROPERTIES) {
- if (Eclipse_ACTF_DEBUG){
- mess += " :" + prop + "=" + _global.Eclipse_ACTF_PROPERTIES[prop] + newline;
- mess += " :0:" + prop + "=" + _level0[prop] + newline;
- }
-
- if (Object.prototype[prop]) {
- delete Object.prototype[prop];
- }
- if (_level0[prop] == undefined) {
- _level0[prop] = _global.Eclipse_ACTF_PROPERTIES[prop];
- }
-
- if (Eclipse_ACTF_DEBUG){
- mess += " :c:" + prop + "=" + _level0[prop] + newline;
- }
-}
-
-if (Eclipse_ACTF_DEBUG){
- Eclipse_ACTF_lc.send("_testLC", "dump", mess);
-}
-
-_global.encodeStringForBridge = function(arg:String) {
- return arg;
-}
-
-#include "Eclipse_ACTF_initializer.as"
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_bridge.fla b/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_bridge.fla
deleted file mode 100644
index d85fc47..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_bridge.fla
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_bridge.swf b/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_bridge.swf
deleted file mode 100644
index b6ac40a..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_bridge.swf
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_loader.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_loader.as
deleted file mode 100644
index 41a2c1b..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_loader.as
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Shin SAITO, Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-// boot_loader.as
-import flash.external.ExternalInterface;
-
-var Eclipse_ACTF_DEBUG:Boolean = false;
-var Eclipse_ACTF_RANDOM_STRING_1 = "";
-
-trace("SWF boot-loader ver 1.3.2 is loaded");
-
-if (Eclipse_ACTF_DEBUG) {
- var Eclipse_ACTF_lc:LocalConnection = new LocalConnection();
- var mess:String = "";
- mess = "SWF bootloader ver 1.3.2" + newline + "this._url = " + this._url + newline;
-}
-
-if (_level53553.Eclipse_ACTF_is_available) {
- if (Eclipse_ACTF_DEBUG) {
- mess += "this is child SWF." + newline;
- }
- for (prop in this) {
- if (prop != "getSameDomainURL" && prop != "mess" && prop != "Eclipse_ACTF_lc" && prop != "$version" &&
- prop != "Eclipse_ACTF_DEBUG") {
- if (Eclipse_ACTF_DEBUG) {
- mess += " :"+prop + "=" + this[prop] + newline;
- }
- _global.Eclipse_ACTF_PROPERTIES[prop] = this[prop];
- Object.prototype[prop] = this[prop];
- }
- }
- if (Eclipse_ACTF_DEBUG) {
- Eclipse_ACTF_Util.send(mess);
- }
- this.loadMovie(this._url, "POST");
-} else {
- if (Eclipse_ACTF_DEBUG) {
- mess += "this is root SWF." + newline;
- }
- _global.Eclipse_ACTF_PROPERTIES = new Object();
- // trace('registering getSwfVersion...');
- // ExternalInterface.addCallback('getSwfVersion', null, Eclipse_ACTF_Controller.getSwfVersion);
- // trace('done.');
- var getSameDomainURL = function(url:String, filename) {
- if (url.indexOf("http:")<0 && url.indexOf("https:")<0) {
- return filename;
- }
- var index = url.lastIndexOf("?");
- if (index >= 0){
- url = url.substring(0,index);
- }
- index = url.lastIndexOf("/");
- if (url.charAt(index-1) == "/") {
- return url + "/" + filename;
- } else {
- return url.substring(0, index+1)+filename;
- }
- }
-
- // --------------------------------------------------------------------------------
- _global.Eclipse_ACTF_Video = new Object();
- _global.Eclipse_ACTF_Video.streams = new Array();
- _global.Eclipse_ACTF_Video.register = function(target:Object, source:Object) {
- if ((!target) || (!source)) return;
- var ar:Array = _global.Eclipse_ACTF_Video.streams;
- var slot:Eclipse_ACTF_Stream;
- for (var i = 0; ; i++) {
- if (i == ar.length) {
- slot = new Eclipse_ACTF_Stream(target, source);
- ar.push(slot);
- break;
- }
- slot = ar[i];
- if (slot.equals(target)) {
- slot.update(source);
- }
- }
- }
-
- _global.Eclipse_ACTF_Video.attachVideo = Video.prototype.attachVideo;
- Video.prototype.attachVideo = function(source:Object) {
- // Eclipse_ACTF_Util.send("Video.attachVideo!!!");
- _global.Eclipse_ACTF_Video.register(this, source);
- _global.Eclipse_ACTF_Video.attachVideo.call(this, source);
- };
-
- // _global.Eclipse_ACTF_Video.soundp = new Object();
- // ASSetPropFlags(_global.Sound.prototype, "attachSound", 0, true);
- // _global.Eclipse_ACTF_Video.soundp.onLoad = Sound.prototype.onLoad;
- //Sound.prototype.attachSound = function() {
- // Eclipse_ACTF_Util.send("Invoked: " + "attachSound");
- // _global.Eclipse_ACTF_Video.register(this, this);
- // return _global.Eclipse_ACTF_Video.soundp.attachSound.apply(this, arguments);
- //}
- // Eclipse_ACTF_Util.send("Init...");
-
- // --------------------------------------------------------------------------------
-
- for (prop in this) {
- if (prop != "getSameDomainURL"
- && prop != "mess"
- && prop != "Eclipse_ACTF_lc"
- && prop != "$version"
- && prop != "Eclipse_ACTF_DEBUG") {
- if (Eclipse_ACTF_DEBUG) {
- mess += " :"+prop + "=" + this[prop] + newline;
- }
- _global.Eclipse_ACTF_PROPERTIES[prop] = this[prop];
- Object.prototype[prop] = this[prop];
- ASSetPropFlags(Object.prototype, prop, 1);
-
- /*
- if (Object.prototype.setPropertyIsEnumerable) {
- Object.prototype.setPropertyIsEnumerable(prop, false);
- }
- */
- }
- }
- if (Eclipse_ACTF_DEBUG) {
- Eclipse_ACTF_lc.send("_testLC", "dump", mess);
- }
-
- // load the secret.
-
- var lv:LoadVars = new LoadVars();
- lv.onLoad = function(flag:Boolean) {
- if (flag) {
- _global.Eclipse_ACTF_SWF_CONTENT_ID = lv.contentid;
- _global.Eclipse_ACTF_SECRET = lv.secret;
- // load the original
- loadMovieNum(_root._url, 0, "POST");
-
- // load boot_bridge.swf
- loadMovieNum(getSameDomainURL(_root._url, "Eclipse-ACTF-SWF-Initialize-Bridge-Package-1082017309130187472.swf"), 53553);
- }
- };
- lv.load(getSameDomainURL(this._url, "http://localhost/Eclipse-ACTF-SWF-LoadVars-1082017309130187472.txt"));
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_loader.fla b/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_loader.fla
deleted file mode 100644
index 80b7524..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_loader.fla
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_loader.swf b/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_loader.swf
deleted file mode 100644
index 59c96fb..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/boot_loader.swf
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_ASSerializer.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_ASSerializer.as
deleted file mode 100644
index 6a46d51..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_ASSerializer.as
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Shin SAITO, Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-/**
- * AS Serializer/Deserialization library
-*/
-class Eclipse_ACTF_ASSerializer {
- private static var ignorePropertiesWithUnderScores:Boolean = true;
-
- public static function serialize(o:Object):String {
- function serializeArray(o: Array) {
- var ret:String = "[";
- for(var i = 0; i < o.length; i++){
- ret += serializeInternal(o[i]);
- ret += ",";
- }
- if (ret.length > 1) {
- ret = ret.substring(0, ret.length - 1);
- }
- ret += "]";
- return ret;
- }
-
- function serializeString(o: String) {
- var rest:String = _global.encodeStringForBridge(o);
- var ret:String = '"';
- var index;
- while ((index = rest.indexOf('"')) >= 0) {
- ret += rest.substring(0,index);
- ret += "\\\"";
- rest = rest.substr(index + 1);
- }
- ret+=rest + '"';
- return ret;
- }
-
- function serializeObject(o: Object) {
- var ret:String = '{';
- for (var prop in o){
- if (o[prop] != null && o[prop] != undefined) {
- if (!ignorePropertiesWithUnderScores || prop.substr(0,2) != '__') {
- ret += serializeString(prop) + ":" ;
- ret += serializeInternal(o[prop]);
- ret += ",";
- }
- }
- }
- if (ret.length > 1) {
- ret = ret.substring(0, ret.length - 1);
- }
- ret += "}";
- return ret;
- }
-
- function serializeInternal(o: Object) {
- if (o instanceof Array) {
- return serializeArray(o);
- }
- switch (typeof(o)) {
- case "undefined":
- return "null";
- case "string":
- return serializeString(o);
- case "object":
- return serializeObject(o);
- case "movieclip":
- return "null";
- case "function":
- return "null";
-
- default:
- return String(o);
- }
- }
- return serializeInternal(o);
- }
-
- public static function deserialize(str:String):Object {
- var idx:Number = 0;
- var obj:Object = undefined;
- var c:String = str.charAt(idx);
-
- function skipSP():Boolean {
- for (;;) {
- c = str.charAt(idx);
- switch (c) {
- case ' ':
- case '\n':
- case '\r':
- case '\t':
- idx++;
- continue;
- case undefined:
- return false;
- default:
- return true;
- }
- }
- }
-
- function tokenEnd():Boolean {
- for (;;) {
- c = str.charAt(idx);
- switch (c) {
- case ' ':
- case '\t':
- case '\n':
- case '\r':
- case ',':
- case ':':
- case ']':
- case '}':
- case undefined:
- return true;
- }
- idx++;
- }
- }
-
- function deserializeArray() {
- // trace("dA");
- idx++;
- var ret:Array = new Array();
- for (;;) {
- skipSP();
- if (c == ']') {
- obj = ret;
- idx++;
- // trace("dA-exit: " + obj);
- return true;
- }
- if (deserializeInternal()) {
- // trace("dA-internal: "+obj);
- ret.push(obj);
- }
- skipSP();
- if (c == ']') {
- obj = ret;
- idx++;
- // trace("dA-exit: " + obj);
- return true;
- }
- if (c != ',') return false;
- idx++;
- }
- }
-
- function deserializeObject() {
- idx++;
- var ret:Object = new Object();
- for (;;) {
- skipSP();
- if (c == '}') {
- obj = ret;
- idx++;
- // trace("dA-exit: " + obj);
- return true;
- }
- if (deserializeString()) {
- var propName = obj;
- // trace(propName);
- skipSP();
- if (c != ':') return false;
- idx++;
- skipSP();
- if (deserializeInternal()) {
- var propVal:Object = obj;
- // trace(propVal);
- ret[propName] = propVal;
- }
- }
- skipSP();
- if (c == '}') {
- obj = ret;
- idx++;
- // trace("dA-exit: " + obj);
- return true;
- }
- if (c != ',') return false;
- idx++;
- }
- return false;
- }
-
- function deserializeString() {
- idx++;
- var ret:String = "";
- for (;;) {
- c = str.charAt(idx);
- switch (c) {
- case '"':
- idx++;
- obj = ret;
- return true;
- case '\\':
- idx++;
- c = str.charAt(idx);
- if (!c) return false;
- case undefined:
- return false;
- }
- ret += c;
- idx++;
- }
- }
-
- function deserializeInternal():Boolean {
- if (!skipSP()) return true;
- switch (c) {
- case '[':
- return deserializeArray();
- case '{':
- return deserializeObject();
- case '"':
- return deserializeString();
- default:
- var idxSt:Number = idx;
- if (tokenEnd()) {
- var substr = str.substring(idxSt, idx);
- if (('0'<=substr.charAt(0) && substr.charAt(0)<='9')
- || substr.charAt(0)=='+' || substr.charAt(0)=='-')
- obj = Number(substr);
- else
- obj = eval(substr);
- // trace(obj);
- return true;
- }
- }
- return false;
- }
-
- deserializeInternal();
- return obj;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_AccInfo.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_AccInfo.as
deleted file mode 100644
index 06af68a..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_AccInfo.as
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-class Eclipse_ACTF_AccInfo {
- var silent:Boolean;
- var forceSimple:Boolean;
- var name:String;
- var description:String;
- var shortcut:String;
-
- var role:Number;
- var state:Number;
- var defaultAction:String;
- var children:Array;
-
- private function Eclipse_ACTF_AccInfo(o:Object) {
- if (o._accProps) {
- this.silent = o._accProps.silent;
- this.forceSimple = o._accProps.forceSimple;
- this.name = o._accProps.name;
- this.description = o._accProps.description;
- this.shortcut = o._accProps.shortcut;
- }
-
- if (o._accImpl) {
- var ai:Object = o._accImpl;
- var nameAccImpl:String = ai.get_accName(0);
- if (nameAccImpl) this.name = nameAccImpl;
- this.role = ai.get_accRole(0);
- this.state = ai.get_accState(0);
- this.defaultAction = ai.get_accDefaultAction(0);
- this.children = ai.getChildIdArray();
- }
- }
-
- public static function newAccInfo(o:Object) {
- if (o._accProps || o._accImpl) return new Eclipse_ACTF_AccInfo(o);
- return undefined;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_AccTarget.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_AccTarget.as
deleted file mode 100644
index c4d71fd..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_AccTarget.as
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-class Eclipse_ACTF_AccTarget {
-
- public static function updateTarget(target:String, depth:Number):Boolean {
- var obj:Object = eval(target);
- var log:Object = new Object();
- updateImpl(obj, target, depth, log);
- Accessibility.updateProperties();
- return log._Eclipse_ACTF_updated;
- }
-
- private static function updateImpl(obj:Object, target:String, depth:Number, log:Object) {
- if (depth < 0) {
- return;
- }
- if (log[target]) {
- return;
- }
- log[target] = true;
-
- if (!(obj instanceof MovieClip) && !(obj instanceof Button)) {
- return;
- }
-
- var isButton:Boolean = obj.onRelease || obj.onPress || obj instanceof Button;
-
- if (isButton) {
- obj._accProps = obj._accProps || {};
- obj._accProps.shortcut = target;
- log._Eclipse_ACTF_updated = true;
- return;
- }
- if (!(obj instanceof MovieClip)) {
- return;
- }
-
- for (var c in obj) {
- var cTarget:String = target+"."+c;
- var co:Object = eval(cTarget);
- cTarget = targetPath(co);
- if (!co._target) {
- co._target = cTarget;
- }
- updateImpl(co, cTarget, depth - 1, log);
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_AutoTranslator.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_AutoTranslator.as
deleted file mode 100644
index e9c1c5d..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_AutoTranslator.as
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-class Eclipse_ACTF_AutoTranslator {
- private static function isButton(n:Eclipse_ACTF_Node):Boolean {
- if (n.type == "object" && n.className == "Button")
- return true;
- if (n.type == "movieclip" && (eval(n.target).onRelease))
- return true;
- return false;
- }
-
- private static function isEmpty(n:Eclipse_ACTF_Node):Boolean {
- if (n.text && n.text.length > 0) return false;
- if (n.accInfo && n.accInfo.name) return false;
- if (isButton(n)) {
- n.text = n.target.substr(n.target.lastIndexOf(".") + 1);
- return false;
- }
- return true;
- }
-
- private static function buildItem(n:Eclipse_ACTF_Node, depth:Number):Array {
- var r:Array = new Array();
- if (n.isOpaqueObject) return r;
- if (n.accInfo && n.accInfo.silent) return r;
- var cr:Array = n.getChildNodesArray();
- cr.reverse();
- for (var i = 0; i < cr.length; i++) {
- var c:Eclipse_ACTF_Node = cr[i];
-
- if (!(c.type == "movieclip" ||
- (c.type == "object" && (c.className == "TextField" || c.className == "Button"))))
- continue;
-
- if (isEmpty(c)) {
- if ((depth <= 0) && (r.length > 0)) {
- r.push(c);
- } else {
- r = r.concat(buildItem(c, depth - 1));
- }
- } else {
- r.push(c);
- }
- }
- return r;
- }
-
- public static function translate(path:String):Array {
- var n:Eclipse_ACTF_Node = Eclipse_ACTF_Node.getNodeFromPath(path);
- if (!n) return null;
- return buildItem(n, 1);
- }
-}
-
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Controller.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Controller.as
deleted file mode 100644
index 18b60a4..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Controller.as
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Shin SAITO - added method getSwfVersion()
- *******************************************************************************/
-
-import flash.filters.*;
-
-class Eclipse_ACTF_Controller {
- public static function callMethod(path:String, methodName:String, args:Array) {
- var o = eval(path);
- var f = o[methodName];
- return f.apply(o, args);
- }
-
- public static function callMethodA(path:String, methodName:String) {
- var o:Object = eval(path);
- var f:Function = o[methodName];
- var a:Array = new Array();
- for (var i = 2; i < arguments.length; i++) {
- a.push(arguments[i]);
- }
- return f.apply(o, a);
- }
-
- public static function getProperty(path:String, prop:String):Object {
- var o:Object = eval(path);
- return o[prop];
- }
-
- public static function setProperty(path:String, prop:String, value:Object) {
- var o:Object = eval(path);
- o[prop] = value;
- }
-
- public static function addFilter(path:String) {
- var o = eval(path);
- var bfilter:BlurFilter = new BlurFilter(4, 4, 2);
- o.filters = [bfilter];
- }
-
- public static function removeFilter(path:String) {
- var o = eval(path);
- o.filters = [];
- }
-
- public static function getSwfVersion() {
- return 8;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Init.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Init.as
deleted file mode 100644
index 7fbd00d..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Init.as
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Shin SAITO - initial API and implementation
- *******************************************************************************/
-import flash.external.ExternalInterface;
-
-class Eclipse_ACTF_Init {
- public static var debug:Boolean = false;
- private static var debugTextField;
-
- public static var callbacks = {
- getRootNode : Eclipse_ACTF_Node.getRootNode,
- getNodeFromPath : Eclipse_ACTF_Node.getNodeFromPath,
-
- getNumSuccessorNodes : Eclipse_ACTF_Node.getNumSuccessorNodes,
- getSuccessorNodes : Eclipse_ACTF_Node.getSuccessorNodes,
-
- getNumChildNodes : Eclipse_ACTF_Node.getNumChildNodes,
- getChildNodes : Eclipse_ACTF_Node.getChildNodes,
-
- getNodeAtDepth : Eclipse_ACTF_Node.getNodeAtDepth,
- getInnerNodes : Eclipse_ACTF_Node.getInnerNodes,
- setFocus : Eclipse_ACTF_Node.setFocus,
-
- callMethod : Eclipse_ACTF_Controller.callMethod,
- callMethodA : Eclipse_ACTF_Controller.callMethodA,
- getProperty : Eclipse_ACTF_Controller.getProperty,
- setProperty : Eclipse_ACTF_Controller.setProperty,
- addFilter : Eclipse_ACTF_Controller.addFilter,
- removeFilter : Eclipse_ACTF_Controller.removeFilter,
- getSwfVersion : Eclipse_ACTF_Controller.getSwfVersion,
-
- searchVideo : Eclipse_ACTF_Media.searchVideo,
- searchSound : Eclipse_ACTF_Media.searchSound,
-
- watchInit : Eclipse_ACTF_Watch.watchInit,
- watchObject : Eclipse_ACTF_Watch.watchObject,
- removeWatchList : Eclipse_ACTF_Watch.removeWatchList,
-
- newMarker : Eclipse_ACTF_Marker.newMarker,
- setMarker : Eclipse_ACTF_Marker.setMarker,
- unsetMarker : Eclipse_ACTF_Marker.unsetMarker,
- showAllMarkers : Eclipse_ACTF_Marker.showAllMarkers,
- clearAllMarkers : Eclipse_ACTF_Marker.clearAllMarkers,
-
- getScaleMode : Eclipse_ACTF_StageProxy.getScaleMode,
- setScaleMode : Eclipse_ACTF_StageProxy.setScaleMode,
- getStageWidth : Eclipse_ACTF_StageProxy.getStageWidth,
- getStageHeight : Eclipse_ACTF_StageProxy.getStageHeight,
- getStageAlign : Eclipse_ACTF_StageProxy.getStageAlign,
-
- translate : Eclipse_ACTF_AutoTranslator.translate,
-
- //repairFlash : Eclipse_ACTF_AccRepair.repairFlash,
-
- updateTarget : Eclipse_ACTF_AccTarget.updateTarget
- };
-
- private static function searchAccInternal(o:Object,
- target:String,
- traversed:Object,
- r:Array) {
- if (traversed[target]) return;
- traversed[target] = true;
- for (var c in o) {
- if (c == "_accProps") {
- debugTextField.text += " ACCPROPS!";
- // Alert.show("Launch Stock Application?", "Stock Price Alert", Alert.OK | Alert.CANCEL, this, myClickHandler, "stockIcon", Alert.OK)
- }
- if (c == "_accImpl") {
- debugTextField.text += " ACCIMPL!";
- }
- var cTarget:String = target + "." + c;
- var co:Object = eval(cTarget);
- if (co._target) {
- cTarget = Eclipse_ACTF_Node.normalizeTargetName(co._target);
- } else {
- co._target = cTarget;
- }
- // ExternalInterface.call("alert", cTarget);
- searchAccInternal(co, cTarget, traversed, r);
- }
- }
-
- public static function searchAcc(path:String) {
- var o:Object = eval(path);
- var traversed:Object = new Object();
- var r:Array = new Array();
- searchAccInternal(o, path, traversed, r);
- }
-
- private static function addCallback(name:String, func:Function) {
- var result:Boolean = ExternalInterface.addCallback(name, null, func);
- if (debug) {
- // debugTextField.text += " " + name + " " + result + "; ";
- }
- return result;
- }
-
- public static function initialize() {
- // trace("Eclipse_ACTF_Init.initialize()");
-
- // var Eclipse_ACTF_is_available:Boolean = ExternalInterface.available;
- if (debug) {
- var lv0Obj = eval("_level0");
- debugTextField = lv0Obj.createTextField("debugText", 1, 0, 0, 10, 10);
- debugTextField._width = lv0Obj._width;
- debugTextField._height = lv0Obj._height;
- searchAcc("_level0");
- searchAcc("_level1");
- debugTextField.text += " DONE!!!!";
- //ExternalInterface.call("alert", "successfully executed init. AS");
- }
-
- /*
- for (var h in callbacks) {
- var res = addCallback(h, callbacks[h]);
- _level0.Eclipse_ACTF_reg_results.push(res);
- if (!res) break;
- }
- */
- // trace("Eclipse_ACTF_Init.initialize() done.");
- }
-}
-
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Marker.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Marker.as
deleted file mode 100644
index 2e94e62..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Marker.as
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-import flash.external.ExternalInterface;
-
-class Eclipse_ACTF_Marker {
- private static var markers = new Array();
- var movieClip:MovieClip;
- var idx:Number;
- var x, y, w, h:Number;
- var txt:TextField;
-
- private function nextMarkerIdx() {
- for (var i = 0; i < markers.length; i++) {
- if (!markers[i]) return i;
- }
- return markers.length;
- }
-
- private function Eclipse_ACTF_Marker(idx:Number) {
- var baseMC:MovieClip = eval("_level0");
- this.idx = this.nextMarkerIdx();
- var nextDepth:Number = baseMC.getNextHighestDepth();
- // For AS version 2 component
- if (nextDepth >= 1048676) {
- nextDepth -= 1000 + this.idx;
- }
- this.movieClip = baseMC.createEmptyMovieClip("__Eclipse_ACTF_marker-" + this.idx, nextDepth);
- markers[this.idx] = this;
- this.movieClip._alpha = 100;
- this.movieClip._visible = false;
-
- this.txt = this.movieClip.createTextField("txt", 1, 0, 0, 10, 10);
- }
-
- private function setText(text:String) {
- var dpp = 4.0 * 96 / 72;
- var h = this.h / 2;
- this.txt._x = 0;
- this.txt._y = 0;
- this.txt._width = this.w;
- this.txt._height = h;
- this.txt.multiline = true;
- this.txt.autoSize = "right";
- var fmt:TextFormat = new TextFormat();
- fmt.font = "Times New Roman";
- var size = h / dpp + 7;
- if (size > 20) size = 20;
- fmt.size = size;
- fmt.color = 0x0010FF;
- this.txt.text = text;
- this.txt.setTextFormat(0, text.length, fmt);
- }
-
- private static function getMarker(idx:Number) {
- return markers[idx];
- }
-
- private function set(x:Number, y:Number,
- w:Number, h:Number) {
- var lw = 4;
- this.x = x;
- this.y = y;
- this.w = w;
- this.h = h;
- this.movieClip.clear();
- this.movieClip._x = x;
- this.movieClip._y = y;
- this.movieClip._w = w;
- this.movieClip._h = h;
- this.movieClip.lineStyle(lw, 0x00FF00, 100);
- this.movieClip.moveTo(0, 0);
- this.movieClip.lineTo(w, 0);
- this.movieClip.lineTo(w, h);
- this.movieClip.lineTo(0, h);
- this.movieClip.lineTo(0, 0);
- this.movieClip._visible = true;
- }
-
- private function unset(x:Number, y:Number,
- w:Number, h:Number) {
- this.movieClip._visible = false;
- }
-
- public static function setMarker(idx:Number,
- x:Number, y:Number,
- w:Number, h:Number) {
- var mk:Eclipse_ACTF_Marker = Eclipse_ACTF_Marker.getMarker(idx);
- mk.set(x, y, w, h);
- }
-
- public static function unsetMarker(idx:Number) {
- var mk:Eclipse_ACTF_Marker = Eclipse_ACTF_Marker.getMarker(idx);
- mk.unset();
- }
-
- public static function newMarker():Number {
- var mk:Eclipse_ACTF_Marker = new Eclipse_ACTF_Marker();
- return mk.idx;
- }
-
- private static var builtMarkers:Array = new Array();
-
- private static function showMarkers(a:Array) {
- for (var i = 0; i < a.length; i++) {
- var mk:Eclipse_ACTF_Marker = new Eclipse_ACTF_Marker();
- builtMarkers.push(mk.idx);
- var c:Eclipse_ACTF_Node = a[i];
- mk.set(c.x, c.y, c.w, c.h);
- mk.setText(c.target + "|" + c.currentFrame);
- var a2:Array = Eclipse_ACTF_Node.getInnerNodes(c.target);
- Eclipse_ACTF_Marker.showMarkers(a2);
- }
- }
-
- public static function showAllMarkers(path:String) {
- var a:Array = Eclipse_ACTF_Node.getInnerNodes(path);
- Eclipse_ACTF_Marker.showMarkers(a);
- }
-
- private function remove() {
- this.movieClip.clear();
- this.txt.text = "";
- this.movieClip.removeMovieClip();
- }
-
- public static function clearAllMarkers() {
- for (var i = 0; i < builtMarkers.length; i++) {
- var j = builtMarkers[i];
- markers[j].remove();
- markers[j] = undefined;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Media.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Media.as
deleted file mode 100644
index 1e56d95..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Media.as
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-import flash.external.ExternalInterface;
-
-class Eclipse_ACTF_Media {
- private static function addObject(o:Object, target:String, a:Array) {
- var len:Number = a.length;
- for (var i:Number = 0; i < len; i++) {
- var o2:Object = eval(a[i].target);
- if (o === o2) return;
- }
- a.push(new Eclipse_ACTF_Node(null, target));
- }
-
- private static function searchVideoInternal(o:Object,
- target:String,
- traversed:Object,
- r:Array) {
- if (traversed[target]) return;
- traversed[target] = true;
- if (o instanceof NetStream) {
- addObject(o, target, r);
- return;
- }
-
- /* else if (o instanceof XMLNode) {
- return;
- } else if (Eclipse_ACTF_Util.isInClass(o, mx.core.UIObject)) {
- return;
- }*/
- for (var c in o) {
- var co:Object = o[c];
- var cTarget:String = target + "." + c;
- if (co._target) {
- cTarget = Eclipse_ACTF_Node.normalizeTargetName(co._target);
- } else {
- co._target = cTarget;
- }
- searchVideoInternal(co, cTarget, traversed, r);
- }
- }
-
- public static function searchVideo():Array {
- /*
- var traversed:Object = new Object();
- var r:Array = new Array();
-
- for (var i = 0; i < arguments.length; i++) {
- var path:String = arguments[i];
- var o:Object = eval(path);
- searchVideoInternal(o, path, traversed, r);
- }
- return r;
- */
- var r:Array = new Array();
- var streams:Array = _global.Eclipse_ACTF_Video.streams;
- for (var i = 0; i < streams.length; i++) {
- var slot:Object = streams[i];
- addObject(slot, "_global.Eclipse_ACTF_Video.streams." + i, r);
- }
- return r;
- }
-
- private static function searchSoundInternal(o:Object,
- target:String,
- traversed:Object,
- r:Array) {
- if (traversed[target]) return;
- traversed[target] = true;
- if (o instanceof Sound) {
- addObject(o, target, r);
- return;
- }
- for (var c in o) {
- var cTarget:String = target + "." + c;
- var co:Object = eval(cTarget);
- if (co._target) {
- cTarget = Eclipse_ACTF_Node.normalizeTargetName(co._target);
- } else {
- co._target = cTarget;
- }
- // ExternalInterface.call("alert", cTarget);
- searchSoundInternal(co, cTarget, traversed, r);
- }
- }
-
- public static function searchSound(path:String):Array {
- /* var o:Object = eval(path);
- var traversed:Object = new Object();
- var r:Array = new Array();
- searchSoundInternal(o, path, traversed, r);
- return r; */
- if (!_global.Eclipse_ACTF_FLASHBridgeGlobalSound) {
- _global.Eclipse_ACTF_FLASHBridgeGlobalSound = new Sound();
- }
- var r:Array = new Array();
- r.push(new Eclipse_ACTF_Node(null, "_global.Eclipse_ACTF_FLASHBridgeGlobalSound"));
- return r;
- }
- /*
- public static function getVolume(path:String):Number {
- var s:Sound = eval(path);
- return s.getVolume();
- }
-
- public static function setVolume(path:String, val:Number) {
- var s:Sound = eval(path);
- s.setVolume(val);
- }
- */
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Node.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Node.as
deleted file mode 100644
index cd7a521..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Node.as
+++ /dev/null
@@ -1,580 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Shin SAITO - initial API and implementation
- *******************************************************************************/
-
-
-class Eclipse_ACTF_Node {
- private var __object;
-
- var objectName;
- var type;
- var className;
- var text;
- var title;
- var target:String;
- var x:Number, y:Number, w:Number, h:Number;
- var value;
- var isOpaqueObject:Boolean;
- var isUIComponent:Boolean;
- var isInputable:Boolean;
- var depth;
- var currentFrame:Number;
- var tabIndex:Number;
-
- var accInfo:Eclipse_ACTF_AccInfo;
-
- /*
- public function Eclipse_ACTF_Node(iName, tn, cn, txt, c) {
- this.instanceName = iName;
- this.type = tn;
- this.className = cn;
- this.text = txt;
- this.children = c;
- trace("Node created.");
- }
- */
-
- //
- var swfVersion:String;
- var url:String;
- var mName:String;
- var mTarget:String;
- var parentTarget:String;
- var targetModified:Boolean;
- var targetIsString:Boolean;
-
- public function toString():String {
- var ret;
- ret = this.objectName + " - (type:" + this.type + ") " + (this.value ? "(value:" + this.value + ")" : "") + " " + (target ? "(target:" + this.target + ")" : "") + " ";
- ret += (this.className ? "(cName:" + this.className + ")" : "") + " " + (this.text ? "(text:" + this.text + ")" : "");
- return ret;
- }
-
- private function uiObjectCheck():Boolean {
- if (!(Eclipse_ACTF_Util.isInClass(this.__object, mx.core.UIObject))) return false;
- if (Eclipse_ACTF_Util.isInClass(this.__object, mx.core.UIComponent)) {
- if (Eclipse_ACTF_Util.classJudge(this.__object, mx.containers.Accordion)) {
- this.className = "mx.containers.Accordion";
- this.isUIComponent = true;
- } else if (Eclipse_ACTF_Util.isInClass(this.__object, mx.containers.Window)) {
- this.isUIComponent = true;
- if (this.__object.title) {
- this.text = this.__object.title;
- }
- if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.Alert)) {
- this.className = "mx.containers.Alart";
- } else {
- this.className = "mx.containers.Window";
- }
- } else if (Eclipse_ACTF_Util.isInClass(this.__object, mx.controls.List)) {
- this.isUIComponent = true;
- this.isInputable = true;
- if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.DataGrid)) {
- this.className = "mx.controls.DataGrid";
- } else {
- this.className = "mx.controls.List";
- }
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.Button)) {
- this.isUIComponent = true;
- this.isOpaqueObject = true;
- this.className = "mx.controls.Button";
- // selected, toggle
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.CheckBox)) {
- this.isUIComponent = true;
- this.isInputable = true;
- this.isOpaqueObject = true;
- this.className = "mx.controls.CheckBox";
- if (this.__object.label) {
- this.text = this.__object.label;
- }
- // selected
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.ComboBox)) {
- this.isInputable = true;
- this.isUIComponent = true;
- this.isOpaqueObject = true;
- this.className = "mx.controls.ComboBox";
- if (this.__object.text) {
- this.text = this.__object.text;
- }
- // value, selectedItem, selectedIndex, ...
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.DateField)) {
- this.isUIComponent = true;
- this.isInputable = true;
- this.isOpaqueObject = true;
- this.className = "mx.controls.DateField";
- // TODO...
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.DateChooser)) {
- this.isUIComponent = true;
- this.isInputable = true;
- this.isOpaqueObject = true;
- this.className = "mx.controls.DateChooser";
- // TODO...
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.Label)) {
- this.className = "mx.controls.Label";
- this.isUIComponent = true;
- this.isOpaqueObject = true;
- if (this.__object.text) {
- this.text = this.__object.text;
- }
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.Loader)) {
- // View
- this.isOpaqueObject = true;
- this.className = "mx.controls.Loader";
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.Menu)) {
- this.className = "mx.controls.Menu";
- this.isUIComponent = true;
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.MenuBar)) {
- this.className = "mx.controls.MenuBar";
- this.isUIComponent = true;
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.NumericStepper)) {
- this.className = "mx.controls.NumericStepper";
- this.isUIComponent = true;
- this.isInputable = true;
- if (this.__object.value) {
- this.text = String(this.__object.value);
- }
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.RadioButton)) {
- this.className = "mx.controls.RadioButton";
- this.isUIComponent = true;
- this.isOpaqueObject = true;
- this.isInputable = true;
- if (this.__object.label) {
- this.text = this.__object.groupName + " " + this.__object.label;
- }
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.containers.ScrollPane)) {
- this.className = "mx.containers.ScrollPane";
- this.isUIComponent = true;
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.TextArea)) {
- this.className = "mx.controls.TextArea";
- this.isOpaqueObject = true;
- this.isUIComponent = true;
- this.isInputable = true;
- if (this.__object.text) {
- this.text = this.__object.text;
- }
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.TextInput)) {
- this.className = "mx.controls.TextInput";
- this.isOpaqueObject = true;
- this.isUIComponent = true;
- this.isInputable = true;
- if (this.__object.text) {
- this.text = this.__object.text;
- }
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.Tree)) {
- this.className = "mx.controls.Tree";
- this.isUIComponent = true;
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.UIScrollBar)) {
- this.className = "mx.controls.UIScrollBar";
- this.isUIComponent = true;
- if (this.__object.scrollPosition) {
- this.text = this.__object.scrollPosition;
- }
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.managers.FocusManager)) {
- this.className = "mx.managers.FocusManager";
- this.isOpaqueObject = true;
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.MediaController)) {
- this.className = "mx.controls.MediaController";
- this.isUIComponent = true;
- this.isOpaqueObject = true;
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.MediaDisplay)) {
- this.className = "mx.controls.MediaDisplay";
- this.isUIComponent = true;
- this.isOpaqueObject = true;
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.MediaPlayback)) {
- this.className = "mx.controls.MediaPlayback";
- this.isUIComponent = true;
- this.isOpaqueObject = true;
- } else {
- this.className = "mx.core.UIComponent";
- }
- } else {
- if (Eclipse_ACTF_Util.classJudge(this.__object, mx.controls.ProgressBar)) {
- this.isOpaqueObject = true;
- this.className = "mx.controls.ProgressBar";
- this.isUIComponent = true;
- if (this.__object.label) {
- this.text = this.__object.label;
- }
- } else {
- this.className = "mx.core.UIObject";
- }
- }
- return true;
- }
-
- public function Eclipse_ACTF_Node(parent, objectStr) {
- // dtrace(" ctor:");
- this.objectName = objectStr;
- // dtrace(" path = " + ((parent != null && parent != undefined) ? parent : "**") + ":" + objectStr);
- if (parent != null && parent != undefined) {
- // trace(parent + ":" + objectStr);
- var parentO = eval(parent);
- this.__object = parentO[objectStr];
- this.target = parent + "." + objectStr;
- } else {
- // trace(this.__object);
- this.target = objectStr;
- this.__object = eval(objectStr);
- }
- this.type = typeof (this.__object);
- // dtrace(" type: " + this.type);
-
- this.accInfo = Eclipse_ACTF_AccInfo.newAccInfo(this.__object);
- if (this.__object.getSWFVersion) {
- this.swfVersion = this.__object.getSWFVersion(); // shin for debug
- }
- this.url = this.__object._url; // shin for debug
- this.w = this.__object._width;
- this.h = this.__object._height;
- if (this.__object.getRect) {
- var bobj:Object = this.__object.getRect();
- this.x = bobj.xMin;
- this.y = bobj.yMin;
- } else {
- /*
- // In this case, the object is put in its parent MC.
- // The origin is located at the center of the object.
- this.x = object._x - this.w / 2;
- this.y = object._y - this.h / 2;
- */
- this.x = this.__object._x;
- this.y = this.__object._y;
- }
- if (this.__object.localToGlobal) {
- this.__object.localToGlobal(this);
- } else if (this.__object._parent.localToGlobal) {
- this.__object._parent.localToGlobal(this);
- }
- if (this.type == "movieclip") {
- var targetPath:String = targetPath(this.__object);
- var rObj:Object = eval(targetPath);
- if (typeof(rObj) == "string") {
- this.targetIsString = true;
- }
- if (eval(rObj) === this.__object) {
- this.targetModified = true;
- this.target = targetPath;
- }
- // dtrace(" target: " + this.target);
- this.mName = this.__object._name;
- this.mTarget = this.__object._target;
- if (this.__object._parent) {
- this.parentTarget = this.__object._parent._target;
- }
- this.currentFrame = this.__object._currentframe;
- this.depth = this.__object.getDepth();
- if (!uiObjectCheck()) {
- if (Eclipse_ACTF_Util.classJudge(this.__object, mx.video.FLVPlayback)) {
- this.className = "mx.video.FLVPlayback";
- this.isUIComponent = true;
- this.isOpaqueObject = true;
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.video.VideoPlayer)) {
- this.isUIComponent = true;
- this.className = "mx.video.VideoPlayer";
- this.isOpaqueObject = true;
- }
- }
-
- if (this.text == null || this.text == undefined || this.text == "") {
- // dtrace(" obtaining text from snapshot...");
- var ts:TextSnapshot = this.__object.getTextSnapshot();
- if (ts) {
- var len:Number = ts.getCount();
- var text = ts.getText(0, len, false);
- // dtrace(" obtained text is [[" + text + "]]");
- if (text != null && text != undefined && text != "")
- this.text = text;
- }
- }
- } else if (this.type == "object") {
- if (this.__object instanceof TextField) {
- this.className = "TextField";
- this.target = targetPath(this.__object);
- if (this.__object.type == "input") {
- this.isInputable = true;
- }
- if ((this.__object.__showContents != false) && this.__object.text != null &&
- this.__object.text != undefined && this.__object.text != "") {
- this.text = this.__object.text;
- }
- this.isOpaqueObject = true;
- // trace(" Text:" + this.text);
- // if (this.__object[o].__showContents != false) {
- // _level0.area_txt.text += " [" + this.__object[o].text + "]";
- } else if (this.__object instanceof Button) {
- this.className = "Button";
- this.target = targetPath(this.__object);
- // if (this.__object[o].__showContents != false) {
- // _level0.area_txt.text += " [" + this.__object[o].text + "]";
- this.isOpaqueObject = true;
- } else if (this.__object instanceof XML) {
- this.className = "XML";
- this.isOpaqueObject = true;
- } else if (this.__object instanceof XMLNode) {
- this.className = "XMLNode";
- this.isOpaqueObject = true;
- } else if (this.__object instanceof Array) {
- this.className = "Array";
- this.isOpaqueObject = true;
- } else if (this.__object instanceof Sound) {
- this.className = "Sound";
- this.isOpaqueObject = true;
- } else if (this.__object instanceof Video) {
- this.className = "Video";
- this.isOpaqueObject = true;
- this.target = targetPath(this.__object);
- } else if (Eclipse_ACTF_Util.classJudge(this.__object, mx.managers.DepthManager)) {
- this.className = "mx.managers.DepthManager";
- this.isOpaqueObject = true;
- } else {
- this.className = "??? Unknown";
- }
- // dtrace(" class name: " + this.className);
- this.depth = this.__object.getDepth();
- } else {
- this.value = String(eval(this.target));
- }
- this.tabIndex = this.__object.tabIndex;
- }
-
- // --------------------------------------------------------------------------------
- // SuccessorNodes. (In graph theory, we can directly reach succeros nodes from "this" node)
- // --------------------------------------------------------------------------------
-
- public function getNumberOfSuccessorNodes():Number {
- return this.getSuccessorNodesArray().length;
- }
- public function getSuccessorNodesArray():Array {
- // dtrace("Node::getSuccessorNodesArray()");
- var successors:Array = new Array();
- if (this.type != "movieclip" && this.type != "object") {
- return successors;
- } else {
- for (var child in eval(this.target)) {
- var cNode:Eclipse_ACTF_Node = new Eclipse_ACTF_Node(this.target, child);
- successors.push(cNode);
- }
- return successors;
- }
- }
-
- public static function getNumSuccessorNodes(path:String):Number {
- // dtrace("static Node::getNumSuccessorNodes()");
- var node:Eclipse_ACTF_Node = Eclipse_ACTF_Node.getNodeFromPath(path);
- if (!node) {
- return undefined;
- }
- return node.getNumberOfSuccessorNodes();
- }
-
- public static function getSuccessorNodes(path:String):Array {
- var node:Eclipse_ACTF_Node = Eclipse_ACTF_Node.getNodeFromPath(path);
- if (!node) {
- return undefined;
- }
- return node.getSuccessorNodesArray();
- }
- // --------------------------------------------------------------------------------
- // ChildNodes. (In tree theory, the child nodes has "this" parent node)
- // --------------------------------------------------------------------------------
- public function getNumberOfChildNodes():Number {
- return this.getChildNodesArray().length;
- }
- public function getChildNodesArray():Array {
- // dtrace("Node::getChildNodesArray()");
- var children:Array = new Array();
- var objNames:Object = new Object();
-
- var tp:String = targetPath(this.__object);
- // dtrace(" tp = " + tp);
- if (tp == null || tp == undefined) {
- // dtrace(" ** tp is null. abort.");
- return children;
- }
-
- // copied from getSuccessorNodesArray(). needless?
- if (this.type != "movieclip" && this.type != "object") {
- // dtrace(" ** the entity is not movieclip nor object. abort.");
- return children;
- }
-
- // Q: why do we use both targetPath and this.target?
- var i:Number = 0;
- for (var child in eval(this.target)) {
- // dtrace(" index " + (i++) + ": " + child);
- var cNode:Eclipse_ACTF_Node = new Eclipse_ACTF_Node(this.target, child);
- var cNodeTarget:String = cNode.target;
- // dtrace(" child's target: " + cNodeTarget);
- var idx:Number = cNodeTarget.lastIndexOf(".");
- if (idx < 0) {
- // dtrace(" ** this child does not have '.'. continue.");
- continue;
- }
-
- if (tp != cNodeTarget.substring(0, idx)) {
- // dtrace(" ** this child is not real child. continue.");
- continue;
- }
-
- // Remove bridge-internal objects.
- if (cNodeTarget.indexOf("__Eclipse_ACTF_") >= 0) {
- // dtrace(" ** this child is bridge-internal entity. continue.");
- continue;
- }
-
- var objName:String = cNodeTarget.substring(idx+1);
- // Eclipse_ACTF_Util.send(objName);
- if (objNames[objName] == 1){
- // Eclipse_ACTF_Util.send(" -- duplicated!");
- // dtrace(" ** duplicated child name. continue.");
- continue;
- }
- objNames[objName] = 1;
- children.push(cNode);
- }
- // dtrace("processed children.");
- return children;
- }
-
- public static function getNumChildNodes(path:String):Number {
- // dtrace("static Node::getNumChildNodes()");
- var node:Eclipse_ACTF_Node = Eclipse_ACTF_Node.getNodeFromPath(path);
- if (!node) {
- return undefined;
- }
- return node.getNumberOfChildNodes();
- }
-
- public static function getChildNodes(path:String):Array {
- var node:Eclipse_ACTF_Node = Eclipse_ACTF_Node.getNodeFromPath(path);
- if (!node) {
- return undefined;
- }
- return node.getChildNodesArray();
- }
-
- // --------------------------------------------------------------------------------
- // Ends here.
- // --------------------------------------------------------------------------------
- public static function getNodeFromPath(path:String):Eclipse_ACTF_Node {
- if (!eval(path)) {
- return undefined;
- }
- var node:Eclipse_ACTF_Node = new Eclipse_ACTF_Node(null, path);
- return node;
- }
- public static function getRootNode():Eclipse_ACTF_Node {
- var node:Eclipse_ACTF_Node = new Eclipse_ACTF_Node(null, "_level0");
- return node;
- }
- public static function isProperlyNested(x1:Number, y1:Number, w1:Number, h1:Number, x2:Number, y2:Number, w2:Number, h2:Number):Boolean {
- var l = Math.max(x1, x2);
- var r = Math.min(x1 + w1, x2 + w2);
- var t = Math.max(y1, y2);
- var b = Math.min(y1 + h1, y2 + h2);
- return (((r - l) > 0) && ((b - t) > 0));
- }
- public static function getNodeAtDepth(path:String, depth:Number):Eclipse_ACTF_Node {
- var b = eval(path);
- var o = b.getInstanceAtDepth(depth);
- if (!o) return undefined;
- var target = Eclipse_ACTF_Node.normalizeTargetName(o._target);
- return new Eclipse_ACTF_Node(null, target);
- }
- private static function cmpxy(a:Eclipse_ACTF_Node, b:Eclipse_ACTF_Node):Number {
- if (a.y > b.y) {
- return 1;
- }
- if (a.y < b.y) {
- return -1;
- }
- if (a.x > b.x) {
- return 1;
- }
- if (a.x < b.x) {
- return -1;
- }
- return 0;
- }
- public static function normalizeTargetName(target:String):String {
- if (target.charAt(0) != '/') {
- return target;
- }
- var ra:Array = target.split("/");
- var nt:String = "_level0";
- for (var i = 0; i < ra.length; i++) {
- if (ra[i].length > 0) {
- nt = nt + "." + ra[i];
- }
- }
- return nt;
- }
- public static function getInnerNodes(path:String, flag:Boolean, startBaseDepth:Boolean):Array {
- var array:Array = new Array();
- // trace("PATH:"+path);
- var b = eval(path);
- var o;
- // trace("TY:" + typeof(b));
- if (b && b.getNextHighestDepth) {
- var ds:Number, de:Number, dc:Number;
- de = b.getNextHighestDepth();
- if (de > 1000) {
- de = 1000;
- }
- // trace("IDS:" + b.getDepth() +":"+b._x+":"+b._y+":"+b._width+":" +b._height);
- // trace("IDE:" + de);
- dc = b.getDepth();
- if (startBaseDepth) {
- ds = dc + 1;
- } else {
- ds = -16383;
- // -16384(_level0.getDepth() + 1)
- }
- for (; ds < de; ds++) {
- // if (ds == dc) continue;
- o = b.getInstanceAtDepth(ds);
- if (o._target == b._target) {
- continue;
- }
- if (o && o._visible) {
- /*
- if (!b._x
- || !o._x
- || Eclipse_ACTF_Node.isProperlyNested(b._x, b._y, b._width, b._height,
- o._x, o._y, o._width, o._height)) {
- trace("ID:" + ds + ":" + o._target);
- array.push(new Eclipse_ACTF_Node(null, o._target));
- }
- */
- var target = Eclipse_ACTF_Node.normalizeTargetName(o._target);
- var o2 = eval(target);
- if (flag || (ds == 0) || (o2.getDepth() == ds)) {
- array.push(new Eclipse_ACTF_Node(null, target));
- }
- }
- }
- }
- // trace("LEN:"+array.length);
- array.sort(Eclipse_ACTF_Node.cmpxy);
- return array;
- }
-
- public static function setFocus(path:String):Boolean {
- var o = eval(path);
- return Selection.setFocus(o);
- }
-
- private static function dtrace(mes:String) {
- // if (debug) {
- if (true) {
- trace(mes);
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_RequestServer.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_RequestServer.as
deleted file mode 100644
index 581198f..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_RequestServer.as
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-class Eclipse_ACTF_RequestServer {
- private static var secret:String;
-
- private static function process(propName, oldVal, newVal, userData) {
- // dtrace("processing: " + propName + " " + oldVal + " " + newVal + " " + userData);
- if (newVal.substring(0, secret.length) == secret) {
- var args = Eclipse_ACTF_ASSerializer.deserialize(newVal.substring(secret.length));
- var name = args.shift();
- // dtrace(" calling function " + name + ": " + args[0] + " " + args[1]);
- var method:Function = Eclipse_ACTF_Init.callbacks[name];
- var retObj = method.apply(null, args);
- // dtrace(" return value [" + retObj + "]");
- _root.Eclipse_ACTF_response_value = Eclipse_ACTF_ASSerializer.serialize(retObj);
- }
- return oldVal;
- }
-
- public static function start(sec:String) {
- secret = sec;
- _root.watch("Eclipse_ACTF_request_args", Eclipse_ACTF_RequestServer.process);
- // dtrace("request server started.");
- }
-
- /*
- private static function dtrace(mes:String) {
- if (debug) {
- trace(mes);
- }
- }
- */
-}
-
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_StageProxy.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_StageProxy.as
deleted file mode 100644
index 50b9d9a..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_StageProxy.as
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-
-class Eclipse_ACTF_StageProxy {
- public static function setScaleMode(mode:String):Boolean {
- Stage.scaleMode = mode;
- return (Stage.scaleMode == mode)
- }
-
- public static function getScaleMode():String {
- return Stage.scaleMode;
- }
-
- public static function getStageWidth():Number {
- return Stage.width;
- }
-
- public static function getStageHeight():Number {
- return Stage.height;
- }
-
- public static function getStageAlign():String {
- return Stage.align;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Stream.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Stream.as
deleted file mode 100644
index d0dc8d7..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Stream.as
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-
-class Eclipse_ACTF_Stream {
- private var netStream:NetStream;
- private var sound:Sound;
- private var pos:Number;
- private var target:Object;
-
- public function equals(obj:Object):Boolean {
- return (obj === this.target);
- }
-
- public function stop() {
- if (this.netStream) {
- this.netStream.pause(true);
- this.netStream.seek(0);
- } else if (this.sound) {
- this.sound.stop();
- this.pos = 0;
- }
- }
-
- private static function searchPlayButtonInternal(o:Object,
- target:String,
- traversed:Object):Boolean {
- if (traversed[target]) return;
- traversed[target] = true;
-
- if (o instanceof XMLNode) {
- return false;
- }
-
- for (var c in o) {
- var co:Object = o[c];
- // Eclipse_ACTF_Util.send("..." + c + " " + c.toUpperCase().indexOf("PLAY"));
- if (c.toUpperCase().indexOf("PLAY") == 0) {
- if (co && co.onRelease) {
- // Eclipse_ACTF_Util.send("Try to Push:" + co);
- co.onRelease();
- return true;
- }
- }
- var cTarget:String = target + "." + c;
- if (co._target) {
- cTarget = Eclipse_ACTF_Node.normalizeTargetName(co._target);
- } else {
- co._target = cTarget;
- }
- if (searchPlayButtonInternal(co, cTarget, traversed)) return true;
- }
- return false;
- }
-
- public static function searchPlayButton() {
- var traversed:Object = new Object();
-
- for (var i = 0; i < arguments.length; i++) {
- var path:String = arguments[i];
- var o:Object = eval(path);
- searchPlayButtonInternal(o, path, traversed);
- }
- }
-
- public function play() {
- if (this.netStream) {
- // Eclipse_ACTF_Util.send("bytesLoaded:" + this.netStream.bytesLoaded);
- if (this.netStream.bytesLoaded <= 1) {
- // Eclipse_ACTF_Util.send("Search button...");
- searchPlayButton("_level0");
- }
- this.netStream.pause(false);
- } else if (this.sound) {
- this.sound.start(this.pos / 1000);
- }
- }
-
- public function pause() {
- if (this.netStream) {
- this.netStream.pause(true);
- } else {
- this.pos = this.sound.duration;
- this.sound.stop();
- }
- }
-
- public function getCurrentState() {
- // TODO
- }
-
- public function getCurrentPosition():Number {
- if (this.netStream) {
- return this.netStream.time;
- } else if (sound) {
- return this.sound.duration;
- }
- return -1;
- }
-
- public function update(src) {
- if (src instanceof NetStream) {
- this.netStream = src;
- } else if (src instanceof Sound) {
- this.sound = src;
- }
- }
-
- public function Eclipse_ACTF_Stream(tgt, src) {
- this.target = tgt;
- this.update(src);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Util.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Util.as
deleted file mode 100644
index 43f7682..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Util.as
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Shin SAITO - initial API and implementation
- *******************************************************************************/
-
-
-class Eclipse_ACTF_Util {
- public static function classJudge(o:Object, cls:Function):Boolean {
- return (o.__proto__ == cls.prototype);
- }
-
- public static function isInClass(o:Object, cls:Function):Boolean {
- o = o.__proto__;
- var clsProto = cls.prototype;
- while (o) {
- if (o == clsProto) return true;
- o = o.__proto__;
- }
- return false;
- }
-
- public static function send(mes:String) {
- // new LocalConnection().send("_testLC", "dump", mes);
- var lc:LocalConnection = new LocalConnection();
- lc.send("_testLC", "dump", mes);
- // lc.close();
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Watch.as b/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Watch.as
deleted file mode 100644
index 62050b7..0000000
--- a/plugins/org.eclipse.actf.model.flash/bridgeSWF/common/Eclipse_ACTF_Watch.as
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-import flash.external.ExternalInterface;
-
-class Eclipse_ACTF_Watch {
- private static var baseObject:Object;
- private static var origOnEnterFrame:Function;
- private static var watchLists:Object = new Object();
- private static var callback:String;
- private var path:String;
- private var ranges:Array;
- private var exists:Boolean;
- private var currentFrame:Number;
-
- private function Eclipse_ACTF_Watch(path:String) {
- this.path = path;
- this.ranges = new Array();
- var obj = eval (path);
- if (obj) {
- this.exists = true;
- this.currentFrame = obj._currentFrame;
- } else {
- this.exists = false;
- this.currentFrame = -1;
- }
- }
-
- private static function isInFrame(fn:Number, r:Object) {
- return (fn >= r.min) && (fn < r.max);
- }
-
- private static function watchEntry() {
- // origOnEnterFrame.call(baseObject);
- for (var path in watchLists) {
- var w:Eclipse_ACTF_Watch = watchLists[path];
- var call = false;
- var obj = eval (w.path);
- if (!obj == w.exists) {
- w.exists = !w.exists;
- call = true;
- } else if (obj) {
- var fn = obj._currentFrame;
- var pfn = w.currentFrame;
- w.currentFrame = fn;
- for (var i = 0; i < w.ranges.length; i++) {
- var r:Object = w.ranges[i];
- var f = Eclipse_ACTF_Watch.isInFrame(fn, r);
- var pf = Eclipse_ACTF_Watch.isInFrame(pfn, r);
- if (f != pf) {
- call = true;
- break;
- }
- }
- }
- if (call) {
- ExternalInterface.call(callback, w.path,
- w.exists, w.currentFrame);
- }
- }
- }
-
- public static function watchInit(cb:String) {
- callback = cb;
- baseObject = eval ("_level0");
- origOnEnterFrame = baseObject.onEnterFrame;
- baseObject.onEnterFrame = function() {
- Eclipse_ACTF_Watch.watchEntry();
- }
- }
-
- public static function watchObject(path:String,
- minFrame:Number,
- maxFrame:Number) {
- var w:Eclipse_ACTF_Watch = watchLists[path];
- if (!w) {
- w = new Eclipse_ACTF_Watch(path);
- watchLists[path] = w;
- }
- if ((minFrame >= 0) && (maxFrame >= 0)) {
- var r:Object = new Object();
- r.min = minFrame;
- r.max = maxFrame;
- w.ranges[w.ranges.length] = r;
- }
- }
-
- public static function removeWatchList(path:String) {
- watchLists[path] = undefined;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/build.properties b/plugins/org.eclipse.actf.model.flash/build.properties
deleted file mode 100644
index 0a63009..0000000
--- a/plugins/org.eclipse.actf.model.flash/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- logging.conf,\
- bridgeSWF/
diff --git a/plugins/org.eclipse.actf.model.flash/logging.conf b/plugins/org.eclipse.actf.model.flash/logging.conf
deleted file mode 100644
index bf04c72..0000000
--- a/plugins/org.eclipse.actf.model.flash/logging.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-handlers = java.util.logging.ConsoleHandler
-.level=FINE
-java.util.logging.ConsoleHandler.level=SEVERE
-java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
-java.util.logging.FileHandler.level=FINEST
-java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
-
-
diff --git a/plugins/org.eclipse.actf.model.flash/src/messages.properties b/plugins/org.eclipse.actf.model.flash/src/messages.properties
deleted file mode 100644
index 70367bd..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/messages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-#flash
-flash.player_ok=Flash DOM is available
-flash.player_loading=Loading... (Please retry later)
-flash.player_embed=Flash embedded by EMBED tag is not supported
-flash.player_no_dom=Flash DOM is not available
-flash.player_no_xcode=Flash DOM is not transcoded
-flash.player_unknown=Unexpected Flash item
-flash.bad_flash_version=Flash Player version {0} is currently installed.\n\nPlease install Flash Player version 8 or later.
-#debug message : no need to translate
-flash.error_target_length=Error: target level {0}
-
diff --git a/plugins/org.eclipse.actf.model.flash/src/messages_ja.properties b/plugins/org.eclipse.actf.model.flash/src/messages_ja.properties
deleted file mode 100644
index 962c47a..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/messages_ja.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-#flash
-flash.player_ok=Flash DOM\u304c\u5229\u7528\u3067\u304d\u307e\u3059
-flash.player_loading=\u30ed\u30fc\u30c9\u4e2d... (\u3042\u3068\u3067\u518d\u8a66\u884c\u3057\u3066\u304f\u3060\u3055\u3044)
-flash.player_embed=embed\u30bf\u30b0\u3092\u5229\u7528\u3057\u305fFlash\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-flash.player_no_dom=Flash DOM\u3092\u5229\u7528\u3067\u304d\u307e\u305b\u3093
-flash.player_no_xcode=Flash DOM\u304c\u5909\u63db\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-flash.player_unknown=\u4e88\u671f\u305b\u306cFlash\u9805\u76ee\u3067\u3059
-flash.bad_flash_version=Flash Player \u30d0\u30fc\u30b8\u30e7\u30f3 {0} \u304c\u73fe\u5728\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n\nFlash Player \u30d0\u30fc\u30b8\u30e7\u30f3 8 \u4ee5\u4e0a\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/ASAccInfo.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/ASAccInfo.java
deleted file mode 100644
index 501d800..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/ASAccInfo.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Takashi ITOH - initial API and implementation
- * Daisuke SATO - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash;
-
-import java.util.Set;
-
-import org.eclipse.actf.model.flash.as.ASObject;
-
-public class ASAccInfo {
-
- private ASObject accInfo;
-
- private ASAccInfo(ASObject accInfo) {
- this.accInfo = accInfo;
- }
-
- public static ASAccInfo create(ASObject target) {
- Object result = target.get(IFlashConst.ASNODE_ACCINFO);
- if (result instanceof ASObject) {
- return new ASAccInfo((ASObject) result);
- }
- return null;
- }
-
- public int getRole() {
- Object obj = accInfo.get(IFlashConst.ACCINFO_ROLE);
- if (obj instanceof Integer) {
- return (Integer) obj;
- }
- return -1;
- }
-
- public int getState() {
- Object obj = accInfo.get(IFlashConst.ACCINFO_STATE);
- if (obj instanceof Integer) {
- return (Integer) obj;
- }
- return -1;
- }
-
- public boolean isSilent() {
- Object obj = accInfo.get(IFlashConst.ACCINFO_SILENT);
- if (obj instanceof Boolean) {
- return (Boolean) obj;
- }
- return false;
- }
-
- public boolean isForceSimple() {
- Object obj = accInfo.get(IFlashConst.ACCINFO_FORCESIMPLE);
- if (obj instanceof Boolean) {
- return (Boolean) obj;
- }
- return false;
- }
-
- public String getName() {
- Object obj = accInfo.get(IFlashConst.ACCINFO_NAME);
- if (obj instanceof String) {
- return (String) obj;
- }
- return null;
- }
-
- public String getDescription() {
- Object obj = accInfo.get(IFlashConst.ACCINFO_DESCRIPTION);
- if (obj instanceof String) {
- return (String) obj;
- }
- return null;
- }
-
- public String getShortcut() {
- Object obj = accInfo.get(IFlashConst.ACCINFO_SHORTCUT);
- if (obj instanceof String) {
- return (String) obj;
- }
- return null;
- }
-
- public String getDefaultAction() {
- Object obj = accInfo.get(IFlashConst.ACCINFO_DEFAULTACTION);
- if (obj instanceof String) {
- return (String) obj;
- }
- return null;
- }
-
- public Object get(String prop) {
- return accInfo.get(prop);
- }
-
- public Set<String> getKeys() {
- return accInfo.getKeys();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- if (accInfo != null) {
- return accInfo.toString();
- } else {
- return "";
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/FlashModelPlugin.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/FlashModelPlugin.java
deleted file mode 100644
index 67be32f..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/FlashModelPlugin.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.actf.model.flash.bridge.IWaXcoding;
-import org.eclipse.actf.model.flash.bridge.impl.WaXcodingImpl;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class FlashModelPlugin extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.actf.model.flash";
-
- // The shared instance
- private static FlashModelPlugin plugin;
-
- private static final Path imposedSWFPath = new Path("bridgeSWF/imposed.swf");
- private static final Path bootloaderSWFPath = new Path("bridgeSWF/boot_loader.swf");
- private static final Path bridgeInitSWFPath = new Path("bridgeSWF/boot_bridge.swf");
-
- /**
- * The constructor
- */
- public FlashModelPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- InputStream is;
- is = tryOpenStream(imposedSWFPath);
- if (is != null) {
- getIWaXcoding().setSWFTranscodingImposedFile(is);
- }
- is = tryOpenStream(bootloaderSWFPath);
- if (is != null) {
- getIWaXcoding().setSWFBootloader(is);
- }
- is = tryOpenStream(bridgeInitSWFPath);
- if (is != null) {
- getIWaXcoding().setSWFBridgeInit(is);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static FlashModelPlugin getDefault() {
- return plugin;
- }
-
- public IWaXcoding getIWaXcoding() {
- return WaXcodingImpl.getInstance();
- }
-
- private InputStream tryOpenStream(Path path) {
- try {
- return FileLocator.openStream(getBundle(), path, false);
- } catch (IOException e) {
- return null;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/FlashPlayer.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/FlashPlayer.java
deleted file mode 100644
index a722e19..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/FlashPlayer.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Takashi ITOH - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash;
-
-import org.eclipse.actf.model.flash.internal.ASBridgeImplV8;
-import org.eclipse.actf.model.flash.internal.FlashStatusUtil;
-import org.eclipse.actf.util.win32.FlashMSAAObject;
-import org.eclipse.actf.util.win32.FlashMSAAObjectFactory;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-public class FlashPlayer implements IFlashPlayer {
-
- private IDispatch idispFlash;
-
- private FlashMSAAObject accessible;
-
- private int swfVersion = -1;
-
- private IASBridge asBrigde = null;
-
- private final boolean _isVisible;
- private boolean _isReady = false;
-
- FlashPlayer(IDispatch idisp) {
- idispFlash = idisp;
- try {
- accessible = FlashMSAAObjectFactory
- .getFlashMSAAObjectFromElement(idispFlash);
- } catch (Exception e) {
- // without UI (FlashDetect)
- _isReady = true;
- }
-
- String wmode = getWMode();
- if (null != wmode
- && (V_OPAQUE.equalsIgnoreCase(wmode) || V_TRANSPARENT
- .equalsIgnoreCase(wmode))) {
- _isVisible = false;
- } else {
- _isVisible = true;
- }
-
- }
-
- private boolean initAsBridge() {
- if (null != asBrigde) {
- return true;
- }
- asBrigde = new ASBridgeImplV8(this);
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IFlashPlayer#getAccessible()
- */
- public FlashMSAAObject getAccessible() {
- return accessible;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IFlashPlayer#isReady()
- */
- public boolean isReady() {
- if (_isReady)
- return true;
- try {
- Object r = idispFlash.get(READY_STATE);
- if (COMPLETED_READY_STATE.equals(r)) {
- _isReady = true;
- return true;
- }
- } catch (Exception e) {
- }
- return false;
- }
-
- public boolean isVisible() {
- return _isVisible;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getRootNode()
- */
- public IASNode getRootNode() {
- if (initAsBridge()) {
- return asBrigde.getRootNode();
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getNodeFromPath(java.lang.String)
- */
- public IASNode getNodeFromPath(String path) {
- if (initAsBridge()) {
- return asBrigde.getNodeFromPath(path);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getNodeAtDepthWithPath(java.lang.String,
- * int)
- */
- public IASNode getNodeAtDepthWithPath(String path, int depth) {
- if (initAsBridge()) {
- return asBrigde.getNodeAtDepthWithPath(path, depth);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#translateWithPath(java.lang.String)
- */
- public IASNode[] translateWithPath(String path) {
- if (initAsBridge()) {
- return asBrigde.translateWithPath(path);
- }
- return new IASNode[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#hasChild(org.eclipse.actf.model.flash.ASNode,
- * boolean)
- */
- public boolean hasChild(IASNode parentNode, boolean visual) {
- return hasChild(parentNode, visual, false);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#hasChild(org.eclipse.actf.model.flash.ASNode,
- * boolean, boolean)
- */
- public boolean hasChild(IASNode parentNode, boolean visual,
- boolean debugMode) {
- if (initAsBridge()) {
- return asBrigde.hasChild(parentNode, visual, debugMode);
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getChildren(org.eclipse.actf.model.flash.ASNode,
- * boolean)
- */
- public IASNode[] getChildren(IASNode parentNode, boolean visual) {
- return getChildren(parentNode, visual, false);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getChildren(org.eclipse.actf.model.flash.ASNode,
- * boolean, boolean)
- */
- public IASNode[] getChildren(IASNode parentNode, boolean visual,
- boolean debugMode) {
- if (initAsBridge()) {
- return asBrigde.getChildren(parentNode, visual, debugMode);
- }
- return new IASNode[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#searchVideo()
- */
- public IASNode[] searchVideo() {
- if (initAsBridge()) {
- return asBrigde.searchVideo();
- }
- return new IASNode[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#searchSound()
- */
- public IASNode[] searchSound() {
- if (initAsBridge()) {
- return asBrigde.searchSound();
- }
- return new IASNode[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#setMarker(java.lang.Number,
- * java.lang.Number, java.lang.Number, java.lang.Number)
- */
- public boolean setMarker(Number x, Number y, Number width, Number height) {
- if (initAsBridge()) {
- return asBrigde.setMarker(x, y, width, height);
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#setMarker(org.eclipse.actf.model.flash.IASNode)
- */
- public boolean setMarker(IASNode node) {
- if (initAsBridge()) {
- return asBrigde.setMarker(node);
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#unsetMarker()
- */
- public boolean unsetMarker() {
- if (initAsBridge()) {
- return asBrigde.unsetMarker();
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#clearAllMarkers()
- */
- public boolean clearAllMarkers() {
- if (initAsBridge()) {
- return asBrigde.clearAllMarkers();
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#setFocus(java.lang.String)
- */
- public boolean setFocus(String target) {
- if (initAsBridge()) {
- return asBrigde.setFocus(target);
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getProperty(java.lang.String,
- * java.lang.String)
- */
- public Object getProperty(String path, String prop) {
- if (initAsBridge()) {
- return asBrigde.getProperty(path, prop);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#setProperty(java.lang.String,
- * java.lang.String, java.lang.Object)
- */
- public void setProperty(String path, String prop, Object value) {
- if (initAsBridge()) {
- asBrigde.setProperty(path, prop, value);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#updateTarget()
- */
- public boolean updateTarget() {
- if (initAsBridge()) {
- return asBrigde.updateTarget();
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#repairFlash()
- */
- public void repairFlash() {
- if (initAsBridge()) {
- asBrigde.repairFlash();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#callMethod(org.eclipse.actf.model.flash.IASNode,
- * java.lang.String)
- */
- public Object callMethod(IASNode targetNode, String method) {
- if (initAsBridge()) {
- return asBrigde.callMethod(targetNode, method);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#callMethod(org.eclipse.actf.model.flash.IASNode,
- * java.lang.String, java.lang.Object[])
- */
- public Object callMethod(IASNode targetNode, String method, Object[] args) {
- if (initAsBridge()) {
- return asBrigde.callMethod(targetNode, method, args);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IFlashPlayer#getStatus()
- */
- public String getStatus() {
- return FlashStatusUtil.getStatus(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IFlashPlayer#getWMode()
- */
- public String getWMode() {
- try {
- Object objWMode = idispFlash.get(ATTR_WMODE);
- return (String) objWMode;
- } catch (Exception e) {
- return null;
- }
- }
-
- String getVariable(String name) {
- try {
- Object obj = idispFlash.invoke1(PLAYER_GET_VARIABLE, name);
- return (String) obj;
- } catch (Exception e) {
- return null;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IFlashPlayer#getPlayerProperty(java.lang.String)
- */
- public void setPlayerProperty(String propertyName, String value) {
- try {
- idispFlash.invoke(PLAYER_SET_ATTRIBUTE, new Object[] {
- propertyName, value });
- } catch (Exception e) {
- return;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IFlashPlayer#getPlayerProperty(java.lang.String)
- */
- public String getPlayerProperty(String propertyName) {
- try {
- Object obj = idispFlash.get(propertyName);
- return (String) obj;
- } catch (Exception e) {
- return null;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IFlashPlayer#getWindow()
- */
- public int getWindow() {
- FlashMSAAObject fob = FlashMSAAObjectFactory
- .getFlashMSAAObjectFromElement(idispFlash);
- return fob.getWindow();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IFlashPlayer#getDispatch()
- */
- public IDispatch getDispatch() {
- return idispFlash;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IFlashPlayer#getPlayerVersion()
- */
- public String getPlayerVersion() {
- String version = getVariable(PLAYER_VERSION);
- if (null == version) {
- IASNode versionNode = getNodeFromPath(PLAYER_VERSION);
- if (null != versionNode) {
- version = versionNode.getValue();
- }
- }
- return version;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IFlashPlayer#getSWFVersion()
- */
- public int getSWFVersion() {
- if (swfVersion == -1) {
- try {
- Object result = idispFlash.invoke0(M_GET_SWF_VERSION);
- if (result instanceof Number) {
- swfVersion = ((Number) result).intValue();
- }
- } catch (Exception e) {
- // e.printStackTrace();
- }
- }
- return swfVersion;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/FlashPlayerFactory.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/FlashPlayerFactory.java
deleted file mode 100644
index 80aed1e..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/FlashPlayerFactory.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Daisuke SATO - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash;
-
-import org.eclipse.actf.model.flash.util.FlashMSAAUtil;
-import org.eclipse.actf.util.win32.FlashMSAAObject;
-import org.eclipse.actf.util.win32.FlashMSAAObjectFactory;
-import org.eclipse.actf.util.win32.comclutch.ComService;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.actf.util.win32.comclutch.IUnknown;
-import org.eclipse.actf.util.win32.comclutch.ResourceManager;
-
-public class FlashPlayerFactory {
-
- public static IFlashPlayer getPlayerFromPtr(int ptr) {
- IUnknown accObject = ComService.newIUnknown(ResourceManager
- .newResourceManager(null), ptr, true);
- IDispatch idisp = FlashMSAAUtil.getHtmlElementFromObject(accObject);
- if (null != idisp) {
- return new FlashPlayer(idisp);
- }
- return null;
- }
-
- public static IFlashPlayer getPlayerFromWindow(int hwnd) {
- FlashMSAAObject accObject = FlashMSAAObjectFactory
- .getFlashMSAAObjectFromWindow(hwnd);
- IDispatch idisp = FlashMSAAUtil.getHtmlElementFromObject(accObject);
- if (null != idisp) {
- return new FlashPlayer(idisp);
- }
- return null;
- }
-
- public static IFlashPlayer getPlayerFromObject(FlashMSAAObject accObject) {
- IDispatch idisp = FlashMSAAUtil.getHtmlElementFromObject(accObject);
- if (null != idisp) {
- return new FlashPlayer(idisp);
- }
- return null;
- }
-
- public static IFlashPlayer getPlayerFromIDsipatch(IDispatch idisp) {
- if (null != idisp) {
- return new FlashPlayer(idisp);
- }
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IASBridge.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IASBridge.java
deleted file mode 100644
index 0d6d8e1..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IASBridge.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash;
-
-
-public interface IASBridge extends IFlashConst {
-
- public abstract Object callMethod(IASNode targetNode, String method);
-
- public abstract Object callMethod(IASNode targetNode, String method,
- Object[] args);
-
- public abstract IASNode[] getChildren(IASNode parentNode, boolean visual);
-
- public abstract IASNode[] getChildren(IASNode parentNode, boolean visual,
- boolean debugMode);
-
- public abstract IASNode getNodeAtDepthWithPath(String path, int depth);
-
- public abstract IASNode getNodeFromPath(String path);
-
- public abstract Object getProperty(String path, String prop);
-
- public abstract IASNode getRootNode();
-
- public abstract boolean hasChild(IASNode parentNode, boolean visual);
-
- public abstract boolean hasChild(IASNode parentNode, boolean visual,
- boolean debugMode);
-
- public abstract void repairFlash();
-
- public abstract IASNode[] searchSound();
-
- public abstract IASNode[] searchVideo();
-
- public abstract boolean setFocus(String target);
-
- public abstract boolean setMarker(IASNode node);
-
- public abstract boolean setMarker(Number x, Number y, Number width,
- Number height);
-
- public abstract boolean clearAllMarkers();
-
- public abstract void setProperty(String path, String prop, Object value);
-
- public abstract IASNode[] translateWithPath(String path);
-
- public abstract boolean unsetMarker();
-
- public abstract boolean updateTarget();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IASNode.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IASNode.java
deleted file mode 100644
index 2b6abfa..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IASNode.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash;
-
-import java.util.Set;
-
-public interface IASNode {
-
- public abstract String getIconType();
-
- public abstract String getType();
-
- public abstract String getClassName();
-
- public abstract String getObjectName();
-
- public abstract String getTarget();
-
- public abstract boolean isUIComponent();
-
- public abstract String getValue();
-
- public abstract String getText();
-
- public abstract String getText(boolean useAccName);
-
- public abstract String getTitle();
-
- public abstract Object getObject(String name);
-
- public abstract IASNode getParent();
-
- public abstract int getLevel();
-
- public abstract boolean hasChild(boolean visual);
-
- public abstract boolean hasChild(boolean visual, boolean debugMode);
-
- public abstract IASNode[] getChildren(boolean visual, boolean informative);
-
- public abstract IASNode[] getChildren(boolean visual, boolean informative,
- boolean debugMode);
-
- public abstract boolean setMarker();
-
- public abstract IFlashPlayer getPlayer();
-
- public abstract ASAccInfo getAccInfo();
-
- public abstract Set<String> getKeys();
-
- public abstract boolean hasOnRelease();
-
- public abstract double getX();
-
- public abstract double getY();
-
- public abstract double getWidth();
-
- public abstract double getHeight();
-
- public abstract int getId();
-
- public abstract int getDepth();
-
- public abstract int getCurrentFrame();
-
- public abstract int getTabIndex();
-
- public abstract boolean isInputable();
-
- public abstract boolean isOpaqueObject();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IFlashConst.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IFlashConst.java
deleted file mode 100644
index 2aa9a41..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IFlashConst.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash;
-
-public interface IFlashConst {
-
- // general
- public static final String CLSID_FLASH = "{D27CDB6E-AE6D-11CF-96B8-444553540000}";
- public static final int INVALID_DEPTH = -16384;
- public static final String PLAYER_VERSION = "$version";
-
- // Browser Ready State
- public static final String READY_STATE = "readyState";
- public static final Integer COMPLETED_READY_STATE = Integer.valueOf(4);
-
- // initialize
- public static final String PATH_ROOTLEVEL = "_level0"; //$NON-NLS-1$
- public static final String PATH_BRIDGELEVEL = "_level53553"; //$NON-NLS-1$
- public static final String PATH_IS_AVAILABLE = ".Eclipse_ACTF_is_available"; //$NON-NLS-1$
- public static final String PATH_CONTENT_ID = ".Eclipse_ACTF_SWF_CONTENT_ID";
-
- // other paths
- public static final String PATH_GLOBAL = "_global"; //$NON-NLS-1$
- public static final String PATH_ON_PRESS = ".onPress";
- public static final String PATH_ON_RELEASE = ".onRelease";
-
- // V8
- public static final String PROP_REQUEST_ARGS = ".Eclipse_ACTF_request_args";
- public static final String PROP_RESPONSE_VALUE = ".Eclipse_ACTF_response_value";
- public static final String PLAYER_SET_VARIABLE = "SetVariable";
- public static final String PLAYER_GET_VARIABLE = "GetVariable";
-
- // HTML node attributes
- public static final String PLAYER_SET_ATTRIBUTE = "SetAttribute";
- // public static final String PLAYER_GET_ATTRIBUTE = "GetAttribute";
- public static final String ATTR_WMODE = "WMode";
- public static final String V_TRANSPARENT = "Transparent";
- public static final String V_OPAQUE = "Opaque";
-
- // methods
- public static final String M_GET_ROOT_NODE = "getRootNode"; //$NON-NLS-1$
- public static final String M_GET_NUM_SUCCESSOR_NODES = "getNumSuccessorNodes"; //$NON-NLS-1$
- public static final String M_GET_SUCCESSOR_NODES = "getSuccessorNodes"; //$NON-NLS-1$
- public static final String M_GET_NUM_CHILD_NODES = "getNumChildNodes"; //$NON-NLS-1$
- public static final String M_GET_CHILD_NODES = "getChildNodes"; //$NON-NLS-1$
- public static final String M_GET_INNER_NODES = "getInnerNodes"; //$NON-NLS-1$
- public static final String M_NEW_MARKER = "newMarker"; //$NON-NLS-1$
- public static final String M_SET_MARKER = "setMarker"; //$NON-NLS-1$
- public static final String M_GET_NODE_FROM_PATH = "getNodeFromPath";//$NON-NLS-1$
- public static final String M_CALL_METHOD = "callMethodA"; //$NON-NLS-1$
-
- public static final String M_SET_FOCUS = "setFocus"; //$NON-NLS-1$
- public static final String M_UPDATE_TARGET = "updateTarget";
- public static final String M_REPAIR_FLASH = "repairFlash";
- public static final String M_SET_PROPERTY = "setProperty";
- public static final String M_GET_PROPERTY = "getProperty";
- public static final String M_TRANSLATE = "translate";
- public static final String M_GET_NODE_AT_DEPTH = "getNodeAtDepth";
- public static final String M_UNSET_MARKER = "unsetMarker";
- public static final String M_CLEAR_ALL_MARKERS = "clearAllMarkers";
- public static final String M_ON_ROLL_OUT = "onRollOut";
- public static final String M_ON_ROLL_OVER = "onRollOver";
- public static final String M_ON_PRESS = "onPress";
- public static final String M_ON_RELEASE = "onRelease";
-
- // methods for media control
- public static final String M_SEARCH_SOUND = "searchSound";
- public static final String M_SEARCH_VIDEO = "searchVideo";
- public static final String M_GET_CURRENT_POSITION = "getCurrentPosition";
- public static final String M_PAUSE = "pause";
- public static final String M_PLAY = "play";
- public static final String M_STOP = "stop";
- public static final String M_SET_VOLUME = "setVolume";
- public static final String M_GET_VOLUME = "getVolume";
-
- // V9
- public static final String DISPATCH_METHOD = "dispatchMethod";
- public static final String M_GET_SWF_VERSION = "getSwfVersion";
- public static final String M_GET_CONTENT_ID = "getContentId";
- // V9
-
- // ASNODE
- public static final String ASNODE_TYPE = "type"; //$NON-NLS-1$
- public static final String ASNODE_CLASS_NAME = "className"; //$NON-NLS-1$
- public static final String ASNODE_OBJECT_NAME = "objectName"; //$NON-NLS-1$
- public static final String ASNODE_TARGET = "target"; //$NON-NLS-1$
- public static final String ASNODE_VALUE = "value"; //$NON-NLS-1$
- public static final String ASNODE_TEXT = "text"; //$NON-NLS-1$
- public static final String ASNODE_TITLE = "title"; //$NON-NLS-1$
- public static final String ASNODE_X = "x"; //$NON-NLS-1$
- public static final String ASNODE_Y = "y"; //$NON-NLS-1$
- public static final String ASNODE_WIDTH = "w"; //$NON-NLS-1$
- public static final String ASNODE_HEIGHT = "h"; //$NON-NLS-1$
- public static final String ASNODE_ACCINFO = "accInfo"; //$NON-NLS-1$
- public static final String ASNODE_DEPTH = "depth"; //$NON-NLS-1$
- public static final String ASNODE_CURRENT_FRAME = "currentFrame"; //$NON-NLS-1$
- public static final String ASNODE_IS_UI_COMPONENT = "isUIComponent"; //$NON-NLS-1$
- public static final String ASNODE_IS_INPUTABLE = "isInputable"; //$NON-NLS-1$
- public static final String ASNODE_IS_OPAQUE_OBJECT = "isOpaqueObject"; //$NON-NLS-1$
- public static final String ASNODE_ID = "id"; //$NON-NLS-1$
- public static final String ASNODE_TAB_INDEX = "tabIndex"; //$NON-NLS-1$
- // ASNODE TYPE/CLASS
- public static final String ASNODE_TYPE_MOVIECLIP = "movieclip";
- public static final String ASNODE_TYPE_OBJECT = "object";
- public static final String ASNODE_TYPE_UNDEFINED = "undefined";
- public static final String ASNODE_TYPE_STRING = "string";
- public static final String ASNODE_TYPE_BOOLEAN = "boolean";
- public static final String ASNODE_TYPE_NULL = "null";
- public static final String ASNODE_TYPE_NUMBER = "number";
- public static final String ASNODE_TYPE_FUNCTION = "function";
- public static final String ASNODE_TYPE_DISPLAYOBJECT = "displayobject";
- public static final String ASNODE_CLASS_BUTTON = "Button";
- public static final String ASNODE_CLASS_ARRAY = "Array";
- public static final String ASNODE_CLASS_TEXTFIELD = "TextField";
- public static final String ASNODE_CLASS_SHAPE = "Shape";
- // ASNODE ICONTYPE
- public static final String ASNODE_ICON_ACCROLE = "accrole_";
- public static final String ASNODE_ICON_ACCPROPS = "accprops"; //$NON-NLS-1$
- public static final String ASNODE_ICON_FLASH = "flash"; //$NON-NLS-1$
- public static final String ASNODE_ICON_OTHERS = "others"; //$NON-NLS-1$
- public static final String ASNODE_ICON_TEXT = "text"; //$NON-NLS-1$
- public static final String ASNODE_ICON_VARIABLE = "variable"; //$NON-NLS-1$
- public static final String ASNODE_ICON_COMPONENT = "component";
- // ASNODE
-
- // ACCINFO
- public static final String ACCINFO_NAME = "name"; //$NON-NLS-1$
- public static final String ACCINFO_DESCRIPTION = "description"; //$NON-NLS-1$
- public static final String ACCINFO_ROLE = "role"; //$NON-NLS-1$
- public static final String ACCINFO_STATE = "state"; //$NON-NLS-1$
- public static final String ACCINFO_SILENT = "silent"; //$NON-NLS-1$
- public static final String ACCINFO_FORCESIMPLE = "forceSimple"; //$NON-NLS-1$
- public static final String ACCINFO_SHORTCUT = "shortcut"; //$NON-NLS-1$
- public static final String ACCINFO_DEFAULTACTION = "defaultAction"; //$NON-NLS-1$
- // public static final String ACCINFO_CHILDREN = "children"; //$NON-NLS-1$
- // ACCINFO
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IFlashPlayer.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IFlashPlayer.java
deleted file mode 100644
index c65cb32..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/IFlashPlayer.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash;
-
-import org.eclipse.actf.util.win32.FlashMSAAObject;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-
-public interface IFlashPlayer extends IASBridge {
-
- public abstract FlashMSAAObject getAccessible();
-
- public abstract IDispatch getDispatch();
-
- public abstract String getStatus();
-
- public abstract String getPlayerVersion();
-
- public abstract void setPlayerProperty(String propertyName, String value);
-
- public abstract String getPlayerProperty(String propertyName);
-
- public abstract int getWindow();
-
- public abstract String getWMode();
-
- public int getSWFVersion();
-
- /**
- * @return whether the HTML document that the FlashPlayer belongs to is
- * ready or not.
- */
- public abstract boolean isReady();
-
- /**
- * @return whether this Flash object is visible or not.
- * Invisible means that the Flash object is in window-less mode.
- */
- public abstract boolean isVisible();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/as/ASDeserializer.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/as/ASDeserializer.java
deleted file mode 100644
index c5fba6e..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/as/ASDeserializer.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.as;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-
-
-public class ASDeserializer {
- private static final Map<String, Object> tokenDic = new HashMap<String, Object>();
- private static final Object UNDEFINED = "undefined".intern();
- private static final Object NULL = "null".intern();
-
- static {
- tokenDic.put("true", Boolean.valueOf(true));
- tokenDic.put("false", Boolean.valueOf(false));
- tokenDic.put("undefined", UNDEFINED);
- tokenDic.put("null", NULL);
- }
-
- private int idx;
- private String str;
-
- private int skipSP() {
- while (idx < str.length()) {
- char ch = str.charAt(idx);
- switch (ch) {
- case ' ':
- case '\t':
- case '\n':
- case '\r':
- idx++;
- break;
- default:
- return idx;
- }
- }
- return -1;
-
-
- }
-
- private int getTokenEndIdx() {
- int idx2 = idx;
- while (idx2 < str.length()) {
- char ch = str.charAt(idx2);
- switch (ch) {
- case ' ':
- case '\t':
- case '\n':
- case '\r':
- case ',':
- case ':':
- case '}':
- case ']':
- return idx2;
-
- default:
- idx2++;
- }
- }
- return idx2;
- }
-
- private String deserializeString() {
- StringBuffer ret = new StringBuffer();
- idx++;
- while (idx < str.length()) {
- char ch = str.charAt(idx);
- switch (ch) {
- case '"':
- idx++;
- return ret.toString();
- case '\\':
- idx++;
- if (idx == str.length()) {
- throw new IllegalArgumentException("Abnormal end of the string:" + str);
- }
- ret.append(str.charAt(idx));
- idx++;
- break;
- default:
- ret.append(ch);
- idx++;
- }
- }
- throw new IllegalArgumentException("Invalid String:" + str);
- }
-
- private Object[] deserializeArray() {
- idx++;
- ArrayList<Object> ret = new ArrayList<Object>();
- while (idx < str.length()) {
- skipSP();
- char ch = str.charAt(idx);
- if (ch == ']') {
- idx++;
- return ret.toArray(new Object[ret.size()]);
- } else {
- ret.add(deserialize());
- }
- skipSP();
- ch = str.charAt(idx);
- if (ch == ']') {
- idx++;
- return ret.toArray(new Object[ret.size()]);
- }
- if (ch != ',') {
- throw new IllegalArgumentException("Missing ',':" + str);
- }
- idx++;
- }
- throw new IllegalArgumentException("Abnormal end of the array:" + str);
- }
-
- private ASObject deserializeASObject() {
- idx++;
- ASObject ret = new ASObject();
- while (idx < str.length()) {
- skipSP();
- char ch = str.charAt(idx);
- if (ch == '}') {
- idx++;
- return ret;
- } else {
- String prop = deserializeString();
- skipSP();
- if (str.charAt(idx) != ':') {
- throw new IllegalArgumentException("Missing ':':" + str);
- }
- idx++;
- Object o = deserialize();
- ret.put(prop, o);
- }
- skipSP();
- ch = str.charAt(idx);
- if (ch == '}') {
- idx++;
- return ret;
- }
- if (str.charAt(idx) != ',') {
- throw new IllegalArgumentException("Missing ',':" + str);
- }
- idx++;
- }
- throw new IllegalArgumentException("Abnormal end of the array:" + str);
- }
-
- public Object deserialize() {
- int r = skipSP();
- if (r < 0) return null;
- char ch = str.charAt(idx);
- switch (ch) {
- case '[':
- return deserializeArray();
- case '{':
- return deserializeASObject();
- case '"':
- return deserializeString();
- default:
- int idx2 = getTokenEndIdx();
- String tok = str.substring(idx, idx2);
- Object o = tokenDic.get(tok);
- this.idx = idx2;
- if (o == NULL) {
- return null;
- }
- if (o != null) {
- return o;
- }
- try {
- int i = Integer.parseInt(tok);
- return Integer.valueOf(i);
- } catch (NumberFormatException e) {
- }
- try {
- double d = Double.parseDouble(tok);
- return new Double(d);
- } catch (NumberFormatException e) {
- }
- throw new IllegalArgumentException(tok + " is not a valid token.");
- }
-
- }
-
- public ASDeserializer(String str) {
- this.idx = 0;
- this.str = str;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/as/ASObject.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/as/ASObject.java
deleted file mode 100644
index ca23518..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/as/ASObject.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.as;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-public class ASObject {
-
- private final Map<String, Object> map;
-
- ASObject() {
- this.map = new HashMap<String, Object>();
- }
-
- Object put(String prop, Object obj) {
- return map.put(prop, obj);
- }
-
- public Object get(String prop) {
- return map.get(prop);
- }
-
- public Set<String> getKeys() {
- return map.keySet();
- }
-
- @Override
- public String toString() {
- StringBuffer ret = new StringBuffer();
- Iterator<String> it = map.keySet().iterator();
- while (it.hasNext()) {
- String prop = it.next();
- ret.append(prop);
- ret.append(":");
- ret.append("" + map.get(prop));
- ret.append(",");
- }
- return ret.toString();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/as/ASSerializer.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/as/ASSerializer.java
deleted file mode 100644
index 6fd6726..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/as/ASSerializer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.as;
-
-
-public class ASSerializer {
- public static String serialize(String str) {
- if ((str.indexOf('"') >= 0) || (str.indexOf('\\') >= 0)) {
- StringBuffer ret = new StringBuffer('"');
- for (int i = 0; i < str.length(); i++) {
- char ch = str.charAt(i);
- switch (ch) {
- case '"':
- ret.append("\\\"");
- break;
- case '\\':
- ret.append("\\\\");
- break;
- default:
- ret.append(ch);
- }
- }
- ret.append('"');
- return ret.toString();
- } else {
- return "\"" + str + "\"";
- }
- }
-
- private static String serialize(Object a) {
- if (a instanceof String) {
- return serialize((String) a);
- } else if (a instanceof Number) {
- return a.toString();
- } else if (a instanceof Boolean) {
- return a.toString();
- } else if (a instanceof Object[]) {
- return serialize((Object[]) a);
- }
- throw new IllegalArgumentException(a + " cannot be serialized.");
- }
-
- public static String serialize(String secret, Object[] args) {
- StringBuffer ret = new StringBuffer(secret);
- ret.append('[');
- if (args.length > 0) {
- ret.append(serialize(args[0]));
- for (int i = 1; i < args.length; i++) {
- ret.append(",");
- Object a = args[i];
- ret.append(serialize(a));
- }
- }
- ret.append("]");
- return ret.toString();
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/IWaXcoding.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/IWaXcoding.java
deleted file mode 100644
index 48a3ec4..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/IWaXcoding.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA -initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.bridge;
-
-import java.io.InputStream;
-
-
-public interface IWaXcoding {
- boolean start(boolean initLogger);
- boolean stop();
-
- String getSecret(String id, boolean remove);
-
- void setPort(int port);
- int getPort();
- void setExternalProxyFlag(boolean flag);
- void setExternalProxy(String host, int port);
- void setMaxConnection(int connections);
- void setTimeout(int timeout);
- void setSWFBootloaderFlag(boolean flag);
- void setSWFBootloader(InputStream is);
- void setSWFBridgeInit(InputStream is);
- void setSWFTranscodingFlag(boolean flag);
- void setSWFTranscodingMinimumVersion(int version);
- void setSWFTranscodingImposedFile(InputStream is);
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/impl/WaXcodingConfig.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/impl/WaXcodingConfig.java
deleted file mode 100644
index 5bc19ed..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/impl/WaXcodingConfig.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash.bridge.impl;
-
-import java.io.InputStream;
-
-import org.eclipse.actf.model.flash.bridge.proxy.HTTPLocalServerSWFFactory;
-import org.eclipse.actf.model.flash.bridge.proxy.ProxyTranscoderSWF;
-import org.eclipse.actf.model.flash.bridge.proxy.SWFBootloader;
-
-public class WaXcodingConfig {
-
- private boolean swfTranscodingFlag = false;
- private int swfTranscodingMinimumVersion = 0;
- private boolean swfBootloaderFlag = true;
-
- public boolean getSWFTranscodingFlag() {
- return swfTranscodingFlag;
- }
-
- public void setSWFTranscodingFlag(boolean flag) {
- this.swfTranscodingFlag = flag;
- }
-
- public void setSWFBootloaderFlag(boolean swfBootloaderFlag) {
- this.swfBootloaderFlag = swfBootloaderFlag;
- }
-
- public boolean getSWFBootloaderFlag() {
- return swfBootloaderFlag;
- }
-
- public int getSWFTranscodingMinimumVersion() {
- return swfTranscodingMinimumVersion;
- }
-
- public void setSWFTranscodingMinimumVersion(int version) {
- this.swfTranscodingMinimumVersion = version;
- }
-
- public void setSWFTranscodingImposedFile(InputStream is) {
- ProxyTranscoderSWF.setSWFTranscodingImposedFile(is);
- }
-
- public void setSWFBootLoader(InputStream is) {
- SWFBootloader.setSWFBootLoaderFile(is);
- }
-
- public void setSWFBridgeInit(InputStream is) {
- HTTPLocalServerSWFFactory.setBridgeInitSwf(is);
- }
-
-
- private static WaXcodingConfig instance = new WaXcodingConfig();
-
- public static WaXcodingConfig getInstance() {
- return instance;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/impl/WaXcodingImpl.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/impl/WaXcodingImpl.java
deleted file mode 100644
index ae6e126..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/impl/WaXcodingImpl.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA -initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.bridge.impl;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import org.eclipse.actf.model.flash.bridge.IWaXcoding;
-import org.eclipse.actf.model.flash.bridge.proxy.HTTPLocalServerSWFFactory;
-import org.eclipse.actf.model.flash.bridge.proxy.ProxyTranscoderSWFFactory;
-import org.eclipse.actf.model.flash.bridge.proxy.SWFBootloaderFactory;
-import org.eclipse.actf.model.flash.bridge.proxy.SWFSecretManager;
-import org.eclipse.actf.util.httpproxy.ExternalProxyConfig;
-import org.eclipse.actf.util.httpproxy.HTTPProxy;
-import org.eclipse.actf.util.httpproxy.ProxyConfig;
-
-
-public class WaXcodingImpl implements IWaXcoding {
- private HTTPProxy proxy;
- private ProxyConfig proxyConfig;
- private ExternalProxyConfig exProxyConfig;
- private WaXcodingConfig waxConfig;
-
- private static final String logConfig =
- "handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler\n"
- + "java.util.logging.ConsoleHandler.level=INFO\n"
- + "java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter\n"
- + "java.util.logging.FileHandler.level=FINEST\n"
- + "java.util.logging.FileHandler.pattern=c:/waxcoding.log\n"
- + "java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter\n";
-
- public boolean start(boolean initLogger) {
- if (proxy != null) return false;
- ByteArrayInputStream is = null;
- if (initLogger) {
- is = new ByteArrayInputStream(logConfig.getBytes());
- }
-
- proxy = HTTPProxy.newProxy(proxyConfig, exProxyConfig, "WaXcoding", is);
- if (proxy == null) return false;
- proxy.startThread();
- return true;
- }
-
- public boolean stop() {
- if (proxy != null) {
- proxy.stopThread();
- proxy = null;
- }
- return true;
- }
-
- public String getSecret(String id, boolean remove) {
- return proxy.getSecret(id, remove);
- }
-
- public void setPort(int port) {
- proxyConfig.setPort(port);
- }
-
- public int getPort() {
- if (proxy != null) {
- return proxy.getListenPort();
- } else {
- return proxyConfig.getPort();
- }
- }
-
- public void setExternalProxyFlag(boolean flag) {
- exProxyConfig.setExternalProxyFlag(flag);
- }
-
- public void setExternalProxy(String host, int port) {
- exProxyConfig.setExternalProxy(host, port);
- }
-
- public void setSWFTranscodingFlag(boolean flag) {
- waxConfig.setSWFTranscodingFlag(flag);
- }
-
- public void setSWFTranscodingMinimumVersion(int version) {
- waxConfig.setSWFTranscodingMinimumVersion(version);
- }
-
- public void setSWFTranscodingImposedFile(InputStream is) {
- waxConfig.setSWFTranscodingImposedFile(is);
- }
-
- public void setMaxConnection(int connections) {
- proxyConfig.setMaxConnection(connections);
- }
-
- public void setTimeout(int timeout) {
- proxyConfig.setTimeout(timeout);
- }
-
- private WaXcodingImpl() {
- proxyConfig = new ProxyConfig();
- exProxyConfig = new ExternalProxyConfig();
- waxConfig = WaXcodingConfig.getInstance();
-
- proxyConfig.setProxyTranscoderFactory(new ProxyTranscoderSWFFactory());
- proxyConfig.setSessionOverriderFactory(new SWFBootloaderFactory());
- proxyConfig.setLocalServerFactory(new HTTPLocalServerSWFFactory());
- proxyConfig.setSecretManager(new SWFSecretManager());
- }
-
- private static final IWaXcoding instance = new WaXcodingImpl();
-
- public static IWaXcoding getInstance() {
- return instance;
- }
-
- public void setSWFBootloaderFlag(boolean flag) {
- waxConfig.setSWFBootloaderFlag(flag);
- }
-
- public void setSWFBootloader(InputStream is) {
- waxConfig.setSWFBootLoader(is);
- }
-
- public void setSWFBridgeInit(InputStream is) {
- waxConfig.setSWFBridgeInit(is);
-
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/HTTPLocalServerSWF.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/HTTPLocalServerSWF.java
deleted file mode 100644
index a543cf9..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/HTTPLocalServerSWF.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.bridge.proxy;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.HashMap;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPLocalServer;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyConnection;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyTranscoder;
-import org.eclipse.actf.util.httpproxy.proxy.ISecretManager;
-import org.eclipse.actf.util.httpproxy.util.HTTPUtil;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.ParseURI;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-public class HTTPLocalServerSWF implements IHTTPLocalServer {
- private static final boolean LOCAL_FILE_ACCESS = false;
-
- private static final int HTTP_WELL_KNOWN_PORT = 80;
- private static final byte[] MIME_TYPE_APPLICATION_XML_A = "application/xml".getBytes();
-
- private static final Logger LOGGER = Logger.getLogger(HTTPLocalServerSWF.class);
-
- static public class MIMEType {
- public final String suffix;
- public final String type;
- public final String subtype;
-
- MIMEType(String suffix, String type, String subtype) {
- this.suffix = suffix;
- this.type = type;
- this.subtype = subtype;
- }
- }
-
- private static HashMap mimeTypeMap = new HashMap();
-
- public static void addMIMEType(String suffix, String type, String subtype) {
- mimeTypeMap.put(suffix, new MIMEType(suffix, type, subtype));
- }
-
- public static MIMEType getMIMEType(String suffix) {
- return (MIMEType) mimeTypeMap.get(suffix);
- }
-
- private static byte[] bridgeInitSwf;
-
- public static void setBridgeInitSwf(InputStream is) {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- int b;
- try {
- while (true) {
- b = is.read();
- if (b < 0) break;
- os.write(b);
- }
- } catch (IOException e) {
- return;
- }
- bridgeInitSwf = os.toByteArray();
- }
-
- private IHTTPResponseMessage processBridgeInitSwf(IHTTPRequestMessage request) {
- IHTTPResponseMessage response = HTTPUtil.createHTTPResponseInMemoryMessage(request.getSerial(),
- IHTTPHeader.HTTP_VERSION_1_0_A,
- "200".getBytes(),
- "OK".getBytes(),
- bridgeInitSwf);
- response.setHeader(IHTTPHeader.CONTENT_TYPE_A,
- SWFUtil.MIME_TYPE_APPLICATION_X_SHOCKWAVE_FLASH_A);
- return response;
- }
-
-
- private IHTTPResponseMessage processLoadVarsForSwf(IHTTPRequestMessage request, ISecretManager secretManager) {
- IHTTPResponseMessage response = HTTPUtil.createHTTPResponseInMemoryMessage(request.getSerial(),
- IHTTPHeader.HTTP_VERSION_1_0_A,
- "200".getBytes(),
- "OK".getBytes(),
- secretManager.requestSecret());
- response.setHeader(IHTTPHeader.CONTENT_TYPE_A,
- SWFUtil.MIME_TYPE_APPLICATION_X_WWW_FORM_URLENCODED_A);
- return response;
- }
-
- private IHTTPResponseMessage processSwfCrossDomainPolicyFile(IHTTPRequestMessage request) {
- //int port = SwfORBFactory.getInstance().getListenPort();
- LOGGER.info("Request crossdomain.xml policy file.");
- int port = getSwfORBPort();
- /*
- String contents = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<cross-domain-policy><allow-access-from domain=\"*\" to-ports=\""
- + port + "\"/></cross-domain-policy>\n";
- */
- String contents = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<cross-domain-policy><allow-access-from domain=\"*\"/></cross-domain-policy>\n";
- IHTTPResponseMessage response = HTTPUtil.createHTTPResponseInMemoryMessage(request.getSerial(),
- IHTTPHeader.HTTP_VERSION_1_0_A,
- "200".getBytes(),
- "OK".getBytes(),
- contents.getBytes());
- response.setHeader(IHTTPHeader.CONTENT_TYPE_A, MIME_TYPE_APPLICATION_XML_A);
- return response;
- }
-
- private IHTTPResponseMessage processLocalFile(int id,
- IHTTPRequestMessage request,
- String absPath,
- IHTTPProxyTranscoder transcoder) {
- try {
- absPath = URLDecoder.decode(absPath, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- }
-
- LOGGER.info("Local Server Mode. Send:" + absPath);
-
- File f = new File(absPath);
- if (!f.canRead()) {
- return null;
- }
-
- int len = (int) f.length();
- byte[] contents = new byte[len];
- FileInputStream is = null;
- try {
- is = new FileInputStream(f);
- is.read(contents, 0, len);
- } catch (Exception e) {
- return null;
- } finally {
- try {
- if (is != null)
- is.close();
- } catch (IOException e) {
- }
- }
-
- IHTTPResponseMessage response = HTTPUtil.createHTTPResponseInMemoryMessage(request.getSerial(),
- IHTTPHeader.HTTP_VERSION_1_0_A,
- "200".getBytes(),
- "OK".getBytes(), contents);
- int dotPos = absPath.lastIndexOf(".");
- if (dotPos > 0) {
- int sPos = absPath.lastIndexOf("/");
- if (dotPos > sPos) {
- String suffix = absPath.substring(dotPos + 1);
- MIMEType mt = getMIMEType(suffix);
- if (mt != null) {
- StringBuffer sb = new StringBuffer();
- sb.append(mt.type).append('/').append(mt.subtype);
- response.setHeader(IHTTPHeader.CONTENT_TYPE_A, sb.toString().getBytes());
- }
- }
- }
-
- if (transcoder != null) {
- response = transcoder.transcode(id, request, response);
- }
- return response;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.IHTTPLocalServer#processRequest(int, org.eclipse.actf.util.httpproxy.proxy.HTTPProxyConnection, org.eclipse.actf.util.httpproxy.core.HTTPRequestMessage, org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyTranscoder)
- */
- public boolean processRequest(int id,
- IHTTPProxyConnection fClient,
- IHTTPRequestMessage request,
- IHTTPProxyTranscoder transcoder)
- throws InterruptedException, IOException {
- if (!IHTTPHeader.METHOD_GET.equals(request.getMethodAsString()))
- return false;
- String uriStr = request.getRequestURIString();
- String authority = ParseURI.getAuthority(uriStr);
- String absPath = ParseURI.getAbsolutePath(uriStr);
-
- String hostStr;
- String host;
- int port;
- if (authority != null) {
- hostStr = authority;
- } else {
- IHTTPHeader hostHeader = request.getHeader(IHTTPHeader.HOST_A);
- if (hostHeader == null)
- return false;
- hostStr = new String(hostHeader.getValue());
- }
- host = ParseURI.parseHost(hostStr);
- port = ParseURI.parsePort(hostStr, HTTP_WELL_KNOWN_PORT);
-
- IHTTPResponseMessage response = null;
- if (absPath.endsWith(SWFUtil.BRIDGE_INIT_SWF_FILENAME)) {
- response = processBridgeInitSwf(request);
- } else if (absPath.endsWith(SWFUtil.LOADVARS_PROPERTY_FILENAME)) {
- response = processLoadVarsForSwf(request, fClient.getSecretManager());
- } else {
- if (!("localhost".equals(host)))
- return false;
- if ((port == HTTP_WELL_KNOWN_PORT) && ("/crossdomain.xml".equals(absPath))) {
- response = processSwfCrossDomainPolicyFile(request);
- } else if (LOCAL_FILE_ACCESS) {
- if (port != fClient.getListenPort())
- return false;
- response = processLocalFile(id, request, absPath, transcoder);
- }
- }
- if (response == null) {
- HTTPUtil.sendFailedToClient(fClient, request);
- return true;
- }
-
- try {
- fClient.sendResponse(0, response);
- } catch (TimeoutException e) {
- LOGGER.fatal("Timeout in local server mode", e);
- }
- return true;
- }
-
- // TODO!!!!
- private int swfORBPort = -1;
-
- public int getSwfORBPort() {
- if (swfORBPort < 0)
- throw new IllegalStateException("swfORBPort is not set");
- return swfORBPort;
- }
-
- public void setSwfORBPort(int swfORBPort) {
- this.swfORBPort = swfORBPort;
- }
-
-
- public HTTPLocalServerSWF() {
- addMIMEType("html", "text", "html");
- addMIMEType("htm", "text", "html");
- addMIMEType("js", "application", "x-javascript");
- addMIMEType("swf", "application", "x-shockwave-flash");
- addMIMEType("gif", "image", "gif");
- addMIMEType("jpeg", "image", "jpeg");
- addMIMEType("jpg", "image", "jpeg");
- addMIMEType("png", "image", "png");
-
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/HTTPLocalServerSWFFactory.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/HTTPLocalServerSWFFactory.java
deleted file mode 100644
index 9b19482..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/HTTPLocalServerSWFFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash.bridge.proxy;
-
-import java.io.InputStream;
-
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPLocalServer;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPLocalServerFactory;
-
-public class HTTPLocalServerSWFFactory implements IHTTPLocalServerFactory {
-
- public static void setBridgeInitSwf(InputStream is){
- HTTPLocalServerSWF.setBridgeInitSwf(is);
- }
-
- public HTTPLocalServerSWFFactory() {
- }
-
- public IHTTPLocalServer newInstance() {
- return new HTTPLocalServerSWF();
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/ProxyTranscoderSWF.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/ProxyTranscoderSWF.java
deleted file mode 100644
index 0900699..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/ProxyTranscoderSWF.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.bridge.proxy;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PushbackInputStream;
-
-import org.eclipse.actf.model.flash.bridge.impl.WaXcodingConfig;
-import org.eclipse.actf.model.flash.transcoder.ISwfTranscoder;
-import org.eclipse.actf.model.flash.transcoder.ISwfTranscoderFactory;
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponsePushbackMessage;
-import org.eclipse.actf.util.httpproxy.core.IPushbackMessageBody;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyTranscoder;
-import org.eclipse.actf.util.httpproxy.util.HTTPUtil;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.ThrowableUtil;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-public class ProxyTranscoderSWF implements IHTTPProxyTranscoder {
- private static final Logger LOGGER = Logger.getLogger(ProxyTranscoderSWF.class);
-
- private static ISwfTranscoderFactory getSwfTranscoderFactory() {
- try {
- // TODO: maybe we should rename the factory package.
- Class clazz = Class
- .forName("org.eclipse.actf.util.swftranscoder.SwfTranscoderFactory");
- return (ISwfTranscoderFactory) clazz.newInstance();
- } catch (Exception e) {
- }
- return null;
- }
-
- private static final ISwfTranscoderFactory swfTranscoderFactory = getSwfTranscoderFactory();
-
- private final ISwfTranscoder swfTranscoder;
-
- private ProxyTranscoderSWF(int id) {
- this.swfTranscoder = swfTranscoderFactory.newInstance(id);
- }
-
- protected static ProxyTranscoderSWF newInstance(int id) {
- if (swfTranscoderFactory == null)
- return null;
- return new ProxyTranscoderSWF(id);
- }
-
- private static Object imposedSWF;
-
- public static void setSWFTranscodingImposedFile(InputStream is) {
- if (swfTranscoderFactory == null)
- return;
- ISwfTranscoder st = swfTranscoderFactory.newInstance(0);
- try {
- imposedSWF = st.parse(is);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- private File getTemporaryDestSWF(File src) throws IOException {
- return new File(src.getAbsolutePath() + ".out");
- }
-
- private File getTemporarySrcSWF() throws IOException {
- return File.createTempFile("SWFTC-", ".swf");
- }
-
- private boolean isTranscodeTarget(int id, IHTTPRequestMessage request,
- IHTTPResponsePushbackMessage response) {
- if (request.getHeader(SWFUtil.X_FLASH_VERSION_A) == null)
- return false;
- if (!SWFUtil.isPossiblySWFContentType(response))
- return false;
-
- IPushbackMessageBody body = response.getPushbackMessageBody();
- if (body == null)
- return false;
- PushbackInputStream bodyInputStream = body
- .getMessageBodyPushBackInputStream();
- int version = SWFUtil.isSWF(bodyInputStream);
- //
- if (version >= WaXcodingConfig.getInstance()
- .getSWFTranscodingMinimumVersion()) {
- LOGGER.info("[id:" + id + "] SWTTranscoder: SWF to be transcoded ("
- + request.getOriginalRequestURIString() + ")- Version:"
- + version);
- return true;
- } else {
- if (version > 0)
- LOGGER.info("[id:" + id
- + "] SWTTranscoder: SWF not to be transcoded ("
- + request.getOriginalRequestURIString() + ")- Version:"
- + version);
- return false;
- }
- }
-
- private void outputFailureLog(StringBuffer buf, IHTTPRequestMessage request,
- File outFile, Throwable e) {
- buf.append("(");
- buf.append(request.getOriginalRequestURIString());
- buf.append(")\n");
- buf.append(ThrowableUtil.stackTraceToString(e));
- if (LOGGER.isDebugEnabled() && (outFile != null)) {
- buf.append("The SWF file is secured in ");
- buf.append(outFile.getAbsolutePath());
- buf.append("\n");
- }
- LOGGER.fatal(buf.toString());
- }
-
- private File saveSWFFile(File f, byte[] target) throws IOException {
- FileOutputStream os = null;
- try {
- os = new FileOutputStream(f);
- os.write(target);
- return f;
- } finally {
- if (os != null) {
- os.close();
- }
- }
- }
-
- public IHTTPResponseMessage transcode(int id, IHTTPRequestMessage request,
- IHTTPResponseMessage response) {
- if (!WaXcodingConfig.getInstance().getSWFTranscodingFlag())
- return response;
- if (imposedSWF == null)
- return response;
- IHTTPResponsePushbackMessage newResponse = HTTPUtil.createHTTPResponsePushbackMessage(
- response, SWFUtil.FLASH_MAGIC_NUMBER_SIZE);
-
- if (!isTranscodeTarget(id, request, newResponse))
- return newResponse;
-
- byte[] transcoded;
- File srcSWFFile = null;
- File destSWFFile = null;
- try {
- srcSWFFile = getTemporarySrcSWF();
- byte[] targetBytes;
- try {
- targetBytes = newResponse.readBody(0, false);
- } catch (TimeoutException e) {
- LOGGER.fatal("[id:" + id
- + "] Message body cannot be read by timeout.");
- // This should be integrated with sendGatewayTimeout...
- return HTTPUtil.createHTTPResponseInMemoryMessage(request.getSerial(),
- IHTTPHeader.HTTP_VERSION_1_0_A, "504".getBytes(),
- "Gateway Timeout".getBytes(),
- IHTTPResponseMessage.EMPTY_BODY);
- }
- if (targetBytes == null)
- return response;
-
- if (LOGGER.isDebugEnabled()) {
- saveSWFFile(srcSWFFile, targetBytes);
- }
- Object srcSwf = swfTranscoder.parse(new ByteArrayInputStream(
- targetBytes));
- Object destSwf = swfTranscoder.impose(imposedSWF, srcSwf);
- transcoded = swfTranscoder.generate(destSwf, false, 8);
-
- destSWFFile = getTemporaryDestSWF(srcSWFFile);
- if (LOGGER.isDebugEnabled()) {
- saveSWFFile(destSWFFile, transcoded);
- }
- } catch (IOException e) {
- e.printStackTrace();
- return response;
- } catch (Exception e) {
- StringBuffer buf = new StringBuffer("SWF transcoding failed ");
- outputFailureLog(buf, request, srcSWFFile, e);
- return response;
- }
-
- IHTTPResponseMessage msg = HTTPUtil.createHTTPResponseInMemoryMessage(
- response, transcoded);
- return msg;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/ProxyTranscoderSWFFactory.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/ProxyTranscoderSWFFactory.java
deleted file mode 100644
index a087ba9..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/ProxyTranscoderSWFFactory.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash.bridge.proxy;
-
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyTranscoder;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyTranscoderFactory;
-
-
-public class ProxyTranscoderSWFFactory implements IHTTPProxyTranscoderFactory {
-
- public ProxyTranscoderSWFFactory() {
- }
-
- public IHTTPProxyTranscoder newInstance(int id) {
- return ProxyTranscoderSWF.newInstance(id);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFBootloader.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFBootloader.java
deleted file mode 100644
index 727f27f..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFBootloader.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.bridge.proxy;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PushbackInputStream;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.actf.model.flash.bridge.impl.WaXcodingConfig;
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponsePushbackMessage;
-import org.eclipse.actf.util.httpproxy.core.IPushbackMessageBody;
-import org.eclipse.actf.util.httpproxy.proxy.IClientStateManager;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverrider;
-import org.eclipse.actf.util.httpproxy.util.CacheMap;
-import org.eclipse.actf.util.httpproxy.util.HTTPUtil;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.ParseURI;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-public class SWFBootloader implements IHTTPSessionOverrider {
- private static final Logger LOGGER = Logger.getLogger(SWFBootloader.class);
-
- private static byte[] bootLoaderSWF;
-
- private boolean replacedFlag;
- private boolean bootloaderRequestingFlag;
-
- private IHTTPRequestMessage sessionRequest;
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverrider#getSessionRequest()
- */
- public IHTTPRequestMessage getSessionRequest() {
- return sessionRequest;
- }
-
- private IHTTPResponseMessage sessionResponse;
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverrider#getSessionResponse()
- */
- public IHTTPResponseMessage getSessionResponse() {
- return sessionResponse;
- }
-
- private final int id;
-
- public SWFBootloader(int id) {
- this.id = id;
- }
-
- public static void setSWFBootLoaderFile(InputStream is) {
- try {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- int b;
- try {
- while (true) {
- b = is.read();
- if (b < 0) break;
- os.write(b);
- }
- } catch (IOException e) {
- return;
- }
- bootLoaderSWF = os.toByteArray();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- private static class CachedSlot {
- public final String uri;
- public IHTTPRequestMessage request;
- public IHTTPResponseMessage response;
- CachedSlot(String uri) {
- this.uri = uri;
- }
- }
-
- private CachedSlot sessionCachedSlot;
-
- private static final int MAX_REFERER_LENGTH = 128;
-
- private Object getCachedObject(IClientStateManager csm, String uri) {
- CacheMap map = (CacheMap) csm.get(SWFBootloader.class);
- if (map == null) {
- map = new CacheMap(128, 20);
- csm.put(SWFBootloader.class, map);
- }
- if (uri.length() > MAX_REFERER_LENGTH) {
- synchronized (map) {
- return map.matchStartsWith(uri);
- }
- } else {
- synchronized (map) {
- return map.get(uri);
- }
- }
- }
-
- private void cacheObject(IClientStateManager csm, String uri, Object cobj) {
- Map map = (Map) csm.get(SWFBootloader.class);
- if (map == null) {
- map = new HashMap();
- csm.put(SWFBootloader.class, map);
- }
- synchronized (map) {
- map.put(uri, cobj);
- }
- }
-
- private static IHTTPResponseMessage bootloaderResponseMessage(IHTTPRequestMessage request) {
- IHTTPResponseMessage msg = HTTPUtil.createHTTPResponseInMemoryMessage(request.getSerial(),
- IHTTPHeader.HTTP_VERSION_1_0_A,
- "200".getBytes(),
- "OK".getBytes(),
- bootLoaderSWF);
- msg.setHeader(IHTTPHeader.CACHE_CONTROL_A, "must-revalidate".getBytes());
- msg.setHeader(IHTTPHeader.CONTENT_TYPE_A, SWFUtil.MIME_TYPE_APPLICATION_X_SHOCKWAVE_FLASH_A);
- return msg;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverrider#replaceRequest(org.eclipse.actf.util.httpproxy.proxy.ClientStateManager, org.eclipse.actf.util.httpproxy.core.HTTPRequestMessage)
- */
- public boolean replaceRequest(IClientStateManager csm,
- IHTTPRequestMessage request)
- throws IOException {
- replacedFlag = false;
- if (!WaXcodingConfig.getInstance().getSWFBootloaderFlag()) return false;
- if (request.getHeader(SWFUtil.X_FLASH_VERSION_A) == null) return false;
-
- String uriStr = request.getRequestURIString();
- String method = request.getMethodAsString();
- Object cobj = getCachedObject(csm, uriStr);
- if (LOGGER.isDebugEnabled()) {
- StringBuffer buf = new StringBuffer("method:");
- buf.append(method);
- buf.append(' ');
- buf.append(uriStr);
- List l = request.getHeaders();
- Iterator it = l.iterator();
- while (it.hasNext()) {
- IHTTPHeader h = (IHTTPHeader) it.next();
- if (!h.isRemoved()) {
- buf.append(h.toString());
- buf.append('\n');
- }
- }
- DEBUG(buf.toString());
- }
-
- if (IHTTPHeader.METHOD_POST.equals(method)) {
- if (cobj instanceof CachedSlot) {
- ByteArrayOutputStream ob = new ByteArrayOutputStream();
- try {
- request.write(0, ob);
- } catch (TimeoutException e) {
- }
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Bootloader's POST command:" + new String(ob.toByteArray()));
- }
- INFO("bootloader requests the original SWF:" + uriStr);
- this.replacedFlag = true;
- this.bootloaderRequestingFlag = true;
- this.sessionCachedSlot = (CachedSlot) cobj;
- this.sessionRequest = sessionCachedSlot.request;
- this.sessionRequest.removeHeader("If-Modified-Since".getBytes());
- this.sessionResponse = sessionCachedSlot.response;
- return true;
- }
- }
-
- IHTTPHeader referer = request.getHeader(IHTTPHeader.REFERER_A);
- if (referer != null) {
- String refStrBase;
- String uriStrBase;
-
- if (false) {
- refStrBase = ParseURI.eliminateQuery(new String(referer.getValue()).trim());
- uriStrBase = ParseURI.eliminateQuery(uriStr);
- System.err.println("R: " + refStrBase);
- System.err.println("U: " + uriStrBase);
- } else {
- refStrBase = new String(referer.getValue()).trim();
- uriStrBase = uriStr;
- }
-
- Object o = getCachedObject(csm, refStrBase);
- if (o != null) {
- INFO(uriStrBase + " seems to be referred by " + refStrBase);
- if (cobj == null) {
- cacheObject(csm, uriStrBase, Boolean.valueOf(true));
- }
- return false;
- }
- }
-
- // send bootloader swf
-
- CachedSlot cs;
- if (cobj instanceof CachedSlot){
- cs = (CachedSlot) cobj;
- } else {
- cs = new CachedSlot(uriStr);
- if (false) {
- cacheObject(csm, ParseURI.eliminateQuery(uriStr), cs);
- } else {
- cacheObject(csm, uriStr, cs);
- }
- }
- cs.request = request;
- /*
- INFO("bootloader is used for " + uriStr);
- HTTPResponseMessage msg = bootloaderResponseMessage(request);
- this.sessionResponse = msg;
- */
- this.replacedFlag = true;
- this.bootloaderRequestingFlag = false;
- this.sessionCachedSlot = cs;
- this.sessionRequest = request;
- this.sessionRequest.removeHeader(IHTTPHeader.IF_MODIFIED_SINCE_A);
- this.sessionRequest.removeHeader(IHTTPHeader.ACCEPT_ENCODING_A);
- this.sessionResponse = null;
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverrider#replaceResponse(org.eclipse.actf.util.httpproxy.proxy.ClientStateManager, org.eclipse.actf.util.httpproxy.core.HTTPRequestMessage, org.eclipse.actf.util.httpproxy.core.HTTPResponseMessage, int)
- */
- public boolean replaceResponse(IClientStateManager csm,
- IHTTPRequestMessage request,
- IHTTPResponseMessage response,
- int timeout) throws IOException, TimeoutException {
- if (!replacedFlag) return false;
-
- if (bootloaderRequestingFlag) {
- if (response != sessionCachedSlot.response) {
- response.setHeader(IHTTPHeader.CACHE_CONTROL_A, "no-cache".getBytes());
- }
- this.sessionResponse = response;
- return true;
- } else {
- if (!SWFUtil.isPossiblySWFContentType(response)) return false;
- IHTTPResponsePushbackMessage newResponse = HTTPUtil.createHTTPResponsePushbackMessage(response,
- SWFUtil.FLASH_MAGIC_NUMBER_SIZE);
-
- IPushbackMessageBody body = newResponse.getPushbackMessageBody();
- if (body == null) return false;
- PushbackInputStream bodyInputStream = body.getMessageBodyPushBackInputStream();
- int version = SWFUtil.isSWF(bodyInputStream);
- INFO("The incoming SWF is version " + version);
- String uriStr = request.getRequestURIString();
- if ((version >= WaXcodingConfig.getInstance().getSWFTranscodingMinimumVersion())
- // Flash Version 9 or later is not supported yet.
- && (version < 9)) {
- INFO("bootloader is used for " + uriStr);
- IHTTPResponseMessage msg = bootloaderResponseMessage(request);
- this.sessionResponse = msg;
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- newResponse.writeBody(timeout, body, os);
- IHTTPResponseMessage cachedResponse = HTTPUtil.createHTTPResponseInMemoryMessage(response,
- os.toByteArray());
- cachedResponse.setHeader(IHTTPHeader.CACHE_CONTROL_A, "no-cache,must-revalidate".getBytes());
- cachedResponse.setHeader(IHTTPHeader.PRAGMA_A, "no-cache".getBytes());
- cachedResponse.setHeader(IHTTPHeader.EXPIRES_A, "-1".getBytes());
-
- INFO("The original response is cached for later use.");
- if (LOGGER.isDebugEnabled()) {
- StringBuffer buf = new StringBuffer("CachedMessage: ");
- List l = cachedResponse.getHeaders();
- Iterator it = l.iterator();
- while (it.hasNext()) {
- IHTTPHeader h = (IHTTPHeader) it.next();
- if (!h.isRemoved()) {
- buf.append(h.toString());
- buf.append('\n');
- }
- }
- DEBUG(buf.toString());
- }
- sessionCachedSlot.response = cachedResponse;
- return true;
- } else {
- INFO("Due to the unsupported version, the bootloader is not applied to " + uriStr);
- this.sessionResponse = newResponse;
- return true;
- }
- }
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("[id:").append(id).append("] SWFBootloader");
- return sb.toString();
- }
-
- private final void INFO(String msg) {
-// StringBuffer sb = new StringBuffer();
-// sb.append(this.toString()).append(": ").append(msg);
-// LOGGER.info(sb.toString());
- LOGGER.info(msg);
- }
-
- private final void DEBUG(String msg) {
-// StringBuffer sb = new StringBuffer();
-// sb.append(this.toString()).append(": ").append(msg);
-// LOGGER.debug(sb.toString());
- LOGGER.debug(msg);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFBootloaderFactory.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFBootloaderFactory.java
deleted file mode 100644
index c77c653..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFBootloaderFactory.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash.bridge.proxy;
-
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverrider;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverriderFactory;
-
-public class SWFBootloaderFactory implements IHTTPSessionOverriderFactory {
-
- public SWFBootloaderFactory() {
- }
-
- public IHTTPSessionOverrider newInstance(int id) {
- return new SWFBootloader(id);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFSecretManager.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFSecretManager.java
deleted file mode 100644
index 76181a5..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFSecretManager.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.actf.model.flash.bridge.proxy;
-
-import java.security.SecureRandom;
-import java.util.Map;
-
-import org.eclipse.actf.util.httpproxy.proxy.ISecretManager;
-import org.eclipse.actf.util.httpproxy.util.CacheMap;
-
-
-public class SWFSecretManager implements ISecretManager {
- private Map secrets = new CacheMap(256, 20);
- private SecureRandom random;
- private static final int SECRET_LENGTH = 20;
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.ISecretManager#getSecret(java.lang.String, boolean)
- */
- public synchronized String getSecret(String id, boolean remove) {
- String secret = (String) secrets.get(id);
- if (remove && (secret != null)) {
- secrets.remove(id);
- }
- return secret;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.ISecretManager#requestSecret()
- */
- public byte[] requestSecret() {
- byte[] secretBytes = new byte[SECRET_LENGTH * 2];
- random.nextBytes(secretBytes);
- StringBuffer buf = new StringBuffer("contentid=");
- StringBuffer buf2 = new StringBuffer();
- int i;
- for (i = 0; i < SECRET_LENGTH; i++) {
- byte b = secretBytes[i];
- buf2.append(b % 100);
- }
- String id = buf2.toString();
- buf.append(buf2);
- buf2.setLength(0);
- buf.append("&secret=");
- for (; i < SECRET_LENGTH * 2; i++) {
- byte b = secretBytes[i];
- buf2.append(b % 100);
- }
- buf.append(buf2);
- buf.append("&end=term");
- buf.append('\r');
- buf.append('\n');
- String secret = buf2.toString();
- synchronized (this) {
- secrets.put(id, secret);
- }
- return buf.toString().getBytes();
- }
-
- public SWFSecretManager() {
- this.random = new SecureRandom();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFUtil.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFUtil.java
deleted file mode 100644
index 8767b50..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/bridge/proxy/SWFUtil.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.bridge.proxy;
-
-import java.io.IOException;
-import java.io.PushbackInputStream;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-
-
-
-
-public class SWFUtil {
- // private final byte[] CT_SHOCKWAVE_FLASH =
- // "application/x-shockwave-flash".getBytes();
- static private final byte[] CT_IMAGE = "image".getBytes();
- static private final byte[] CT_VIDEO = "video".getBytes();
-
- static public final byte[] X_FLASH_VERSION_A = "x-flash-version".getBytes();
- static public final byte[] MIME_TYPE_APPLICATION_X_SHOCKWAVE_FLASH_A = "application/x-shockwave-flash".getBytes();
- static public final byte[] MIME_TYPE_APPLICATION_X_WWW_FORM_URLENCODED_A = "application/x-www-form-urlencoded".getBytes();
-
- public static final String BRIDGE_INIT_SWF_FILENAME = "Eclipse-ACTF-SWF-Initialize-Bridge-Package-1082017309130187472.swf";
- public static final String LOADVARS_PROPERTY_FILENAME = "Eclipse-ACTF-SWF-LoadVars-1082017309130187472.txt";
-
- static public final int FLASH_MAGIC_NUMBER_SIZE = 4;
-
- public static boolean isContentTypeEqual(byte[] ct, byte[] type) {
- if (ct.length < type.length)
- return false;
- int i;
- for (i = 0; i < type.length; i++) {
- if (ct[i] != type[i])
- return false;
- }
- if ((ct[i] == '/') || (ct.length == type.length))
- return true;
- return false;
- }
-
- public static boolean isPossiblySWFContentType(IHTTPResponseMessage response) {
- IHTTPHeader contentTypeH = response.getHeader(IHTTPHeader.CONTENT_TYPE_A);
- if (contentTypeH != null) {
- byte[] ct = contentTypeH.getValue();
- if (isContentTypeEqual(ct, CT_IMAGE)) return false;
- if (isContentTypeEqual(ct, CT_VIDEO)) return false;
- }
- return true;
- }
-
- static public int isSWF(PushbackInputStream pbis) {
- try {
- byte[] magicNumber = new byte[FLASH_MAGIC_NUMBER_SIZE];
- int returnValue = -1;
- int size = pbis.read(magicNumber);
- if (size < FLASH_MAGIC_NUMBER_SIZE) {
- pbis.unread(magicNumber, 0, size);
- return -1;
- }
- if (((magicNumber[0] == 'C') || (magicNumber[0] == 'F'))
- && (magicNumber[1] == 'W')
- && (magicNumber[2] == 'S')) {
- returnValue = magicNumber[3];
- }
- pbis.unread(magicNumber);
- return returnValue;
- } catch (IOException e) {
- e.printStackTrace();
- return -1;
- }
- }
-}
-
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/ASBridgeImplV8.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/ASBridgeImplV8.java
deleted file mode 100644
index 65e49bc..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/ASBridgeImplV8.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.actf.model.flash.FlashModelPlugin;
-import org.eclipse.actf.model.flash.IASBridge;
-import org.eclipse.actf.model.flash.IASNode;
-import org.eclipse.actf.model.flash.IFlashPlayer;
-import org.eclipse.actf.model.flash.as.ASDeserializer;
-import org.eclipse.actf.model.flash.as.ASObject;
-import org.eclipse.actf.model.flash.as.ASSerializer;
-import org.eclipse.actf.model.flash.bridge.IWaXcoding;
-import org.eclipse.actf.util.win32.comclutch.DispatchException;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.swt.widgets.Display;
-
-public class ASBridgeImplV8 implements IASBridge {
-
- private IFlashPlayer flashPlayer;
- private IDispatch idispFlash;
-
- private Object objMarker;
-
- private String requestArgsPath;
- private String responseValuePath;
- private String contentIdPath;
- private String secret = null;
-
- private boolean _isRepaired = false;
-
- public ASBridgeImplV8(IFlashPlayer flashPlayer) {
- this.flashPlayer = flashPlayer;
- idispFlash = flashPlayer.getDispatch();
-
- String rootPath = "";
- if ("true".equals(getVariable(PATH_ROOTLEVEL + PATH_IS_AVAILABLE))) { //$NON-NLS-1$ //$NON-NLS-2$
- rootPath = PATH_ROOTLEVEL;
- } else if ("true".equals(getVariable(PATH_BRIDGELEVEL + PATH_IS_AVAILABLE))) { //$NON-NLS-1$ //$NON-NLS-2$
- rootPath = PATH_BRIDGELEVEL;
- }
-
- this.requestArgsPath = rootPath + PROP_REQUEST_ARGS;
- this.responseValuePath = rootPath + PROP_RESPONSE_VALUE;
- this.contentIdPath = rootPath + PATH_CONTENT_ID;
- }
-
- private String getVariable(String name) {
- try {
- Object obj = idispFlash.invoke1(PLAYER_GET_VARIABLE, name);
- return (String) obj;
- } catch (Exception e) {
- return null;
- }
- }
-
- private void setVariable(String name, String value) {
- try {
- idispFlash
- .invoke(PLAYER_SET_VARIABLE, new Object[] { name, value });
- } catch (Exception e) {
- }
- }
-
- private boolean initSecret() {
- if (null != secret) {
- return true;
- }
- try {
- String id = getVariable(contentIdPath);
- if (null == id || id.length() == 0)
- return false;
- IWaXcoding waxcoding = FlashModelPlugin.getDefault()
- .getIWaXcoding();
- secret = waxcoding.getSecret(id, false);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return (null != secret);
- }
-
- private Object invoke(String method) {
- return invoke(new Object[] { method });
- }
-
- private Object invoke(String method, Object arg1) {
- return invoke(new Object[] { method, arg1 });
- }
-
- private Object invoke(Object[] args) {
- int counter = 0;
- try {
- if (!initSecret()) {
- return null;
- }
- setVariable(responseValuePath, ""); //$NON-NLS-1$
- String argsStr = ASSerializer.serialize(secret, args);
- setVariable(requestArgsPath, argsStr);
- long endTime = System.currentTimeMillis() + 100;
- while (endTime > System.currentTimeMillis()) {
- counter++;
- String value = getVariable(responseValuePath);
- if (null != value && value.length() > 0) {
- ASDeserializer asd = new ASDeserializer(value);
- return asd.deserialize();
- }
- Display.getCurrent().readAndDispatch();
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- if (counter != 1) {
- System.out.println("FlashPlayer: " + counter);
- for (int i = 0; i < args.length; i++) {
- System.out.println(" args[" + i + "]=" + args[i]); //$NON-NLS-1$
- //$NON-NLS-2$
- }
- }
- }
- return null;
- }
-
- private ASNodeImplV8[] createFlashNodeArray(Object object,
- IASNode parentNode) {
- List<ASNodeImplV8> children = new ArrayList<ASNodeImplV8>();
- if (object instanceof Object[]) {
- Object[] objChildren = (Object[]) object;
- for (int i = 0; i < objChildren.length; i++) {
- if (objChildren[i] instanceof ASObject) {
- children.add(new ASNodeImplV8(parentNode, flashPlayer,
- (ASObject) objChildren[i]));
- }
- }
- }
- return children.toArray(new ASNodeImplV8[children.size()]);
-
- }
-
- private void initMarker() {
- if (objMarker != null)
- return;
- Object result = invoke(M_NEW_MARKER);
- if (result instanceof Integer) {
- objMarker = (Integer) result;
- return;
- }
- objMarker = null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#callMethod(org.eclipse.actf.model.flash.IASNode,
- * java.lang.String)
- */
- public Object callMethod(IASNode targetNode, String method) {
- return invoke(new Object[] { M_CALL_METHOD, targetNode.getTarget(),
- method });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#callMethod(org.eclipse.actf.model.flash.IASNode,
- * java.lang.String, java.lang.Object[])
- */
- public Object callMethod(IASNode targetNode, String method, Object[] args) {
- if (null == args) {
- args = new Object[0];
- }
- Object[] a = new Object[args.length + 3];
- a[0] = M_CALL_METHOD;
- a[1] = targetNode.getTarget();
- a[2] = method;
- System.arraycopy(args, 0, a, 3, args.length);
- return invoke(a);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getChildren(org.eclipse.actf.model.flash.ASNode,
- * boolean)
- */
- public IASNode[] getChildren(IASNode parentNode, boolean visual) {
- return getChildren(parentNode, visual, false);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getChildren(org.eclipse.actf.model.flash.ASNode,
- * boolean, boolean)
- */
- public IASNode[] getChildren(IASNode parentNode, boolean visual,
- boolean debugMode) {
- String sidMethod;
- if (visual) {
- sidMethod = M_GET_INNER_NODES;
- } else {
- sidMethod = debugMode ? M_GET_SUCCESSOR_NODES : M_GET_CHILD_NODES;
- }
- return createFlashNodeArray(invoke(sidMethod, parentNode.getTarget()),
- parentNode);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getNodeAtDepthWithPath(java.lang.String,
- * int)
- */
- public IASNode getNodeAtDepthWithPath(String path, int depth) {
- Object result = invoke(new Object[] { M_GET_NODE_AT_DEPTH, path,
- Integer.valueOf(depth) });
- if (result instanceof ASObject) {
- return new ASNodeImplV8(null, flashPlayer, (ASObject) result);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getNodeFromPath(java.lang.String)
- */
- public IASNode getNodeFromPath(String path) {
- Object result = invoke(M_GET_NODE_FROM_PATH, path);
- if (result instanceof ASObject) {
- return new ASNodeImplV8(null, flashPlayer, (ASObject) result);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getProperty(java.lang.String,
- * java.lang.String)
- */
- public Object getProperty(String path, String prop) {
- return invoke(new Object[] { M_GET_PROPERTY, path, prop });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#getRootNode()
- */
- public IASNode getRootNode() {
- Object result = invoke(M_GET_ROOT_NODE);
- if (result instanceof ASObject) {
- return new ASNodeImplV8(null, flashPlayer, (ASObject) result);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#hasChild(org.eclipse.actf.model.flash.ASNode,
- * boolean)
- */
- public boolean hasChild(IASNode parentNode, boolean visual) {
- return hasChild(parentNode, visual, false);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#hasChild(org.eclipse.actf.model.flash.ASNode,
- * boolean, boolean)
- */
- public boolean hasChild(IASNode parentNode, boolean visual,
- boolean debugMode) {
- if (visual) {
- return true;
- }
- String sidMethod;
- if (visual) {
- sidMethod = M_GET_NUM_SUCCESSOR_NODES;
- } else {
- sidMethod = debugMode ? M_GET_NUM_SUCCESSOR_NODES
- : M_GET_NUM_CHILD_NODES;
- }
- Object result = invoke(sidMethod, parentNode.getTarget());
- if (result instanceof Integer) {
- return ((Integer) result).intValue() > 0;
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#repairFlash()
- */
- public void repairFlash() {
- if (!_isRepaired) {
- _isRepaired = true;
- invoke(M_REPAIR_FLASH, PATH_ROOTLEVEL);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#searchSound()
- */
- public IASNode[] searchSound() {
- return createFlashNodeArray(invoke(new Object[] { M_SEARCH_SOUND,
- PATH_ROOTLEVEL, PATH_GLOBAL }), null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#searchVideo()
- */
- public IASNode[] searchVideo() {
- return createFlashNodeArray(invoke(new Object[] { M_SEARCH_VIDEO,
- PATH_ROOTLEVEL, PATH_GLOBAL }), null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#setFocus(java.lang.String)
- */
- public boolean setFocus(String target) {
- Object result = invoke(M_SET_FOCUS, target);
- if (result instanceof Boolean) {
- return ((Boolean) result).booleanValue();
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#setMarker(java.lang.Number,
- * java.lang.Number, java.lang.Number, java.lang.Number)
- */
- public boolean setMarker(Number x, Number y, Number width, Number height) {
- unsetMarker();
- if (null != x && null != y && null != width && null != height) {
- initMarker();
- if (null != objMarker) {
- invoke(new Object[] { M_SET_MARKER, objMarker, x, y, width,
- height });
- return true;
- }
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#setMarker(org.eclipse.actf.model.flash.IASNode)
- */
- public boolean setMarker(IASNode node) {
- return setMarker(node.getX(), node.getY(), node.getWidth(), node
- .getHeight());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#setProperty(java.lang.String,
- * java.lang.String, java.lang.Object)
- */
- public void setProperty(String path, String prop, Object value) {
- invoke(new Object[] { M_SET_PROPERTY, path, prop, value });
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#translateWithPath(java.lang.String)
- */
- public IASNode[] translateWithPath(String path) {
- Object result = null;
- try {
- result = invoke(M_TRANSLATE, path);
- } catch (DispatchException e) {
- }
- return createFlashNodeArray(result, null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#unsetMarker()
- */
- public boolean unsetMarker() {
- if (objMarker == null)
- return false;
- invoke(M_UNSET_MARKER, objMarker);
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASBridge#updateTarget()
- */
- public boolean updateTarget() {
- Object result = invoke(new Object[] { M_UPDATE_TARGET, PATH_ROOTLEVEL,
- 10 });
- return ((result instanceof Boolean) && (((Boolean) result)
- .booleanValue()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.flash.IASBridge#clearAllMarkers()
- */
- public boolean clearAllMarkers() {
- invoke(M_CLEAR_ALL_MARKERS);
- return true;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/ASNodeImplV8.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/ASNodeImplV8.java
deleted file mode 100644
index e8d347a..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/ASNodeImplV8.java
+++ /dev/null
@@ -1,569 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Takashi ITOH - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- * Shin SAITO - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash.internal;
-
-import java.net.URLDecoder;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.actf.model.flash.ASAccInfo;
-import org.eclipse.actf.model.flash.IASNode;
-import org.eclipse.actf.model.flash.IFlashConst;
-import org.eclipse.actf.model.flash.IFlashPlayer;
-import org.eclipse.actf.model.flash.as.ASObject;
-
-public class ASNodeImplV8 implements IFlashConst, IASNode {
-
- private static final String ACC_IMPL = "_accImpl";
- private static final String ACC_PROPS = "_accProps";
- private static final String LEVEL0_FOCUS_MANAGER = "_level0.focusManager";
- private static final String LEVEL0_RESERVED = "_level0.reserved";
- private static final String ON_RELEASE = "onRelease";
-
- private IFlashPlayer player;
- private ASObject asObject;
- private IASNode parent;
- private int level;
- private int id;
- private ASAccInfo accInfo;
- private boolean isReference = false;
- private boolean skipChildren = false;
- private boolean isAccProperties = false;
-
- private Boolean hasOnRelease;
-
- private String strIconType = ASNODE_ICON_OTHERS;
- private String strType;
- private String strClassName;
- private String strObjectName;
- private String strTarget;
- private boolean isUIComponent;
-
- public ASNodeImplV8(IASNode parent, IFlashPlayer player, ASObject node) {
- this.parent = parent;
- this.level = null != parent ? parent.getLevel() + 1 : 0;
- this.player = player;
-
- asObject = node;
- strType = getString(ASNODE_TYPE);
- strClassName = getString(ASNODE_CLASS_NAME);
- strObjectName = getString(ASNODE_OBJECT_NAME);
- strTarget = getString(ASNODE_TARGET);
- Object tmpId = asObject.get(ASNODE_ID);
- if (tmpId instanceof Integer) {
- id = ((Integer) tmpId).intValue();
- } else {
- id = -1;
- }
-
- isUIComponent = "true".equals(getString(ASNODE_IS_UI_COMPONENT)); //$NON-NLS-1$
-
- if (null != parent) {
- String targetParent = parent.getTarget();
- if (null != targetParent) {
- if (!strTarget.equals(targetParent + "." + strObjectName)) { //$NON-NLS-1$
- isReference = true;
- }
- }
- String parentObjectName = parent.getObjectName();
- if (ACC_PROPS.equals(parentObjectName) || //$NON-NLS-1$
- ACC_IMPL.equals(parentObjectName)) { //$NON-NLS-1$
- isAccProperties = true;
- }
- }
- if (ASNODE_TYPE_NUMBER.equals(strType) || //$NON-NLS-1$
- ASNODE_TYPE_NULL.equals(strType) || //$NON-NLS-1$
- ASNODE_TYPE_BOOLEAN.equals(strType) || //$NON-NLS-1$
- ASNODE_TYPE_STRING.equals(strType) || //$NON-NLS-1$
- ASNODE_TYPE_UNDEFINED.equals(strType)) { //$NON-NLS-1$
- skipChildren = true;
- } else if (ASNODE_TYPE_OBJECT.equals(strType)) { //$NON-NLS-1$
- if (null == strClassName || ASNODE_CLASS_ARRAY.equals(strClassName)) { //$NON-NLS-1$
- skipChildren = true;
- }
- } else if (ASNODE_TYPE_MOVIECLIP.equals(strType)) { //$NON-NLS-1$
- if (LEVEL0_RESERVED.equals(strTarget) || //$NON-NLS-1$
- LEVEL0_FOCUS_MANAGER.equals(strTarget)) { //$NON-NLS-1$
- skipChildren = true;
- }
- }
- this.accInfo = ASAccInfo.create(asObject);
-
- initIconType();
- }
-
- private void initIconType() {
- if (ASNODE_TYPE_MOVIECLIP.equals(strType)) { //$NON-NLS-1$
- strIconType = strType;
- if (accInfo != null) {
- int accRole = accInfo.getRole();
- if (-1 != accRole) {
- strIconType = ASNODE_ICON_ACCROLE+accRole;
- return;
- }
- }
- if (hasOnRelease()) {
- strIconType = ASNODE_CLASS_BUTTON;
- }
- } else if (ASNODE_TYPE_OBJECT.equals(strType)) { //$NON-NLS-1$
- strIconType = strType;
- if (ASNODE_CLASS_BUTTON.equals(strClassName)) { //$NON-NLS-1$
- strIconType = ASNODE_CLASS_BUTTON;
- } else if (strClassName.startsWith(ASNODE_CLASS_TEXTFIELD)) { //$NON-NLS-1$
- strIconType = ASNODE_ICON_TEXT;
- } else {
- if (ACC_IMPL.equals(strObjectName) || //$NON-NLS-1$
- ACC_PROPS.equals(strObjectName)) { //$NON-NLS-1$
- strIconType = ASNODE_ICON_ACCPROPS;
- }
- }
- } else if (ASNODE_TYPE_FUNCTION.equals(strType) || //$NON-NLS-1$
- ASNODE_TYPE_STRING.equals(strType)) { //$NON-NLS-1$
- strIconType = strType;
- } else if (ASNODE_TYPE_NUMBER.equals(strType) || //$NON-NLS-1$
- ASNODE_TYPE_NULL.equals(strType) || //$NON-NLS-1$
- ASNODE_TYPE_BOOLEAN.equals(strType) || //$NON-NLS-1$
- ASNODE_TYPE_UNDEFINED.equals(strType)) { //$NON-NLS-1$
- strIconType = ASNODE_ICON_VARIABLE;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getType()
- */
- public String getType() {
- return strType;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getClassName()
- */
- public String getClassName() {
- return strClassName;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getObjectName()
- */
- public String getObjectName() {
- return strObjectName;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getTarget()
- */
- public String getTarget() {
- return strTarget;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#isUIComponent()
- */
- public boolean isUIComponent() {
- return isUIComponent;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getValue()
- */
- public String getValue() {
- if (null != asObject) {
- return decodeString(getString(ASNODE_VALUE));
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getText()
- */
- public String getText() {
- return getText(true);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getText(boolean)
- */
- public String getText(boolean useAccName) {
- String text = null;
- if (useAccName && null != accInfo) {
- text = accInfo.getName();
- }
- if (null == text) {
- if (null != asObject) {
- text = getString(ASNODE_TEXT);
- }
- } else {
- text = "[" + text + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- return decodeString(text);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getTitle()
- */
- public String getTitle() {
- if (null != asObject) {
- return decodeString(getString(ASNODE_TITLE));
- }
- return null;
- }
-
- private String getString(String name) {
- if (null != asObject) {
- Object result = asObject.get(name);
- return null == result ? null : result.toString();
- }
- return null;
- }
-
- private Number getNumber(String name) {
- if (null != asObject) {
- Object result = asObject.get(name);
- if (result == null)
- return null;
- else if (result instanceof Number)
- return (Number) result;
- else
- return null;
- } else
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getObject(java.lang.String)
- */
- public Object getObject(String name) {
- if (null != asObject) {
- return asObject.get(name);
- }
- return null;
- }
-
- private String decodeString(String input) {
- if (null != input) {
- try {
- return URLDecoder.decode(input, "UTF-8"); //$NON-NLS-1$
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- return input;
- }
-
- private double getDoubleValue(Object o) {
- if (o instanceof Number) {
- return ((Number) o).doubleValue();
- }
- return Double.NaN;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getParent()
- */
- public IASNode getParent() {
- return parent;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getLevel()
- */
- public int getLevel() {
- return level;
- }
-
- private boolean shouldSkip() {
- return (skipChildren && !isAccProperties) || isReference;
- }
-
- private boolean isAccProperties() {
- return isAccProperties;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#hasChild(boolean)
- */
- public boolean hasChild(boolean visual) {
- return hasChild(visual, false);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#hasChild(boolean, boolean)
- */
- public boolean hasChild(boolean visual, boolean debugMode) {
- if (level >= 50) {
- throw new Error(
- MessageFormat
- .format(
- Messages
- .getString("flash.error_target_length"), new Object[] { new Integer(level) }) + "\n" + strTarget); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return player.hasChild(this, visual, debugMode);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getChildren(boolean, boolean)
- */
- public IASNode[] getChildren(boolean visual, boolean informative) {
- return getChildren(visual, informative, false);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getChildren(boolean, boolean,
- * boolean)
- */
- public IASNode[] getChildren(boolean visual, boolean informative,
- boolean debugMode) {
- IASNode[] children = player.getChildren(this, visual, debugMode);
- List<ASNodeImplV8> childList = new ArrayList<ASNodeImplV8>();
- for (IASNode child : children) {
- if (child instanceof ASNodeImplV8) {
- ASNodeImplV8 node = (ASNodeImplV8) child;
- if (!debugMode) {
- if (!visual && node.shouldSkip()) {
- continue;
- }
- if (informative && !node.isAccProperties()) {
- if (null == node.getText()
- && !ASNODE_TYPE_MOVIECLIP
- .equals(node.getType()) && //$NON-NLS-1$
- !ASNODE_CLASS_BUTTON
- .equals(node.getClassName()) && //$NON-NLS-1$
- !ACC_PROPS.equals(node.getObjectName()) && //$NON-NLS-1$
- !ACC_IMPL.equals(node.getObjectName()) && //$NON-NLS-1$
- !ON_RELEASE.equals(node.getObjectName())) //$NON-NLS-1$
- {
- continue;
- }
- }
- }
- childList.add(node);
- }
- }
- return childList.toArray(new IASNode[childList.size()]);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#setMarker()
- */
- public boolean setMarker() {
- if (null != asObject) {
- try {
- return player.setMarker(getNumber(ASNODE_X),
- getNumber(ASNODE_Y), getNumber(ASNODE_WIDTH),
- getNumber(ASNODE_HEIGHT));
- } catch (Exception e) {
- }
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getPlayer()
- */
- public IFlashPlayer getPlayer() {
- return player;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getAccInfo()
- */
- public ASAccInfo getAccInfo() {
- return accInfo;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getKeys()
- */
- public Set<String> getKeys() {
- if (null != asObject) {
- return asObject.getKeys();
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#hasOnRelease()
- */
- public boolean hasOnRelease() {
- if (null == hasOnRelease) {
- IASNode onReleaseNode = player.getNodeFromPath(strTarget
- + PATH_ON_RELEASE); //$NON-NLS-1$
- if (null != onReleaseNode) {
- hasOnRelease = Boolean.TRUE;
- } else {
- hasOnRelease = Boolean.FALSE;
- }
- }
- return hasOnRelease.booleanValue();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getX()
- */
- public double getX() {
- return getDoubleValue(asObject.get(ASNODE_X));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getY()
- */
- public double getY() {
- return getDoubleValue(asObject.get(ASNODE_Y));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getWidth()
- */
- public double getWidth() {
- return getDoubleValue(asObject.get(ASNODE_WIDTH));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getHeight()
- */
- public double getHeight() {
- return getDoubleValue(asObject.get(ASNODE_HEIGHT));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getId()
- */
- public int getId() {
- return id;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getDepth()
- */
- public int getDepth() {
- Integer target = (Integer) asObject.get(ASNODE_DEPTH);
- if (target != null)
- return target.intValue();
- return INVALID_DEPTH;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getCurrentFrame()
- */
- public int getCurrentFrame() {
- Integer target = (Integer) asObject.get(ASNODE_CURRENT_FRAME);
- if (target != null)
- return target.intValue();
- return -1;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#isInputable()
- */
- public boolean isInputable() {
- Boolean b = (Boolean) asObject.get(ASNODE_IS_INPUTABLE);
- if (b == null)
- return false;
- return b.booleanValue();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#isOpaqueObject()
- */
- public boolean isOpaqueObject() {
- Boolean b = (Boolean) asObject.get(ASNODE_IS_OPAQUE_OBJECT);
- if (b == null)
- return false;
- return b.booleanValue();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getTabIndex()
- */
- public int getTabIndex() {
- Number num = getNumber(ASNODE_TAB_INDEX);
- if (num == null)
- return -1;
- else
- return num.intValue();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.flash.IASNode#getIconType()
- */
- public String getIconType() {
- return strIconType;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/FlashStatusUtil.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/FlashStatusUtil.java
deleted file mode 100644
index 8bca71f..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/FlashStatusUtil.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Takashi ITOH - initial API and implementation
- * Daisuke SATO - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.internal;
-
-import org.eclipse.actf.model.flash.IASNode;
-import org.eclipse.actf.model.flash.IFlashPlayer;
-
-public class FlashStatusUtil {
-
-
- // messages for status text
- private static final String STATUS_OK = Messages.getString("flash.player_ok"); //$NON-NLS-1$
- private static final String STATUS_NG = Messages
- .getString("flash.player_embed"); //$NON-NLS-1$
- private static final String STATUS_NA = Messages
- .getString("flash.player_no_xcode"); //$NON-NLS-1$
- private static final String STATUS_WAIT = Messages
- .getString("flash.player_loading"); //$NON-NLS-1$
-
- // constants for check
- private static final String OBJECT = "OBJECT";
- private static final String TAG_NAME = "tagName";
-
-
- public static String getStatus(IFlashPlayer player) {
- if (null == player) {
- return null;
- }
-
- IASNode rootNode = player.getRootNode();
- if (null != rootNode) {
- return STATUS_OK;
- }
-
- //TODO check swf version here
-
- String tagName = player.getPlayerProperty(TAG_NAME);
- if (!OBJECT.equalsIgnoreCase(tagName)) {
- return STATUS_NG;
- }
-
- if (!player.isReady()) {
- return STATUS_WAIT;
- }
-
- return STATUS_NA;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/Messages.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/Messages.java
deleted file mode 100644
index b93648c..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/internal/Messages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-
-public class Messages {
- private static final String BUNDLE_NAME = "messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/transcoder/ISwfTranscoder.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/transcoder/ISwfTranscoder.java
deleted file mode 100644
index dd94b20..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/transcoder/ISwfTranscoder.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.transcoder;
-
-import java.io.InputStream;
-
-
-
-public interface ISwfTranscoder {
- Object parse(InputStream is) throws Exception;
- Object impose(Object imposed, Object src);
- byte[] generate(Object swf, boolean compress, int version) throws Exception;
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/transcoder/ISwfTranscoderFactory.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/transcoder/ISwfTranscoderFactory.java
deleted file mode 100644
index 91dca21..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/transcoder/ISwfTranscoderFactory.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.transcoder;
-
-
-
-public interface ISwfTranscoderFactory {
- ISwfTranscoder newInstance(int id);
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/util/FlashDetect.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/util/FlashDetect.java
deleted file mode 100644
index 12ca4d9..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/util/FlashDetect.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Takashi ITOH - initial API and implementation
- * Daisuke SATO - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.flash.util;
-
-import java.text.MessageFormat;
-
-import org.eclipse.actf.model.flash.FlashPlayerFactory;
-import org.eclipse.actf.model.flash.IFlashConst;
-import org.eclipse.actf.model.flash.internal.Messages;
-import org.eclipse.actf.util.win32.comclutch.ComService;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Display;
-
-public class FlashDetect {
-
- private static String strVersion = null;
-
- static {
- try {
- IDispatch idisp = ComService
- .createDispatch(IFlashConst.CLSID_FLASH);
- String rawVersion = FlashPlayerFactory
- .getPlayerFromIDsipatch(idisp).getPlayerVersion();
- // String rawVersion = (String)
- // idisp.invoke1(IFlashConst.PLAYER_GET_VARIABLE,
- // IFlashConst.PLAYER_VERSION);
- int sep = rawVersion.indexOf(' ');
- if (sep > 0) {
- strVersion = rawVersion.substring(sep + 1);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static void showDialog() {
- if (null == strVersion)
- return;
- int sep = strVersion.indexOf(',');
- if (sep > 0) {
- try {
- if (Integer.parseInt(strVersion.substring(0, sep)) < 8) {
- MessageDialog
- .openWarning(
- Display.getCurrent().getActiveShell(),
- Messages.getString("flash.warning"), //$NON-NLS-1$
- MessageFormat
- .format(
- Messages
- .getString("flash.bad_flash_version"), new Object[] { strVersion })); //$NON-NLS-1$
- }
- } catch (Exception e) {
- }
- }
- strVersion = null;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/util/FlashMSAAUtil.java b/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/util/FlashMSAAUtil.java
deleted file mode 100644
index 546bd9b..0000000
--- a/plugins/org.eclipse.actf.model.flash/src/org/eclipse/actf/model/flash/util/FlashMSAAUtil.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Takashi ITOH - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.flash.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.actf.model.flash.FlashPlayerFactory;
-import org.eclipse.actf.model.flash.IFlashPlayer;
-import org.eclipse.actf.util.win32.FlashMSAAObject;
-import org.eclipse.actf.util.win32.FlashMSAAObjectFactory;
-import org.eclipse.actf.util.win32.WindowUtil;
-import org.eclipse.actf.util.win32.comclutch.ComService;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.actf.util.win32.comclutch.IServiceProvider;
-import org.eclipse.actf.util.win32.comclutch.IUnknown;
-import org.eclipse.actf.util.win32.msaa.MSAA;
-
-/**
- * Utility class for accessible objects of Flash.
- */
-public class FlashMSAAUtil {
-
- private static boolean SCAN_ALL = false;
- private static boolean SHOW_OFFSCREEN = false;
-
- public static boolean isFlash(int iacc) {
- FlashMSAAObject acc = FlashMSAAObjectFactory
- .getFlashMSAAObjectFromPtr(iacc);
- return isFlash(acc);
- }
-
- public static boolean isInvisibleFlash(int iacc) {
- FlashMSAAObject acc = FlashMSAAObjectFactory
- .getFlashMSAAObjectFromPtr(iacc);
- return isInvisibleFlash(acc);
- }
-
- public static IFlashPlayer[] getFlashPlayers(int hwnd) {
- return getFlashPlayers(hwnd, SHOW_OFFSCREEN, SCAN_ALL);
- }
-
- public static IFlashPlayer[] getFlashPlayers(int hwnd,
- boolean showOffScreen, boolean scanAll) {
- FlashMSAAObject acc = FlashMSAAObjectFactory
- .getFlashMSAAObjectFromWindow(hwnd);
- FlashMSAAObject[] accs = getFlashElements(acc, showOffScreen, scanAll);
- IFlashPlayer[] ret = new IFlashPlayer[accs.length];
- for (int i = 0; i < accs.length; i++) {
- ret[i] = FlashPlayerFactory.getPlayerFromObject(accs[i]);
- }
- return ret;
- }
-
- /**
- * @param accObject
- * the accessible object to be checked.
- * @return whether the <i>accObject</i> is a Flash object or not.
- */
- public static boolean isFlash(FlashMSAAObject accObject) {
- return isFlashClass(accObject.getClassName())
- || isInvisibleFlash(accObject);
- }
-
- /**
- * @param accObject
- * the accessible object to be checked.
- * @return whether the <i>accObject</i> is an invisible Flash object or
- * not. Invisible means that the Flash object is in window-less
- * mode.
- */
- public static boolean isInvisibleFlash(FlashMSAAObject accObject) {
- if (MSAA.ROLE_SYSTEM_CLIENT == accObject.getAccRole()) {
- String description = accObject.getAccDescription();
- if (null != description && description.startsWith("PLUGIN: type=")) { //$NON-NLS-1$
- return null != FlashMSAAUtil.getHtmlAttribute(accObject,
- "WMode"); //$NON-NLS-1$
- }
- }
- return false;
- }
-
- public static boolean isFlashClass(String className) {
- return "MacromediaFlashPlayerActiveX".equals(className) || //$NON-NLS-1$
- "ShockwaveFlashPlugin".equals(className); //$NON-NLS-1$
- }
-
- /**
- * @param root
- * the root element to be used to obtain its children.
- * @return the children of the <i>inputElement</i>. It is same as
- * getFlashElements(inputElement, false, false).
- */
- public static FlashMSAAObject[] getFlashElements(FlashMSAAObject root) {
- return getFlashElements(root, SHOW_OFFSCREEN, SCAN_ALL);
- }
-
- /**
- * @param root
- * the root element to be traversed to collect Flash objects.
- * @param showOffScreen
- * whether the objects being off screen are collected or not.
- * @param scanAll
- * whether the window-less Flash objects are collected or not.
- * @return the collected Flash objects.
- */
- public static FlashMSAAObject[] getFlashElements(FlashMSAAObject root,
- boolean showOffScreen, boolean scanAll) {
- FlashFinder finder = new FlashFinder();
- finder.find(root, showOffScreen, scanAll);
- return finder.getResults();
- }
-
- /**
- * @return the scan mode of Flash finder. If it is true then the window-less
- * Flash objects are also collected.
- */
- public static boolean isScanAll() {
- return SCAN_ALL;
- }
-
- /**
- * @param scan_all
- * the scan mode of Flash finder. If it is true then the
- * window-less Flash objects are also collected.
- */
- public static void setScanAll(boolean scan_all) {
- SCAN_ALL = scan_all;
- }
-
- /**
- * @return the scan mode of Flash finder. If it is true then the off screen
- * objects are also collected.
- */
- public static boolean isShowOffscreen() {
- return SHOW_OFFSCREEN;
- }
-
- /**
- * @param show_offscreen
- * the scan mode of Flash finder. If it is true then the off
- * screen objects are also collected.
- */
- public static void setShowOffscreen(boolean show_offscreen) {
- SHOW_OFFSCREEN = show_offscreen;
- }
-
- private static class FlashFinder {
- private boolean showOffScreen = false;
-
- private List<FlashMSAAObject> result = new ArrayList<FlashMSAAObject>();
-
- public void find(FlashMSAAObject accObject, boolean showOffScreen,
- boolean scanAll) {
- this.showOffScreen = showOffScreen;
- if (scanAll || 0 != findFlashWindow((int) accObject.getWindow())) {
- findChildren(accObject);
- }
- }
-
- private static int findFlashWindow(int hwnd) {
- if (0 != hwnd) {
- if (FlashMSAAUtil.isFlashClass(WindowUtil
- .GetWindowClassName(hwnd))) {
- return hwnd;
- }
- for (int hwndChild = WindowUtil.GetChildWindow(hwnd); 0 != hwndChild; hwndChild = WindowUtil
- .GetNextWindow(hwndChild)) {
- int hwndFound = findFlashWindow(hwndChild);
- if (0 != hwndFound) {
- return hwndFound;
- }
- }
- }
- return 0;
- }
-
- private void findChildren(FlashMSAAObject[] inputElements) {
- for (int i = 0; i < inputElements.length; i++) {
- findChildren((FlashMSAAObject) inputElements[i]);
- }
- }
-
- private void findChildren(FlashMSAAObject accObject) {
- if (null != accObject) {
- int role = accObject.getAccRole();
- if ((MSAA.ROLE_SYSTEM_WINDOW == role || MSAA.ROLE_SYSTEM_CLIENT == role)
- && FlashMSAAUtil.isFlash(accObject)) {
- result.add(accObject);
- } else {
- switch (accObject.getAccState()
- & (MSAA.STATE_INVISIBLE | MSAA.STATE_OFFSCREEN)) {
- case MSAA.STATE_INVISIBLE | MSAA.STATE_OFFSCREEN:
- if (!showOffScreen)
- break;
- case 0:
- findChildren(accObject.getChildren());
- break;
- }
- }
- }
- }
-
- public FlashMSAAObject[] getResults() {
- FlashMSAAObject[] resultArray = new FlashMSAAObject[result.size()];
- return result.toArray(resultArray);
- }
-
- }
-
- public static IDispatch getHtmlElementFromPtr(int iacc) {
- FlashMSAAObject acc = FlashMSAAObjectFactory
- .getFlashMSAAObjectFromPtr(iacc);
- return getHtmlElementFromObject(acc);
- }
-
- public static String getHtmlAttribute(int iacc, String name) {
- FlashMSAAObject acc = FlashMSAAObjectFactory
- .getFlashMSAAObjectFromPtr(iacc);
- return getHtmlAttribute(acc, name);
- }
-
- /**
- * @param objUnknown
- * the object to be used to obtain the interface of HTML element.
- * It must be an instance of IAccessibleObject or an instance of
- * IUnknown
- * @return the HTML element interface of the <i>objUnknown</i>.
- * @see IAccessibleObject
- * @see IUnknown
- */
- public static IDispatch getHtmlElementFromObject(Object objUnknown) {
- if (objUnknown instanceof FlashMSAAObject) {
- objUnknown = ((FlashMSAAObject) objUnknown).getIAccessible();
- }
- if (objUnknown instanceof IUnknown) {
- IServiceProvider sp = (IServiceProvider) ((IUnknown) objUnknown)
- .queryInterface(IUnknown.IID_IServiceProvider);
- if (sp == null)
- return null;
- IUnknown idisp = null;
- try {
- idisp = sp.queryService(IUnknown.IID_IHTMLElement,
- IUnknown.IID_IHTMLElement);
- } catch (Exception e) {
- e.printStackTrace();
- }
- if (idisp == null)
- return null;
- return ComService.newIDispatch(idisp);
- }
- return null;
- }
-
- /**
- * @param objUnknown
- * the object to be used to obtain the interface of HTML element.
- * It must be an instance of IAccessibleObject or an instance of
- * IUnknown
- * @param name
- * the attribute name to be used.
- * @return the attribute value string.
- * @see #getHtmlElementFromObject(Object)
- */
- private static String getHtmlAttribute(Object objUnknown, String name) {
- IDispatch varElement = getHtmlElementFromObject(objUnknown);
- if (varElement == null)
- return null;
- try {
- return (String) varElement.get(name);
- } catch (Exception e) {
- }
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/.classpath b/plugins/org.eclipse.actf.model.ui.editors.ie/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/.cvsignore b/plugins/org.eclipse.actf.model.ui.editors.ie/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/.project b/plugins/org.eclipse.actf.model.ui.editors.ie/.project
deleted file mode 100644
index 8da4177..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.model.ui.editors.ie</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.model.ui.editors.ie/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.model.ui.editors.ie/META-INF/MANIFEST.MF
deleted file mode 100644
index 878d313..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF Web Browser IE Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.model.ui.editors.ie;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.actf.model.ui.editors.ie.BrowserIE_Plugin
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.actf.core,
- org.eclipse.actf.model.ui,
- org.eclipse.actf.model.dom.dombycom,
- org.eclipse.actf.model.dom.html,
- org.eclipse.actf.util.win32,
- org.eclipse.actf.ui,
- org.eclipse.actf.util.vocab
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.actf.model.ui.editors.ie.editor,
- org.eclipse.actf.model.ui.editors.ie.events
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/about.html b/plugins/org.eclipse.actf.model.ui.editors.ie/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/build.properties b/plugins/org.eclipse.actf.model.ui.editors.ie/build.properties
deleted file mode 100644
index a080038..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- .,\
- icons/,\
- plugin.properties,\
- plugin_ja.properties,\
- plugin.xml
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/icons/bl_24_02.gif b/plugins/org.eclipse.actf.model.ui.editors.ie/icons/bl_24_02.gif
deleted file mode 100644
index 38992c2..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/icons/bl_24_02.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/plugin.properties b/plugins/org.eclipse.actf.model.ui.editors.ie/plugin.properties
deleted file mode 100644
index 5a32b9f..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/plugin.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-browser.ie.title=Web Browser
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/plugin.xml b/plugins/org.eclipse.actf.model.ui.editors.ie/plugin.xml
deleted file mode 100644
index 6d86241..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/plugin.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="WebBrowserEventListener" name="WebBrowserEventListener" schema="schema/WebBrowserEventListener.exsd"/>
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.actf.model.ui.editors.ie.editor.WebBrowserEditor"
- contributorClass="org.eclipse.actf.model.ui.editors.ie.impl.WebBrowserEditorContributor"
- default="true"
- extensions="html, htm, xhtml, mht"
- icon="icons/bl_24_02.gif"
- id="org.eclipse.actf.model.ui.editors.ie.editor.WebBrowserEditor"
- name="%browser.ie.title"/>
- </extension>
-</plugin>
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/plugin_ja.properties b/plugins/org.eclipse.actf.model.ui.editors.ie/plugin_ja.properties
deleted file mode 100644
index 5a32b9f..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/plugin_ja.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-browser.ie.title=Web Browser
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/schema/WebBrowserEventListener.exsd b/plugins/org.eclipse.actf.model.ui.editors.ie/schema/WebBrowserEventListener.exsd
deleted file mode 100644
index 6438e92..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/schema/WebBrowserEventListener.exsd
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.actf.model.ui.editors.ie">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.actf.model.ui.editors.ie" id="WebBrowserEventListener" name="WebBrowserEventListener"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="listener" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="listener">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2007 IBM Corporation and others.<br>
-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 <a
-href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/BrowserIE_Plugin.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/BrowserIE_Plugin.java
deleted file mode 100644
index 03f732b..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/BrowserIE_Plugin.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editors.ie;
-
-import org.eclipse.actf.ui.util.AbstractUIPluginACTF;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class BrowserIE_Plugin extends AbstractUIPluginACTF {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.actf.model.ui.editors.ie";
-
- // The shared instance
- private static BrowserIE_Plugin plugin;
-
- /**
- * The constructor
- */
- public BrowserIE_Plugin() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static BrowserIE_Plugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/editor/WebBrowserEditor.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/editor/WebBrowserEditor.java
deleted file mode 100644
index ef6d315..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/editor/WebBrowserEditor.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.editor;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.IModelServiceHolder;
-import org.eclipse.actf.model.ui.editor.DummyEditorInput;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.editors.ie.events.INewWiondow2EventListener;
-import org.eclipse.actf.model.ui.editors.ie.events.IWindowClosedEventListener;
-import org.eclipse.actf.model.ui.editors.ie.impl.WebBrowserEventExtension;
-import org.eclipse.actf.model.ui.editors.ie.impl.WebBrowserIEImpl;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NewWindow2Parameters;
-import org.eclipse.actf.model.ui.util.ModelServiceUtils;
-import org.eclipse.actf.ui.util.PlatformUIUtil;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorPart;
-
-public class WebBrowserEditor extends EditorPart implements IModelServiceHolder {
-
- public static final String ID = WebBrowserEditor.class.getName();
-
- WebBrowserIEImpl webBrowser;
-
- IEditorInput input;
-
- public WebBrowserEditor() {
- super();
- }
-
- public void createPartControl(Composite parent) {
- String targetUrl = "about:blank";
- if (input instanceof DummyEditorInput) {
- targetUrl = ((DummyEditorInput) input).getUrl();
- if ("".equals(targetUrl)) {
- targetUrl = "about:blank";
- }
- }
-
- webBrowser = new WebBrowserIEImpl(this, parent, targetUrl);
- webBrowser.setNewWindow2EventListener(new INewWiondow2EventListener() {
-
- public void newWindow2(NewWindow2Parameters param) {
- IEditorPart newEditor = ModelServiceUtils.launch("about:blank",
- ID);
- if (newEditor instanceof WebBrowserEditor) {
- IWebBrowserACTF browser = (IWebBrowserACTF) ((WebBrowserEditor) newEditor)
- .getModelService();
- param.setBrowserAddress(browser.getIWebBrowser2());
- WebBrowserEventExtension.newWindow(browser);
- } else {
- // TODO
- }
- }
- });
-
- webBrowser
- .setWindowClosedEventListener(new IWindowClosedEventListener() {
- public void windowClosed() {
- IWorkbenchPage page = PlatformUIUtil.getActivePage();
- if (page != null) {
- IEditorReference[] editorRefs = page
- .getEditorReferences();
- for (IEditorReference i : editorRefs) {
- if (WebBrowserEditor.this == i.getEditor(false)) {
- PlatformUIUtil.getActivePage().closeEditor(
- WebBrowserEditor.this, false);
- }
- }
- }
- }
- });
-
- }
-
- public void dispose() {
- WebBrowserEventExtension.browserDisposed(webBrowser, getPartName());
- }
-
- public void setFocus() {
- WebBrowserEventExtension.focusChange(webBrowser);
- }
-
- public void doSave(IProgressMonitor monitor) {
- // TODO
- }
-
- public void doSaveAs() {
- // TODO
- }
-
- public void init(IEditorSite site, IEditorInput input)
- throws PartInitException {
- setSite(site);
- setInput(input);
- this.input = input;
- }
-
- public boolean isDirty() {
- return false;
- }
-
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- public IModelService getModelService() {
- return (this.webBrowser);
- }
-
- public IEditorPart getEditorPart() {
- return this;
- }
-
- public void setEditorTitle(String title) {
- setPartName(title);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/editor/WebBrowserEditorInput.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/editor/WebBrowserEditorInput.java
deleted file mode 100644
index 4c775d2..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/editor/WebBrowserEditorInput.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.editor;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-
-
-public class WebBrowserEditorInput implements IEditorInput {
-
- private String name = "Web Browser";
-
- private String url = "about:blank";
-
- public WebBrowserEditorInput(){
- }
-
-
- public WebBrowserEditorInput(String url) {
- setUrl(url);
- }
-
- public WebBrowserEditorInput(String url, String name) {
- setUrl(url);
- if (name != null) {
- this.name = name;
- }
-
- }
-
- public boolean exists() {
- System.out.println("exists");
- return false;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- return name;
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return "";
- }
-
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public String getUrl() {
- return url;
- }
-
- protected void setUrl(String url) {
- if (url != null) {
- this.url = url;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/events/INewWiondow2EventListener.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/events/INewWiondow2EventListener.java
deleted file mode 100644
index 9d93b44..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/events/INewWiondow2EventListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.events;
-
-import java.util.EventListener;
-
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NewWindow2Parameters;
-
-
-
-
-public interface INewWiondow2EventListener extends EventListener {
-
- //TODO param
- public void newWindow2(NewWindow2Parameters param);
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/events/IWindowClosedEventListener.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/events/IWindowClosedEventListener.java
deleted file mode 100644
index 6b765e6..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/events/IWindowClosedEventListener.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.events;
-
-import java.util.EventListener;
-
-
-
-
-public interface IWindowClosedEventListener extends EventListener {
-
- public void windowClosed();
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/CurrentStylesImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/CurrentStylesImpl.java
deleted file mode 100644
index 52c76f5..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/CurrentStylesImpl.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.impl;
-
-import java.net.URL;
-
-import org.eclipse.actf.model.dom.dombycom.IElementEx;
-import org.eclipse.actf.model.dom.dombycom.IStyle;
-import org.eclipse.actf.model.ui.editor.browser.ICurrentStyles;
-import org.eclipse.actf.util.xpath.XPathCreator;
-import org.eclipse.swt.graphics.Rectangle;
-
-public class CurrentStylesImpl implements ICurrentStyles {
-
- private static final String A_VISIBILITY = "visibility";
-
- private static final String A_TEXT_DECORATION = "textDecoration";
-
- private static final String A_TEXT_ALIGN = "textAlign";
-
- private static final String A_POSITION = "position";
-
- private static final String A_LINE_HEIGHT = "lineHeight";
-
- private static final String A_LETTER_SPACING = "letterSpacing";
-
- private static final String A_FONT_VARIANT = "fontVariant";
-
- private static final String A_FONT_STYLE = "fontStyle";
-
- private static final String A_FONT_SIZE = "fontSize";
-
- private static final String A_FONT_FAMILY = "fontFamily";
-
- private static final String A_DISPLAY = "display";
-
- private static final String A_COLOR = "color";
-
- private static final String A_BACKGROUND_REPEAT = "backgroundRepeat";
-
- private static final String A_BACKGROUND_COLOR = "backgroundColor";
-
- private static final String HREF = "href";
-
- private static final String TAG_A = "A";
-
- private final String xpath;
-
- private final String tagName;
-
- private final Rectangle rect;
-
- private final String backgroundColor;
-
- private final String backgroundRepeat;
-
- private final String color;
-
- private final String fontFamily;
-
- private final String fontSize;
-
- private final String fontStyle;
-
- private final String fontVariant;
-
- private final String lineHeight;
-
- private final String textAlign;
-
- private final String visibility;
-
- private final String display;
-
- private final String position;
-
- private final String textDecoration;
-
- private final String letterSpacing;
-
- private boolean isLink;
-
- private URL target = null;
-
- /**
- *
- */
- public CurrentStylesImpl(IElementEx element, URL baseUrl) {
- rect = element.getLocation();
- xpath = XPathCreator.childPathSequence(element);
- tagName = element.getTagName();
-
- isLink = false;
- if (TAG_A.equalsIgnoreCase(tagName)) {
- String href = element.getAttribute(HREF);
- if (null != href) {
- if (null != baseUrl) {
- try {
- target = new URL(baseUrl, href);
- isLink = true;
- } catch (Exception e) {
- // e.printStackTrace();
- try {
- target = new URL(href);
- isLink = true;
- } catch (Exception e2) {
- // e2.printStackTrace();
- }
- }
- } else {
- try {
- target = new URL(href);
- isLink = true;
- } catch (Exception e2) {
- //e2.printStackTrace();
- }
- }
- }
- }
-
- IStyle style = element.getStyle();
- backgroundColor = (String) style.get(A_BACKGROUND_COLOR);
- backgroundRepeat = (String) style.get(A_BACKGROUND_REPEAT);
- color = (String) style.get(A_COLOR);
- display = (String) style.get(A_DISPLAY);
- fontFamily = (String) style.get(A_FONT_FAMILY);
- fontSize = (String) style.get(A_FONT_SIZE);
- fontStyle = (String) style.get(A_FONT_STYLE);
- fontVariant = (String) style.get(A_FONT_VARIANT);
- letterSpacing = (String) style.get(A_LETTER_SPACING);
- lineHeight = (String) style.get(A_LINE_HEIGHT);
- position = (String) style.get(A_POSITION);
- textAlign = (String) style.get(A_TEXT_ALIGN);
- textDecoration = (String) style.get(A_TEXT_DECORATION);
- visibility = (String) style.get(A_VISIBILITY);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getBackgroundColor()
- */
- public String getBackgroundColor() {
- return backgroundColor;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getBackgroundRepeat()
- */
- public String getBackgroundRepeat() {
- return backgroundRepeat;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getColor()
- */
- public String getColor() {
- return color;
- }
-
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getCssText()
- // */
- // public String getCssText() {
- // return cssText;
- // }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getDisplay()
- */
- public String getDisplay() {
- return display;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getFontFamily()
- */
- public String getFontFamily() {
- return fontFamily;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getFontSize()
- */
- public String getFontSize() {
- return fontSize;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getFontStyle()
- */
- public String getFontStyle() {
- return fontStyle;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getFontVariant()
- */
- public String getFontVariant() {
- return fontVariant;
- }
-
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getFontWeight()
- // */
- // public String getFontWeight() {
- // return fontWeight;
- // }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getLetterSpacing()
- */
- public String getLetterSpacing() {
- return letterSpacing;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getLineHeight()
- */
- public String getLineHeight() {
- return lineHeight;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getPosition()
- */
- public String getPosition() {
- return position;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getTextAlign()
- */
- public String getTextAlign() {
- return textAlign;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getTextDecoration()
- */
- public String getTextDecoration() {
- return textDecoration;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getVisibility()
- */
- public String getVisibility() {
- return visibility;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getTagName()
- */
- public String getTagName() {
- return tagName;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getXPath()
- */
- public String getXPath() {
- return xpath;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getRectangle()
- */
- public Rectangle getRectangle() {
- return rect;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#getLinkURL()
- */
- public URL getLinkURL() {
- return target;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.ICurrentStyles#isLink()
- */
- public boolean isLink() {
- return isLink;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserEditorContributor.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserEditorContributor.java
deleted file mode 100644
index 5dcdadf..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserEditorContributor.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.impl;
-
-import org.eclipse.actf.model.ui.editor.actions.DisableDebugMessageAction;
-import org.eclipse.actf.model.ui.editor.actions.GoBackAction;
-import org.eclipse.actf.model.ui.editor.actions.GoForwardAction;
-import org.eclipse.actf.model.ui.editor.actions.RefreshAction;
-import org.eclipse.actf.model.ui.editor.actions.StopAction;
-import org.eclipse.actf.model.ui.editor.actions.TextSizeMenu;
-import org.eclipse.actf.ui.util.Messages;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.EditorActionBarContributor;
-
-
-
-
-public class WebBrowserEditorContributor extends EditorActionBarContributor {
-
- private DisableDebugMessageAction silentAction;
-
- private DisableDebugMessageAction silentAction2;
-
- public WebBrowserEditorContributor() {
- silentAction = new DisableDebugMessageAction();
- silentAction2 = new DisableDebugMessageAction(false);
- silentAction.addPropertyChangeListener(silentAction2);
- silentAction2.addPropertyChangeListener(silentAction);
- }
-
- public void init(IActionBars bars, IWorkbenchPage page) {
- super.init(bars, page);
- // System.out.println(page);
-
- }
-
- public void contributeToCoolBar(ICoolBarManager coolBarManager) {
- // not sync with Editor show/hide...
- }
-
- public void setActiveEditor(IEditorPart targetEditor) {
- // TODO use this to get IWebBrowser for Actions. don't depend on Mediator
- }
-
- public void dispose() {
- }
-
- public void contributeToToolBar(IToolBarManager toolBarManager) {
- // toolBarManager.add(new GroupMarker("Navigate"));
- toolBarManager.add(new GoBackAction());
- toolBarManager.add(new GoForwardAction());
- toolBarManager.add(new RefreshAction());
- toolBarManager.add(new StopAction());
- if (Platform.inDebugMode()) {
- toolBarManager.add(silentAction);
- }
- }
-
- public void contributeToMenu(IMenuManager menuManager) {
- // TODO consider aiBrowser
- // menuManager.add(new
- // FavoritesMenu(PlatformUI.getWorkbench().getActiveWorkbenchWindow()));
- // Display TODO only for Browser
- // TODO
- MenuManager displayMenu = new MenuManager(Messages.getString("MenuConst.&Display_1"),
- "displayMenu");
- displayMenu.add(new Separator("navigate"));
- displayMenu.add(new GoBackAction(false));
- displayMenu.add(new GoForwardAction(false));
- displayMenu.add(new RefreshAction(false));
- displayMenu.add(new StopAction(false));
- if (Platform.inDebugMode()) {
- displayMenu.add(silentAction2);
- }
-
- displayMenu.add(new Separator());
- displayMenu.add(new Separator("view"));
- displayMenu.add(new TextSizeMenu(PlatformUI.getWorkbench().getActiveWorkbenchWindow()));
- menuManager.insertAfter(IWorkbenchActionConstants.M_FILE, displayMenu);
-
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserEventExtension.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserEventExtension.java
deleted file mode 100644
index 2711e3c..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserEventExtension.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTFEventListener;
-import org.eclipse.actf.model.ui.editors.ie.BrowserIE_Plugin;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.Platform;
-
-
-
-public class WebBrowserEventExtension {
- private static final String TAG_LISTENER = "listener";
- // private static final String ATTR_ID = "id";
- private static final String ATTR_CLASS = "class";
-
- private static WebBrowserEventExtension[] cachedExtensions;
-
- public static WebBrowserEventExtension[] getExtensions() {
- if (cachedExtensions != null) return cachedExtensions;
-
- IExtension[] extensions = Platform.getExtensionRegistry()
- .getExtensionPoint(BrowserIE_Plugin.PLUGIN_ID, "WebBrowserEventListener")
- .getExtensions();
- List<WebBrowserEventExtension> l = new ArrayList<WebBrowserEventExtension>();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement[] configElements =
- extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- WebBrowserEventExtension ex = parseExtension(configElements[j], l.size());
- if (ex != null) l.add(ex);
- }
- }
- cachedExtensions = (WebBrowserEventExtension[]) l.toArray(new WebBrowserEventExtension[l.size()]);
- return cachedExtensions;
- }
-
- private static WebBrowserEventExtension parseExtension(IConfigurationElement configElement, int idx) {
- if (!configElement.getName().equals(TAG_LISTENER))
- return null;
- try {
- return new WebBrowserEventExtension(configElement, idx);
- } catch (Exception e) {
- }
- return null;
- }
-
- public static void disposeExtensions() {
- if (cachedExtensions == null) return;
- for (int i = 0; i < cachedExtensions.length; i++) {
- cachedExtensions[i].dispose();
- }
- cachedExtensions = null;
- }
-
- public static void navigateComplete(IWebBrowserACTF iWebBrowser, String url) {
- WebBrowserEventExtension[] exs = getExtensions();
- if (exs == null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().navigateComplete(iWebBrowser, url);
- }
- }
-
- public static void titleChange(IWebBrowserACTF iWebBrowser, String title) {
- WebBrowserEventExtension[] exs = getExtensions();
- if (exs == null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().titleChange(iWebBrowser, title);
- }
- }
-
- public static void progressChange(IWebBrowserACTF iWebBrowser, int progress, int progressMax){
- WebBrowserEventExtension[] exs = getExtensions();
- if(exs == null) return;
- for (int i=0; i < exs.length; i++){
- exs[i].getListener().progressChange(iWebBrowser, progress, progressMax);
- }
- }
-
- public static void myDocumentComplete(IWebBrowserACTF iWebBrowser){
- WebBrowserEventExtension[] exs = getExtensions();
-
- //System.out.println("myDocumentComplete");
-
- if (exs == null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().myDocumentComplete(iWebBrowser);
- }
- }
-
- public static void focusChange(IWebBrowserACTF iWebBrowser){
- WebBrowserEventExtension[] exs = getExtensions();
- if (exs == null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().focusChange(iWebBrowser);
- }
- }
-
- public static void browserDisposed(IWebBrowserACTF iWebBrowser, String title){
- WebBrowserEventExtension[] exs = getExtensions();
- if(exs ==null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().browserDisposed(iWebBrowser, title);
- }
- //System.out.println("close:"+iWebBrowser);
- }
-
- public static void beforeNavigate(IWebBrowserACTF iWebBrowser, String url, String targetFrameName, boolean isInNavigation){
- WebBrowserEventExtension[] exs = getExtensions();
- if(exs ==null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().beforeNavigate(iWebBrowser, url, targetFrameName, isInNavigation);
- }
- }
-
- public static void myRefresh(IWebBrowserACTF webBrowser) {
- WebBrowserEventExtension[] exs = getExtensions();
-
- //System.out.println("myRefresh");
-
- if(exs ==null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().myRefresh(webBrowser);
- }
- }
-
- public static void myRefreshComplete(IWebBrowserACTF webBrowser) {
- WebBrowserEventExtension[] exs = getExtensions();
-
- //System.out.println("myRefreshComplete");
-
- if(exs ==null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().myRefreshComplete(webBrowser);
- }
- }
-
- public static void navigateStop(IWebBrowserACTF webBrowser) {
- WebBrowserEventExtension[] exs = getExtensions();
- if(exs ==null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().navigateStop(webBrowser);
- }
- }
-
- public static void focusGainedOfAddressText(IWebBrowserACTF webBrowser) {
- WebBrowserEventExtension[] exs = getExtensions();
- if(exs ==null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().focusGainedOfAddressText(webBrowser);
- }
- }
-
- public static void focusLostOfAddressText(IWebBrowserACTF webBrowser) {
- WebBrowserEventExtension[] exs = getExtensions();
- if(exs ==null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().focusLostOfAddressText(webBrowser);
- }
- }
-
- public static void newWindow(IWebBrowserACTF webBrowser){
- WebBrowserEventExtension[] exs = getExtensions();
- if(exs ==null) return;
- for (int i = 0; i < exs.length; i++) {
- exs[i].getListener().newWindow(webBrowser);
- }
- }
-
-
- private final IConfigurationElement configElement;
- private IWebBrowserACTFEventListener listener;
-
- private WebBrowserEventExtension(IConfigurationElement configElement, int idx) {
- this.configElement = configElement;
- }
-
- private IWebBrowserACTFEventListener getListener() {
- if (listener != null) return listener;
- try {
- listener = (IWebBrowserACTFEventListener) configElement.createExecutableExtension(ATTR_CLASS);
- } catch (Exception e) {
- }
- return listener;
- }
-
- public void dispose() {
- if (listener == null) return;
- listener.dispose();
- listener = null;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEComposite.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEComposite.java
deleted file mode 100644
index f7e1f84..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEComposite.java
+++ /dev/null
@@ -1,964 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Takashi ITOH - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.impl;
-
-import java.io.FileOutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import org.eclipse.actf.model.ui.ImagePositionInfo;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.BeforeNavigate2Parameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.BrowserEventListener;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.DocumentCompleteParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NavigateComplete2Parameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NavigateErrorParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NewWindow2Parameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.ProgressChangeParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.StatusTextChangeParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.TitleChangeParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.WindowClosingParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.impl.BeforeNavigate2ParametersImpl;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.impl.DocumentCompleteParametersImpl;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.impl.NavigateComplete2ParametersImpl;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.impl.NavigateErrorParametersImpl;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.impl.NewWindow2ParametersImpl;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.impl.ProgressChangeParametersImpl;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.impl.StatusTextChangeParametersImpl;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.impl.TitleChangeParametersImpl;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.impl.WindowClosingParametersImpl;
-import org.eclipse.actf.model.ui.editors.ie.win32.IPersistFile;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.internal.Callback;
-import org.eclipse.swt.internal.ole.win32.COM;
-import org.eclipse.swt.internal.ole.win32.IDispatch;
-import org.eclipse.swt.internal.win32.OS;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.ole.win32.OLE;
-import org.eclipse.swt.ole.win32.OleAutomation;
-import org.eclipse.swt.ole.win32.OleControlSite;
-import org.eclipse.swt.ole.win32.OleEvent;
-import org.eclipse.swt.ole.win32.OleFrame;
-import org.eclipse.swt.ole.win32.OleListener;
-import org.eclipse.swt.ole.win32.Variant;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-public class WebBrowserIEComposite extends Composite {
-
- public static final int SCROLL_BY = 0;
-
- public static final int SCROLL_TO = 1;
-
- OleFrame frame;
-
- OleControlSite site;// , site2;
-
- OleAutomation auto;// , auto2;
-
- boolean disposing = false;
-
- boolean bDisableScriptDebugger = false;
-
- private BrowserEventListener[] eventListeners = new BrowserEventListener[0];
-
- static final String BROWSER_PROGID = "Shell.Explorer"; //$NON-NLS-1$
-
- private int oldProc = 0;
-
- private boolean isClosed = false;
-
- // Event IDs
- // TODO in capital
- @SuppressWarnings("unused")
- private static final int EventID_BEFORENAVIGATE = 100,
- EventID_NAVIGATECOMPLETE = 101, EventID_STATUSTEXTCHANGE = 102,
- EventID_QUIT = 103, EventID_DOWNLOADCOMPLETE = 104,
- EventID_COMMANDSTATECHANGE = 105, EventID_DOWNLOADBEGIN = 106,
- EventID_NEWWINDOW = 107, EventID_PROGRESSCHANGE = 108,
- EventID_WINDOWMOVE = 109, EventID_WINDOWRESIZE = 110,
- EventID_WINDOWACTIVATE = 111, EventID_PROPERTYCHANGE = 112,
- EventID_TITLECHANGE = 113, EventID_TITLEICONCHANGE = 114,
- EventID_FRAMEBEFORENAVIGATE = 200,
- EventID_FRAMENAVIGATECOMPLETE = 201, EventID_FRAMENEWWINDOW = 204,
- EventID_BEFORENAVIGATE2 = 250, EventID_NEWWINDOW2 = 251,
- EventID_NAVIGATECOMPLETE2 = 252, EventID_ONQUIT = 253,
- EventID_ONVISIBLE = 254, EventID_ONTOOLBAR = 255,
- EventID_ONMENUBAR = 256, EventID_ONSTATUSBAR = 257,
- EventID_ONFULLSCREEN = 258, EventID_DOCUMENTCOMPLETE = 259,
- EventID_ONTHEATERMODE = 260, EventID_ONADDRESSBAR = 261,
- EventID_WINDOWSETRESIZABLE = 262, EventID_WINDOWCLOSING = 263,
- EventID_WINDOWSETLEFT = 264, EventID_WINDOWSETTOP = 265,
- EventID_WINDOWSETWIDTH = 266, EventID_WINDOWSETHEIGHT = 267,
- EventID_CLIENTTOHOSTWINDOW = 268, EventID_SETSECURELOCKICON = 269,
- EventID_FILEDOWNLOAD = 270, EventID_NAVIGATEERROR = 271,
- EventID_PRIVACYIMPACTEDSTATECHANGE = 272, EventID_NEWWINDOW3 = 273;
-
- public WebBrowserIEComposite(Composite parent, int style) {
- super(parent, style);
- /*
- * Create OLE frame
- */
- try {
- frame = new OleFrame(this, SWT.NONE);
- frame.setLayoutData(new GridData(GridData.FILL_BOTH));
- site = new WebBrowserIEControlSite(frame, SWT.NONE, BROWSER_PROGID);
- site.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
- auto = new OleAutomation(site);
-
- } catch (SWTException e) {
- dispose();
- SWT.error(SWT.ERROR_NO_HANDLES);
- }
-
- /*
- * Misc settings
- */
- setBrowserBoolean("RegisterAsDropTarget", true); //$NON-NLS-1$
-
- /*
- * Add SWT Event handlers
- */
- Listener swtListener = new Listener() {
- public void handleEvent(Event e) {
- switch (e.type) {
- case SWT.Dispose: {
- if (!disposing) {
- disposing = true;
- notifyListeners(e.type, e);
- e.type = SWT.NONE;
- if (auto != null) {
- auto.dispose();
- auto = null;
- }
- }
- break;
- }
- case SWT.Resize: {
- frame.setBounds(getClientArea());
- break;
- }
- }
- }
- };
- addListener(SWT.Dispose, swtListener);
- addListener(SWT.Resize, swtListener);
-
- Listener keyListener = new Listener() {
- public void handleEvent(Event e) {
- switch (e.type) {
- case SWT.KeyDown:
- case SWT.KeyUp: {
- notifyListeners(e.type, e);
- break;
- }
- }
- }
- };
- site.addListener(SWT.KeyDown, keyListener);
- site.addListener(SWT.KeyUp, keyListener);
-
- /*
- * Add OLE Event handlers
- */
- OleListener browserListener = new OleListener() {
- public void handleEvent(OleEvent event) {
- if (null != auto) {
- try {
- switch (event.type) {
- case EventID_BEFORENAVIGATE2:
- onBeforeNavigate2(new BeforeNavigate2ParametersImpl(
- event));
- break;
- case EventID_NAVIGATECOMPLETE2:
- onNavigateComplete2(new NavigateComplete2ParametersImpl(
- event));
- break;
- case EventID_NAVIGATEERROR:
- onNavigateError(new NavigateErrorParametersImpl(
- event));
- break;
- case EventID_DOCUMENTCOMPLETE:
- onDocumentComplete(new DocumentCompleteParametersImpl(
- event));
- break;
- case EventID_NEWWINDOW2:
- onNewWindow2(new NewWindow2ParametersImpl(event));
- break;
- case EventID_WINDOWCLOSING:
- onWindowClosing(new WindowClosingParametersImpl(
- event));
- break;
- case EventID_STATUSTEXTCHANGE:
- onStatusTextChange(new StatusTextChangeParametersImpl(
- event));
- break;
- case EventID_TITLECHANGE:
- onTitleChange(new TitleChangeParametersImpl(event));
- break;
- case EventID_PROGRESSCHANGE:
- onProgressChange(new ProgressChangeParametersImpl(
- event));
- break;
- default:
- System.out
- .println("event.type=" + event.type + " ,event.arguments=" + dumpArags(event.arguments)); //$NON-NLS-1$ //$NON-NLS-2$
- break;
- }
- } catch (Exception e) {
- System.err.println(dumpArags(event.arguments)); //$NON-NLS-1$
- e.printStackTrace();
- }
- }
- }
- };
-
- site.addEventListener(EventID_BEFORENAVIGATE2, browserListener);
- site.addEventListener(EventID_DOCUMENTCOMPLETE, browserListener);
- site.addEventListener(EventID_NAVIGATECOMPLETE2, browserListener);
- site.addEventListener(EventID_NAVIGATEERROR, browserListener);
- site.addEventListener(EventID_NEWWINDOW2, browserListener);
- site.addEventListener(EventID_PROGRESSCHANGE, browserListener);
- site.addEventListener(EventID_STATUSTEXTCHANGE, browserListener);
- site.addEventListener(EventID_TITLECHANGE, browserListener);
- site.addEventListener(EventID_WINDOWCLOSING, browserListener);
-
- // for JavaScript window.close()
-
- Callback callback = new Callback(this, "siteWindowProc", 4); //$NON-NLS-1$
- int address = callback.getAddress();
- if (address != 0) {
- oldProc = OS.GetWindowLong(site.handle, OS.GWL_WNDPROC);
- OS.SetWindowLong(site.handle, OS.GWL_WNDPROC, address);
- } else {
- callback.dispose();
- }
-
- }
-
- /*
- * Public interfaces
- */
-
- public void addBrowserEventListener(BrowserEventListener listener) {
- Set set = getEventListeners();
- set.add(listener);
- setEventListeners(set);
- }
-
- public void removeBrowserEventListener(BrowserEventListener listener) {
- Set set = getEventListeners();
- set.remove(listener);
- setEventListeners(set);
- }
-
- public int getLeft() {
- return getBrowserInteger("Left"); //$NON-NLS-1$
- }
-
- public int getTop() {
- return getBrowserInteger("Top"); //$NON-NLS-1$
- }
-
- public int getWidth() {
- return getBrowserInteger("Width"); //$NON-NLS-1$
- }
-
- public int getHeight() {
- return getBrowserInteger("Height"); //$NON-NLS-1$
- }
-
- public int getReadyState() {
- return getBrowserInteger("ReadyState"); //$NON-NLS-1$
- }
-
- public String getType() {
- return getBrowserString("Type"); //$NON-NLS-1$
- }
-
- public String getLocationURL() {
- return getBrowserString("LocationURL"); //$NON-NLS-1$
- }
-
- public String getLocationName() {
- return getBrowserString("LocationName"); //$NON-NLS-1$
- }
-
- public boolean getSilent() {
- return getBrowserBoolean("Silent"); //$NON-NLS-1$
- }
-
- public void setSilent(boolean silent) {
- setBrowserBoolean("Silent", silent); //$NON-NLS-1$
- }
-
- public boolean getDisableScriptDebugger() {
- return bDisableScriptDebugger;
- }
-
- public void setDisableScriptDebugger(boolean bDisable) {
- bDisableScriptDebugger = bDisable;
- }
-
- public boolean goBack() {
- return invokeBrowserMethod("GoBack"); //$NON-NLS-1$
- }
-
- public boolean goForward() {
- return invokeBrowserMethod("GoForward"); //$NON-NLS-1$
- }
-
- public boolean stop() {
- return invokeBrowserMethod("Stop"); //$NON-NLS-1$
- }
-
- public boolean refresh() {
- return invokeBrowserMethod("Refresh"); //$NON-NLS-1$
- }
-
- public boolean navigate(String url) {
- int[] pIdNavigate = auto
- .getIDsOfNames(new String[] { "Navigate", "URL" }); //$NON-NLS-1$ //$NON-NLS-2$
- if (null != pIdNavigate) {
- Variant varUrl = new Variant(url);
- Variant varResult = auto.invoke(pIdNavigate[0],
- new Variant[] { varUrl }, new int[] { pIdNavigate[1] });
- varUrl.dispose();
- if (varResult != null) {
- boolean result = varResult.getType() == OLE.VT_EMPTY;
- varResult.dispose();
- return result;
- }
- }
- return false;
- }
-
- public boolean navigate2(String url, int flags, String targetFrameName,
- Object postData, String headers) {
- int[] pIdNavigate2 = auto.getIDsOfNames(new String[] { "Navigate2" }); //$NON-NLS-1$
- if (null != pIdNavigate2) {
- Variant varUrl = new Variant(url);
- Variant varFlags = new Variant(flags);
- Variant varTargetFrameName = null == targetFrameName ? new Variant()
- : new Variant(targetFrameName);
- Variant varHeaders = null == headers ? new Variant() : new Variant(
- headers);
- if (!(postData instanceof Variant)) {
- postData = new Variant();
- }
- Variant varResult = auto.invoke(pIdNavigate2[0], new Variant[] {
- varUrl, varFlags, varTargetFrameName, (Variant) postData,
- varHeaders });
- varUrl.dispose();
- varFlags.dispose();
- varTargetFrameName.dispose();
- varHeaders.dispose();
- if (varResult != null) {
- boolean result = varResult.getType() == OLE.VT_EMPTY;
- varResult.dispose();
- return result;
- }
- }
- return false;
- }
-
- public boolean setFontSize(int nSize) {
- Variant varIn = new Variant(nSize);
- try {
- return OLE.S_OK == site.exec(OLE.OLECMDID_ZOOM,
- OLE.OLECMDEXECOPT_DONTPROMPTUSER, varIn, null);
- } catch (Exception e) {
- } finally {
- varIn.dispose();
- }
- return false;
- }
-
- public int getFontSize() {
- Variant varOut = new Variant();
- try {
- if (OLE.S_OK == site.exec(OLE.OLECMDID_ZOOM,
- OLE.OLECMDEXECOPT_DONTPROMPTUSER, null, varOut)) {
- if (OLE.VT_I4 == varOut.getType()) {
- return varOut.getInt();
- }
- }
- } catch (Exception e) {
- } finally {
- varOut.dispose();
- }
- return -1;
- }
-
- public boolean saveLiveDom(String fileName) {
- Variant varDocument = getBrowserVariant("Document"); //$NON-NLS-1$
- if (null != varDocument) {
- try {
- OleAutomation document = varDocument.getAutomation();
- Variant varDocEle = getVariant(document, "documentElement");
- document.dispose();
- if (null != varDocEle) {
- try {
- OleAutomation docEle = varDocEle.getAutomation();
- Variant varOuterHTML = getVariant(docEle, "outerHTML");
- docEle.dispose();
- if (null != varOuterHTML) {
- try {
- // for bug
- // replace "alt=\u3000" with "alt=\" \""
- // replace "alt=* " with "alt=\"*\" "
-
- PrintWriter pw = new PrintWriter(
- new OutputStreamWriter(
- new FileOutputStream(fileName),
- "UTF-8"));
- pw.println(varOuterHTML.getString());
- pw.flush();
- pw.close();
- return true;
- } catch (Exception e3) {
- e3.printStackTrace();
- } finally {
- varOuterHTML.dispose();
- }
- }
- } catch (Exception e2) {
- e2.printStackTrace();
- } finally {
- varDocEle.dispose();
- }
- }
- } catch (Exception e1) {
- e1.printStackTrace();
- } finally {
- varDocument.dispose();
- }
- }
- return false;
- }
-
- public boolean save(String fileName) {
- Variant varDocument = getBrowserVariant("Document"); //$NON-NLS-1$
- if (null != varDocument) {
- try {
- return saveDocument(varDocument, fileName);
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- varDocument.dispose();
- }
- }
- return false;
- }
-
- public int getBrowserAddress() {
- Variant variant = new Variant(auto);
- IDispatch iDispatch = variant.getDispatch();
- return iDispatch.getAddress();
- }
-
- public int[] getWholeSize() {
- int[] result = new int[] { -1, -1 };
- Variant varDocument = getBrowserVariant("Document"); //$NON-NLS-1$
- if (null != varDocument) {
- try {
- OleAutomation document = varDocument.getAutomation();
- Variant varDocEle = getVariant(document, "documentElement");
- if (null != varDocEle) {
- try {
- OleAutomation docEle = varDocEle.getAutomation();
- result[0] = getIntFromOleAutomation(docEle, "scrollWidth");
- result[1] = getIntFromOleAutomation(docEle, "scrollHeight");
- docEle.dispose();
-
- int bodySize[] = getBodySize(document);
-
- // System.out.println(result[0]+" "+result[1]+" :
- // "+bodySize[0]+" "+bodySize[1]);
-
- if (result[0] < bodySize[0]) {
- result[0] = bodySize[0];
- }
- if (result[1] < bodySize[1]) {
- result[1] = bodySize[1];
- }
-
- } catch (Exception e1) {
- e1.printStackTrace();
- } finally {
- varDocEle.dispose();
- }
- }
- document.dispose();
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- varDocument.dispose();
- }
- }
- return (result);
- }
-
- public ImagePositionInfo[] getAllImagePosition() {
- ImagePositionInfo[] result = new ImagePositionInfo[0];
- Variant varDocument = getBrowserVariant("Document");
- if (null != varDocument) {
- try {
- OleAutomation document = varDocument.getAutomation();
- Variant varImages = getVariant(document, "images");
- document.dispose();
- if (null != varImages) {
- try {
- OleAutomation images = varImages.getAutomation();
- result = getAllImagePosition(images);
- images.dispose();
- } catch (Exception e1) {
- e1.printStackTrace();
- } finally {
- varImages.dispose();
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- varDocument.dispose();
- }
- }
- return result;
- }
-
- public boolean scroll(int x, int y, int type) {
- if (type == 0 || type == 1) {
- Variant varDocument = getBrowserVariant("Document"); //$NON-NLS-1$
- if (null != varDocument) {
- try {
- OleAutomation document = varDocument.getAutomation();
- Variant varWindow = getVariant(document, "parentWindow");
- document.dispose();
- if (null != varWindow) {
- try {
- OleAutomation window = varWindow.getAutomation();
- String scrollType = "scrollBy";
- if (type == 1) {
- scrollType = "scrollTo";
- }
- int[] idScroll = window
- .getIDsOfNames(new String[] { scrollType });
- if (null != idScroll) {
- window.invoke(idScroll[0], new Variant[] {
- new Variant(x), new Variant(y) });
- window.dispose();
- return true;
- }
- window.dispose();
- } catch (Exception e1) {
- e1.printStackTrace();
- } finally {
- varWindow.dispose();
- }
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- varDocument.dispose();
- }
- }
- }
- return false;
- }
-
- /*
- * Browser event handlers
- */
-
- protected void onBeforeNavigate2(BeforeNavigate2Parameters param) {
- for (int i = 0; i < eventListeners.length; i++) {
- eventListeners[i].beforeNavigate2(param);
- }
- }
-
- protected void onNavigateComplete2(NavigateComplete2Parameters param) {
- for (int i = 0; i < eventListeners.length; i++) {
- eventListeners[i].navigateComplete2(param);
- }
- }
-
- protected void onNavigateError(NavigateErrorParameters param) {
- for (int i = 0; i < eventListeners.length; i++) {
- eventListeners[i].navigateError(param);
- }
- }
-
- protected void onDocumentComplete(DocumentCompleteParameters param) {
- for (int i = 0; i < eventListeners.length; i++) {
- eventListeners[i].documentComplete(param);
- }
- }
-
- protected void onNewWindow2(NewWindow2Parameters param) {
- for (int i = 0; i < eventListeners.length; i++) {
- eventListeners[i].newWindow2(param);
- }
- }
-
- protected void onWindowClosing(WindowClosingParameters param) {
- // param.setCancel(true);
- //
- for (int i = 0; i < eventListeners.length; i++) {
- eventListeners[i].windowClosing(param);
- }
- }
-
- protected void onWindowClosed() {
- for (int i = 0; i < eventListeners.length; i++) {
- eventListeners[i].windowClosed();
- }
- }
-
- protected void onStatusTextChange(StatusTextChangeParameters param) {
- for (int i = 0; i < eventListeners.length; i++) {
- eventListeners[i].statusTextChange(param);
- }
- }
-
- protected void onTitleChange(TitleChangeParameters param) {
- for (int i = 0; i < eventListeners.length; i++) {
- eventListeners[i].titleChange(param);
- }
- }
-
- protected void onProgressChange(ProgressChangeParameters param) {
- for (int i = 0; i < eventListeners.length; i++) {
- eventListeners[i].progressChange(param);
- }
- }
-
- /*
- * Private methods
- */
-
- private Set getEventListeners() {
- return new LinkedHashSet(Arrays.asList(eventListeners));
- }
-
- private void setEventListeners(Set set) {
- eventListeners = (BrowserEventListener[]) set
- .toArray(new BrowserEventListener[set.size()]);
- }
-
- private static boolean saveDocument(Variant varDocument, String fileName) {
- if (OLE.VT_DISPATCH == varDocument.getType()) {
- int[] pPersistFile = new int[1];
- try {
- if (OLE.S_OK == varDocument.getDispatch().QueryInterface(
- COM.IIDIPersistFile, pPersistFile)) {
- int pStrAddress = COM
- .SysAllocString((fileName + "\0").toCharArray()); //$NON-NLS-1$
- try {
- return OLE.S_OK == new IPersistFile(pPersistFile[0])
- .Save(pStrAddress, false);
- } finally {
- COM.SysFreeString(pStrAddress);
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- return false;
- }
-
- private boolean invokeBrowserMethod(String name) {
- int[] pIdName = auto.getIDsOfNames(new String[] { name });
- if (null != pIdName) {
- Variant varResult = auto.invoke(pIdName[0]);
- if (null != varResult) {
- try {
- return varResult.getType() == OLE.VT_EMPTY;
- } finally {
- varResult.dispose();
- }
- }
- }
- return false;
- }
-
- private Variant getBrowserVariant(String name) {
- int[] pIdName = auto.getIDsOfNames(new String[] { name });
- if (null != pIdName) {
- return auto.getProperty(pIdName[0]);
- }
- return null;
- }
-
- private int getBrowserInteger(String name) {
- Variant varResult = getBrowserVariant(name);
- if (null != varResult) {
- try {
- return varResult.getInt();
- } finally {
- varResult.dispose();
- }
- }
- return 0;
- }
-
- private String getBrowserString(String name) {
- Variant varResult = getBrowserVariant(name);
- if (null != varResult) {
- try {
- return varResult.getString();
- } finally {
- varResult.dispose();
- }
- }
- return null;
- }
-
- private boolean getBrowserBoolean(String name) {
- Variant varResult = getBrowserVariant(name);
- if (null != varResult) {
- try {
- return varResult.getBoolean();
- } finally {
- varResult.dispose();
- }
- }
- return false;
- }
-
- private boolean setBrowserVariant(String name, Variant var) {
- int[] pIdName = auto.getIDsOfNames(new String[] { name });
- if (null != pIdName) {
- return auto.setProperty(pIdName[0], var);
- }
- return false;
- }
-
- private boolean setBrowserInteger(String name, int value) {
- return setBrowserVariant(name, new Variant(value));
- }
-
- private boolean setBrowserString(String name, String value) {
- return setBrowserVariant(name, new Variant(value));
- }
-
- private boolean setBrowserBoolean(String name, boolean value) {
- return setBrowserVariant(name, new Variant(value));
- }
-
- private int[] getBodySize(OleAutomation document) {
- int[] result = { -1, -1 };
- Variant varBody = getVariant(document, "body");
- if (null != varBody) {
- try {
- OleAutomation body = varBody.getAutomation();
- int scrollWidth = getIntFromOleAutomation(body, "scrollWidth");
- int offsetLeft = getIntFromOleAutomation(body, "offsetLeft");
- int scrollHeight = getIntFromOleAutomation(body, "scrollHeight");
- int offsetTop = getIntFromOleAutomation(body, "offsetTop");
-
- // System.out.println(scrollWidth+" "+offsetLeft+"
- // "+scrollHeight+" "+offsetTop);
-
- result[0] = scrollWidth + offsetLeft * 2;
- result[1] = scrollHeight + offsetTop * 2;
-
- body.dispose();
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- varBody.dispose();
- }
- }
- return result;
- }
-
- private ImagePositionInfo[] getAllImagePosition(OleAutomation images) {
- ImagePositionInfo[] result = new ImagePositionInfo[0];
- int size = getIntFromOleAutomation(images, "length");
- if (size > -1) {
- ImagePositionInfo[] tmp = new ImagePositionInfo[size];
- int[] idItem = images.getIDsOfNames(new String[] { "Item" });
- for (int i = 0; i < size; i++) {
- Variant varImage = images.invoke(idItem[0],
- new Variant[] { new Variant(i) });
- if (null != varImage) {
- try {
- OleAutomation image = varImage.getAutomation();
- int[] bcr = getBoundingClientRect(image);
- int width = getIntFromOleAutomation(image, "Width");
- int height = getIntFromOleAutomation(image, "Height");
- String url = getStringFromOleAutomation(image, "src");
- image.dispose();
-
- //System.out.println(bcr[0]+" "+bcr[1]+" "+bcr[2]+" "+bcr[3]+" "+width+" "+height+" "+url);
-
- tmp[i] = new ImagePositionInfo(bcr[0],bcr[1],width,height,url);
-
- } catch (Exception e2) {
- e2.printStackTrace();
- return result;
- } finally {
- varImage.dispose();
- }
- }
- }
- result = tmp;
- }
- return result;
- }
-
- private int[] getBoundingClientRect(OleAutomation image) {
- int[] result = new int[] { 0, 0};//Left, Top
- if (null != image) {
- int[] idBCR = image.getIDsOfNames(new String[] {"getBoundingClientRect"});
- Variant varBCR = image.invoke(idBCR[0]);
- if (null != varBCR) {
- try {
- OleAutomation bcr = varBCR.getAutomation();
- result = new int[] { getIntFromOleAutomation(bcr, "Left"),
- getIntFromOleAutomation(bcr, "Top"),
- //getIntFromOleAutomation(bcr, "Right"),
- //getIntFromOleAutomation(bcr, "Bottom")
- };
- bcr.dispose();
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- varBCR.dispose();
- }
- }
- }
- return result;//
- }
-
- private Variant getVariant(OleAutomation target, String name) {
- if (null != target) {
- int[] pIdName = target.getIDsOfNames(new String[] { name });
- if (null != pIdName) {
- return target.getProperty(pIdName[0]);
- }
- }
- return null;
- }
-
- private int getIntFromOleAutomation(OleAutomation target, String name) {
- Variant varResult = getVariant(target, name);
- if (null != varResult) {
- try {
- return varResult.getInt();
- } finally {
- varResult.dispose();
- }
- }
- return -1;// TODO
- }
-
- private String getStringFromOleAutomation(OleAutomation target, String name) {
- Variant varResult = getVariant(target, name);
- if (null != varResult) {
- try {
- return varResult.getString();
- } finally {
- varResult.dispose();
- }
- }
- return "";// TODO
- }
-
- /**
- * Window procedure
- *
- * @param hwnd
- * @param msg
- * @param wParam
- * @param lParam
- * @return
- */
- int siteWindowProc(int hwnd, int msg, int wParam, int lParam) {
- try {
- if (!isClosed && OS.WM_PARENTNOTIFY == msg
- && wParam == OS.WM_DESTROY) {
- isClosed = true;
- onWindowClosed();
- return 0;
- }
- return OS.CallWindowProc(oldProc, hwnd, msg, wParam, lParam);
- } catch (Exception e) {
- System.out.println("error: siteWindowProc");
- // e.printStackTrace();
- }
- return 0;
- }
-
- /*
- * for debug
- */
- private static String dumpArags(Variant[] args) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < args.length; i++) {
- if (i > 0) {
- sb.append(", "); //$NON-NLS-1$
- }
- sb.append(i + ":"); //$NON-NLS-1$
- if ((OLE.VT_BYREF | OLE.VT_VARIANT) == args[i].getType()) {
- int byRef = args[i].getByRef();
- short[] dataType = new short[1];
- COM.MoveMemory(dataType, byRef, 2);
- String strType = ""; //$NON-NLS-1$
- int type = dataType[0];
- if ((type & OLE.VT_BYREF) != 0) {
- strType = "VT_BYREF|"; //$NON-NLS-1$
- type = type & ~OLE.VT_BYREF;
- }
- switch (type) {
- case OLE.VT_BOOL:
- strType += "VT_BOOL";break; //$NON-NLS-1$
- case OLE.VT_I2:
- strType += "VT_I2";break; //$NON-NLS-1$
- case OLE.VT_I4:
- strType += "VT_I4";break; //$NON-NLS-1$
- case OLE.VT_I8:
- strType += "VT_I8";break; //$NON-NLS-1$
- case OLE.VT_R4:
- strType += "VT_R4";break; //$NON-NLS-1$
- case OLE.VT_R8:
- strType += "VT_R8";break; //$NON-NLS-1$
- case OLE.VT_BSTR:
- strType += "VT_BSTR";break; //$NON-NLS-1$
- case OLE.VT_DISPATCH:
- strType += "VT_DISPATCH";break; //$NON-NLS-1$
- case OLE.VT_UNKNOWN:
- strType += "VT_UNKNOWN";break; //$NON-NLS-1$
- case OLE.VT_EMPTY:
- strType += "VT_EMPTY";break; //$NON-NLS-1$
- case OLE.VT_VARIANT:
- strType += "VT_VARIANT";break; //$NON-NLS-1$
- default:
- strType += "type=" + type;break; //$NON-NLS-1$
- }
- sb.append("REF_VARIANT(" + strType + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- sb.append(args[i]);
- }
- }
- return sb.toString();
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEControlSite.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEControlSite.java
deleted file mode 100644
index a85fc9d..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEControlSite.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.impl;
-
-import org.eclipse.swt.internal.ole.win32.COM;
-import org.eclipse.swt.internal.ole.win32.COMObject;
-import org.eclipse.swt.internal.ole.win32.GUID;
-import org.eclipse.swt.internal.win32.MSG;
-import org.eclipse.swt.internal.win32.OS;
-import org.eclipse.swt.ole.win32.OleControlSite;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-public class WebBrowserIEControlSite extends OleControlSite {
- COMObject iDocHostUIHandler;
- COMObject iOleCommandTarget;
-
- static final int OLECMDID_SHOWSCRIPTERROR = 40;
-
- static final String ABOUT_BLANK = "about:blank"; //$NON-NLS-1$
-
- public WebBrowserIEControlSite(Composite parent, int style, String progId) {
- super(parent, style, progId);
- }
-
- protected void createCOMInterfaces() {
- super.createCOMInterfaces();
- iDocHostUIHandler = new COMObject(new int[]{2, 0, 0, 4, 1, 5, 0, 0, 1, 1, 1, 3, 3, 2, 2, 1, 3, 2}){
- public int method0(int[] args) {return QueryInterface(args[0], args[1]);}
- public int method1(int[] args) {return AddRef();}
- public int method2(int[] args) {return Release();}
- public int method3(int[] args) {return ShowContextMenu(args[0], args[1], args[2], args[3]);}
- public int method4(int[] args) {return GetHostInfo(args[0]);}
- public int method5(int[] args) {return ShowUI(args[0], args[1], args[2], args[3], args[4]);}
- public int method6(int[] args) {return HideUI();}
- public int method7(int[] args) {return UpdateUI();}
- public int method8(int[] args) {return EnableModeless(args[0]);}
- public int method9(int[] args) {return OnDocWindowActivate(args[0]);}
- public int method10(int[] args) {return OnFrameWindowActivate(args[0]);}
- public int method11(int[] args) {return ResizeBorder(args[0], args[1], args[2]);}
- public int method12(int[] args) {return TranslateAccelerator(args[0], args[1], args[2]);}
- public int method13(int[] args) {return GetOptionKeyPath(args[0], args[1]);}
- public int method14(int[] args) {return GetDropTarget(args[0], args[1]);}
- public int method15(int[] args) {return GetExternal(args[0]);}
- public int method16(int[] args) {return TranslateUrl(args[0], args[1], args[2]);}
- public int method17(int[] args) {return FilterDataObject(args[0], args[1]);}
- };
- iOleCommandTarget = new COMObject(new int[]{2, 0, 0, 4, 5}) {
- public int method0(int[] args) {return QueryInterface(args[0], args[1]);}
- public int method1(int[] args) {return AddRef();}
- public int method2(int[] args) {return Release();}
- public int method3(int[] args) {return QueryStatus(args[0], args[1], args[2], args[3]);}
- public int method4(int[] args) {return Exec(args[0], args[1], args[2], args[3], args[4]);}
- };
- }
-
- protected void disposeCOMInterfaces() {
- super.disposeCOMInterfaces();
- if (iDocHostUIHandler != null) {
- iDocHostUIHandler.dispose();
- iDocHostUIHandler = null;
- }
- if (iOleCommandTarget != null) {
- iOleCommandTarget.dispose();
- iOleCommandTarget = null;
- }
- }
-
- protected int QueryInterface(int riid, int ppvObject) {
- int result = super.QueryInterface(riid, ppvObject);
- if (result == COM.S_OK) return result;
- if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
- GUID guid = new GUID();
- COM.MoveMemory(guid, riid, GUID.sizeof);
- if (COM.IsEqualGUID(guid, COM.IIDIDocHostUIHandler)) {
- COM.MoveMemory(ppvObject, new int[] {iDocHostUIHandler.getAddress()}, 4);
- AddRef();
- return COM.S_OK;
- }
- if (COM.IsEqualGUID(guid, COM.IIDIOleCommandTarget)) {
- COM.MoveMemory(ppvObject, new int[] {iOleCommandTarget.getAddress()}, 4);
- AddRef();
- return COM.S_OK;
- }
- COM.MoveMemory(ppvObject, new int[] {0}, 4);
- return COM.E_NOINTERFACE;
- }
-
- protected int AddRef() {
- return super.AddRef();
- }
-
- protected int Release() {
- return super.Release();
- }
-
- /* IDocHostUIHandler */
-
- int EnableModeless(int EnableModeless) {
- return COM.E_NOTIMPL;
- }
-
- int FilterDataObject(int pDO, int ppDORet) {
- return COM.E_NOTIMPL;
- }
-
- int GetDropTarget(int pDropTarget, int ppDropTarget) {
- return COM.E_NOTIMPL;
- }
-
- int GetExternal(int ppDispatch) {
- OS.MoveMemory(ppDispatch, new int[] {0}, 4);
- return COM.S_FALSE;
- }
-
- int GetHostInfo(int pInfo) {
- int style = getParent().getParent().getStyle();
- int info = 0x00040000;
-// if ((style & SWT.BORDER) == 0) info |= 0x00200000;
- OS.MoveMemory(pInfo + 4, new int[] {info}, 4);
- return COM.S_OK;
- }
-
- int GetOptionKeyPath(int pchKey, int dw) {
- return COM.E_NOTIMPL;
- }
-
- int HideUI() {
- return COM.E_NOTIMPL;
- }
-
- int OnDocWindowActivate(int fActivate) {
- return COM.E_NOTIMPL;
- }
-
- int OnFrameWindowActivate(int fActivate) {
- return COM.E_NOTIMPL;
- }
-
- int ResizeBorder(int prcBorder, int pUIWindow, int fFrameWindow) {
- return COM.E_NOTIMPL;
- }
-
- int ShowContextMenu(int dwID, int ppt, int pcmdtReserved, int pdispReserved) {
- /* Show default IE popup menu */
- return COM.S_FALSE;
- }
-
- int ShowUI(int dwID, int pActiveObject, int pCommandTarget, int pFrame, int pDoc) {
- return COM.E_NOTIMPL;
- }
-
- int TranslateAccelerator(int lpMsg, int pguidCmdGroup, int nCmdID) {
- /*
- * Handle menu accelerator
- */
- Menu menubar = getShell().getMenuBar();
- if (menubar != null && !menubar.isDisposed() && menubar.isEnabled()) {
- Shell shell = menubar.getShell();
- int hwnd = shell.handle;
- int hAccel = OS.SendMessage(hwnd, OS.WM_APP+1, 0, 0);
- if (hAccel != 0) {
- MSG msg = new MSG();
- OS.MoveMemory(msg, lpMsg, MSG.sizeof);
- if (OS.TranslateAccelerator(hwnd, hAccel, msg) != 0) {
- return COM.S_OK;
- }
- }
- }
- /*
- * Block Ctrl+N (New window)
- */
- MSG msg = new MSG();
- OS.MoveMemory(msg, lpMsg, MSG.sizeof);
- if (msg.message == OS.WM_KEYDOWN && msg.wParam == OS.VK_N && OS.GetKeyState (OS.VK_CONTROL) < 0) {
- return COM.S_OK;
- }
- return COM.S_FALSE;
- }
-
- int TranslateUrl(int dwTranslate, int pchURLIn, int ppchURLOut) {
- return COM.E_NOTIMPL;
- }
-
- int UpdateUI() {
- return COM.E_NOTIMPL;
- }
-
- /* IOleCommandTarget */
- int QueryStatus(int pguidCmdGroup, int cCmds, int prgCmds, int pCmdText) {
- return COM.E_NOTSUPPORTED;
- }
-
- int Exec(int pguidCmdGroup, int nCmdID, int nCmdExecOpt, int pvaIn, int pvaOut) {
- /*
- * Disable script error dialog.
- */
-// System.out.println("pguidCmdGroup="+pguidCmdGroup+", nCmdID="+nCmdID+", nCmdExecOpt="+nCmdExecOpt+", pvaIn="+pvaIn+", pvaOut="+pvaOut);
- if (pguidCmdGroup != 0 && nCmdID == OLECMDID_SHOWSCRIPTERROR) {
- boolean bDisable = ((WebBrowserIEComposite)(getParent().getParent())).bDisableScriptDebugger;
- if( bDisable ) {
- GUID guid = new GUID();
- COM.MoveMemory(guid, pguidCmdGroup, GUID.sizeof);
- if (COM.IsEqualGUID(guid, COM.CGID_DocHostCommandHandler)) {
- return COM.S_OK;
- }
- }
- }
- return COM.E_NOTSUPPORTED;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEImpl.java
deleted file mode 100644
index 0cdd67a..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEImpl.java
+++ /dev/null
@@ -1,573 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.impl;
-
-import java.io.File;
-import java.io.FileInputStream;
-
-import org.eclipse.actf.model.dom.dombycom.DomByCom;
-import org.eclipse.actf.model.dom.html.util.HtmlParserUtil;
-import org.eclipse.actf.model.ui.IModelServiceHolder;
-import org.eclipse.actf.model.ui.IModelServiceScrollManager;
-import org.eclipse.actf.model.ui.ImagePositionInfo;
-import org.eclipse.actf.model.ui.ModelServiceSizeInfo;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserStyleInfo;
-import org.eclipse.actf.model.ui.editors.ie.BrowserIE_Plugin;
-import org.eclipse.actf.model.ui.editors.ie.events.INewWiondow2EventListener;
-import org.eclipse.actf.model.ui.editors.ie.events.IWindowClosedEventListener;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.BeforeNavigate2Parameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.BrowserEventListener;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.DocumentCompleteParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NavigateComplete2Parameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NavigateErrorParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NewWindow2Parameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.ProgressChangeParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.StatusTextChangeParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.TitleChangeParameters;
-import org.eclipse.actf.model.ui.editors.ie.internal.events.WindowClosingParameters;
-import org.eclipse.actf.model.ui.editors.ie.win32.RegistryUtil;
-import org.eclipse.actf.model.ui.util.ScrollBarSizeUtil;
-import org.eclipse.actf.util.logging.DebugPrintUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-public class WebBrowserIEImpl implements IWebBrowserACTF, BrowserEventListener {
-
- private WebBrowserToolbar toolbar;
-
- private WebBrowserIEComposite browserComposite;
-
- private boolean _inNavigation = false;
-
- private boolean _inReload = false;
-
- private boolean _inStop = false;
-
- private boolean _inJavascript = false;
-
- // TODO back,forw,stop,replace,etc.
- private boolean _urlExist;
-
- private int _navigateErrorCode;
-
- private IModelServiceHolder _holder = null;
-
- private boolean onloadPopupBlock = true;
-
- // private boolean allowNewWindow = false;
-
- private IModelServiceScrollManager scrollManager;
-
- private DomByCom domByCom;
-
- private INewWiondow2EventListener newWindow2EventListener = null;
-
- private IWindowClosedEventListener windowClosedEventListener = null;
-
- public WebBrowserIEImpl(IModelServiceHolder holder, Composite parent,
- String startURL) {
- this._holder = holder;
-
- GridLayout gridLayout = new GridLayout();
- gridLayout.verticalSpacing = 0;
- gridLayout.horizontalSpacing = 0;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- parent.setLayout(gridLayout);
-
- toolbar = new WebBrowserToolbar(this, parent, SWT.NONE);
- browserComposite = new WebBrowserIEComposite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- browserComposite.setLayout(layout);
- browserComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if (null == startURL) {
- startURL = "about:blank"; //$NON-NLS-1$
- }
- toolbar.setAddressTextString(startURL);
-
- browserComposite.setDisableScriptDebugger(true);
-
- browserComposite.addBrowserEventListener(this);
-
- scrollManager = new WebBrowserIEScrollManager(this);
-
- domByCom = new DomByCom(getIWebBrowser2());
-
- navigate(startURL);
- }
-
- public void setFocusAddressText(boolean selectAll) {
- toolbar.setFocusToAddressText(selectAll);
- }
-
- public void showAddressText(boolean flag) {
- toolbar.showAddressText(flag);
- }
-
- /*
- * browse commands
- */
-
- public void navigate(String url) {
-
- toolbar.setAddressTextString(url);
-
- this._urlExist = true;
- this._navigateErrorCode = 200;
-
- browserComposite.navigate(url);
-
- // TODO file:// case (ReadyState = 1)
- // System.out.println("State:"+getReadyState());
- }
-
- public void goBackward() {
- // TODO rename?
- browserComposite.goBack();
- }
-
- public void goForward() {
- browserComposite.goForward();
- }
-
- public void navigateStop() {
- if (_inNavigation || _inReload) {
- _inStop = true;
- _inNavigation = false;
- _inReload = false;
- _inJavascript = false;
- }
- browserComposite.stop();
- }
-
- public void navigateRefresh() {
- if (!_inReload) {
- _inReload = true;
- _inJavascript = false;
- WebBrowserEventExtension.myRefresh(WebBrowserIEImpl.this);
- }
- browserComposite.refresh();
- }
-
- /**
- * @param isWhole
- * @return (browserSizeX, browserSizeY, pageSizeX, pageSizeY)
- */
- public ModelServiceSizeInfo getBrowserSize(boolean isWhole) {
- int[] size = new int[] { 1, 1, 1, 1 };
- int width = browserComposite.getWidth() - 4;
- int height = browserComposite.getHeight() - 4;
- int scrollbarWidth = ScrollBarSizeUtil.getVerticalBarWidth();
- size[0] = width - scrollbarWidth;
- size[1] = height;
- size[2] = width - scrollbarWidth;
- size[3] = height;
- if (isWhole) {
- int[] tmpSize = browserComposite.getWholeSize();
- if (tmpSize.length == 2 && tmpSize[0] > -1 && tmpSize[1] > -1) {
- size[2] = tmpSize[0];
- size[3] = tmpSize[1];
- if (tmpSize[0] > size[0]) {
- size[1] -= scrollbarWidth;
- }
- }
- }
-
- return (new ModelServiceSizeInfo(size[0], size[1], size[2], size[3]));
- }
-
- /*
- * navigation result
- */
-
- public int getReadyState() {
- return browserComposite.getReadyState();
- }
-
- // TODO add to IWebBrowser Interface
- // Browser properties
- // "Width"
- // "Height"
- // "Left"
- // "Top"
- // "BrowserType"
- // "Silent"
- // "setSilent"
-
- // TODO remove?
- public boolean isReady() {
- return (getReadyState() == READYSTATE_COMPLETE);
- }
-
- public String getURL() {
- return browserComposite.getLocationURL();
- }
-
- public String getLocationName() {
- return browserComposite.getLocationName();
- }
-
- public boolean isUrlExists() {
- // TODO
- return this._urlExist;
- }
-
- public int getNavigateErrorCode() {
- // TODO
- return this._navigateErrorCode;
- }
-
- /*
- * Scroll
- */
-
- public IModelServiceScrollManager getScrollManager() {
- return scrollManager;
- }
-
- public void scrollY(int y) {
- browserComposite.scroll(0, y, WebBrowserIEComposite.SCROLL_BY);
- }
-
- public void scrollTo(int x, int y) {
- browserComposite.scroll(x, y, WebBrowserIEComposite.SCROLL_TO);
- }
-
- /*
- * browser setting
- */
- public void setHlinkStop(boolean bStop) {
- // TODO low priority
- }
-
- public void setWebBrowserSilent(boolean bSilent) {
- browserComposite.setSilent(bSilent);
- }
-
- public void setDisableScriptDebugger(boolean bDisable) {
- browserComposite.setDisableScriptDebugger(bDisable);
- }
-
- public void setDisplayImage(boolean display) {
- // TODO
- }
-
- public boolean isDisableScriptDebugger() {
- return browserComposite.getDisableScriptDebugger();
- }
-
- public void setFontSize(int fontSize) {
- browserComposite.setFontSize(fontSize);
- }
-
- public int getFontSize() {
- return browserComposite.getFontSize();
- }
-
- /*
- * highlight
- */
-
- public void highlightElementById(String idVal) {
- // TODO low priority
- }
-
- public void hightlightElementByAttribute(String name, String value) {
- // TODO low priority
- }
-
- public void recoveryHighlight() {
- // TODO low priority
- }
-
- RGB getAnchorColor() {
- String color = RegistryUtil
- .getIERegistryString(RegistryUtil.IE_ANCHOR_COLOR);
- return getRGB(color);
- }
-
- RGB getVisitedAnchorColor() {
- String color = RegistryUtil
- .getIERegistryString(RegistryUtil.IE_ANCHOR_COLOR_VISITED);
- return getRGB(color);
- }
-
- private RGB getRGB(String color) {
- if (null != color) {
- try {
- String[] strArray = color.split(","); //$NON-NLS-1$
- return new RGB(Integer.parseInt(strArray[0]), Integer
- .parseInt(strArray[1]), Integer.parseInt(strArray[2]));
- } catch (Exception e) {
- }
- }
- return null;
- }
-
- public int getIWebBrowser2() {
- return browserComposite.getBrowserAddress();
- }
-
- public String[] getSupportMIMETypes() {
- return MIMETYPES_HTML;
- }
-
- public String[] getSupportExtensions() {
- return EXTS_HTML;
- }
-
- public void open(String url) {
- navigate(url);
- }
-
- public void open(File target) {
- if (null != target) {
- // TODO test
- navigate(target.getAbsolutePath());
- }
- }
-
- public Document getDocument() {
- try {
- File tmpF = BrowserIE_Plugin.getDefault().createTempFile("actf", "html");
- saveOriginalDocument(tmpF.getAbsolutePath());
- HtmlParserUtil hpu = new HtmlParserUtil();
- hpu.parse(new FileInputStream(tmpF));
- return hpu.getSHDocument();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
- }
-
- public Document getLiveDocument() {
- return domByCom.getDocument();
- }
-
- public Composite getTargetComposite() {
- return browserComposite;
- }
-
- public File saveDocumentAsHTMLFile(String file) {
- if (null != file) {
- // TODO replace with DomByCOM (need write as XML support)
- boolean saveLiveDOM = (browserComposite.saveLiveDom(file));
- if (!saveLiveDOM) {
- return new File(file);
- }
- }
- return null;
- }
-
- public File saveOriginalDocument(String file) {
- if (null != file) {
- boolean saveOrigHtmlSource = (browserComposite.save(file));
- if (!saveOrigHtmlSource) {
- return new File(file);
- }
- }
- return null;
- }
-
- public void jumpToNode(Node target) {
- // TODO impl for Runtime Dom
- }
-
- public String getCurrentMIMEType() {
- // TODO get info from browser
- return MIMETYPES_HTML[0];
- }
-
- /*
- * BrowserEventListener implementations
- */
-
- public void beforeNavigate2(BeforeNavigate2Parameters param) {
- // _inNavigation = true;
- String target = param.getUrl();
- DebugPrintUtil.debugPrintln("BN: " + target + " "
- + param.getTargetFrameName());
- if (!_inReload) {
- if (!target.startsWith("javascript")) { // TODO //$NON-NLS-1$
- _inJavascript = false;
- _inNavigation = true;
- _inReload = false;
- } else {
- _inJavascript = true;
- _inNavigation = false;
- _inReload = false;
- }
- }
- WebBrowserEventExtension.beforeNavigate(this, target, param
- .getTargetFrameName(), _inNavigation);
-
- }
-
- public void documentComplete(DocumentCompleteParameters param) {
- if (param.isTopWindow()) {
- WebBrowserEventExtension.myDocumentComplete(this);
- // System.out.println("myDocComplete");
- _inNavigation = false;
- _inJavascript = false;
- _inReload = false;
- }
- // System.out.println("Document Complete:"+param.getUrl();
- }
-
- public void navigateComplete2(NavigateComplete2Parameters param) {
- WebBrowserEventExtension.navigateComplete(this, param.getUrl());
- toolbar
- .setAddressTextString(browserComposite.getLocationURL()/* param.getUrl() */);
- DebugPrintUtil.debugPrintln("NavigateComplete2");
- }
-
- public void navigateError(NavigateErrorParameters param) {
- DebugPrintUtil.debugPrintln("Navigate Error. URL:" + param.getUrl()
- + " Status Code:" + param.getStatusCode());
-
- _navigateErrorCode = param.getStatusCode();
- _urlExist = false;
- _inNavigation = false;
- }
-
- public void newWindow2(NewWindow2Parameters param) {
- if (_inNavigation && onloadPopupBlock/* !browser2.READYSTATE_COMPLETE */) {
- // TODO
- param.setCancel(true);
- } else if (newWindow2EventListener != null) {
- newWindow2EventListener.newWindow2(param);
- }
- }
-
- public void progressChange(ProgressChangeParameters param) {
- int prog = param.getProgress();
- int progMax = param.getProgressMax();
- WebBrowserEventExtension.progressChange(this, prog, progMax);
- DebugPrintUtil.debugPrintln("Stop: " + _inStop + " Reload: "
- + _inReload + " inJavaScript: " + _inJavascript
- + " navigation: " + _inNavigation);
- if (_inStop) {
- if (prog == 0 && progMax == 0) {
- _inStop = false;
- DebugPrintUtil.debugPrintln("stop fin");
- WebBrowserEventExtension.navigateStop(this);
- }
- } else if (_inReload) {
- if (prog == 0 && progMax == 0) {
- _inReload = false;
- DebugPrintUtil.debugPrintln("reload fin");
- WebBrowserEventExtension.myRefreshComplete(this);
- }
- } else if (_inJavascript) {
- if (prog == -1 && progMax == -1) {
- _inJavascript = false;
- DebugPrintUtil.debugPrintln("javascript fin");
- }
- } else if (!_inNavigation && !(prog == 0 && progMax == 0)) {
- // 0/0 is complete
- _inReload = true;
- DebugPrintUtil.debugPrintln("reload");
- WebBrowserEventExtension.myRefresh(this);
- }
- }
-
- public void statusTextChange(StatusTextChangeParameters param) {
- // System.out.println(param.getText());
- }
-
- public void titleChange(TitleChangeParameters param) {
- try {
- String title = param.getText();
- WebBrowserEventExtension.titleChange(this, title);
- DebugPrintUtil.debugPrintln("TitleChange");
- if (!(_inNavigation || _inStop)) {
- if (!_inReload) {
- _inReload = true;
- _inJavascript = false;
- DebugPrintUtil.debugPrintln("reload");
- WebBrowserEventExtension.myRefresh(this);
- }
- }
- _holder.setEditorTitle(title);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void windowClosing(WindowClosingParameters param) {
- }
-
- public void windowClosed() {
- if (windowClosedEventListener != null) {
- windowClosedEventListener.windowClosed();
- }
- }
-
- public Object getAttribute(String name) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getID() {
- return WebBrowserIEImpl.class.getName() + ":" + this;
- }
-
- public String getTitle() {
- return getLocationName();
- }
-
- public void setNewWindow2EventListener(
- INewWiondow2EventListener newWindow2EventListner) {
- this.newWindow2EventListener = newWindow2EventListner;
- }
-
- public void setWindowClosedEventListener(
- IWindowClosedEventListener windowClosingEventListener) {
- this.windowClosedEventListener = windowClosingEventListener;
- }
-
- public ImagePositionInfo[] getAllImagePosition() {
- return browserComposite.getAllImagePosition();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.IModelService#getModelServiceHolder()
- */
- public IModelServiceHolder getModelServiceHolder() {
- return _holder;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF#getStyleInfo()
- */
- public IWebBrowserStyleInfo getStyleInfo() {
- // TODO obtain current style info from live DOM [233615]
- // need to wait IPZilla [2323]
- return new WebBrowserStyleInfoImpl(this);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEScrollManager.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEScrollManager.java
deleted file mode 100644
index ff8e40a..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserIEScrollManager.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.impl;
-
-import org.eclipse.actf.model.ui.IModelServiceScrollManager;
-import org.eclipse.actf.model.ui.ModelServiceSizeInfo;
-
-
-
-public class WebBrowserIEScrollManager implements IModelServiceScrollManager {
-
- WebBrowserIEImpl browserIE;
-
- public WebBrowserIEScrollManager(WebBrowserIEImpl browserIE) {
- this.browserIE = browserIE;
- }
-
- //do not have to wait rendering
-
- public void absoluteCoordinateScroll(int y, boolean waitRendering) {
- browserIE.scrollY(y);
- }
-
- public void absoluteCoordinateScroll(int x, int y, boolean waitRendering) {
- browserIE.scrollTo(x, y);
- }
-
- public int decrementScrollX(boolean waitRendering) {
- return -1;
- }
-
- public int decrementScrollY(boolean waitRendering) {
- return -1;
- }
-
- public int incrementScrollX(boolean waitRendering) {
- return -1;
- }
-
- public int incrementScrollY(boolean waitRendering) {
- return -1;
- }
-
- public int decrementLargeScrollX(boolean waitRendering) {
- return -1;
- }
-
- public int decrementLargeScrollY(boolean waitRendering) {
- return -1;
- }
-
- public int incrementLargeScrollX(boolean waitRendering) {
- return -1;
- }
-
- public int incrementLargeScrollY(boolean waitRendering) {
- return -1;
- }
-
- public int decrementPageScroll(boolean waitRendering) {
- return -1;
- }
-
- public int incrementPageScroll(boolean waitRendering) {
- return -1;
- }
-
- public int jumpToPage(int pageNumber, boolean waitRendering) {
- return -1;
- }
-
- public int getCurrentPageNumber() {
- return -1;
- }
-
- public int getLastPageNumber() {
- return -1;
- }
-
- public int getScrollType() {
- return ABSOLUTE_COORDINATE;
- }
-
- public ModelServiceSizeInfo getSize(boolean isWhole) {
- return browserIE.getBrowserSize(isWhole);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserStyleInfoImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserStyleInfoImpl.java
deleted file mode 100644
index d18c9a3..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserStyleInfoImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.impl;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-
-import org.eclipse.actf.model.dom.dombycom.IElementEx;
-import org.eclipse.actf.model.ui.ModelServiceSizeInfo;
-import org.eclipse.actf.model.ui.editor.browser.ICurrentStyles;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserStyleInfo;
-import org.eclipse.actf.util.dom.TreeWalkerImpl;
-import org.eclipse.swt.graphics.RGB;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.traversal.NodeFilter;
-
-public class WebBrowserStyleInfoImpl implements IWebBrowserStyleInfo {
- private static final String TAG_HEAD = "HEAD";
- private final WebBrowserIEImpl browser;
-
- public WebBrowserStyleInfoImpl(WebBrowserIEImpl browser) {
- this.browser = browser;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.IWebBrowserStyleInfo#getCurrentStyles()
- */
- public HashMap<String, ICurrentStyles> getCurrentStyles() {
- HashMap<String, ICurrentStyles> currentStyles = new HashMap<String, ICurrentStyles>(
- 512);
- Document doc = browser.getLiveDocument();
- TreeWalkerImpl treeWalker = new TreeWalkerImpl(doc,
- NodeFilter.SHOW_ELEMENT, new NodeFilter() {
-
- public short acceptNode(Node arg0) {
- if (TAG_HEAD.equalsIgnoreCase(arg0.getNodeName())) {
- return FILTER_REJECT;
- }
- return FILTER_ACCEPT;
- }
- }, false);
- Node tmpN = treeWalker.nextNode();
- URL base = null;
- try {
- base = new URL(browser.getURL());
- } catch (MalformedURLException e) {
- e.printStackTrace();
- }
- while (tmpN != null) {
- if (tmpN instanceof IElementEx) {
- ICurrentStyles curStyle = new CurrentStylesImpl(
- (IElementEx) tmpN, base);
- currentStyles.put(curStyle.getXPath(), curStyle);
- }
- tmpN = treeWalker.nextNode();
- }
-
- return currentStyles;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.IWebBrowserStyleInfo#getUnvisitedLinkColor()
- */
- public RGB getUnvisitedLinkColor() {
- return browser.getAnchorColor();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.IWebBrowserStyleInfo#getVisitedLinkColor()
- */
- public RGB getVisitedLinkColor() {
- return browser.getVisitedAnchorColor();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.model.ui.editor.browser.IWebBrowserStyleInfo#getSizeInfo()
- */
- public ModelServiceSizeInfo getSizeInfo(boolean isWhole) {
- return browser.getBrowserSize(isWhole);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserToolbar.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserToolbar.java
deleted file mode 100644
index a399c07..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/impl/WebBrowserToolbar.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.actf.model.ui.editors.ie.impl;
-
-import org.eclipse.actf.model.ui.ModelUIPlugin;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.editors.ie.BrowserIE_Plugin;
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-
-public class WebBrowserToolbar extends Composite {
-
- // TODO move to base plugin
-
- private Text _addressText;
-
- private boolean _isFocusOnText;
-
- private IWebBrowserACTF browser;
-
- public WebBrowserToolbar(IWebBrowserACTF browser, Composite parent, int style) {
- super(parent, style);
-
- this.browser = browser;
-
- setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- GridLayout gridLayout = new GridLayout();
- gridLayout.marginBottom = 1;
- gridLayout.verticalSpacing = 0;
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- gridLayout.horizontalSpacing = 0;
- gridLayout.numColumns = 3;
- setLayout(gridLayout);
-
- initLayout();
- }
-
- private void initLayout() {
- Label addressLabel = new Label(this, SWT.NONE);
- addressLabel.setLayoutData(new GridData());
- addressLabel.setText(" " + ModelServiceMessages.getString("WebBrowser.Address")); //$NON-NLS-1$ //$NON-NLS-2$
- addressLabel.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent arg0) {
- if (arg0.stateMask == SWT.ALT && (arg0.character == 'd' || arg0.character == 'D')) {
- _addressText.setFocus();
- _addressText.selectAll();
- }
- }
- });
-
- this._addressText = new Text(this, SWT.SINGLE | SWT.BORDER);
- GridData gridData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
- gridData.widthHint = 1024;
- _addressText.setLayoutData(gridData);
- this._addressText.addFocusListener(new FocusAdapter() {
- public void focusLost(FocusEvent arg0) {
- _isFocusOnText = false;
- if (browser != null) {
- WebBrowserEventExtension.focusLostOfAddressText(browser);
- }
- }
-
- public void focusGained(FocusEvent arg0) {
- _addressText.selectAll();
- if (browser != null) {
- WebBrowserEventExtension.focusGainedOfAddressText(browser);
- }
- }
- });
-
- this._addressText.addMouseListener(new MouseAdapter() {
- public void mouseUp(MouseEvent arg0) {
- if (!_isFocusOnText) {
- _addressText.selectAll();
- _isFocusOnText = true;
- }
- }
-
- public void mouseDoubleClick(MouseEvent e) {
- _addressText.selectAll();
- }
- });
-
- // TODO use action
-
- this._addressText.addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- if (e.character == SWT.CR) {
- if (browser != null) {
- browser.open(_addressText.getText());
- // TODO: Remaining the focus on the address field causes navigation problem on aiBrowser
- // As a makeshift, we move the focus to the toolbar parent but we should reconsider
- // this treatment.
- WebBrowserToolbar.this.forceFocus();
- }
- }
- }
-
- public void keyReleased(KeyEvent e) {
- }
- });
-
- Button searchButton = new Button(this, SWT.NULL);
- searchButton.setLayoutData(getButtonsGridData());
- searchButton.setText(ModelServiceMessages.getString("WebBrowser.Go")); //$NON-NLS-1$
- searchButton.setToolTipText(ModelServiceMessages.getString("WebBrowser.Go_tp")); //$NON-NLS-1$
- //TODO
- searchButton.setImage(BrowserIE_Plugin.imageDescriptorFromPlugin(ModelUIPlugin.PLUGIN_ID, "icons/browser/go.png").createImage());
- searchButton.addMouseListener(new MouseAdapter() {
- public void mouseUp(MouseEvent e) {
- if (browser != null) {
- browser.open(_addressText.getText());
- }
- }
- });
- // _compositeParent.getShell().setDefaultButton(searchButton);
- }
-
- private GridData getButtonsGridData() {
- GridData gridData = new GridData();
- gridData.heightHint = 32;
- gridData.widthHint = 32;
- gridData.horizontalAlignment = GridData.HORIZONTAL_ALIGN_CENTER;
-
- return gridData;
- }
-
- public String getAddressTextString() {
- return _addressText.getText();
- }
-
- public void setAddressTextString(String targetS) {
- _addressText.setText(targetS);
- }
-
- public void setFocusToAddressText(boolean selectAll) {
- if (!isVisible()) setVisible(true);
- _addressText.setFocus();
- if (selectAll) {
- _addressText.selectAll();
- } else {
- _addressText.setSelection(0);
- }
- }
-
- public void showAddressText(boolean flag) {
- this.setVisible(flag);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/BeforeNavigate2Parameters.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/BeforeNavigate2Parameters.java
deleted file mode 100644
index 8238d2e..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/BeforeNavigate2Parameters.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-
-public interface BeforeNavigate2Parameters {
-
- public int getBrowserAddress();
-
- public String getUrl();
-
- public int getFlags();
-
- public String getTargetFrameName();
-
- public Object getPostData();
-
- public String getHeaders();
-
- public boolean getCancel();
-
- public void setCancel(boolean cancel);
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/BrowserEventAdapter.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/BrowserEventAdapter.java
deleted file mode 100644
index 98405ef..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/BrowserEventAdapter.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-public abstract class BrowserEventAdapter implements BrowserEventListener {
-
- public void beforeNavigate2(BeforeNavigate2Parameters param) {
- }
-
- public void navigateComplete2(NavigateComplete2Parameters param) {
- }
-
- public void navigateError(NavigateErrorParameters param) {
- }
-
- public void documentComplete(DocumentCompleteParameters param) {
- }
-
- public void newWindow2(NewWindow2Parameters param) {
- }
-
- public void progressChange(ProgressChangeParameters param) {
- }
-
- public void statusTextChange(StatusTextChangeParameters param) {
- }
-
- public void titleChange(TitleChangeParameters param) {
- }
-
- public void windowClosing(WindowClosingParameters param) {
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/BrowserEventListener.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/BrowserEventListener.java
deleted file mode 100644
index ddc17e7..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/BrowserEventListener.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-public interface BrowserEventListener {
-
- public void beforeNavigate2(BeforeNavigate2Parameters param);
-
- public void navigateComplete2(NavigateComplete2Parameters param);
-
- public void navigateError(NavigateErrorParameters param);
-
- public void documentComplete(DocumentCompleteParameters param);
-
- public void newWindow2(NewWindow2Parameters param);
-
- public void windowClosing(WindowClosingParameters param);
-
- public void statusTextChange(StatusTextChangeParameters param);
-
- public void titleChange(TitleChangeParameters param);
-
- public void progressChange(ProgressChangeParameters param);
-
- public void windowClosed();
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/DocumentCompleteParameters.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/DocumentCompleteParameters.java
deleted file mode 100644
index 505e25d..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/DocumentCompleteParameters.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-public interface DocumentCompleteParameters {
-
- public int getWindowAddress();
-
- public String getUrl();
-
- public boolean isTopWindow();
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/NavigateComplete2Parameters.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/NavigateComplete2Parameters.java
deleted file mode 100644
index c1a559f..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/NavigateComplete2Parameters.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-public interface NavigateComplete2Parameters {
-
- public int getBrowserAddress();
-
- public String getUrl();
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/NavigateErrorParameters.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/NavigateErrorParameters.java
deleted file mode 100644
index 2f162a0..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/NavigateErrorParameters.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-
-public interface NavigateErrorParameters {
-
- public int getBrowserAddress();
-
- public String getUrl();
-
- public String getTargetFrameName();
-
- public int getStatusCode();
-
- public boolean getCancel();
-
- public void setCancel(boolean cancel);
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/NewWindow2Parameters.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/NewWindow2Parameters.java
deleted file mode 100644
index e207cfc..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/NewWindow2Parameters.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-public interface NewWindow2Parameters {
-
- public int getBrowserAddress();
-
- public void setBrowserAddress(int address);
-
- public boolean getCancel();
-
- public void setCancel(boolean cancel);
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/ProgressChangeParameters.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/ProgressChangeParameters.java
deleted file mode 100644
index 4348ed0..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/ProgressChangeParameters.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-public interface ProgressChangeParameters {
-
- public int getProgress();
-
- public int getProgressMax();
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/StatusTextChangeParameters.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/StatusTextChangeParameters.java
deleted file mode 100644
index df618e2..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/StatusTextChangeParameters.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-public interface StatusTextChangeParameters {
-
- public String getText();
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/TitleChangeParameters.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/TitleChangeParameters.java
deleted file mode 100644
index 5fec03b..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/TitleChangeParameters.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-public interface TitleChangeParameters {
-
- public String getText();
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/WindowClosingParameters.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/WindowClosingParameters.java
deleted file mode 100644
index 0615035..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/WindowClosingParameters.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events;
-
-
-
-public interface WindowClosingParameters {
-
- public boolean getIsChildWindow();
-
- public boolean getCancel();
-
- public void setCancel(boolean cancel);
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/AbstractEventParameters.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/AbstractEventParameters.java
deleted file mode 100644
index 7c12b14..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/AbstractEventParameters.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events.impl;
-
-import org.eclipse.swt.internal.ole.win32.COM;
-import org.eclipse.swt.ole.win32.OleAutomation;
-import org.eclipse.swt.ole.win32.OleControlSite;
-import org.eclipse.swt.ole.win32.OleEvent;
-import org.eclipse.swt.ole.win32.Variant;
-
-
-
-public abstract class AbstractEventParameters {
-
- protected OleEvent event;
-
- protected AbstractEventParameters(OleEvent event) {
- this.event = event;
- }
-
- protected Variant getVariant(int index) {
- try {
- return event.arguments[index];
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- return null;
- }
-
- protected String getString(int index) {
- try {
- return event.arguments[index].getString();
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- return null;
- }
-
- protected int getInteger(int index) {
- try {
- return event.arguments[index].getInt();
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- return 0;
- }
-
- protected boolean getBoolean(int index) {
- try {
- return event.arguments[index].getBoolean();
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- return false;
- }
-
- protected void setBooleanByRef(int index, boolean value) {
- try {
- event.arguments[index].setByRef(value);
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- }
-
- protected int getIntegerByRef(int index) {
- try {
- int byRef = event.arguments[index].getByRef();
- if( 0 != byRef ) {
- int[] pValue = new int[1];
- COM.MoveMemory(pValue, byRef, 4);
- return pValue[0];
- }
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- return 0;
- }
-
- protected void setIntegerByRef(int index, int value) {
- try {
- event.arguments[index].setByRef(value);
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- }
-
- protected int getDispatchAddress(int index) {
- try {
- return event.arguments[index].getDispatch().getAddress();
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- return 0;
- }
-
- protected int getControlSiteAddress() {
- if( event.widget instanceof OleControlSite ) {
- Variant varWebSite = new Variant(new OleAutomation((OleControlSite)(event.widget)));
- try {
- return varWebSite.getDispatch().getAddress();
- }
- finally {
- varWebSite.dispose();
- }
- }
- return 0;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/BeforeNavigate2ParametersImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/BeforeNavigate2ParametersImpl.java
deleted file mode 100644
index e8680f2..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/BeforeNavigate2ParametersImpl.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events.impl;
-
-import org.eclipse.actf.model.ui.editors.ie.internal.events.BeforeNavigate2Parameters;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.ole.win32.OleEvent;
-
-public class BeforeNavigate2ParametersImpl extends AbstractEventParameters implements BeforeNavigate2Parameters {
-
- private static int
- INDEX_Browser = 0, // [in]
- INDEX_url = 1, // [in]
- INDEX_flags = 2, // [in]
- INDEX_targetFrameName = 3, // [in]
- INDEX_postData = 4, // [in]
- INDEX_headers = 5, // [in]
- INDEX_cancel = 6; // [in,out]
-
- public BeforeNavigate2ParametersImpl(OleEvent event) {
- super(event);
- if( Platform.inDebugMode() ) {
- int dispBrowser = getBrowserAddress();
- String url = getUrl();
- int flags = getFlags();
- String targetFrameName = getTargetFrameName();
- Object postData = getPostData();
- String headers = getHeaders();
- boolean cancel = getCancel();
- System.out.println("BeforeNavigate2("+dispBrowser+",\""+url+"\","+flags+",\""+targetFrameName+"\","+postData+",\""+headers+"\","+cancel+")"); //$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-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.BeforeNavigate2Parameters#getBrowserAddress()
- */
- public int getBrowserAddress() {
- return getDispatchAddress(INDEX_Browser);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.BeforeNavigate2Parameters#getUrl()
- */
- public String getUrl() {
- return getString(INDEX_url);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.BeforeNavigate2Parameters#getFlags()
- */
- public int getFlags() {
- return getInteger(INDEX_flags);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.BeforeNavigate2Parameters#getTargetFrameName()
- */
- public String getTargetFrameName() {
- return getString(INDEX_targetFrameName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.BeforeNavigate2Parameters#getPostData()
- */
- public Object getPostData() {
- return getVariant(INDEX_postData);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.BeforeNavigate2Parameters#getHeaders()
- */
- public String getHeaders() {
- return getString(INDEX_headers);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.BeforeNavigate2Parameters#getCancel()
- */
- public boolean getCancel() {
- return getBoolean(INDEX_cancel);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.BeforeNavigate2Parameters#setCancel(boolean)
- */
- public void setCancel(boolean cancel) {
- setBooleanByRef(INDEX_cancel, cancel);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/DocumentCompleteParametersImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/DocumentCompleteParametersImpl.java
deleted file mode 100644
index 9b2379d..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/DocumentCompleteParametersImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events.impl;
-
-import org.eclipse.actf.model.ui.editors.ie.internal.events.DocumentCompleteParameters;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.ole.win32.OleEvent;
-
-
-
-
-public class DocumentCompleteParametersImpl extends AbstractEventParameters implements DocumentCompleteParameters {
-
- private static int
- INDEX_Window = 0, // [in]
- INDEX_url = 1; // [in]
-
- public DocumentCompleteParametersImpl(OleEvent event) {
- super(event);
- if( Platform.inDebugMode() ) {
- int dispWindow = getWindowAddress();
- String url = getUrl();
- boolean isTop = isTopWindow();
- System.out.println("DocumentComplete("+dispWindow+",\""+url+"\") top="+isTop); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.DocumentCompleteParameters#getWindowAddress()
- */
- public int getWindowAddress() {
- return getDispatchAddress(INDEX_Window);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.DocumentCompleteParameters#getUrl()
- */
- public String getUrl() {
- return getString(INDEX_url);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.DocumentCompleteParameters#isTopWindow()
- */
- public boolean isTopWindow() {
- return getWindowAddress() == getControlSiteAddress();
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/NavigateComplete2ParametersImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/NavigateComplete2ParametersImpl.java
deleted file mode 100644
index 419e010..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/NavigateComplete2ParametersImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events.impl;
-
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NavigateComplete2Parameters;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.ole.win32.OleEvent;
-
-
-
-
-public class NavigateComplete2ParametersImpl extends AbstractEventParameters implements NavigateComplete2Parameters {
-
- private static int
- INDEX_Browser = 0, // [in]
- INDEX_url = 1; // [in]
-
- public NavigateComplete2ParametersImpl(OleEvent event) {
- super(event);
- if( Platform.inDebugMode() ) {
- int dispBrowser = getBrowserAddress();
- String url = getUrl();
- System.out.println("NavigateComplete2("+dispBrowser+",\""+url+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NavigateComplete2Parameters#getBrowserAddress()
- */
- public int getBrowserAddress() {
- return getDispatchAddress(INDEX_Browser);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NavigateComplete2Parameters#getUrl()
- */
- public String getUrl() {
- return getString(INDEX_url);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/NavigateErrorParametersImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/NavigateErrorParametersImpl.java
deleted file mode 100644
index 6ed466a..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/NavigateErrorParametersImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events.impl;
-
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NavigateErrorParameters;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.ole.win32.OleEvent;
-
-
-
-
-public class NavigateErrorParametersImpl extends AbstractEventParameters implements NavigateErrorParameters {
-
- private static int
- INDEX_Browser = 0, // [in]
- INDEX_url = 1, // [in]
- INDEX_targetFrameName = 2, // [in]
- INDEX_statusCode = 3, // [in]
- INDEX_cancel = 4; // [in,out]
-
- public NavigateErrorParametersImpl(OleEvent event) {
- super(event);
- if( Platform.inDebugMode() ) {
- int dispBrowser = getBrowserAddress();
- String url = getUrl();
- String targetFrameName = getTargetFrameName();
- int statusCode = getStatusCode();
- boolean cancel = getCancel();
- System.out.println("NavigateError("+dispBrowser+",\""+url+"\","+targetFrameName+"\","+statusCode+"\","+cancel+")"); //$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-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NavigateErrorParameters#getBrowserAddress()
- */
- public int getBrowserAddress() {
- return getDispatchAddress(INDEX_Browser);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NavigateErrorParameters#getUrl()
- */
- public String getUrl() {
- return getString(INDEX_url);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NavigateErrorParameters#getTargetFrameName()
- */
- public String getTargetFrameName() {
- return getString(INDEX_targetFrameName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NavigateErrorParameters#getStatusCode()
- */
- public int getStatusCode() {
- return getInteger(INDEX_statusCode);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NavigateErrorParameters#getCancel()
- */
- public boolean getCancel() {
- return getBoolean(INDEX_cancel);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NavigateErrorParameters#setCancel(boolean)
- */
- public void setCancel(boolean cancel) {
- setBooleanByRef(INDEX_cancel, cancel);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/NewWindow2ParametersImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/NewWindow2ParametersImpl.java
deleted file mode 100644
index 4accf05..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/NewWindow2ParametersImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events.impl;
-
-import org.eclipse.actf.model.ui.editors.ie.internal.events.NewWindow2Parameters;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.ole.win32.OleEvent;
-
-
-
-
-public class NewWindow2ParametersImpl extends AbstractEventParameters implements NewWindow2Parameters {
-
- private static int
- INDEX_Browser = 0, // [in,out]
- INDEX_cancel = 1; // [in,out]
-
- public NewWindow2ParametersImpl(OleEvent event) {
- super(event);
- if( Platform.inDebugMode() ) {
- int dispBrowser = getBrowserAddress();
- boolean cancel = getCancel();
- System.out.println("NewWindow2("+dispBrowser+","+cancel+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NewWindow2Parameters#getBrowserAddress()
- */
- public int getBrowserAddress() {
- return getIntegerByRef(INDEX_Browser);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NewWindow2Parameters#setBrowserAddress(int)
- */
- public void setBrowserAddress(int address) {
- setIntegerByRef(INDEX_Browser, address);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NewWindow2Parameters#getCancel()
- */
- public boolean getCancel() {
- return getBoolean(INDEX_cancel);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.NewWindow2Parameters#setCancel(boolean)
- */
- public void setCancel(boolean cancel) {
- setBooleanByRef(INDEX_cancel, cancel);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/ProgressChangeParametersImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/ProgressChangeParametersImpl.java
deleted file mode 100644
index bbdd6d4..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/ProgressChangeParametersImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events.impl;
-
-import org.eclipse.actf.model.ui.editors.ie.internal.events.ProgressChangeParameters;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.ole.win32.OleEvent;
-
-
-
-
-public class ProgressChangeParametersImpl extends AbstractEventParameters implements ProgressChangeParameters {
-
- private static int
- INDEX_nProgress = 0, // [in]
- INDEX_nProgressMax = 1; // [in]
-
- public ProgressChangeParametersImpl(OleEvent event) {
- super(event);
- if( Platform.inDebugMode() ) {
- int nProgress = getProgress();
- int nProgressMax = getProgressMax();
- System.out.println("ProgressChange("+nProgress+","+nProgressMax+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.ProgressChangeParameters#getProgress()
- */
- public int getProgress() {
- return getInteger(INDEX_nProgress);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.ProgressChangeParameters#getProgressMax()
- */
- public int getProgressMax() {
- return getInteger(INDEX_nProgressMax);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/StatusTextChangeParametersImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/StatusTextChangeParametersImpl.java
deleted file mode 100644
index 5c69c95..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/StatusTextChangeParametersImpl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events.impl;
-
-import org.eclipse.actf.model.ui.editors.ie.internal.events.StatusTextChangeParameters;
-import org.eclipse.swt.ole.win32.OleEvent;
-
-
-
-
-public class StatusTextChangeParametersImpl extends AbstractEventParameters implements StatusTextChangeParameters {
-
- private static int
- INDEX_text = 0; // [in]
-
- public StatusTextChangeParametersImpl(OleEvent event) {
- super(event);
-// if( Platform.inDebugMode() ) {
-// String text = getText();
-// System.out.println("StatusTextChange(\""+text+"\")"); //$NON-NLS-1$ //$NON-NLS-2$
-// }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.StatusTextChangeParameters#getText()
- */
- public String getText() {
- return getString(INDEX_text);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/TitleChangeParametersImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/TitleChangeParametersImpl.java
deleted file mode 100644
index c5097fa..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/TitleChangeParametersImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events.impl;
-
-import org.eclipse.actf.model.ui.editors.ie.internal.events.TitleChangeParameters;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.ole.win32.OleEvent;
-
-
-
-
-public class TitleChangeParametersImpl extends AbstractEventParameters implements TitleChangeParameters {
-
- private static int
- INDEX_text = 0; // [in]
-
- public TitleChangeParametersImpl(OleEvent event) {
- super(event);
- if( Platform.inDebugMode() ) {
- String text = getText();
- System.out.println("TitleChange(\""+text+"\")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.TitleChangeParameters#getText()
- */
- public String getText() {
- return getString(INDEX_text);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/WindowClosingParametersImpl.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/WindowClosingParametersImpl.java
deleted file mode 100644
index 313c15a..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/internal/events/impl/WindowClosingParametersImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.internal.events.impl;
-
-import org.eclipse.actf.model.ui.editors.ie.internal.events.WindowClosingParameters;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.ole.win32.OleEvent;
-
-
-
-
-public class WindowClosingParametersImpl extends AbstractEventParameters implements WindowClosingParameters {
-
- private static int
- INDEX_isChildWindow = 0, // [in]
- INDEX_cancel = 1; // [in,out]
-
- public WindowClosingParametersImpl(OleEvent event) {
- super(event);
- if( Platform.inDebugMode() ) {
- boolean isChildWindow = getIsChildWindow();
- boolean cancel = getCancel();
- System.out.println("WindowClosing("+isChildWindow+","+cancel+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.WindowClosingParameters#getIsChildWindow()
- */
- public boolean getIsChildWindow() {
- return getBoolean(INDEX_isChildWindow);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.WindowClosingParameters#getCancel()
- */
- public boolean getCancel() {
- return getBoolean(INDEX_cancel);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.ui.editors.ie.events.WindowClosingParameters#setCancel(boolean)
- */
- public void setCancel(boolean cancel) {
- setBooleanByRef(INDEX_cancel, cancel);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/win32/IPersistFile.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/win32/IPersistFile.java
deleted file mode 100644
index eb588af..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/win32/IPersistFile.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.win32;
-
-import org.eclipse.swt.internal.ole.win32.COM;
-import org.eclipse.swt.internal.ole.win32.IPersist;
-
-
-
-public class IPersistFile extends IPersist {
- private int address;
- public IPersistFile(int address) {
- super(address);
- this.address = address;
- }
- public int IsDirty() {
- return COM.VtblCall(4, address);
- }
- public int Load(int pszFilename, int dwMode) {
- return COM.VtblCall(5, address, pszFilename, dwMode);
- }
- public int Save(int pszFilename, boolean fRemember) {
- return COM.VtblCall(6, address, pszFilename, fRemember);
- }
- public int SaveCompleted(int pszFilename) {
- return COM.VtblCall(7, address, pszFilename);
- }
- public int GetCurFile(int ppszFilename){
- return COM.VtblCall(9, address, ppszFilename);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/win32/RegistryUtil.java b/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/win32/RegistryUtil.java
deleted file mode 100644
index 1d73a38..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ie/src/org/eclipse/actf/model/ui/editors/ie/win32/RegistryUtil.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ie.win32;
-
-import org.eclipse.swt.internal.win32.OS;
-import org.eclipse.swt.internal.win32.TCHAR;
-
-public class RegistryUtil {
-
- public static final int REG_NONE = 0, REG_SZ = 1, REG_EXPAND_SZ = 2,
- REG_BINARY = 3, REG_DWORD = 4, REG_DWORD_BIG_ENDIAN = 5,
- REG_LINK = 6, REG_MULTI_SZ = 7, REG_RESOURCE_LIST = 8,
- REG_FULL_RESOURCE_DESCRIPTOR = 9,
- REG_RESOURCE_REQUIREMENTS_LIST = 10, REG_QWORD = 11;
-
- public static final int KEY_READ = 0x20019;
-
- public static final String IE_SETTINGS_KEY = "Software\\Microsoft\\Internet Explorer\\Settings", //$NON-NLS-1$
- IE_ANCHOR_COLOR = "Anchor Color", //$NON-NLS-1$
- IE_ANCHOR_COLOR_VISITED = "Anchor Color Visited"; //$NON-NLS-1$
-
- public static int getIERegistryInt(String valueString) {
- return getRegistryInt(OS.HKEY_CURRENT_USER,
- RegistryUtil.IE_SETTINGS_KEY, valueString);
- }
-
- public static String getIERegistryString(String valueString) {
- return getRegistryString(OS.HKEY_CURRENT_USER,
- RegistryUtil.IE_SETTINGS_KEY, valueString);
- }
-
- public static int getRegistryInt(int hKeyParent, String subKeyString,
- String valueString) {
- int hKey = open(hKeyParent, subKeyString, 0, KEY_READ);
- if (0 != hKey) {
- try {
- return getIntegerValue(hKey, valueString);
- } finally {
- close(hKey);
- }
- }
- return 0;
- }
-
- public static String getRegistryString(int hKeyParent, String subKeyString,
- String valueString) {
- int hKey = open(hKeyParent, subKeyString, 0, KEY_READ);
- if (0 != hKey) {
- try {
- return getStringValue(hKey, valueString);
- } finally {
- close(hKey);
- }
- }
- return null;
- }
-
- private static int open(int hKeyParent, String subKeyString, int ulOptions,
- int samDesired) {
- TCHAR keyName = new TCHAR(0, subKeyString, true);
- int[] phKey = new int[1];
- if (0 == OS.RegOpenKeyEx(hKeyParent, keyName, ulOptions, samDesired,
- phKey)) {
- return phKey[0];
- }
- return 0;
- }
-
- private static int close(int hKey) {
- return OS.RegCloseKey(hKey);
- }
-
- private static int getIntegerValue(int hKey, String valueString) {
- TCHAR valueName = new TCHAR(0, valueString, true);
- int[] pcbData = new int[] { 4 };
- int[] pType = new int[1];
- int[] pData = new int[1];
- if (0 == OS.RegQueryValueEx(hKey, valueName, 0, pType, pData, pcbData)) {
- if (REG_DWORD == pType[0]) {
- return pData[0];
- }
- }
- return 0;
- }
-
- private static String getStringValue(int hKey, String valueString) {
- TCHAR valueName = new TCHAR(0, valueString, true);
- int[] pcbData = new int[1];
- int[] pType = new int[1];
- if (0 == OS.RegQueryValueEx(hKey, valueName, 0, pType, (TCHAR) null,
- pcbData)) {
- if (REG_SZ == pType[0]) {
- TCHAR buff = new TCHAR(0, pcbData[0] / TCHAR.sizeof);
- if (0 == OS.RegQueryValueEx(hKey, valueName, 0, pType, buff,
- pcbData)) {
- return buff.toString(0, buff.strlen());
- }
- }
- }
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/.classpath b/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/.project b/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/.project
deleted file mode 100644
index fff3644..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.model.ui.editors.ooo.initializer</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/META-INF/MANIFEST.MF
deleted file mode 100644
index 89c45ca..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF ODF Browser Initializer Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.model.ui.editors.ooo.initializer;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Vendor: Eclipse.org
-Export-Package: org.eclipse.actf.model.ui.editors.ooo.initializer.kicker;x-friends:="org.eclipse.actf.model.ui.editors.ooo",
- org.eclipse.actf.model.ui.editors.ooo.initializer.util
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
-Eclipse-LazyStart: true
-Bundle-Activator: org.eclipse.actf.model.ui.editors.ooo.initializer.OOoEditorInitPlugin
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/about.html b/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/build.properties b/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/build.properties
deleted file mode 100644
index 72b377f..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-source.. = src/
-output.. = bin/
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-bin.includes = META-INF/,\
- .,\
- about.html
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/src/org/eclipse/actf/model/ui/editors/ooo/initializer/OOoEditorInitPlugin.java b/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/src/org/eclipse/actf/model/ui/editors/ooo/initializer/OOoEditorInitPlugin.java
deleted file mode 100644
index d3fe1fd..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/src/org/eclipse/actf/model/ui/editors/ooo/initializer/OOoEditorInitPlugin.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editors.ooo.initializer;
-
-import org.eclipse.actf.model.ui.editors.ooo.initializer.util.OOoEditorInitUtil;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class OOoEditorInitPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.actf.model.ui.editors.ooo.initializer";
-
- // The shared instance
- private static OOoEditorInitPlugin plugin;
-
- /**
- * The constructor
- */
- public OOoEditorInitPlugin() {
- OOoEditorInitUtil.init();
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static OOoEditorInitPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/src/org/eclipse/actf/model/ui/editors/ooo/initializer/kicker/IOOoEditorInitializerKicker.java b/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/src/org/eclipse/actf/model/ui/editors/ooo/initializer/kicker/IOOoEditorInitializerKicker.java
deleted file mode 100644
index 7be0f62..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/src/org/eclipse/actf/model/ui/editors/ooo/initializer/kicker/IOOoEditorInitializerKicker.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editors.ooo.initializer.kicker;
-
-
-//Dummy interface to start OOoEditorInitializer Plug-in before the OOoEditor Plug-in
-//(by using LazyStart)
-public interface IOOoEditorInitializerKicker {
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/src/org/eclipse/actf/model/ui/editors/ooo/initializer/util/OOoEditorInitUtil.java b/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/src/org/eclipse/actf/model/ui/editors/ooo/initializer/util/OOoEditorInitUtil.java
deleted file mode 100644
index 66be41e..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo.initializer/src/org/eclipse/actf/model/ui/editors/ooo/initializer/util/OOoEditorInitUtil.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ooo.initializer.util;
-
-import org.eclipse.swt.internal.win32.OS;
-import org.eclipse.swt.internal.win32.TCHAR;
-import org.eclipse.ui.PlatformUI;
-
-public class OOoEditorInitUtil {
-
- private static boolean IS_INITIALIZED = false;
-
- public static boolean init() {
- return isOOoInstalled(false);
- }
-
- static public boolean isOOoInstalled(boolean showHelp) {
-
- if (IS_INITIALIZED) {
- return true;
- }
-
- String path = null;
- try {
- path = getOpenOfficePath();
- } catch (IllegalArgumentException e) {
- }
- if (path == null) {
- if (showHelp) {
- PlatformUI
- .getWorkbench()
- .getHelpSystem()
- .displayHelpResource(
- "/org.eclipse.actf.examples.adesigner.doc/docs/odf/install.html");
- }
- return false;
- }
-
- IS_INITIALIZED = true;
- System.setProperty("OOo_PROGRAM_PATH", path);
-
- return true;
- }
-
- /**
- * get OpenOffice (later than 2.0) path
- *
- * @return
- * @throws IllegalArgumentException
- */
- public static String getOpenOfficePath() throws IllegalArgumentException {
-
- final String entry = "SOFTWARE\\OpenOffice.org\\UNO\\InstallPath";
-
- final int[] hKey = new int[1];
- try {
- int rc = OS.RegOpenKeyEx(OS.HKEY_LOCAL_MACHINE, new TCHAR(
- OS.CP_INSTALLED, entry, true), 0, 0xF003F, hKey);
- if (0 != rc) {
- throw new IllegalArgumentException(
- "Failed to call RegOpenKeyEx.");
- }
-
- TCHAR buf = new TCHAR(OS.CP_INSTALLED, 256);
- final int[] len = new int[] { 256 };
- rc = OS.RegQueryValueEx(hKey[0], (TCHAR) null, 0, null, buf, len);
- if (0 != rc) {
- throw new IllegalArgumentException(
- "Failed to call RegQueryValueEx.");
- }
-
- return buf.toString(0, buf.strlen());
- } finally {
- if (hKey[0] != 0) {
- OS.RegCloseKey(hKey[0]);
- }
- }
- }
-
- public static boolean isInitialized() {
- return IS_INITIALIZED;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/.classpath b/plugins/org.eclipse.actf.model.ui.editors.ooo/.classpath
deleted file mode 100644
index 4cb1be3..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="var" path="OOO_HOME/program/classes/juh.jar"/>
- <classpathentry kind="var" path="OOO_HOME/program/classes/jurt.jar"/>
- <classpathentry kind="var" path="OOO_HOME/program/classes/ridl.jar"/>
- <classpathentry kind="var" path="OOO_HOME/program/classes/unoil.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/.cvsignore b/plugins/org.eclipse.actf.model.ui.editors.ooo/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/.project b/plugins/org.eclipse.actf.model.ui.editors.ooo/.project
deleted file mode 100644
index 203f728..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.model.ui.editors.ooo</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.model.ui.editors.ooo/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.model.ui.editors.ooo/META-INF/MANIFEST.MF
deleted file mode 100644
index c324d83..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF ODF Browser Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.model.ui.editors.ooo;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.actf.model.ui.editors.ooo.OOoEditorPlugin
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.actf.core,
- org.eclipse.actf.model.dom.odf,
- org.eclipse.actf.model.ui,
- org.eclipse.actf.model.ui.editors.ooo.initializer;visibility:=reexport,
- org.eclipse.actf.ui
-Eclipse-LazyStart: true
-Bundle-ClassPath: runtimes/accessibility_browser_odf.jar,
- external:$OOo_PROGRAM_PATH$\classes\juh.jar,
- external:$OOo_PROGRAM_PATH$\classes\jurt.jar,
- external:$OOo_PROGRAM_PATH$\classes\ridl.jar,
- external:$OOo_PROGRAM_PATH$\classes\unoil.jar,
- external:C:\Program Files\OpenOffice.org 2.3\program\classes\juh.jar,
- external:C:\Program Files\OpenOffice.org 2.3\program\classes\jurt.jar,
- external:C:\Program Files\OpenOffice.org 2.3\program\classes\ridl.jar,
- external:C:\Program Files\OpenOffice.org 2.3\program\classes\unoil.jar
-Export-Package: org.eclipse.actf.model.ui.editors.ooo.editor
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/about.html b/plugins/org.eclipse.actf.model.ui.editors.ooo/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/build.properties b/plugins/org.eclipse.actf.model.ui.editors.ooo/build.properties
deleted file mode 100644
index ddd04aa..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-bin.includes = plugin.xml,\
- about.html,\
- META-INF/,\
- icons/,\
- plugin.properties,\
- plugin_ja.properties,\
- runtimes/accessibility_browser_odf.jar
-jars.compile.order = runtimes/accessibility_browser_odf.jar
-source.runtimes/accessibility_browser_odf.jar = src/
-output.runtimes/accessibility_browser_odf.jar = bin/
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/icons/exclawhite16.gif b/plugins/org.eclipse.actf.model.ui.editors.ooo/icons/exclawhite16.gif
deleted file mode 100644
index 50b4fd9..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/icons/exclawhite16.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/plugin.properties b/plugins/org.eclipse.actf.model.ui.editors.ooo/plugin.properties
deleted file mode 100644
index 56f3d20..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/plugin.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-odf.editor.title=OpenDocument
-
-ODFEditorAction.Open=Open ODF File
-
-ODFEditor.convertHTML=Converting ODF to HTML...
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/plugin.xml b/plugins/org.eclipse.actf.model.ui.editors.ooo/plugin.xml
deleted file mode 100644
index fec809c..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/plugin.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.actf.model.ui.editors.ooo.editor.OOoEditor"
- contributorClass="org.eclipse.actf.model.ui.editors.ooo.editor.impl.OOoEditorContributor"
- default="false"
- extensions="odt, odp, ods"
- icon="icons/exclawhite16.gif"
- id="org.eclipse.actf.model.ui.editors.ooo.editor.OOoEditor"
- name="%odf.editor.title"/>
- </extension>
-</plugin>
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/plugin_ja.properties b/plugins/org.eclipse.actf.model.ui.editors.ooo/plugin_ja.properties
deleted file mode 100644
index 04b8e70..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/plugin_ja.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-odf.editor.title=OpenDocument
-
-ODFEditorAction.Open=ODF \u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f
-
-ODFEditor.convertHTML=ODF \u3092 HTML \u306b\u5909\u63db\u4e2d
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/readme.txt b/plugins/org.eclipse.actf.model.ui.editors.ooo/readme.txt
deleted file mode 100644
index 2969bb0..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/readme.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Development instruction for this plugin.
-
-OpenOffice.org (ver. 2.1.0 or above) is pre-req for this plugin.
-Please add new Classpath Variables "OOO_HOME" by using
-Window>Preferences->Java->Build Path->Classpath Variables.
-Usually, OpenOffice.org will be installed into
-"c:\Program Files\OpenOffice.org <version>".
-
-<example>
-
-Name: OOO_HOME
-Path: c:\Program Files\OpenOffice.org 2.3
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/OOoEditorPlugin.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/OOoEditorPlugin.java
deleted file mode 100644
index 052ad17..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/OOoEditorPlugin.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editors.ooo;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.actf.model.ui.editors.ooo.initializer.kicker.IOOoEditorInitializerKicker;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class OOoEditorPlugin extends AbstractUIPlugin implements IOOoEditorInitializerKicker {
-
- public static final String PLUGIN_ID = "org.eclipse.actf.model.ui.editors.ooo";
-
- //The shared instance.
- private static OOoEditorPlugin plugin;
-
- private ResourceBundle _resourceBundle;
-
- private static BundleContext _context;
-
- /**
- * The constructor.
- */
- public OOoEditorPlugin() {
- plugin = this;
-
- //OOoEditorInitUtil is called automatically by using dummy interface+LazyStart
-// if(!OOoEditorInitUtil.isInitialized()){
-// System.err.println("Please call OOoEditorInitUtil.init() before using OOoEditor.");
-// }
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- _context = context;
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- _context = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static OOoEditorPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public static String getResourceString(String key) {
- ResourceBundle bundle = OOoEditorPlugin.getDefault().getResourceBundle();
- try {
- return (null != bundle) ? bundle.getString(key) : key;
- } catch (MissingResourceException mre) {
- return "???" + key + "???";
- }
- }
-
- public ResourceBundle getResourceBundle() {
- if (null == _resourceBundle && null != _context) {
- Bundle bundle = _context.getBundle();
- if (null != bundle) {
- _resourceBundle = Platform.getResourceBundle(bundle);
- }
- }
-
- return _resourceBundle;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/actions/EditODFAction.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/actions/EditODFAction.java
deleted file mode 100644
index 2184870..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/actions/EditODFAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ooo.actions;
-
-import org.eclipse.actf.ui.util.PlatformUIUtil;
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-
-
-public class EditODFAction extends Action{
-
- private final String message = "Edit";
-
- public EditODFAction() {
- setText(message);
- setToolTipText(message);
- setImageDescriptor(PlatformUIUtil.getSharedImageDescriptor(ISharedImages.IMG_DEF_VIEW));
- }
-
- public void run() {
- MessageBox msgBox = new MessageBox(PlatformUI.getWorkbench().getDisplay().getActiveShell(), SWT.OK);
- msgBox.setMessage("not implemented yet");
- msgBox.open();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/actions/OpenODFAction.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/actions/OpenODFAction.java
deleted file mode 100644
index 5216ed7..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/actions/OpenODFAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ooo.actions;
-
-import org.eclipse.actf.model.ui.editors.ooo.OOoEditorPlugin;
-import org.eclipse.actf.model.ui.editors.ooo.editor.OOoEditor;
-import org.eclipse.actf.model.ui.util.ModelServiceUtils;
-import org.eclipse.actf.ui.util.PlatformUIUtil;
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-
-
-public class OpenODFAction extends Action {
-
- private final String message = OOoEditorPlugin
- .getResourceString("ODFEditorAction.Open");
-
- public OpenODFAction() {
- setText(message);
- setToolTipText(message);
- setImageDescriptor(PlatformUIUtil
- .getSharedImageDescriptor(ISharedImages.IMG_OBJ_FOLDER));
- }
-
- public void run() {
- FileDialog openDialog = new FileDialog(PlatformUI.getWorkbench()
- .getDisplay().getActiveShell(), SWT.OPEN);
- openDialog
- .setFilterNames(new String[] { "OpenDocument (*.odt; *.odp; *.ods)" });
- openDialog.setFilterExtensions(new String[] { "*.odt; *.odp; *.ods" });
- String sUrl = openDialog.open();
-
- if (sUrl != null) {
- ModelServiceUtils.launch(sUrl, OOoEditor.ID);
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/actions/SaveODFAction.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/actions/SaveODFAction.java
deleted file mode 100644
index 8663713..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/actions/SaveODFAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ooo.actions;
-
-import org.eclipse.actf.ui.util.PlatformUIUtil;
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-
-
-
-public class SaveODFAction extends Action{
-
- private final String message = "Save";
-
- public SaveODFAction() {
- setText(message);
- setToolTipText(message);
- setImageDescriptor(PlatformUIUtil.getSharedImageDescriptor(ISharedImages.IMG_DEF_VIEW));
- }
-
- public void run() {
- MessageBox msgBox = new MessageBox(PlatformUI.getWorkbench().getDisplay().getActiveShell(), SWT.OK);
- msgBox.setMessage("not implemented yet");
- msgBox.open();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/OOoComposite.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/OOoComposite.java
deleted file mode 100644
index 875729c..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/OOoComposite.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Norimasa HAYASHIDA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ooo.editor;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.actf.model.dom.odf.ODFParser;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.util.converter.ODFConverter;
-import org.eclipse.actf.model.dom.odf.util.converter.ODFConverterCreator;
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.IModelServiceHolder;
-import org.eclipse.actf.model.ui.IModelServiceScrollManager;
-import org.eclipse.actf.model.ui.ImagePositionInfo;
-import org.eclipse.actf.model.ui.editors.ooo.editor.impl.OOoEditorScrollManager;
-import org.eclipse.actf.model.ui.editors.ooo.editor.impl.OOoEditorToolbar;
-import org.eclipse.actf.model.ui.editors.ooo.editor.impl.OOoWindowComposite;
-import org.eclipse.actf.model.ui.editors.ooo.initializer.util.OOoEditorInitUtil;
-import org.eclipse.actf.model.ui.editors.ooo.internal.util.ODFException;
-import org.eclipse.actf.model.ui.editors.ooo.internal.util.OOoNavigation;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public class OOoComposite extends Composite implements IModelService {
- private OOoWindowComposite _oOoWindowComposite = null;
-
- private Composite _comp;
-
- private OOoEditorScrollManager scrollManager;
-
- OOoEditorToolbar _toolbar;
-
- private String lastURL = null;
-
- private String title = "";
-
- private IModelServiceHolder holder;
-
- public OOoComposite(Composite parent, int style, IModelServiceHolder holder) {
- super(parent, style);
- if (OOoEditorInitUtil.isOOoInstalled(true)) {
- init();
- }
- this.holder = holder;
- }
-
- private void init() {
- GridLayout gridLayout = new GridLayout();
- gridLayout.verticalSpacing = 0;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- setLayout(gridLayout);
-
- this._toolbar = new OOoEditorToolbar(this, this, SWT.NONE, true);
- this._comp = new Composite(this, SWT.EMBEDDED);
- this._comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- try {
- this._comp.setLayout(gridLayout);
- this._oOoWindowComposite = new OOoWindowComposite(this._comp,
- SWT.EMBEDDED);
- this._oOoWindowComposite.setLayoutData(new GridData(SWT.FILL,
- SWT.FILL, true, true));
- scrollManager = new OOoEditorScrollManager(this._oOoWindowComposite);
- } catch (ODFException e) {
- e.printStackTrace();
- }
- }
-
- public void dispose() {
- super.dispose();
- // this._oOoBeanPanel.close();
- }
-
- public String[] getSupportMIMETypes() {
- return MIMETYPES_ODF;
- }
-
- public String[] getSupportExtensions() {
- return EXTS_ODF;
- }
-
- public void open(String url) {
- if (null != url && null != this._oOoWindowComposite) {
- // move this url format to OOoWindowComposite::load
- /*
- * if (0 != url.indexOf("private:") && 0 != url.indexOf("file:///")) {
- * try { File srcFile = new File(url); StringBuffer sb = new
- * StringBuffer("file:///");
- * sb.append(srcFile.getCanonicalPath().replace('\\', '/')); url =
- * sb.toString(); if (!srcFile.canRead()) { return; } } catch
- * (IOException ioe) { ioe.printStackTrace(); return; } }
- */
- File file = new File(url);
- if ((null != file) && (file.exists())) {
- this._oOoWindowComposite.open(url);
- this._toolbar.getAddressText().setText(url);
-
- // ODFBrowserEditor odfBrowserEditor =
- // ODFBrowserEditorManager.getODFEditorPart(url);
- // odfBrowserEditor.changeTitle(url);
-
- titleChange(file.getName());
- }
- }
- }
-
- public void open(File target) {
- // TODO Auto-generated method stub
-
- }
-
- public String getURL() {
- if (null != _oOoWindowComposite) {
- return this._oOoWindowComposite.getUrl();
- }
- return "";
- }
-
- public List<Element> getElemList(Node root) {
- List<Element> elemList = new ArrayList<Element>();
-
- NodeList nl = root.getChildNodes();
- for (int i = 0; i < nl.getLength(); i++) {
- Node node = nl.item(i);
- if (node instanceof Element) {
- elemList.add((Element) node);
- }
- if (node.hasChildNodes()) {
- elemList.addAll(getElemList(node));
- }
- }
- return elemList;
- }
-
- public Document getDocument() {
- String currentURL = getURL();
- if (currentURL == null)
- return null;
- OOoNavigation oooNavigation = _oOoWindowComposite.getOooNavigation();
- ODFDocument odfDoc = oooNavigation.getContentXML();
- if ((odfDoc != null) && (currentURL.equals(lastURL)))
- return odfDoc;
-
- // create ODF Document by ODF API
- ODFParser odfParser = new ODFParser();
- odfDoc = odfParser.getDocument(currentURL);
- // set ID to each ODF element
- /*
- * NodeIterator nodeIter = ((DocumentTraversal)
- * odfDoc).createNodeIterator(odfDoc, NodeFilter.SHOW_ELEMENT, null,
- * false); int contentID = 0; Node node = nodeIter.nextNode(); while
- * (node != null) { ((Element)
- * node).setAttribute(ODFConstants.ODF_CONTENT_ID, new
- * Integer(contentID).toString()); node = nodeIter.nextNode();
- * contentID++; }
- */
- int contentID = 0;
- List<Element> elemList = getElemList(odfDoc.getDocumentElement());
- for (int i = 0; i < elemList.size(); i++) {
- Element elem = elemList.get(i);
- elem.setAttribute(ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID,
- new Integer(contentID).toString());
- contentID++;
- }
-
- oooNavigation.setContentXML(odfDoc);
- lastURL = currentURL;
- return odfDoc;
- }
-
- public Document getLiveDocument() {
- return null;
- }
-
- public Composite getTargetComposite() {
- return _comp;
- }
-
- public File saveDocumentAsHTMLFile(String file) {
- if (null == file)
- return null;
-
- // TODO
- // setStatusMessage(OdfPlugin.getResourceString("ODFEditor.convertHTML"));
-
- // TODO file check
- ODFDocument odfDoc = (ODFDocument) getDocument();
- ODFConverter odfConverter = ODFConverterCreator.createHTMLConverter();
- odfConverter.setDocument(odfDoc);
- odfConverter.convertDocument(file, false);
- return (new File(file));
- }
-
- public IModelServiceScrollManager getScrollManager() {
- return scrollManager;
- }
-
- public void jumpToNode(Node target) {
- if (null != target) {
- new OOoNavigationThread(target).start();
- }
- }
-
- private class OOoNavigationThread extends Thread {
-
- private Node _targetNode;
-
- public OOoNavigationThread(Node targetNode) {
- this._targetNode = targetNode;
- }
-
- public void run() {
- try {
- _oOoWindowComposite.getOooNavigation().jumpToProblemPosition(
- _targetNode);
- } catch (ODFException odfe) {
- odfe.printStackTrace();
- }
- }
- }
-
- public String getCurrentMIMEType() {
- // TODO return actual MIME type
- return MIMETYPES_ODF[0];
- }
-
- private void titleChange(String title) {
- this.title = title;
- holder.setEditorTitle(title);
- }
-
- public Object getAttribute(String name) {
- // do nothing
- return null;
- }
-
- public String getID() {
- return OOoComposite.class.getName() + ":" + this;
- }
-
- public String getTitle() {
- return title;
- }
-
- public File saveOriginalDocument(String file) {
- // TODO impl
- return null;
- }
-
- public ImagePositionInfo[] getAllImagePosition() {
- // TODO impl
- return new ImagePositionInfo[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.model.IModelService#getModelServiceHolder()
- */
- public IModelServiceHolder getModelServiceHolder() {
- return holder;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/OOoEditor.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/OOoEditor.java
deleted file mode 100644
index 41b96f6..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/OOoEditor.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Norimasa HAYASHIDA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.actf.model.ui.editors.ooo.editor;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.IModelServiceHolder;
-import org.eclipse.actf.model.ui.editor.DummyEditorInput;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorPart;
-
-
-
-
-public class OOoEditor extends EditorPart implements IModelServiceHolder {
-
- public static final String ID = OOoEditor.class.getName();
-
- private OOoComposite _odfBrowser;
-
- private IEditorInput input;
-
- public OOoEditor() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- public void doSave(IProgressMonitor monitor) {
- // TODO Auto-generated method stub
-
- }
-
- public void doSaveAs() {
- // TODO Auto-generated method stub
-
- }
-
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- setSite(site);
- setInput(input);
- this.input = input;
- }
-
- public boolean isDirty() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isSaveAsAllowed() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void createPartControl(Composite parent) {
- String targetUrl = null;
- if (input instanceof DummyEditorInput) {
- targetUrl = ((DummyEditorInput) input).getUrl();
- if ("".equals(targetUrl)) {
- targetUrl = null;
- }
- }
-
- this._odfBrowser = new OOoComposite(parent, SWT.NONE, this);
- if (targetUrl != null) {
- _odfBrowser.open(targetUrl);
- }
- }
-
- public void setFocus() {
- // TODO Auto-generated method stub
-
- }
-
- public IModelService getModelService() {
- return this._odfBrowser;
- }
-
- public IEditorPart getEditorPart() {
- return this;
- }
-
- public void dispose() {
- this._odfBrowser.dispose();
- }
-
- public void setEditorTitle(String title) {
- setPartName(title);
- setInputWithNotify(new DummyEditorInput(_odfBrowser.getURL(),input.getName()));
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoEditorContributor.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoEditorContributor.java
deleted file mode 100644
index ebdf29f..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoEditorContributor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Norimasa HAYASHIDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ooo.editor.impl;
-
-import org.eclipse.actf.model.ui.editors.ooo.actions.OpenODFAction;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.ui.part.EditorActionBarContributor;
-
-public class OOoEditorContributor extends EditorActionBarContributor {
-
- public OOoEditorContributor() {
- super();
- }
-
- public void contributeToToolBar(IToolBarManager toolBarManager) {
- toolBarManager.add(new OpenODFAction());
- // toolBarManager.add(new EditODFAction());
- // toolBarManager.add(new SaveODFAction());
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoEditorScrollManager.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoEditorScrollManager.java
deleted file mode 100644
index 7dd29d8..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoEditorScrollManager.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ooo.editor.impl;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.util.ODFFileUtils;
-import org.eclipse.actf.model.ui.IModelServiceScrollManager;
-import org.eclipse.actf.model.ui.ModelServiceSizeInfo;
-import org.eclipse.actf.model.ui.editors.ooo.internal.util.ODFException;
-import org.eclipse.actf.model.ui.util.ScrollBarSizeUtil;
-
-import com.sun.star.accessibility.XAccessibleAction;
-import com.sun.star.lang.IndexOutOfBoundsException;
-
-public class OOoEditorScrollManager implements IModelServiceScrollManager {
-
- OOoWindowComposite _oOoWindowComposite;
-
- public OOoEditorScrollManager(OOoWindowComposite oOoWindowComposite) {
- _oOoWindowComposite = oOoWindowComposite;
- }
-
- public void absoluteCoordinateScroll(int y, boolean waitRendering) {
- }
-
- public void absoluteCoordinateScroll(int x, int y, boolean waitRendering) {
- }
-
- public int incrementScrollX(boolean waitRendering) {
- String sUrl = _oOoWindowComposite.getUrl();
- if (ContentType.SPREADSHEET.equals(ODFFileUtils.getODFFileType(sUrl))) {
- return -1;
- } else {
- return doScrollAction(0,
- OOoWindowComposite.ACTION_SCROLL_INCREMENT_LINE);
- }
- }
-
- public int decrementScrollX(boolean waitRendering) {
- String sUrl = _oOoWindowComposite.getUrl();
- if (ContentType.SPREADSHEET.equals(ODFFileUtils.getODFFileType(sUrl))) {
- return -1;
- } else {
- return doScrollAction(0,
- OOoWindowComposite.ACTION_SCROLL_DECREMENT_LINE);
- }
- }
-
- public int incrementScrollY(boolean waitRendering) {
- String sUrl = _oOoWindowComposite.getUrl();
- if (ContentType.SPREADSHEET.equals(ODFFileUtils.getODFFileType(sUrl))) {
- return -1;
- } else {
- return doScrollAction(1,
- OOoWindowComposite.ACTION_SCROLL_INCREMENT_LINE);
- }
- }
-
- public int decrementScrollY(boolean waitRendering) {
- String sUrl = _oOoWindowComposite.getUrl();
- if (ContentType.SPREADSHEET.equals(ODFFileUtils.getODFFileType(sUrl))) {
- return -1;
- } else {
- return doScrollAction(1,
- OOoWindowComposite.ACTION_SCROLL_DECREMENT_LINE);
- }
- }
-
- public int incrementLargeScrollX(boolean waitRendering) {
- String sUrl = _oOoWindowComposite.getUrl();
- ContentType odfFileType = ODFFileUtils.getODFFileType(sUrl);
- if ((ContentType.SPREADSHEET.equals(odfFileType))
- || (ContentType.PRESENTATION.equals(odfFileType))) {
- return -1;
- } else {
- return doScrollAction(0,
- OOoWindowComposite.ACTION_SCROLL_INCREMENT_BLOCK);
- }
- }
-
- public int decrementLargeScrollX(boolean waitRendering) {
- String sUrl = _oOoWindowComposite.getUrl();
- ContentType odfFileType = ODFFileUtils.getODFFileType(sUrl);
- if ((ContentType.SPREADSHEET.equals(odfFileType))
- || (ContentType.PRESENTATION.equals(odfFileType))) {
- return -1;
- } else {
- return doScrollAction(0,
- OOoWindowComposite.ACTION_SCROLL_DECREMENT_BLOCK);
- }
- }
-
- public int incrementLargeScrollY(boolean waitRendering) {
- String sUrl = _oOoWindowComposite.getUrl();
- ContentType odfFileType = ODFFileUtils.getODFFileType(sUrl);
- if (ContentType.PRESENTATION.equals(odfFileType)) {
- _oOoWindowComposite.setDrawingMode();
- return _oOoWindowComposite.movePresentationPage(true);
- } else if (ContentType.SPREADSHEET.equals(odfFileType)) {
- return -1;
- } else {
- return doScrollAction(1,
- OOoWindowComposite.ACTION_SCROLL_INCREMENT_BLOCK);
- }
- }
-
- public int decrementLargeScrollY(boolean waitRendering) {
- String sUrl = _oOoWindowComposite.getUrl();
- ContentType odfFileType = ODFFileUtils.getODFFileType(sUrl);
- if (ContentType.PRESENTATION.equals(odfFileType)) {
- _oOoWindowComposite.setDrawingMode();
- return _oOoWindowComposite.movePresentationPage(false);
- } else if (ContentType.SPREADSHEET.equals(odfFileType)) {
- return -1;
- } else {
- return doScrollAction(1,
- OOoWindowComposite.ACTION_SCROLL_DECREMENT_BLOCK);
- }
- }
-
- public int decrementPageScroll(boolean waitRendering) {
- String sUrl = _oOoWindowComposite.getUrl();
- ContentType odfFileType = ODFFileUtils.getODFFileType(sUrl);
- if (ContentType.PRESENTATION.equals(odfFileType)) {
- _oOoWindowComposite.setDrawingMode();
- int result = _oOoWindowComposite.movePresentationPage(false);
- if (waitRendering)
- waitRendering();
- return result;
- }
- return -1;
- }
-
- public int incrementPageScroll(boolean waitRendering) {
- String sUrl = _oOoWindowComposite.getUrl();
- ContentType odfFileType = ODFFileUtils.getODFFileType(sUrl);
- if (ContentType.PRESENTATION.equals(odfFileType)) {
- _oOoWindowComposite.setDrawingMode();
- int result = _oOoWindowComposite.movePresentationPage(true);
- if (waitRendering)
- waitRendering();
- return result;
- }
- return -1;
- }
-
- public int jumpToPage(int pageNumber, boolean waitRendering) {
- if (ContentType.PRESENTATION.equals(ODFFileUtils
- .getODFFileType(_oOoWindowComposite.getUrl()))) {
- _oOoWindowComposite.setDrawingMode();
- int result = _oOoWindowComposite.jumpToPresentationPage(pageNumber);
- if (waitRendering)
- waitRendering();
- return result;
- }
- return -1;
- }
-
- public int getCurrentPageNumber() {
- if (ContentType.PRESENTATION.equals(ODFFileUtils
- .getODFFileType(_oOoWindowComposite.getUrl()))) {
- return _oOoWindowComposite.getCurrentPageNumber();
- }
- return -1;
- }
-
- public int getLastPageNumber() {
- if (ContentType.PRESENTATION.equals(ODFFileUtils
- .getODFFileType(_oOoWindowComposite.getUrl()))) {
- return _oOoWindowComposite.getPresentationPageCount();
- }
- return -1;
- }
-
- public int getScrollType() {
- String sUrl = _oOoWindowComposite.getUrl();
- if (sUrl == null)
- return NONE;
-
- if (ContentType.PRESENTATION.equals(ODFFileUtils.getODFFileType(sUrl))) {
- return PAGE;
- } else {
- return NONE;
- }
- }
-
- private int doScrollAction(int axis, int action) {
- int[] prevViewData = _oOoWindowComposite.getViewData();
- if (prevViewData == null)
- return -1;
-
- XAccessibleAction[] scrollAction = _oOoWindowComposite
- .getScrollAction();
- if ((scrollAction == null) || (scrollAction.length <= axis)
- || (scrollAction[axis] == null)) {
- return -1;
- }
-
- try {
- scrollAction[axis].doAccessibleAction(action);
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- }
- int[] viewData = _oOoWindowComposite.getViewData();
- return Math.abs(viewData[axis] - prevViewData[axis]);
- }
-
- public ModelServiceSizeInfo getSize(boolean isWhole) {
- // initialize window setting
- if (ContentType.PRESENTATION.equals(ODFFileUtils
- .getODFFileType(_oOoWindowComposite.getUrl()))) {
- _oOoWindowComposite.setDrawingMode();
- try {
- Thread.sleep(200);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- // start calculate window size
- int[] winSize;
- try {
- winSize = _oOoWindowComposite.getOOoWinSize();
- } catch (ODFException e) {
- return (new ModelServiceSizeInfo(0, 0, 0, 0));
- }
- int barWidth = ScrollBarSizeUtil.getVerticalBarWidth();
- int barHeight = ScrollBarSizeUtil.getHorizontalBarHeight();
- ModelServiceSizeInfo viewSize = new ModelServiceSizeInfo(winSize[0]
- - barWidth, winSize[1] - barHeight, winSize[0] - barWidth,
- winSize[1] - barHeight);
-
- if (isWhole) {
- if (ContentType.PRESENTATION.equals(ODFFileUtils
- .getODFFileType(_oOoWindowComposite.getUrl()))) {
- int pageCount = _oOoWindowComposite.getPresentationPageCount();
- ModelServiceSizeInfo size = new ModelServiceSizeInfo(winSize[0]
- - barWidth, winSize[1] - barHeight, winSize[0]
- - barWidth, winSize[1] * pageCount - barHeight);
- return size;
- }
-
- _oOoWindowComposite.setVisible(false);
-
- while (true) {
- int offset = incrementLargeScrollX(false);
- if ((offset == 0) || (offset == -1))
- break;
- }
- while (true) {
- int offset = incrementLargeScrollY(false);
- if ((offset == 0) || (offset == -1))
- break;
- }
-
- int[] viewData = _oOoWindowComposite.getViewData();
- if (viewData == null) {
- _oOoWindowComposite.setVisible(true);
- return viewSize;
- }
- ModelServiceSizeInfo size = new ModelServiceSizeInfo(winSize[0]
- - barWidth, winSize[1] - barWidth, viewData[2] - barWidth,
- viewData[3] - barWidth);
-
- while (true) {
- int offset = decrementLargeScrollX(false);
- if ((offset == 0) || (offset == -1))
- break;
- }
- while (true) {
- int offset = decrementLargeScrollY(false);
- if ((offset == 0) || (offset == -1))
- break;
- }
- _oOoWindowComposite.setVisible(true);
- _oOoWindowComposite.redraw();
- return size;
- } else {
- return viewSize;
- }
- }
-
- private void waitRendering() {
- Thread tmp = new Thread() {
- public void run() {
- try {
- Thread.sleep(750);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- };
- tmp.run();
- try {
- tmp.join();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoEditorToolbar.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoEditorToolbar.java
deleted file mode 100644
index 1bb2e5a..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoEditorToolbar.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Norimasa HAYASHIDA - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.actf.model.ui.editors.ooo.editor.impl;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.ModelUIPlugin;
-import org.eclipse.actf.model.ui.editors.ooo.OOoEditorPlugin;
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-
-
-
-public class OOoEditorToolbar extends Composite {
-
- private Text _addressText;
-
- private boolean _isFocusOnText;
-
- private IModelService modelService;
-
- public OOoEditorToolbar(IModelService modelService, Composite parent, int style, boolean isEditor) {
- super(parent, style);
-
- this.modelService = modelService;
-
- setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- GridLayout gridLayout = new GridLayout();
- gridLayout.marginBottom = 1;
- gridLayout.verticalSpacing = 0;
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- gridLayout.horizontalSpacing = 0;
- gridLayout.numColumns = 3;
- setLayout(gridLayout);
-
- initLayout(isEditor);
- }
-
- private void initLayout(boolean isEditor) {
-
- Label addressLabel = new Label(this, SWT.NONE);
- addressLabel.setLayoutData(new GridData());
- addressLabel.setText(" " + ModelServiceMessages.getString("WebBrowser.Address")); //$NON-NLS-1$ //$NON-NLS-2$
- addressLabel.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent arg0) {
- if (arg0.stateMask == SWT.ALT && (arg0.character == 'd' || arg0.character == 'D')) {
- _addressText.setFocus();
- _addressText.selectAll();
- }
- }
- });
-
- this._addressText = new Text(this, SWT.SINGLE | SWT.BORDER);
- GridData gridData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
- gridData.widthHint = 1024;
- _addressText.setLayoutData(gridData);
- this._addressText.addFocusListener(new FocusAdapter() {
- public void focusLost(FocusEvent arg0) {
- _isFocusOnText = false;
- }
-
- public void focusGained(FocusEvent arg0) {
- _addressText.selectAll();
- }
- });
-
- this._addressText.addMouseListener(new MouseAdapter() {
- public void mouseUp(MouseEvent arg0) {
- if (!_isFocusOnText) {
- _addressText.selectAll();
- _isFocusOnText = true;
- }
- }
-
- public void mouseDoubleClick(MouseEvent e) {
- _addressText.selectAll();
- }
- });
-
- this._addressText.addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- if (e.character == SWT.CR) {
- // BrowserEventListenerManager.getInstance().fireNavigate(_addressText.getText());
- modelService.open(_addressText.getText());
- }
- }
-
- public void keyReleased(KeyEvent e) {
- }
- });
-
- // search button
- Button searchButton = new Button(this, SWT.NULL);
- searchButton.setLayoutData(getButtonsGridData());
- searchButton.setText(ModelServiceMessages.getString("WebBrowser.Go")); //$NON-NLS-1$
- searchButton.setToolTipText(ModelServiceMessages.getString("WebBrowser.Go_tp")); //$NON-NLS-1$
- searchButton.setImage(OOoEditorPlugin.imageDescriptorFromPlugin(ModelUIPlugin.PLUGIN_ID, "icons/browser/go.png").createImage());
- searchButton.addMouseListener(new MouseAdapter() {
- public void mouseUp(MouseEvent e) {
- // BrowserEventListenerManager.getInstance().fireNavigate(_addressText.getText());
- modelService.open(_addressText.getText());
- }
- });
- // _compositeParent.getShell().setDefaultButton(searchButton);
- }
-
- private GridData getButtonsGridData() {
- GridData gridData = new GridData();
- gridData.heightHint = 32;
- gridData.widthHint = 32;
-
- return gridData;
- }
-
- public Text getAddressText() {
- return this._addressText;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoWindowComposite.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoWindowComposite.java
deleted file mode 100644
index 0ddc965..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/editor/impl/OOoWindowComposite.java
+++ /dev/null
@@ -1,540 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Tatsuya ISHIHARA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editors.ooo.editor.impl;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.actf.model.dom.odf.ODFParser;
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.manifest.ManifestConstants;
-import org.eclipse.actf.model.dom.odf.util.ODFFileUtils;
-import org.eclipse.actf.model.ui.editors.ooo.internal.util.BootstrapForOOoComposite;
-import org.eclipse.actf.model.ui.editors.ooo.internal.util.ODFException;
-import org.eclipse.actf.model.ui.editors.ooo.internal.util.ODFUtils;
-import org.eclipse.actf.model.ui.editors.ooo.internal.util.OOoNavigation;
-import org.eclipse.actf.model.ui.editors.ooo.internal.util.OOoUIControls;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.w3c.dom.Document;
-import org.w3c.dom.NodeList;
-
-import com.sun.star.accessibility.AccessibleRole;
-import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleAction;
-import com.sun.star.accessibility.XAccessibleContext;
-import com.sun.star.awt.PosSize;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.XSystemChildFactory;
-import com.sun.star.awt.XToolkit;
-import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.comp.helper.BootstrapException;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
-import com.sun.star.drawing.XDrawView;
-import com.sun.star.frame.FrameSearchFlag;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XController;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.XFrames;
-import com.sun.star.frame.XFramesSupplier;
-import com.sun.star.lang.DisposedException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-import com.sun.star.lang.SystemDependent;
-import com.sun.star.lang.WrappedTargetException;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.sheet.XSpreadsheetView;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.util.CloseVetoException;
-import com.sun.star.util.XCloseable;
-
-public class OOoWindowComposite extends Composite {
- public static final int ACTION_SCROLL_DECREMENT_LINE = 0;
- public static final int ACTION_SCROLL_INCREMENT_LINE = 1;
- public static final int ACTION_SCROLL_DECREMENT_BLOCK = 2;
- public static final int ACTION_SCROLL_INCREMENT_BLOCK = 3;
-
- private XDesktop xDesktop = null;
- private XMultiServiceFactory xMSF = null;
- private OOoWindow oooWin = null;
- private XFrame xFrame = null;
- private XComponent xComponent = null;
- private XAccessibleAction[] scrollAction = null;
-
- private String _url = null;
-
- private OOoNavigation oooNavigation = null;
-
- public OOoWindowComposite(Composite parent, int style) throws ODFException {
- super(parent, style);
- init();
- addControlListener(new OOoWindowControlListener());
- addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- dispose();
- }
- });
- }
-
- public void init() throws ODFException {
- try {
- ClassLoader classLoader = ODFUtils.loadOpenOfficeLibs();
- BootstrapForOOoComposite.bootstrap(classLoader);
- xMSF = BootstrapForOOoComposite.getXMultiServiceFactory();
- xDesktop = BootstrapForOOoComposite.getXDesktop();
- } catch (BootstrapException e) {
- throw new ODFException(e.getMessage());
- }
- }
-
- private class OOoWindowControlListener implements ControlListener {
- public void controlMoved(ControlEvent e) {
- // TODO Auto-generated method stub
-
- }
-
- public void controlResized(ControlEvent e) {
- if (oooWin!=null) {
- Object source = e.getSource();
- if (source instanceof Composite) {
- Point size = ((Composite)source).getSize();
- oooWin.setSize(size.x, size.y);
- }
- }
- }
- }
-
- public void dispose() {
- super.dispose();
- xMSF = null;
- if (oooWin!=null) oooWin.dispose();
- if (xFrame!=null) closeFrame();
- xFrame = null;
- xComponent = null;
- if ((xDesktop!=null)&&(ODFUtils.getOpenOfficeFrameNum()==0)) {
- dispathMessageThread(new Runnable() {
- public void run() {
- try {
- xDesktop.terminate();
- } catch (DisposedException de) {
- }
- }});
- }
- xDesktop = null;
- if (scrollAction!=null) {
- for (int i=0; i<scrollAction.length; i++)
- scrollAction[i] = null;
- }
- scrollAction = null;
- }
-
- public void dispathMessageThread(Runnable runnable) {
- Thread thread = new Thread(runnable);
- thread.start();
- Display display = Display.getDefault();
- while(thread.isAlive()) {
- display.readAndDispatch();
- try {
- Thread.sleep(200);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
-
- private void closeFrame() {
- if(xFrame!=null){
- dispathMessageThread(new Runnable() {
- public void run() {
- XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, xFrame);
- if (xCloseable!=null){
- try {
- xCloseable.close(true);
- } catch (CloseVetoException e) {
- e.printStackTrace();
- }
- }else{
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xFrame);
- if (xComponent!=null){
- xComponent.dispose();
- }
- }
- }});
- xFrame = null;
- xComponent = null;
- }
- }
-
- private void load(String sUrl) {
- if (0 != sUrl.indexOf("private:") && 0 != sUrl.indexOf("file:///")) {
- try {
- File srcFile = new File(sUrl);
- StringBuffer sb = new StringBuffer("file:///");
- sb.append(srcFile.getCanonicalPath().replace('\\', '/'));
- sUrl = sb.toString();
- if (!srcFile.canRead()) {
- return;
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- return;
- }
- }
-
- XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, xFrame);
- try{
- PropertyValue[] loadProp = new PropertyValue[1];
- loadProp[0] = new PropertyValue();
- loadProp[0].Name = "ReadOnly";
- loadProp[0].Value = Boolean.TRUE;
- xComponent = xComponentLoader.loadComponentFromURL(sUrl, xFrame.getName(), FrameSearchFlag.ALL, loadProp);
- oooNavigation = new OOoNavigation(xMSF, xComponent);
- }catch(Exception e){
- xComponent = null;
- }
- }
-
- private XAccessible findXAccessibleByRole(XAccessible xAc, short role) {
- XAccessibleContext xAcContext = xAc.getAccessibleContext();
- if (xAc.getAccessibleContext().getAccessibleRole()==role) {
- return xAc;
- }
- for (int i=0; i<xAcContext.getAccessibleChildCount(); i++) {
- XAccessible xAcChild = null;
- try {
- xAcChild = xAcContext.getAccessibleChild(i);
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- }
- XAccessible foundAc = findXAccessibleByRole(xAcChild, role);
- if (foundAc!=null) return foundAc;
- }
- return null;
- }
-
- // index 0 : X scroll bar
- // index 1 : Y scroll bar
- //action for SCROLL PANE
- //0 --- decrementLine
- //1 --- incrementLine
- //2 --- decrementBlock
- //3 --- incrementBlock
- private XAccessibleAction[] findScrollAction() {
- XWindow xWindow = oooWin.getXWindow();
- XAccessible xAcWindow = (XAccessible) UnoRuntime.queryInterface(XAccessible.class, xWindow);
- XAccessible xAcScrollPane = findXAccessibleByRole(xAcWindow, AccessibleRole.SCROLL_PANE);
-
- XAccessibleContext scrollPaneContext = xAcScrollPane.getAccessibleContext();
- XAccessible[] xAcScrollBar = new XAccessible[2];
- XAccessibleAction[] scrollAction = new XAccessibleAction[2];
- for (int i=0, j=0; i<scrollPaneContext.getAccessibleChildCount(); i++) {
- try {
- XAccessible child = scrollPaneContext.getAccessibleChild(i);
- XAccessibleContext childContext = child.getAccessibleContext();
- if (childContext.getAccessibleRole()==AccessibleRole.SCROLL_BAR) {
- xAcScrollBar[j] = child;
- scrollAction[j] = (XAccessibleAction) UnoRuntime.queryInterface(XAccessibleAction.class,
- xAcScrollBar[j].getAccessibleContext());
- j++;
- }
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- }
- }
- return scrollAction;
- }
-
- private class OOoWindow {
- Composite parent = null;
- XWindow xWindow = null;
-
- public OOoWindow(Composite parent) {
- this.parent = parent;
- }
-
- public void dispose() {
- xWindow = null;
- }
-
- public void create(XMultiServiceFactory xMSF) {
- if(xWindow==null){
- XToolkit xToolkit = null;
- try {
- xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, xMSF.createInstance("com.sun.star.awt.Toolkit"));
- } catch (Exception e) {
- e.printStackTrace();
- }
- if(xToolkit!=null) {
- XSystemChildFactory xSystemChildFactory = (XSystemChildFactory) UnoRuntime.queryInterface(XSystemChildFactory.class, xToolkit);
- if(xSystemChildFactory!=null){
- byte[] procID = new byte[0];
- XWindowPeer xWindowPeer = xSystemChildFactory.createSystemChild(new Integer(parent.handle), procID, SystemDependent.SYSTEM_WIN32);
- if(xWindowPeer!=null){
- xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xWindowPeer);
- }
- }
- }
- }
- }
-
- public XWindow getXWindow() {return xWindow;}
-
- public void setSize(int width, int height){
- if(xWindow!=null){
- xWindow.setPosSize(0, 0, width, height, PosSize.SIZE);
- }
- }
-
- public void setWidth(int width){
- if(xWindow!=null){
- xWindow.setPosSize(0, 0, width, 0, PosSize.WIDTH);
- }
- }
-
- public void setHeight(int height){
- if(xWindow!=null){
- xWindow.setPosSize(0, 0, 0, height, PosSize.HEIGHT);
- }
- }
-
- public void setVisible(boolean visible){
- if(xWindow!=null){
- xWindow.setVisible(visible);
- }
- }
- }
-
- public boolean isPasswordProtected(String url) {
- ODFParser parser = new ODFParser();
- Document manifestDoc = parser.getDocument(url, org.eclipse.actf.model.dom.odf.ODFConstants.ODF_MANIFEST_FILENAME);
- if (manifestDoc==null) return false;
- NodeList nl = manifestDoc.getElementsByTagNameNS(ManifestConstants.MANIFEST_NAMESPACE_URI, ManifestConstants.ELEMENT_ENCRYPTION_DATA);
- if ((nl!=null)&&(nl.getLength()!=0)) return true;
- return false;
- }
-
- public void open(String sUrl) {
- if (isPasswordProtected(sUrl)) {
- PlatformUI.getWorkbench().getHelpSystem().displayHelpResource("/org.eclipse.actf.examples.adesigner.doc/docs/odf/error.html");
- return;
- }
-
- // remove previous OOo window
- if (oooWin!=null) {
- oooWin.dispose();
- }
- if (xFrame!=null) {
- closeFrame();
- }
-
- oooWin = new OOoWindow(this);
- this._url = sUrl;
-
- dispathMessageThread(new Runnable() {
- public void run() {
- try {
- oooWin.create(xMSF);
-
- xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, xMSF.createInstance("com.sun.star.frame.Frame"));
- XFramesSupplier xFramesSupplier = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, xMSF.createInstance("com.sun.star.frame.Desktop"));
- XFrames xFrames = xFramesSupplier.getFrames();
- xFrames.append(xFrame);
- xFrame.initialize(oooWin.getXWindow());
-
- load(_url);
-
- scrollAction = findScrollAction();
-
- try {
- OOoUIControls.hideUIElements(xFrame, xMSF);
- } catch (ODFException e) {
- e.printStackTrace();
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }});
-
- Point size = this.getSize();
- oooWin.setVisible(true);
- oooWin.setSize(size.x, size.y);
- }
-
- public String getUrl(){
- return this._url;
- }
-
- public OOoNavigation getOooNavigation() {
- return this.oooNavigation;
- }
-
- public XAccessibleAction[] getScrollAction() {
- return scrollAction;
- }
-
- public int[] getViewData() {
- ContentType odfFileType = ODFFileUtils.getODFFileType(_url);
- if (ContentType.WRITE.equals(odfFileType)) {
- XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent);
- if (xTextDocument!=null) {
- String viewData = (String) xFrame.getController().getViewData();
- String[] pointsStr = viewData.split(";");
- int[] points = new int[4];
- points[0] = new Integer(pointsStr[3]).intValue();
- points[1] = new Integer(pointsStr[4]).intValue();
- points[2] = new Integer(pointsStr[5]).intValue();
- points[3] = new Integer(pointsStr[6]).intValue();
- return points;
- }
- } else if (ContentType.SPREADSHEET.equals(odfFileType)) {
- XController xController = xFrame.getController();
- XSpreadsheetView xSpreadView = (XSpreadsheetView) UnoRuntime.queryInterface(XSpreadsheetView.class, xController);
- XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xSpreadView);
- try {
- Rectangle visibleArea = (Rectangle) UnoRuntime.queryInterface(Rectangle.class, xPropSet.getPropertyValue("VisibleArea"));
- int[] points = new int[4];
- points[0] = visibleArea.X;
- points[1] = visibleArea.Y;
- points[2] = visibleArea.X + visibleArea.Width;
- points[3] = visibleArea.Y + visibleArea.Height;
- return points;
- } catch (UnknownPropertyException e1) {
- e1.printStackTrace();
- } catch (WrappedTargetException e1) {
- e1.printStackTrace();
- }
- } else if (ContentType.PRESENTATION.equals(odfFileType)) {
- XController xController = xFrame.getController();
- XDrawView xDrawView = (XDrawView) UnoRuntime.queryInterface(XDrawView.class, xController);
- XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xDrawView);
- try {
- Rectangle visibleArea = (Rectangle) UnoRuntime.queryInterface(Rectangle.class, xPropSet.getPropertyValue("VisibleArea"));
- int[] points = new int[4];
- points[0] = visibleArea.X;
- points[1] = visibleArea.Y;
- points[2] = visibleArea.X + visibleArea.Width;
- points[3] = visibleArea.Y + visibleArea.Height;
- return points;
- } catch (UnknownPropertyException e1) {
- e1.printStackTrace();
- } catch (WrappedTargetException e1) {
- e1.printStackTrace();
- }
- }
- return null;
- }
-
- public int[] getOOoWinSize() throws ODFException {
- if(xFrame==null){
- throw new ODFException("not initialized");
- }
-
- XWindow componentWindow = xFrame.getComponentWindow();
- Rectangle rect = componentWindow.getPosSize();
- int[] size = new int[2];
- size[0] = rect.Width;
- size[1] = rect.Height;
- return size;
- }
-
- public int getPresentationPageCount() {
- return ODFUtils.getDrawPageCount(xComponent);
- }
-
- public int jumpToPresentationPage(int pageNumber) {
- XDrawPagesSupplier xDrawPagesSupp = (XDrawPagesSupplier) UnoRuntime.queryInterface(XDrawPagesSupplier.class, xComponent);
- XDrawPages xDrawPages = xDrawPagesSupp.getDrawPages();
-
- XController xController = xFrame.getController();
- XDrawView xDrawView = (XDrawView) UnoRuntime.queryInterface(XDrawView.class, xController);
- try {
- XDrawPage page = (XDrawPage) UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex(pageNumber-1));
- xDrawView.setCurrentPage(page);
- return 1;
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- }
- return -1;
- }
-
- public int getCurrentPageNumber(){
- XController xController = xFrame.getController();
- XDrawView xDrawView = (XDrawView) UnoRuntime.queryInterface(XDrawView.class, xController);
- XDrawPage curPage = xDrawView.getCurrentPage();
- XPropertySet curPageProp = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, curPage);
- try {
- return ((Short) curPageProp.getPropertyValue("Number")).intValue();
- } catch (UnknownPropertyException e1) {
- e1.printStackTrace();
- } catch (WrappedTargetException e1) {
- e1.printStackTrace();
- }
- return -1;
- }
-
- public int movePresentationPage(boolean forward){
- XDrawPagesSupplier xDrawPagesSupp = (XDrawPagesSupplier) UnoRuntime.queryInterface(XDrawPagesSupplier.class, xComponent);
- XDrawPages xDrawPages = xDrawPagesSupp.getDrawPages();
- int pageCount = xDrawPages.getCount();
-
- int curPageNumber = getCurrentPageNumber();
- if (curPageNumber==-1) return -1;
-
- if ((forward==true)&&(curPageNumber==pageCount)) return 0;
- if ((forward==false)&&(curPageNumber==1)) return 0;
-
- int newPageIndex;
- if (forward) newPageIndex = curPageNumber;
- else newPageIndex = curPageNumber-2;
-
- XController xController = xFrame.getController();
- XDrawView xDrawView = (XDrawView) UnoRuntime.queryInterface(XDrawView.class, xController);
- try {
- XDrawPage newPage = (XDrawPage) UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex(newPageIndex));
- xDrawView.setCurrentPage(newPage);
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- }
- try{
- return getOOoWinSize()[1];
- }catch(ODFException e){
- return -1;
- }
- }
-
- public boolean setDrawingMode() {
- try {
- return OOoUIControls.setDrawingMode(xMSF, xFrame.getController());
- } catch (ODFException e) {
- e.printStackTrace();
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/BootstrapForOOoComposite.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/BootstrapForOOoComposite.java
deleted file mode 100644
index 40108d9..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/BootstrapForOOoComposite.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Norimasa HAYASHIDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editors.ooo.internal.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URLEncoder;
-
-import com.sun.star.bridge.UnoUrlResolver;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.comp.helper.Bootstrap;
-import com.sun.star.comp.helper.BootstrapException;
-import com.sun.star.connection.NoConnectException;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lib.uno.helper.UnoUrl;
-import com.sun.star.lib.util.NativeLibraryLoader;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-
-
-public class BootstrapForOOoComposite extends Bootstrap {
- private static XComponentContext xComponentContext = null;
- private static XMultiServiceFactory xMSF = null;
- private static XDesktop xDesktop = null;
-
- public static final Process bootstrap(ClassLoader classLoader) throws BootstrapException {
-
- Process process = null;
-
- try {
- xComponentContext = createInitialComponentContext(null);
- if (null == xComponentContext) {
- throw new BootstrapException("no local component context");
- }
-
- String sOfficeExeName = System.getProperty("os.name").startsWith("Windows") ? "soffice.exe" : "soffice";
- File sOfficeFile = NativeLibraryLoader.getResource(classLoader, sOfficeExeName);
- if (null == sOfficeFile) {
- throw new BootstrapException("no office executable found");
- }
-
- XMultiComponentFactory xMCF = xComponentContext.getServiceManager();
- if (null == xMCF) {
- throw new BootstrapException("no initial service manager");
- }
-
- XUnoUrlResolver xUnoUrlResolver = UnoUrlResolver.create(xComponentContext);
- String sUnoUrl = "uno:pipe,name=" + getPipeName() + ";urp;StarOffice.ServiceManager";
-
- UnoUrl unourl = UnoUrl.parseUnoUrl(sUnoUrl);
- String connType = unourl.getConnection();
- String protocol = unourl.getProtocol();
- String initObj = unourl.getRootOid();
-
- String as[] = new String[5];
- as[0] = sOfficeFile.getPath();
- as[1] = "-nologo";
- as[2] = "-nodefault";
- as[3] = "-norestore";
- if (connType.equals("pipe")) {
- as[4] = "-accept=pipe,name=" + getPipeName() + ";" + protocol + ";" + initObj;
- } else {
- throw new IOException("not connection specified");
- }
-
- process = Runtime.getRuntime().exec(as);
-
- Object oServiceManager;
- do {
- try {
- oServiceManager = xUnoUrlResolver.resolve("uno:pipe,name=" + getPipeName() + ";urp;StarOffice.ServiceManager");
- break;
- } catch (NoConnectException nce) {
- Thread.currentThread();
- Thread.sleep(500);
- } } while (true);
-
- xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oServiceManager);
- xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, xMSF.createInstance("com.sun.star.frame.Desktop"));
- } catch (RuntimeException re) {
- throw re;
- } catch (Exception e) {
- throw new BootstrapException(e);
- }
-
- return process;
- }
-
- private static String getPipeName() {
- String s = System.getProperty("user.name") + "_Office";
- s = replaceAll(s, "_", "%B7");
-
- return replaceAll(replaceAll(URLEncoder.encode(s), "+", "%20"), "%", "_");
- }
-
- private static String replaceAll(String s, String s1, String s2) {
- StringBuffer stringbuffer = new StringBuffer(s);
- int i = s.length();
- int j = s1.length();
- while ((i = s.lastIndexOf(s1, i - 1)) > -1) {
- stringbuffer.replace(i, i + j, s2);
- }
-
- return stringbuffer.toString();
- }
-
- public static XComponentContext getXComponentContext() {return xComponentContext;}
- public static XMultiServiceFactory getXMultiServiceFactory() {return xMSF;}
- public static XDesktop getXDesktop() {return xDesktop;}
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/ODFException.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/ODFException.java
deleted file mode 100644
index 48eb4bd..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/ODFException.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Norimasa HAYASHIDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editors.ooo.internal.util;
-
-
-
-public class ODFException extends Exception {
-
- private static final long serialVersionUID = -6677727822167816263L;
-
- public ODFException(){
- super();
- }
-
- public ODFException(String msg){
- super(msg);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/ODFUtils.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/ODFUtils.java
deleted file mode 100644
index ef365b8..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/ODFUtils.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Norimasa HAYASHIDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editors.ooo.internal.util;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.office.DocumentContentElement;
-import org.eclipse.actf.model.ui.editors.ooo.initializer.util.OOoEditorInitUtil;
-import org.eclipse.swt.internal.win32.OS;
-import org.eclipse.swt.internal.win32.TCHAR;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.comp.helper.Bootstrap;
-import com.sun.star.container.NoSuchElementException;
-import com.sun.star.container.XEnumeration;
-import com.sun.star.container.XEnumerationAccess;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XDispatchHelper;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.XLayoutManager;
-import com.sun.star.frame.XModel;
-import com.sun.star.lang.IndexOutOfBoundsException;
-import com.sun.star.lang.WrappedTargetException;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-
-
-public class ODFUtils {
- public static int getDrawPageCount(XComponent xComp) {
- XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, xComp);
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
-
- return xDrawPages.getCount();
- }
-
- public static XDrawPage getDrawPageByIndex(XComponent xComp, int index) throws ODFException {
-
- try {
- XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, xComp);
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
-
- return (XDrawPage) UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex(index));
-
- } catch (IndexOutOfBoundsException ioobe) {
- ioobe.printStackTrace();
- throw new ODFException(ioobe.getMessage());
- } catch (WrappedTargetException wte) {
- wte.printStackTrace();
- throw new ODFException(wte.getMessage());
- }
- }
-
- public static ContentType getODFFileType(Document odfContent) {
- if (odfContent!=null) {
- Element content = odfContent.getDocumentElement();
- if (content instanceof DocumentContentElement) {
- return ((DocumentContentElement)content).getBodyElement().getContent().getContentType();
- }
- }
- return ContentType.NONE;
- }
-
- public static XFrame getXFrame(XComponentContext xCompContext) throws ODFException {
- XComponent xComp = getXComponent(xCompContext);
- XModel model = (XModel) UnoRuntime.queryInterface(XModel.class, xComp);
- return model.getCurrentController().getFrame();
- }
-
- public static XDispatchHelper getXDispatchHelper(XComponentContext xCompContext) throws ODFException {
-
- XDispatchHelper xDispatchHelper = null;
-
- XMultiComponentFactory xMCF = xCompContext.getServiceManager();
-
- try {
- Object oDispatchHelper = xMCF.createInstanceWithContext("com.sun.star.frame.DispatchHelper", xCompContext);
- xDispatchHelper = (XDispatchHelper) UnoRuntime.queryInterface(XDispatchHelper.class, oDispatchHelper);
- } catch (Exception e) {
- throw new ODFException(e.getMessage());
- }
-
- return xDispatchHelper;
- }
-
- public static XLayoutManager getXLayoutManager(XFrame xFrame) throws ODFException {
-
- XLayoutManager xLayoutManager = null;
-
- XPropertySet framePropSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xFrame);
- try {
- xLayoutManager = (XLayoutManager) UnoRuntime.queryInterface(XLayoutManager.class, framePropSet
- .getPropertyValue("LayoutManager"));
- } catch (UnknownPropertyException upe) {
- throw new ODFException(upe.getMessage());
- } catch (WrappedTargetException wte) {
- throw new ODFException(wte.getMessage());
- }
-
- return xLayoutManager;
- }
-
- public static XComponent getXComponent(XComponentContext xComponentContext) throws ODFException {
- XDesktop xDesktop = BootstrapForOOoComposite.getXDesktop();
- XEnumerationAccess xEnumerationAccess = xDesktop.getComponents();
- XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
- while (xEnumeration.hasMoreElements()) {
- Object oComp = null;
- try {
- oComp = xEnumeration.nextElement();
- } catch (NoSuchElementException nsee) {
- throw new ODFException(nsee.getMessage());
- } catch (WrappedTargetException wte) {
- throw new ODFException(wte.getMessage());
- }
-
- if (null != oComp) {
- return (XComponent) UnoRuntime.queryInterface(XComponent.class, oComp);
- }
- }
-
- return null;
- }
-
- public static XDesktop getXDesktop(XComponentContext xComponentContext) throws ODFException {
- XDesktop xDesktop = null;
- try {
- XMultiComponentFactory xMCF = xComponentContext.getServiceManager();
- Object oDesktop = xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", xComponentContext);
- xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, oDesktop);
- } catch (Exception e) {
- throw new ODFException(e.getMessage());
- }
-
- return xDesktop;
- }
-
- public static ClassLoader loadOpenOfficeLibs() throws ODFException {
- String openOfficeProgramPath = OOoEditorInitUtil.getOpenOfficePath() + "\\";
-
- File msvcr71 = new File(openOfficeProgramPath + "msvcr71.dll");
- if (msvcr71.exists()) {
- System.load(msvcr71.getPath());
- }
-
- if (System.getProperty("java.vm.vendor").equals("IBM Corporation")) {
- String javaHome = System.getProperty("com.ibm.oti.vm.bootstrap.library.path");
-
- // dummy variable to load awt.dll
- java.awt.Color awtColor = new java.awt.Color(0, 0, 0);
- System.load(javaHome + "\\jawt.dll");
- } else if (System.getProperty("java.vm.vendor").equals("Sun Microsystems Inc.")) {
- String javaHome = System.getProperty("java.home");
-
- //dummy variable to load awt.dll
- java.awt.Color awtColor = new java.awt.Color(0, 0, 0);
- System.load(javaHome + "\\bin\\jawt.dll");
- } else {
- throw new ODFException("should be launched by using IBM Java");
- }
-
- System.load(openOfficeProgramPath + "uwinapi.dll");
- System.load(openOfficeProgramPath + "officebean.dll");
- System.load(openOfficeProgramPath + "sal3.dll");
- System.load(openOfficeProgramPath + "jpipe.dll");
-
- ClassLoader javaClassLoader = null;
- try {
- URL[] jarList = new URL[] { new File(openOfficeProgramPath + "classes\\juh.jar").toURL(),
- new File(openOfficeProgramPath + "classes\\jurt.jar").toURL(),
- new File(openOfficeProgramPath + "classes\\ridl.jar").toURL(),
- new File(openOfficeProgramPath + "classes\\unoil.jar").toURL() };
-
- javaClassLoader = new URLClassLoader(jarList, Bootstrap.class.getClassLoader());
-
- } catch (MalformedURLException murle) {
- throw new ODFException(murle.getMessage());
- }
-
- return javaClassLoader;
- }
-
- private static String getWindowClass(int hwnd) {
- TCHAR buffer = new TCHAR(0, 128);
- OS.GetClassName(hwnd, buffer, buffer.length());
- return buffer.toString(0, buffer.strlen());
- }
-
- private static int getOpenOfficeFrameNum(int hWnd, int frameNum) {
- int result = frameNum;
- int hFrame = 0;
- int hwndChild = OS.GetWindow (hWnd, OS.GW_CHILD);
- while (hwndChild != 0) {
- String winClass = getWindowClass(hwndChild);
- if (winClass.equals("SALTMPSUBFRAME")) {
- result++;
- } else {
- result = getOpenOfficeFrameNum(hwndChild, result);
- }
- hwndChild = OS.GetWindow(hwndChild, OS.GW_HWNDNEXT);
- }
- return result;
- }
-
- public static int getOpenOfficeFrameNum() {
- int result = 0;
- int hwndChild = OS.GetWindow (OS.GetDesktopWindow(), OS.GW_CHILD);
- while (hwndChild != 0) {
- result = getOpenOfficeFrameNum(hwndChild, result);
- String winClass = getWindowClass(hwndChild);
- if (winClass.equals("SALFRAME")){
- result++;
- } else {
- result = getOpenOfficeFrameNum(hwndChild, result);
- }
- hwndChild = OS.GetWindow(hwndChild, OS.GW_HWNDNEXT);
- }
- return result;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/OOoNavigation.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/OOoNavigation.java
deleted file mode 100644
index 681f5eb..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/OOoNavigation.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Norimasa HAYASHIDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editors.ooo.internal.util;
-
-import org.eclipse.actf.model.dom.odf.ODFConstants.ContentType;
-import org.eclipse.actf.model.dom.odf.base.DrawingObjectElement;
-import org.eclipse.actf.model.dom.odf.base.ODFDocument;
-import org.eclipse.actf.model.dom.odf.base.ODFElement;
-import org.eclipse.actf.model.dom.odf.dr3d.Dr3dConstants;
-import org.eclipse.actf.model.dom.odf.draw.ControlElement;
-import org.eclipse.actf.model.dom.odf.draw.DrawConstants;
-import org.eclipse.actf.model.dom.odf.draw.FrameElement;
-import org.eclipse.actf.model.dom.odf.draw.PageElement;
-import org.eclipse.actf.model.dom.odf.table.TableConstants;
-import org.eclipse.actf.model.dom.odf.table.TableElement;
-import org.eclipse.actf.model.dom.odf.util.converter.ODFConverter;
-import org.eclipse.actf.util.xpath.XPathUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.sun.star.container.NoSuchElementException;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPageSupplier;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
-import com.sun.star.frame.XController;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.XModel;
-import com.sun.star.lang.IllegalArgumentException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-import com.sun.star.lang.WrappedTargetException;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.table.XCell;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextEmbeddedObjectsSupplier;
-import com.sun.star.text.XTextGraphicObjectsSupplier;
-import com.sun.star.text.XTextTable;
-import com.sun.star.text.XTextTablesSupplier;
-import com.sun.star.text.XTextViewCursor;
-import com.sun.star.text.XTextViewCursorSupplier;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.view.XSelectionSupplier;
-
-
-
-public class OOoNavigation {
-
- private String _targetContentID = null;
- private ODFDocument _contentXML = null;
- private ContentType _fileType = null;
- private XMultiServiceFactory _xMSF = null;
- private XComponent _xComp = null;
-
- public OOoNavigation(XMultiServiceFactory xMSF, XComponent xComponent) {
- this._xMSF = xMSF;
- this._xComp = xComponent;
- }
-
- public void setContentXML(ODFDocument contentXML){
- this._contentXML = contentXML;
- }
-
- public ODFDocument getContentXML(){
- return this._contentXML;
- }
-
- //TODO find Node from Browser
- public void jumpToProblemPosition(Node targetNode) throws ODFException {
- this._targetContentID = ((Element) targetNode).getAttribute(ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID);
- if (null == this._targetContentID) {
- return;
- }
-
- if (null == this._fileType) {
- this._fileType = ODFUtils.getODFFileType(this._contentXML);
- }
- if (this._fileType==ContentType.NONE) {
- return;
- }
-
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, this._xComp);
- XController xController = xModel.getCurrentController();
- // before select error content set Drawing mode
- if (this._fileType == ContentType.PRESENTATION) {
- OOoUIControls.setDrawingMode(_xMSF, xController);
- }
-
- String drawPrefix = this._contentXML.lookupPrefix(DrawConstants.DRAW_NAMESPACE_URI);
- String dr3dPrefix = this._contentXML.lookupPrefix(Dr3dConstants.DR3D_NAMESPACE_URI);
-
- String targetNodeName = targetNode.getNodeName();
- String targetOdfNodeName = ((Element) targetNode).getAttribute(ODFConverter.OUTPUT_ATTR_ODF_TAGNAME);
- if (targetNodeName.equalsIgnoreCase("img")) {
- jumpToProblemImage(targetNode);
- } else if (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_OBJECT)) {
- jumpToProblemObject(targetNode);
- } else if (targetNodeName.equalsIgnoreCase("table")) {
- jumpToProblemTable(targetNode);
- } else if ( (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_CAPTION))
- || (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_CIRCLE))
- || (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_CUSTOM_SHAPE))
- || (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_ELLIPSE))
- || (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_G))
- || (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_LINE))
- || (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_CONNECTOR))
- || (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_POLYGON))
- || (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_POLYLINE))
- || (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_RECT))
- || (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_REGULAR_POLYGON))
- || (targetOdfNodeName.equals(dr3dPrefix + ":" + Dr3dConstants.ELEMENT_SCENE)) ) {
- jumpToProblemDrawingShape(targetNode);
- } else if (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_PAGE)) {
- jumpToProblemDrawingPage(targetNode);
- } else if (targetOdfNodeName.equals(drawPrefix + ":" + DrawConstants.ELEMENT_CONTROL)) {
- jumpToProblemFormControl(targetNode);
- }
-
- // after select error content hide UI elements
- try {
- XFrame xFrame = xController.getFrame();
- OOoUIControls.hideUIElements(xFrame, this._xMSF);
- } catch (ODFException e) {
- e.printStackTrace();
- }
- }
-
- private void jumpToProblemTable(Node targetNode) throws ODFException {
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, this._xComp);
- XSelectionSupplier selectionSupplier = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class,
- xModel.getCurrentController());
-
- if (ContentType.WRITE.equals(this._fileType)) {
- XTextDocument xTextDoc = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, this._xComp);
-
- XTextTablesSupplier xTableSupplier = (XTextTablesSupplier) UnoRuntime.queryInterface(
- XTextTablesSupplier.class, xTextDoc);
-
- XNameAccess xNameAccess = xTableSupplier.getTextTables();
- try {
- if (!(targetNode instanceof Element)) return;
- String odfContentId = ((Element)targetNode).getAttribute(ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID);
- NodeList nl = XPathUtil.evalXPathNodeList(_contentXML.getDocumentElement(),
- "//*[namespace-uri()='" + TableConstants.TABLE_NAMESPACE_URI
- + "' and local-name()='" + TableConstants.ELEMENT_TABLE
- + "'][@" + ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID + "='" + odfContentId + "']");
- if ((nl==null)||(nl.getLength()!=1)) return;
- TableElement tableElem = (TableElement) nl.item(0);
- String tableName = tableElem.getAttributeNS(TableConstants.TABLE_NAMESPACE_URI, TableConstants.ATTR_NAME);
- Object oTable = xNameAccess.getByName(tableName);
- XTextTable xTable = (XTextTable) UnoRuntime.queryInterface (XTextTable.class, oTable);
- selectionSupplier.select(xTable);
-
- // select whole table
- XController xController = xModel.getCurrentController();
- XTextViewCursorSupplier xTextViewCursorSupplier = (XTextViewCursorSupplier) UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController);
- XTextViewCursor xTextViewCursor = xTextViewCursorSupplier.getViewCursor();
- xTextViewCursor.collapseToStart();
-
- XCell lastCell = xTable.getCellByName(xTable.getCellNames()[xTable.getCellNames().length - 1]);
- selectionSupplier.select(lastCell);
- xTextViewCursor.gotoStart(true);
- } catch (NoSuchElementException e) {
- e.printStackTrace();
- throw new ODFException(e.getMessage());
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- throw new ODFException(e.getMessage());
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- throw new ODFException(e.getMessage());
- }
- }
- }
-
- private void jumpToProblemImage(Node targetNode) throws ODFException {
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, this._xComp);
- XSelectionSupplier selectionSupplier = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class, xModel.getCurrentController());
-
- if (!(targetNode instanceof Element)) return;
- String odfContentId = ((Element)targetNode).getAttribute(ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID);
- NodeList nl = XPathUtil.evalXPathNodeList(_contentXML.getDocumentElement(),
- "//*[@" + ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID + "='" + odfContentId + "']");
- if ((nl==null)||(nl.getLength()!=1)) return;
- if (!(nl.item(0) instanceof ODFElement)) return;
-
- Node parent = nl.item(0).getParentNode();
- if (!(parent instanceof FrameElement)) return;
-
- FrameElement frameElem = (FrameElement) parent;
- String drawName = frameElem.getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI, DrawConstants.ATTR_NAME);
- if (drawName==null) return;
-
- Object xDoc = UnoRuntime.queryInterface(XTextDocument.class, this._xComp);
- if ((xDoc!=null)&&(xDoc instanceof XTextDocument)) {
- XTextDocument xTextDoc = (XTextDocument) xDoc;
- XTextGraphicObjectsSupplier xGraphicSupplier = (XTextGraphicObjectsSupplier) UnoRuntime.queryInterface(XTextGraphicObjectsSupplier.class, xTextDoc);
- XNameAccess xNameAccess = xGraphicSupplier.getGraphicObjects();
- try {
- Object obj = xNameAccess.getByName(drawName);
- selectionSupplier.select(obj);
- return;
- } catch (NoSuchElementException e) {
- e.printStackTrace();
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- }
- }
- Object xPageSupplier = UnoRuntime.queryInterface(XDrawPagesSupplier.class, this._xComp);
- if ((xPageSupplier!=null)&&(xPageSupplier instanceof XDrawPagesSupplier)) {
- XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) xPageSupplier;
- int zIndex = (int) frameElem.getZIndex();
- int pageIndex = (int) frameElem.getPageIndex();
- if ((zIndex!=-1)&&(pageIndex!=-1)) {
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
- try {
- Object xPage = UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex(pageIndex));
- if ((xPage!=null)&&(xPage instanceof XDrawPage)) {
- XDrawPage xDrawPage = (XDrawPage) xPage;
- Object obj = xDrawPage.getByIndex(zIndex);
- selectionSupplier.select(obj);
- return;
- }
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- }
- }
- }
- return;
- }
-
- private void jumpToProblemObject(Node targetNode) throws ODFException {
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, this._xComp);
- XSelectionSupplier selectionSupplier = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class, xModel.getCurrentController());
-
- if (!(targetNode instanceof Element)) return;
- String odfContentId = ((Element)targetNode).getAttribute(ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID);
- NodeList nl = XPathUtil.evalXPathNodeList(_contentXML.getDocumentElement(),
- "//*[@" + ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID + "='" + odfContentId + "']");
- if ((nl==null)||(nl.getLength()!=1)) return;
- if (!(nl.item(0) instanceof ODFElement)) return;
-
- Node parent = nl.item(0).getParentNode();
- if (!(parent instanceof FrameElement)) return;
-
- FrameElement frameElem = (FrameElement) parent;
- String drawName = frameElem.getAttributeNS(DrawConstants.DRAW_NAMESPACE_URI, DrawConstants.ATTR_NAME);
- if (drawName==null) return;
-
- Object xDoc = UnoRuntime.queryInterface(XTextDocument.class, this._xComp);
- if ((xDoc!=null)&&(xDoc instanceof XTextDocument)) {
- XTextDocument xTextDoc = (XTextDocument) xDoc;
- XTextEmbeddedObjectsSupplier xGraphicSupplier = (XTextEmbeddedObjectsSupplier) UnoRuntime.queryInterface(XTextEmbeddedObjectsSupplier.class, xTextDoc);
- XNameAccess xNameAccess = xGraphicSupplier.getEmbeddedObjects();
- try {
- Object obj = xNameAccess.getByName(drawName);
- selectionSupplier.select(obj);
- return;
- } catch (NoSuchElementException e) {
- e.printStackTrace();
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- }
- }
- Object xPageSupplier = UnoRuntime.queryInterface(XDrawPagesSupplier.class, this._xComp);
- if ((xPageSupplier!=null)&&(xPageSupplier instanceof XDrawPagesSupplier)) {
- XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) xPageSupplier;
- int zIndex = (int) frameElem.getZIndex();
- int pageIndex = (int) frameElem.getPageIndex();
- if ((zIndex!=-1)&&(pageIndex!=-1)) {
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
- try {
- Object xPage = UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex(pageIndex));
- if ((xPage!=null)&&(xPage instanceof XDrawPage)) {
- XDrawPage xDrawPage = (XDrawPage) xPage;
- Object obj = xDrawPage.getByIndex(zIndex);
- selectionSupplier.select(obj);
- return;
- }
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- }
- }
- }
- return;
- }
-
- private void jumpToProblemDrawingShape(Node targetNode) throws ODFException {
- try {
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, this._xComp);
- XSelectionSupplier selectionSupplier = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class, xModel.getCurrentController());
-
- if (!(targetNode instanceof Element)) return;
- String odfContentId = ((Element)targetNode).getAttribute(ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID);
- NodeList nl = XPathUtil.evalXPathNodeList(_contentXML.getDocumentElement(),
- "//*[@" + ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID + "='" + odfContentId + "']");
- if ((nl==null)||(nl.getLength()!=1)) return;
- if (!(nl.item(0) instanceof DrawingObjectElement)) return;
-
- DrawingObjectElement shapeElem = (DrawingObjectElement) nl.item(0);
- int zIndex = (int) shapeElem.getZIndex();
- if( zIndex >= 0 ) {
- Object xPageSupplier = UnoRuntime.queryInterface(XDrawPageSupplier.class, this._xComp);
- if (xPageSupplier instanceof XDrawPageSupplier) {
- XDrawPageSupplier xDrawPageSupplier = (XDrawPageSupplier)xPageSupplier;
- XDrawPage xDrawPage = xDrawPageSupplier.getDrawPage();
- if( null != xDrawPage ) {
- try {
- Object obj = xDrawPage.getByIndex(zIndex);
- selectionSupplier.select(obj);
- return;
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- }
- }
- }
- Object xPagesSupplier = UnoRuntime.queryInterface(XDrawPagesSupplier.class, this._xComp);
- if ((xPagesSupplier!=null)&&(xPagesSupplier instanceof XDrawPagesSupplier)) {
- XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) xPagesSupplier;
- int pageIndex = (int) shapeElem.getPageIndex();
- if ((zIndex!=-1)&&(pageIndex!=-1)) {
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
- try {
- Object xPage = UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex(pageIndex));
- if ((xPage!=null)&&(xPage instanceof XDrawPage)) {
- XDrawPage xDrawPage = (XDrawPage) xPage;
- Object obj = xDrawPage.getByIndex(zIndex);
- selectionSupplier.select(obj);
- return;
- }
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- }
- }
- }
- }
- } catch (IllegalArgumentException iae) {
- iae.printStackTrace();
- throw new ODFException(iae.getMessage());
- }
- }
-
- private void jumpToProblemDrawingPage(Node targetNode) throws ODFException {
- try {
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, this._xComp);
- XSelectionSupplier selectionSupplier = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class, xModel.getCurrentController());
-
- if (ContentType.PRESENTATION.equals(this._fileType)) {
- if (!(targetNode instanceof Element)) return;
- String odfContentId = ((Element)targetNode).getAttribute(ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID);
- NodeList nl = XPathUtil.evalXPathNodeList(_contentXML.getDocumentElement(),
- "//*[namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_PAGE
- + "'][@" + ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID + "='" + odfContentId + "']");
- if ((nl==null)||(nl.getLength()!=1)) return;
- if (nl.item(0) instanceof PageElement) {
- PageElement pageElem = (PageElement) nl.item(0);
- int pageIndex = (int) pageElem.getPageIndex();
- XDrawPage xDrawPage = ODFUtils.getDrawPageByIndex(this._xComp, pageIndex);
- selectionSupplier.select(xDrawPage);
- return;
- }
- }
- } catch (IllegalArgumentException iae) {
- iae.printStackTrace();
- throw new ODFException(iae.getMessage());
- }
- }
-
- private void jumpToProblemFormControl(Node targetNode) throws ODFException {
- try {
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, this._xComp);
- XSelectionSupplier selectionSupplier = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class, xModel.getCurrentController());
-
- if (!(targetNode instanceof Element)) return;
- String odfContentId = ((Element)targetNode).getAttribute(ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID);
- NodeList nl = XPathUtil.evalXPathNodeList(_contentXML.getDocumentElement(),
- "//*[namespace-uri()='" + DrawConstants.DRAW_NAMESPACE_URI
- + "' and local-name()='" + DrawConstants.ELEMENT_CONTROL
- + "'][@" + ODFConverter.OUTPUT_ATTR_ODF_CONTENT_ID + "='" + odfContentId + "']");
- if ((nl==null)||(nl.getLength()!=1)) return;
- if (!(nl.item(0) instanceof ControlElement)) return;
-
- ControlElement elem = (ControlElement) nl.item(0);
- int zIndex = (int)elem.getZIndex();
- if( zIndex >= 0 ) {
- Object xPageSupplier = UnoRuntime.queryInterface(XDrawPageSupplier.class, this._xComp);
- if (xPageSupplier instanceof XDrawPageSupplier) {
- XDrawPageSupplier xDrawPageSupplier = (XDrawPageSupplier)xPageSupplier;
- XDrawPage xDrawPage = xDrawPageSupplier.getDrawPage();
- if( null != xDrawPage ) {
- try {
- Object obj = xDrawPage.getByIndex(zIndex);
- selectionSupplier.select(obj);
- return;
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- }
- }
- }
- Object xPagesSupplier = UnoRuntime.queryInterface(XDrawPagesSupplier.class, this._xComp);
- if ((xPagesSupplier!=null)&&(xPagesSupplier instanceof XDrawPagesSupplier)) {
- XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) xPagesSupplier;
- int pageIndex = (int) elem.getPageIndex();
- if ((zIndex!=-1)&&(pageIndex!=-1)) {
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
- try {
- Object xPage = UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex(pageIndex));
- if ((xPage!=null)&&(xPage instanceof XDrawPage)) {
- XDrawPage xDrawPage = (XDrawPage) xPage;
- Object obj = xDrawPage.getByIndex(zIndex);
- selectionSupplier.select(obj);
- return;
- }
- } catch (IndexOutOfBoundsException e) {
- e.printStackTrace();
- } catch (WrappedTargetException e) {
- e.printStackTrace();
- }
- }
- }
- }
- } catch (IllegalArgumentException iae) {
- iae.printStackTrace();
- throw new ODFException(iae.getMessage());
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/OOoUIControls.java b/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/OOoUIControls.java
deleted file mode 100644
index a0c2e83..0000000
--- a/plugins/org.eclipse.actf.model.ui.editors.ooo/src/org/eclipse/actf/model/ui/editors/ooo/internal/util/OOoUIControls.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Norimasa HAYASHIDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editors.ooo.internal.util;
-
-import com.sun.star.beans.Property;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.PropertyVetoException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertySetInfo;
-import com.sun.star.frame.XController;
-import com.sun.star.frame.XDispatch;
-import com.sun.star.frame.XDispatchHelper;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.XLayoutManager;
-import com.sun.star.lang.IllegalArgumentException;
-import com.sun.star.lang.WrappedTargetException;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.ui.XUIElement;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.util.XURLTransformer;
-
-
-
-public class OOoUIControls {
-
- public static void hideUIElements(XFrame xFrame, XMultiServiceFactory xMSF) throws ODFException {
- try {
- XDispatchProvider xDispatchProvider = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, xFrame);
- Object oDispatchHelper = xMSF.createInstance("com.sun.star.frame.DispatchHelper");
- XDispatchHelper dispatchHelper = (XDispatchHelper)AnyConverter.toObject(XDispatchHelper.class, oDispatchHelper);
-
- executeXDispatch("NormalMultiPaneGUI", Boolean.TRUE, xDispatchProvider, dispatchHelper);
- executeXDispatch("InputLineVisible", Boolean.FALSE, xDispatchProvider, dispatchHelper);
- executeXDispatch("LeftPaneDraw", Boolean.FALSE, xDispatchProvider, dispatchHelper);
- executeXDispatch("LeftPaneImpress", Boolean.FALSE, xDispatchProvider, dispatchHelper);
- executeXDispatch("RightPane", Boolean.FALSE, xDispatchProvider, dispatchHelper);
- executeXDispatch("Ruler", Boolean.FALSE, xDispatchProvider, dispatchHelper);
- executeXDispatch("ShowRuler", Boolean.FALSE, xDispatchProvider, dispatchHelper);
- executeXDispatch("ZoomPage", Boolean.TRUE, xDispatchProvider, dispatchHelper);
-
- hideXUIElements(xFrame);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static boolean setDrawingMode(XMultiServiceFactory xMSF, XController controller) throws ODFException {
- return executeXDispatchAction(xMSF, controller, "slot:27009");
- }
-
- private static void hideXUIElements(XFrame xFrame) throws ODFException {
-
- try {
- XLayoutManager xLayoutManager = ODFUtils.getXLayoutManager(xFrame);
- XUIElement[] xUIElems = xLayoutManager.getElements();
-
- XPropertySet xUIElemPropSet;
- XPropertySetInfo xUIElemPropSetInfo;
- Property[] xUIElemProps;
- for (int i = 0; i < xUIElems.length; i++) {
- xUIElemPropSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xUIElems[i]);
- xUIElemPropSetInfo = xUIElemPropSet.getPropertySetInfo();
- if(xUIElemPropSetInfo.hasPropertyByName("Persistent")) {
- xUIElemPropSet.setPropertyValue("Persistent", Boolean.FALSE);
- }
- xUIElemProps = xUIElemPropSetInfo.getProperties();
- for (int j = 0; j < xUIElemProps.length; j++) {
- if (xUIElemProps[j].Name.equals("ResourceURL")) {
- xLayoutManager.hideElement(xUIElemPropSet.getPropertyValue(xUIElemProps[j].Name).toString());
- }
- }
- }
- } catch (UnknownPropertyException upe) {
- throw new ODFException(upe.getMessage());
- } catch (WrappedTargetException wte) {
- throw new ODFException(wte.getMessage());
- } catch (PropertyVetoException pve) {
- throw new ODFException(pve.getMessage());
- } catch (IllegalArgumentException iae) {
- throw new ODFException(iae.getMessage());
- }
- }
-
- private static void executeXDispatch(String name, Object value, XDispatchProvider xDispatchProvider,
- XDispatchHelper dispatchHelper) throws ODFException {
- PropertyValue[] pValue = new PropertyValue[1];
- pValue[0] = new PropertyValue();
- pValue[0].Name = name;
- pValue[0].Value = value;
-
- dispatchHelper.executeDispatch(xDispatchProvider, ".uno:" + name, "", 0, pValue);
- }
-
-
- private static boolean executeXDispatchAction(XMultiServiceFactory xMSF, XController controller, String action) {
- try {
- XDispatchProvider dispatchProvider = (XDispatchProvider)UnoRuntime.queryInterface(XDispatchProvider.class, controller);
- if (null != dispatchProvider) {
- com.sun.star.util.URL actionURL[] = new com.sun.star.util.URL[1];
- actionURL[0] = new com.sun.star.util.URL();
- actionURL[0].Complete = action;
- XURLTransformer urlTransformer = (XURLTransformer) UnoRuntime.queryInterface(XURLTransformer.class,
- xMSF.createInstance("com.sun.star.util.URLTransformer"));
- urlTransformer.parseStrict(actionURL);
- XDispatch dispatch = dispatchProvider.queryDispatch(actionURL[0], "", 0);
- if (null != dispatch) {
- dispatch.dispatch(actionURL[0], new PropertyValue[0]);
- return true;
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/.classpath b/plugins/org.eclipse.actf.model.ui/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.model.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.model.ui/.cvsignore b/plugins/org.eclipse.actf.model.ui/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.actf.model.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.actf.model.ui/.project b/plugins/org.eclipse.actf.model.ui/.project
deleted file mode 100644
index e06a96d..0000000
--- a/plugins/org.eclipse.actf.model.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.model.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.model.ui/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.actf.model.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index d935816..0000000
--- a/plugins/org.eclipse.actf.model.ui/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon May 12 17:00:37 JST 2008
-eclipse.preferences.version=1
-encoding//src/messages.properties=8859_1
diff --git a/plugins/org.eclipse.actf.model.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.model.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 68cac6f..0000000
--- a/plugins/org.eclipse.actf.model.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: ACTF Model UI Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.model.ui;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.actf.model.ui.ModelUIPlugin
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.actf.core,
- org.eclipse.actf.ui
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.actf.model.ui,
- org.eclipse.actf.model.ui.editor,
- org.eclipse.actf.model.ui.editor.actions,
- org.eclipse.actf.model.ui.editor.browser,
- org.eclipse.actf.model.ui.util
diff --git a/plugins/org.eclipse.actf.model.ui/about.html b/plugins/org.eclipse.actf.model.ui/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.model.ui/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui/build.properties b/plugins/org.eclipse.actf.model.ui/build.properties
deleted file mode 100644
index e351777..0000000
--- a/plugins/org.eclipse.actf.model.ui/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- icons/,\
- plugin.xml,\
- config/
diff --git a/plugins/org.eclipse.actf.model.ui/config/favorites.pref b/plugins/org.eclipse.actf.model.ui/config/favorites.pref
deleted file mode 100644
index b671848..0000000
--- a/plugins/org.eclipse.actf.model.ui/config/favorites.pref
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu May 10 18:06:02 JST 2007
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-IBM=http\://www.ibm.com/
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui/icons/browser/go.png b/plugins/org.eclipse.actf.model.ui/icons/browser/go.png
deleted file mode 100644
index aca5ebd..0000000
--- a/plugins/org.eclipse.actf.model.ui/icons/browser/go.png
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.ui/icons/toolbar/reload.png b/plugins/org.eclipse.actf.model.ui/icons/toolbar/reload.png
deleted file mode 100644
index 39f5fb8..0000000
--- a/plugins/org.eclipse.actf.model.ui/icons/toolbar/reload.png
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.ui/icons/toolbar/scriptDebug.png b/plugins/org.eclipse.actf.model.ui/icons/toolbar/scriptDebug.png
deleted file mode 100644
index 6ff9bbd..0000000
--- a/plugins/org.eclipse.actf.model.ui/icons/toolbar/scriptDebug.png
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.ui/icons/toolbar/stop.png b/plugins/org.eclipse.actf.model.ui/icons/toolbar/stop.png
deleted file mode 100644
index 8028c44..0000000
--- a/plugins/org.eclipse.actf.model.ui/icons/toolbar/stop.png
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.model.ui/plugin.xml b/plugins/org.eclipse.actf.model.ui/plugin.xml
deleted file mode 100644
index 685d9c0..0000000
--- a/plugins/org.eclipse.actf.model.ui/plugin.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="browserFavorites" name="Web Browser Favorites" schema="schema/browserFavorites.exsd"/>
-</plugin>
diff --git a/plugins/org.eclipse.actf.model.ui/schema/browserFavorites.exsd b/plugins/org.eclipse.actf.model.ui/schema/browserFavorites.exsd
deleted file mode 100644
index 75b5b9f..0000000
--- a/plugins/org.eclipse.actf.model.ui/schema/browserFavorites.exsd
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.actf.common">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.actf.common" id="browserFavorites" name="Web Browser Favorites"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="favorites"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="favorites">
- <complexType>
- <attribute name="prefFile" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2008 IBM Corporation and others.<br>
-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 <a
-href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.actf.model.ui/src/messages.properties b/plugins/org.eclipse.actf.model.ui/src/messages.properties
deleted file mode 100644
index 854701a..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/messages.properties
+++ /dev/null
@@ -1,46 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-MenuConst.&Font_2 = Font Size(&X)
-MenuConst.Largest_3 = Largest\t(&G)
-MenuConst.Large_4 = Large\t(&L)
-MenuConst.Medium_5 = Medium\t(&M)
-MenuConst.Small_6 = Small\t(&S)
-MenuConst.Smallest_7 = Smallest\t(&A)
-MenuConst.F&avorites_8 = F&avorites
-MenuConst.AddFavorites = &Add to Favorites
-MenuConst.ArrangeFavorites = &Organize Favorites
-
-WebBrowser.Address = A&ddress
-WebBrowser.Backward_4 = &Back
-WebBrowser.Forward_5 = &Forward
-WebBrowser.Stop = &Stop
-WebBrowser.Refresh = &Refresh
-WebBrowser.Script = &Omit Script Debug Messages
-WebBrowser.Go = Go
-
-WebBrowser.Backward_4_tp = Back
-WebBrowser.Forward_5_tp = Forward
-WebBrowser.Stop_tp = Stop
-WebBrowser.Refresh_tp = Refresh
-WebBrowser.Script_tp = Omit script debug messages
-WebBrowser.Go_tp = Go
-
-DialogArrangeFavorite.Title = Arrange Favorites
-DialogArrangeFavorite.Modify_Name = &Rename
-DialogArrangeFavorite.Delete = &Delete
-
-DialogAddFavorite.Title = Edit Name
-DialogAddFavorite.Name_Label = Name:
-DialogAddFavorite.Text_Empty_Alert = The name can not be empty.
-DialogAddFavorite.Text_Exist_Alert = The name has existed in the favorites.
-DialogConst.Name_Label = Name
-
-ImageCreator.ImageTooLarge = Image size is too large. The simulation image is shortened.\n\n -Please adjust the display size of target content.\n or\n -Please turn off "whole page" check box.
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui/src/messages_ja.properties b/plugins/org.eclipse.actf.model.ui/src/messages_ja.properties
deleted file mode 100644
index b287a27..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/messages_ja.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-MenuConst.&Font_2 = \u6587\u5b57\u306e\u30b5\u30a4\u30ba\t(&X)
-MenuConst.Largest_3 = \u6700\u5927\t(&G)
-MenuConst.Large_4 = \u5927\t(&L)
-MenuConst.Medium_5 = \u4e2d\t(&M)
-MenuConst.Small_6 = \u5c0f\t(&S)
-MenuConst.Smallest_7 = \u6700\u5c0f\t(&A)
-MenuConst.F&avorites_8 = \u304a\u6c17\u306b\u5165\u308a(&A)
-MenuConst.AddFavorites = \u304a\u6c17\u306b\u5165\u308a\u306b\u8ffd\u52a0(&A)
-MenuConst.ArrangeFavorites = \u304a\u6c17\u306b\u5165\u308a\u306e\u6574\u7406(&O)
-
-WebBrowser.Address = \u30a2\u30c9\u30ec\u30b9(&D)
-WebBrowser.Backward_4 = \u623b\u308b\t(&B)
-WebBrowser.Forward_5 = \u9032\u3080\t(&F)
-WebBrowser.Stop = \u505c\u6b62\t(&S)
-WebBrowser.Refresh = \u6700\u65b0\u306e\u60c5\u5831\u306b\u66f4\u65b0\t(&R)
-WebBrowser.Script =\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30e9\u30fc\u8868\u793a\u3092\u505c\u6b62\t(&O)
-WebBrowser.Go = \u79fb\u52d5
-
-
-WebBrowser.Backward_4_tp = \u623b\u308b
-WebBrowser.Forward_5_tp = \u9032\u3080
-WebBrowser.Stop_tp = \u505c\u6b62
-WebBrowser.Refresh_tp = \u6700\u65b0\u306e\u60c5\u5831\u306b\u66f4\u65b0
-WebBrowser.Script_tp =\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30e9\u30fc\u8868\u793a\u3092\u505c\u6b62
-WebBrowser.Go_tp = \u79fb\u52d5
-
-DialogArrangeFavorite.Title = \u304a\u6c17\u306b\u5165\u308a\u306e\u6574\u7406
-DialogArrangeFavorite.Modify_Name = \u540d\u524d\u306e\u5909\u66f4\t(&R)
-DialogArrangeFavorite.Delete = \u524a\u9664\t(&D)
-
-DialogAddFavorite.Title = \u540d\u524d\u306e\u7de8\u96c6
-DialogAddFavorite.Name_Label = \u540d\u524d\uff1a
-DialogAddFavorite.Text_Empty_Alert = \u4f55\u304b\u540d\u524d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044
-DialogAddFavorite.Text_Exist_Alert = \u305d\u306e\u540d\u524d\u306f\u65e2\u306b\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059
-DialogConst.Name_Label = \u540d\u524d
-
-ImageCreator.ImageTooLarge = \u753b\u50cf\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3059\u304e\u308b\u305f\u3081\uff0c\u753b\u50cf\u306e\u4e00\u90e8\u304c\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u5bfe\u8c61\u304b\u3089\u30ab\u30c3\u30c8\u3055\u308c\u307e\u3057\u305f\uff0e\n\n -\u5bfe\u8c61\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u8868\u793a\u30b5\u30a4\u30ba\u3092\u8abf\u7bc0\u3059\u308b\u304b\n -\u300c\u5168\u753b\u9762\u300d\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u30aa\u30d5\u306b\u3057\u3066\u4e0b\u3055\u3044\uff0e
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/IModelService.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/IModelService.java
deleted file mode 100644
index 7fe234b..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/IModelService.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui;
-
-import java.io.File;
-
-import org.eclipse.swt.widgets.Composite;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-
-
-public interface IModelService {
-
- // TODO
- public static final String[] MIMETYPES_HTML = { "text/html", "application/xhtml+xml" };
-
- public static final String[] MIMETYPES_ODF = { "application/vnd.oasis.opendocument.presentation",
- "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.spreadsheet" };
-
- public static final String[] EXTS_HTML = { "html", "htm", "xhtml", "mht" };
-
- public static final String[] EXTS_ODF = { "odt", "ods", "odp" };
-
- public static final String ATTR_WINDOWHANDLE = "WindowHandle";
-
- String[] getSupportMIMETypes();
-
- //TODO use editor extension info
- String[] getSupportExtensions();
-
- String getCurrentMIMEType();
-
- void open(String url);
-
- void open(File target);
-
- String getURL();
-
- String getTitle();
-
- String getID();
-
- //TODO support other model
- Document getDocument();
-
- Document getLiveDocument();
-
- Composite getTargetComposite();
-
- File saveOriginalDocument(String file);
-
- File saveDocumentAsHTMLFile(String file);
-
- void jumpToNode(Node target);
-
- IModelServiceScrollManager getScrollManager();
-
- ImagePositionInfo[] getAllImagePosition();
-
- IModelServiceHolder getModelServiceHolder();
-
- //for extension
- Object getAttribute(String name);
- // clearhighlight
- // size
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/IModelServiceHolder.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/IModelServiceHolder.java
deleted file mode 100644
index a18f595..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/IModelServiceHolder.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui;
-
-import org.eclipse.ui.IEditorPart;
-
-
-
-public interface IModelServiceHolder {
- IModelService getModelService();
- IEditorPart getEditorPart();
- void setEditorTitle(String title);
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/IModelServiceScrollManager.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/IModelServiceScrollManager.java
deleted file mode 100644
index 079b84b..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/IModelServiceScrollManager.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui;
-
-
-
-
-public interface IModelServiceScrollManager {
- static int NONE = -1;
- static int ABSOLUTE_COORDINATE = 0;
- static int INCREMENTAL = 1;
- static int PAGE = 2;
-
- int getScrollType();
-
- void absoluteCoordinateScroll(int y, boolean waitRendering);
- void absoluteCoordinateScroll(int x, int y, boolean waitRendering);
-
- int incrementScrollX(boolean waitRendering);
- int decrementScrollX(boolean waitRendering);
- int incrementScrollY(boolean waitRendering);
- int decrementScrollY(boolean waitRendering);
- int incrementLargeScrollX(boolean waitRendering);
- int decrementLargeScrollX(boolean waitRendering);
- int incrementLargeScrollY(boolean waitRendering);
- int decrementLargeScrollY(boolean waitRendering);
-
- int incrementPageScroll(boolean waitRendering);
- int decrementPageScroll(boolean waitRendering);
-
- int jumpToPage(int pageNumber, boolean waitRendering);
- int getCurrentPageNumber();
- int getLastPageNumber();
-
- ModelServiceSizeInfo getSize(boolean isWhole);
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ImagePositionInfo.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ImagePositionInfo.java
deleted file mode 100644
index ad0ea11..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ImagePositionInfo.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui;
-
-
-public class ImagePositionInfo {
- int x=0;
- int y=0;
- int width=0;
- int height=0;
- String url="";
-
- public ImagePositionInfo(int x, int y, int width, int height, String url) {
- this.x = x;
- this.y = y;
- this.width = width;
- this.height = height;
- this.url = url;
- }
-
- public int getHeight() {
- return height;
- }
-
- public void setHeight(int height) {
- this.height = height;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public int getWidth() {
- return width;
- }
-
- public void setWidth(int width) {
- this.width = width;
- }
-
- public int getX() {
- return x;
- }
-
- public void setX(int x) {
- this.x = x;
- }
-
- public int getY() {
- return y;
- }
-
- public void setY(int y) {
- this.y = y;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ModelServiceImageCreator.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ModelServiceImageCreator.java
deleted file mode 100644
index a13ad6b..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ModelServiceImageCreator.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui;
-
-import java.io.File;
-
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.ImageLoader;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.ui.PlatformUI;
-
-
-
-
-public class ModelServiceImageCreator {
-
- // 256M -> 7000000 400M->10000000
- public static final int DUMP_IMG_SIZE_LIMIT = 10000000;
-
- private IModelService modelService;
-
- public ModelServiceImageCreator(IModelService modelService) {
- this.modelService = modelService;
- }
-
- public File getScreenImageAsBMP(String saveFileName, boolean isWhole) {
-
- IModelServiceScrollManager scrollManager = modelService.getScrollManager();
- int[] size = scrollManager.getSize(isWhole).toArray();
-
- boolean hugeImage = false;
-
- if (size[0] < 1 || size[1] < 1) {
- size = new int[] { 1, 1, 1, 1 };
- }
-
- if (size[2] * size[3] > DUMP_IMG_SIZE_LIMIT) {
- size[3] = DUMP_IMG_SIZE_LIMIT / size[2];
- if (isWhole) {
- hugeImage = true;
- }
- }
-
- ImageData[] wholeImgData;
-
- if (isWhole) {
- switch (scrollManager.getScrollType()) {
- case IModelServiceScrollManager.ABSOLUTE_COORDINATE:
- wholeImgData = getImageByAbsoluteCoordinateScroll(size, scrollManager, true);
- break;
- case IModelServiceScrollManager.PAGE:
- wholeImgData = getImageByPageScroll(size, scrollManager);
- break;
- case IModelServiceScrollManager.INCREMENTAL:
- wholeImgData = getImageByIncrementalScroll(size, scrollManager);
- break;
- case IModelServiceScrollManager.NONE:
- default:
- hugeImage = false;
- wholeImgData = getImageByAbsoluteCoordinateScroll(size, scrollManager, false);
- }
- } else {
- wholeImgData = getImageByAbsoluteCoordinateScroll(size, scrollManager, false);
- }
-
- ImageLoader loader = new ImageLoader();
- loader.data = wholeImgData;
- loader.save(saveFileName, SWT.IMAGE_BMP);
-
- if (hugeImage) {
- MessageBox warn = new MessageBox(PlatformUI.getWorkbench().getDisplay().getActiveShell(), SWT.OK
- | SWT.ICON_INFORMATION);
- warn.setMessage(ModelServiceMessages.getString("ImageCreator.ImageTooLarge"));
- warn.open();
- }
-
- return new File(saveFileName);
- }
-
- private ImageData[] getImageByAbsoluteCoordinateScroll(int[] size, IModelServiceScrollManager scrollManager,
- boolean isWhole) {
- Image img = new Image(Display.getDefault(), size[0] + 2, size[1] + 2);
- ImageData[] wholeImgData = new ImageData[1];
- GC gc = new GC(modelService.getTargetComposite());
- int xCnt, yCnt;
-
- if (isWhole) {
- xCnt = (size[2] + size[0] - 1) / size[0];
- yCnt = (size[3] + size[1] - 1) / size[1];
- } else {
- xCnt = 1;
- yCnt = 1;
- size[2] = size[0];
- size[3] = size[1];
- }
- ImageData[][] imgData = new ImageData[xCnt][yCnt];
-
- // System.out.println("start a:"+xCnt+" "+yCnt);
-
- for (int i = 0; i < xCnt; i++) {
- for (int j = 0; j < yCnt; j++) {
- if (isWhole) {
- scrollManager.absoluteCoordinateScroll(i * size[0], j * size[1], true);
- }
-
- gc.copyArea(img, 0, 0);
- imgData[i][j] = img.getImageData();
- }
- }
- if (isWhole) {
- scrollManager.absoluteCoordinateScroll(0, 0, false);
- }
-
- int depth = imgData[0][0].depth;
- //System.out.println(size[0] + " " + size[1] + " " + size[2] + " " + size[3] + " " + depth);
-
- wholeImgData[0] = new ImageData(size[2], size[3], depth, imgData[0][0].palette);
- // new PaletteData(0xff,0xff,0xff));
-
- int wholeRowBytes = ((size[2] * depth + 31) / 32) * 4;
- int partRowBytes = (((size[0] + 2) * depth + 31) / 32) * 4;
- depth = depth / 8;
- int xBegin, yBegin;
-
- int wholeSize = wholeImgData[0].data.length;
-
- for (int j = 0; j < yCnt; j++) {
- for (int i = 0; i < xCnt; i++) {
- if (j < yCnt - 1) {
- yBegin = 0;
- } else {
- yBegin = size[1] * yCnt - size[3];
- }
-
- if (i < xCnt - 1) {
- xBegin = 0;
- } else {
- xBegin = size[0] * xCnt - size[2];
- }
- xBegin += 2;
-
- for (int k = yBegin; k < size[1]; k++) {
- // System.out.println("i:" + i + " j:" + j + " k:" + k);
- int wholeBegin = (j * size[1] + (k - yBegin)) * wholeRowBytes + i * size[0] * depth;
- int copySize = partRowBytes - xBegin * depth;
- if (wholeSize < wholeBegin + copySize) {
- copySize = wholeSize - wholeBegin;
- }
- System.arraycopy(imgData[i][j].data, (k + 2) * partRowBytes + xBegin * depth, wholeImgData[0].data,
- wholeBegin, copySize);
- }
- }
- }
-
- gc.dispose();
- //System.out.println("ImageCreator(abs): fin");
-
- return wholeImgData;
-
- }
-
- private ImageData[] getImageByIncrementalScroll(int[] size, IModelServiceScrollManager scrollManager) {
- final Image img = new Image(Display.getDefault(), size[0] + 2, size[1] + 2);
- ImageData[] wholeImgData = new ImageData[1];
- final GC gc = new GC(modelService.getTargetComposite());
- int xCnt = 1, yCnt = 1;
-
- // TODO use getScrollcount() method
- while (scrollManager.incrementLargeScrollX(false) > 0)
- ;
- while (scrollManager.incrementLargeScrollY(false) > 0)
- ;
-
- while (scrollManager.decrementLargeScrollX(false) > 0) {
- xCnt++;
- }
- while (scrollManager.decrementLargeScrollY(false) > 0) {
- yCnt++;
- }
-
- // for rendering wait
- scrollManager.decrementLargeScrollY(true);
-
- ImageData[][] imgData = new ImageData[xCnt][yCnt];
- int[] scrollX = new int[xCnt];
- int[] scrollY = new int[yCnt];
-
- //System.out.println("start:" + xCnt + " " + yCnt);
-
- // System.out.println("X: "+scrollManager.incrementScrollX());
- // System.out.println("Y: "+scrollManager.incrementScrollY());
-
- for (int i = 0; i < xCnt; i++) {
- for (int j = 0; j < yCnt; j++) {
-
- gc.copyArea(img, 0, 0);
- imgData[i][j] = img.getImageData();
-
- // gc.copyArea(img, 0, 0);
- // imgData[i][j] = img.getImageData();
- scrollY[j] = scrollManager.incrementLargeScrollY(true);
- }
- scrollX[i] = scrollManager.incrementLargeScrollX(true);
- while (scrollManager.decrementLargeScrollY(false) > 0)
- ;
- }
-
- int depth = imgData[0][0].depth;
- //System.out.println(size[0] + " " + size[1] + " " + size[2] + " " + size[3] + " " + depth);
-
- wholeImgData[0] = new ImageData(size[2], size[3], depth, imgData[0][0].palette);
-
- int wholeRowBytes = ((size[2] * depth + 31) / 32) * 4;
- int partRowBytes = (((size[0] + 2) * depth + 31) / 32) * 4;
- depth = depth / 8;
- int xBegin, yBegin;
- int curX = 0, curY = 0;
- int finX = 0, finY = 0;
-
- int wholeSize = wholeImgData[0].data.length;
-
- //System.out.println("copy start");
- for (int j = 0; j < yCnt; j++) {
- if (j == 0) {
- yBegin = 0;
- } else {
- yBegin = finY - curY;
- }
- // System.out.println("Y: " + yBegin + " " + curY + " " + finY);
- for (int i = 0; i < xCnt; i++) {
-
- if (i == 0) {
- xBegin = 0;
- } else {
- xBegin = finX - curX;
- }
- xBegin += 2;
- // System.out.println("X: " + xBegin + " " + curX + " " + finX);
-
- // for (int k = yBegin; k < size[1]; k++) {
- for (int k = 0; k < size[1]; k++) {
- // System.out.println("i:" + i + " j:" + j + " k:" + k);
-
- int wholeBegin = (finY + (k - yBegin)) * wholeRowBytes + finX * depth;
- int copySize = partRowBytes - xBegin * depth;
- // System.out.println(wholeBegin + " " + copySize + " " + wholeSize);
- if (wholeSize < wholeBegin + copySize) {
- copySize = wholeSize - wholeBegin;
- }
- if (copySize > 0) {
- System.arraycopy(imgData[i][j].data, (k + 2) * partRowBytes + xBegin * depth,
- wholeImgData[0].data, wholeBegin, copySize);
- }
- }
- curX += scrollX[i];
- finX += size[0] - xBegin;
- }
- curY += scrollY[j];
- finY += size[1] - yBegin;
- }
-
- gc.dispose();
- //System.out.println("ImageCreator(inc): fin");
- return wholeImgData;
-
- }
-
- private ImageData[] getImageByPageScroll(int[] size, IModelServiceScrollManager scrollManager) {
- final Image img = new Image(Display.getDefault(), size[0] + 2, size[1] + 2);
- ImageData[] wholeImgData = new ImageData[1];
- final GC gc = new GC(modelService.getTargetComposite());
- int yCnt = 1;
-
- yCnt = scrollManager.getLastPageNumber();
- if (yCnt < 1) {
- //System.out.println("page count:" + yCnt);
- yCnt = 1;
- }
-
- scrollManager.jumpToPage(1, true);
-
- ImageData[] imgData = new ImageData[yCnt];
-
- //System.out.println("start:" + " " + yCnt);
-
- for (int j = 0; j < yCnt; j++) {
- gc.copyArea(img, 0, 0);
- imgData[j] = img.getImageData();
- scrollManager.incrementPageScroll(true);
- }
- scrollManager.jumpToPage(1, false);
-
- int depth = imgData[0].depth;
- //System.out.println(size[0] + " " + size[1] + " " + size[2] + " " + size[3] + " " + depth);
-
- wholeImgData[0] = new ImageData(size[2], size[3], depth, imgData[0].palette);
-
- int wholeRowBytes = ((size[2] * depth + 31) / 32) * 4;
- int partRowBytes = (((size[0] + 2) * depth + 31) / 32) * 4;
- depth = depth / 8;
-
- int wholeSize = wholeImgData[0].data.length;
-
- for (int j = 0; j < yCnt; j++) {
- for (int k = 0; k < size[1]; k++) {
- // System.out.println("i:" + i + " j:" + j + " k:" + k);
- int wholeBegin = (size[1] * j + k) * wholeRowBytes;
- int copySize = partRowBytes;
- if (wholeSize < wholeBegin + copySize) {
- copySize = wholeSize - wholeBegin;
- }
- if (copySize > 0) {
- System.arraycopy(imgData[j].data, (k + 2) * partRowBytes, wholeImgData[0].data, wholeBegin,
- copySize);
- }
-
- }
- }
-
- gc.dispose();
- //System.out.println("ImageCreator(page): fin");
- return wholeImgData;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ModelServiceSizeInfo.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ModelServiceSizeInfo.java
deleted file mode 100644
index b370adc..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ModelServiceSizeInfo.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui;
-
-public class ModelServiceSizeInfo {
-
- int viewSizeX;
-
- int viewSizeY;
-
- int wholeSizeX;
-
- int wholeSizeY;
-
- public ModelServiceSizeInfo(int viewSizeX, int viewSizeY, int wholeSizeX,
- int wholeSizeY) {
- this.viewSizeX = viewSizeX;
- this.viewSizeY = viewSizeY;
- this.wholeSizeX = wholeSizeX;
- this.wholeSizeY = wholeSizeY;
- }
-
- public int getViewSizeX() {
- return viewSizeX;
- }
-
- public int getViewSizeY() {
- return viewSizeY;
- }
-
- public int getWholeSizeX() {
- return wholeSizeX;
- }
-
- public int getWholeSizeY() {
- return wholeSizeY;
- }
-
- public int[] toArray() {
- return new int[] { viewSizeX, viewSizeY, wholeSizeX, wholeSizeY };
- }
-
- @Override
- public String toString() {
- return "View: (" + viewSizeX + ", " + viewSizeY + ") Whole: ("
- + wholeSizeX + ", " + wholeSizeY + ")";
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ModelUIPlugin.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ModelUIPlugin.java
deleted file mode 100644
index 811779e..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/ModelUIPlugin.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui;
-
-import org.eclipse.actf.model.ui.editor.preferences.IPreferenceConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class ModelUIPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.actf.model.ui";
-
- // The shared instance
- private static ModelUIPlugin plugin;
-
- /**
- * The constructor
- */
- public ModelUIPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin.getPreferenceStore().setValue(
- IPreferenceConstants.NOT_FIRST_TIME, true);
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static ModelUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in
- * relative path.
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(
- PLUGIN_ID, path);
- }
-
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/DummyEditorInput.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/DummyEditorInput.java
deleted file mode 100644
index c0e5e79..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/DummyEditorInput.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-
-
-public class DummyEditorInput implements IEditorInput {
-
- private String name = "";
-
- private String url = "";
-
- public DummyEditorInput(String url, String name) {
- setUrl(url);
- if (name != null) {
- this.name = name;
- }
-
- }
-
- public boolean exists() {
- System.out.println("exists");
- return false;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- return name;
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return "";
- }
-
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public String getUrl() {
- return url;
- }
-
- protected void setUrl(String url) {
- if (url != null) {
- this.url = url;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/AddFavoritesAction.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/AddFavoritesAction.java
deleted file mode 100644
index 66e5e76..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/AddFavoritesAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editor.actions;
-
-import java.util.Map;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.editor.dialogs.FavoritesAddDialog;
-import org.eclipse.actf.model.ui.internal.FavoritesChangeEvent;
-import org.eclipse.actf.model.ui.internal.FavoritesUtil;
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.actf.model.ui.util.ModelServiceUtils;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-
-
-public class AddFavoritesAction extends FavoritesAction {
-
- public static final String ID = AddFavoritesAction.class.getName();
-
- private IWorkbenchWindow _window;
-
- public AddFavoritesAction(IWorkbenchWindow window, Map favoritesMap) {
- this._window = window;
-
- setId(ID);
- setText(ModelServiceMessages.getString("MenuConst.AddFavorites")); //$NON-NLS-1$
- }
-
- public void run() {
- if (null != this._window) {
-
- IModelService modelService = ModelServiceUtils.getActiveModelService();
- if(modelService==null){
- return;
- }
-
- String title = modelService.getURL();
- if(modelService instanceof IWebBrowserACTF){
- title = ((IWebBrowserACTF)modelService).getLocationName();
- }
- Map<String, String> tmpMap = FavoritesUtil.getFavoritesMap();
- FavoritesAddDialog addDialog = new FavoritesAddDialog(this._window.getShell(), tmpMap, title);
-
- int ret = addDialog.open();
- if (ret==IDialogConstants.OK_ID) {
- String url = modelService.getURL();
- tmpMap.put(addDialog.getName(), url);
- FavoritesUtil.saveFavoritesMap(tmpMap);
- FavoritesChangeEvent fce = new FavoritesChangeEvent(this, tmpMap);
- fireFavoritesChanged(fce);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/ArrangeFavoritesAction.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/ArrangeFavoritesAction.java
deleted file mode 100644
index a29a4c2..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/ArrangeFavoritesAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editor.actions;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.eclipse.actf.model.ui.editor.dialogs.FavoritesArrangeDialog;
-import org.eclipse.actf.model.ui.internal.FavoritesChangeEvent;
-import org.eclipse.actf.model.ui.internal.FavoritesUtil;
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class ArrangeFavoritesAction extends FavoritesAction {
-
- public static final String ID = ArrangeFavoritesAction.class.getName();
-
- private IWorkbenchWindow _window;
-
- public ArrangeFavoritesAction(IWorkbenchWindow window, Map favoritesMap) {
- this._window = window;
-
- setId(ID);
- setText(ModelServiceMessages.getString("MenuConst.ArrangeFavorites"));
- }
-
- public void run() {
- Map<String, String> tmpMap = new TreeMap<String, String>();
- tmpMap.putAll(FavoritesUtil.getFavoritesMap());
- FavoritesArrangeDialog arrangeDialog = new FavoritesArrangeDialog(
- this._window.getShell(), tmpMap);
-
- int returnCode = arrangeDialog.open();
- if (returnCode == IDialogConstants.OK_ID && arrangeDialog.isModified()) {
- tmpMap = arrangeDialog.getFavoritesMap();
- FavoritesUtil.saveFavoritesMap(tmpMap);
- FavoritesChangeEvent fce = new FavoritesChangeEvent(this, tmpMap);
- fireFavoritesChanged(fce);
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/DisableDebugMessageAction.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/DisableDebugMessageAction.java
deleted file mode 100644
index a3b7416..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/DisableDebugMessageAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.actions;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.ModelUIPlugin;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.actf.model.ui.util.ModelServiceUtils;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-
-
-
-public class DisableDebugMessageAction extends Action implements IPropertyChangeListener {
- private String message = ModelServiceMessages.getString("WebBrowser.Script");
- private String message_tp = ModelServiceMessages.getString("WebBrowser.Script_tp");
-
-
- public DisableDebugMessageAction() {
- this(true);
- }
-
- public DisableDebugMessageAction(boolean flag) {
- super("script", AS_CHECK_BOX);
- setText(message);
- setToolTipText(message_tp);
- //TODO refer current setting
- setChecked(true);
- if(flag)
- setImageDescriptor(ModelUIPlugin.getImageDescriptor("icons/toolbar/scriptDebug.png"));
- }
-
- public void run() {
-
- IModelService modelService = ModelServiceUtils.getActiveModelService();
- if (modelService != null && modelService instanceof IWebBrowserACTF) {
- ((IWebBrowserACTF) modelService).setDisableScriptDebugger(this.isChecked());
- }
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- this.setChecked(((Action)event.getSource()).isChecked());
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/FavoritesAction.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/FavoritesAction.java
deleted file mode 100644
index 0f1a702..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/FavoritesAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editor.actions;
-
-import java.util.Vector;
-
-import org.eclipse.actf.model.ui.internal.FavoritesChangeEvent;
-import org.eclipse.actf.model.ui.internal.FavoritesChangeListener;
-import org.eclipse.jface.action.Action;
-
-
-
-abstract public class FavoritesAction extends Action {
-
- private Vector<FavoritesChangeListener> _favoritesChangeListeners = new Vector<FavoritesChangeListener>();
-
- public void addFavoritesChangeListener(FavoritesChangeListener fcl) {
- this._favoritesChangeListeners.addElement(fcl);
- }
-
- public void removeFavoritesChangeListener(FavoritesChangeListener fcl) {
- this._favoritesChangeListeners.removeElement(fcl);
- }
-
- protected void fireFavoritesChanged(FavoritesChangeEvent fce) {
- if (this._favoritesChangeListeners.size() > 0) {
- for (int i = 0; i < this._favoritesChangeListeners.size(); i++) {
- ((FavoritesChangeListener) this._favoritesChangeListeners.elementAt(i)).favoritesChanged(fce);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/FavoritesItemAction.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/FavoritesItemAction.java
deleted file mode 100644
index b2e3b91..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/FavoritesItemAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editor.actions;
-
-import org.eclipse.actf.model.ui.util.ModelServiceUtils;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class FavoritesItemAction extends FavoritesAction {
-
- public static final String ID = FavoritesItemAction.class.getName();
-
- private IWorkbenchWindow _window;
-
- private String _url;
-
- boolean useExistingEditor;
-
- public FavoritesItemAction(IWorkbenchWindow window, String name, String url, boolean useExistingEditor) {
- this._window = window;
- this._url = url;
- this.useExistingEditor = useExistingEditor;
-
- setText(name);
- setId(ID + "_" + name);
- }
-
- public void run() {
- if (null != this._window) {
- if(useExistingEditor){
- ModelServiceUtils.openInExistingEditor(_url);
- }else{
- ModelServiceUtils.launch(_url);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/FavoritesMenu.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/FavoritesMenu.java
deleted file mode 100644
index d61d333..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/FavoritesMenu.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editor.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.actf.model.ui.internal.FavoritesChangeEvent;
-import org.eclipse.actf.model.ui.internal.FavoritesChangeListener;
-import org.eclipse.actf.model.ui.internal.FavoritesUtil;
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class FavoritesMenu extends MenuManager implements FavoritesChangeListener {
-
- private IWorkbenchWindow _window;
-
- private List<String> _favoritesItemIdList = new ArrayList<String>();
-
- private boolean useExistingEditor;
-
- public FavoritesMenu(IWorkbenchWindow window) {
- this(window, false);
- }
-
- public FavoritesMenu(IWorkbenchWindow window, boolean useExistingEditor){
- super(ModelServiceMessages.getString("MenuConst.F&avorites_8"));
- this._window = window;
-
- this.useExistingEditor = useExistingEditor;
-
- Map favoritesMap = FavoritesUtil.getFavoritesMap();
-
- AddFavoritesAction favoritesAddAction = new AddFavoritesAction(window, favoritesMap);
- add(favoritesAddAction);
- favoritesAddAction.addFavoritesChangeListener(this);
-
- ArrangeFavoritesAction favoritesArrangeAction = new ArrangeFavoritesAction(this._window, favoritesMap);
- add(favoritesArrangeAction);
- favoritesArrangeAction.addFavoritesChangeListener(this);
-
- add(new Separator());
-
- updateAllFavoritesItems(favoritesMap);
- }
-
-
- public void favoritesChanged(FavoritesChangeEvent fce) {
- updateAllFavoritesItems(fce.getFavoritesMap());
- }
-
- private void updateAllFavoritesItems(Map favoritesMap) {
- Iterator favoritesIt = favoritesMap.keySet().iterator();
-
- removeAllFavoritesItemAction();
- while (favoritesIt.hasNext()) {
- String name = (String) favoritesIt.next();
- String url = (String) favoritesMap.get(name);
- addFavoritesItemAction(name, url);
- }
-
- FavoritesUtil.saveFavoritesMap(favoritesMap);
- }
-
- private void removeAllFavoritesItemAction(){
- for(int i = 0; i < this._favoritesItemIdList.size(); i++){
- remove((String)this._favoritesItemIdList.get(i));
- }
- this._favoritesItemIdList.clear();
- }
-
- private void addFavoritesItemAction(String name, String url) {
- FavoritesItemAction favoritesItemAction = new FavoritesItemAction(this._window, name, url, useExistingEditor);
- add(favoritesItemAction);
- this._favoritesItemIdList.add( FavoritesItemAction.ID + "_" + name);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/GoBackAction.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/GoBackAction.java
deleted file mode 100644
index a71d295..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/GoBackAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.actions;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.editor.browser.DefaultWebBrowserNavigationEventListener;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserNavigationEventListener;
-import org.eclipse.actf.model.ui.editor.browser.WebBrowserNavigationEvent;
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.actf.model.ui.util.ModelServiceUtils;
-import org.eclipse.actf.ui.util.PlatformUIUtil;
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.ISharedImages;
-
-
-
-
-public class GoBackAction extends Action {
- private String message = ModelServiceMessages.getString("WebBrowser.Backward_4");
-
- private String message_tp = ModelServiceMessages.getString("WebBrowser.Backward_4_tp");
-
- private IWebBrowserNavigationEventListener defaultListener = new DefaultWebBrowserNavigationEventListener();
-
- public GoBackAction() {
- this(true);
- }
-
- public GoBackAction(boolean flag) {
- setText(message);
- setToolTipText(message_tp);
- if (flag)
- setImageDescriptor(PlatformUIUtil.getSharedImageDescriptor(ISharedImages.IMG_TOOL_BACK));
- }
-
- public void run() {
- IModelService modelService = ModelServiceUtils.getActiveModelService();
- if (modelService != null && modelService instanceof IWebBrowserACTF) {
- WebBrowserNavigationEvent event = new WebBrowserNavigationEvent(this, ((IWebBrowserACTF) modelService));
- if (IWebBrowserACTF.WebBrowserNavigationEventListnerHolder.LISTENER != null) {
- IWebBrowserACTF.WebBrowserNavigationEventListnerHolder.LISTENER.goBack(event);
- } else {
- defaultListener.goBack(event);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/GoForwardAction.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/GoForwardAction.java
deleted file mode 100644
index e7ebea4..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/GoForwardAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.actions;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.editor.browser.DefaultWebBrowserNavigationEventListener;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserNavigationEventListener;
-import org.eclipse.actf.model.ui.editor.browser.WebBrowserNavigationEvent;
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.actf.model.ui.util.ModelServiceUtils;
-import org.eclipse.actf.ui.util.PlatformUIUtil;
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.ISharedImages;
-
-
-
-
-public class GoForwardAction extends Action {
- private String message = ModelServiceMessages.getString("WebBrowser.Forward_5");
- private String message_tp = ModelServiceMessages.getString("WebBrowser.Forward_5_tp");
-
- private IWebBrowserNavigationEventListener defaultListener = new DefaultWebBrowserNavigationEventListener();
-
- public GoForwardAction() {
- this(true);
- }
-
- public GoForwardAction(boolean flag) {
- setText(message);
- setToolTipText(message_tp);
- if (flag)
- setImageDescriptor(PlatformUIUtil.getSharedImageDescriptor(ISharedImages.IMG_TOOL_FORWARD));
- }
-
- public void run() {
- IModelService modelService = ModelServiceUtils.getActiveModelService();
- if (modelService != null && modelService instanceof IWebBrowserACTF) {
- WebBrowserNavigationEvent event = new WebBrowserNavigationEvent(this, ((IWebBrowserACTF) modelService));
- if (IWebBrowserACTF.WebBrowserNavigationEventListnerHolder.LISTENER != null) {
- IWebBrowserACTF.WebBrowserNavigationEventListnerHolder.LISTENER.goForward(event);
- } else {
- defaultListener.goForward(event);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/RefreshAction.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/RefreshAction.java
deleted file mode 100644
index d5fffbd..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/RefreshAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.actions;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.ModelUIPlugin;
-import org.eclipse.actf.model.ui.editor.browser.DefaultWebBrowserNavigationEventListener;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserNavigationEventListener;
-import org.eclipse.actf.model.ui.editor.browser.WebBrowserNavigationEvent;
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.actf.model.ui.util.ModelServiceUtils;
-import org.eclipse.jface.action.Action;
-
-
-
-
-public class RefreshAction extends Action {
- private String message = ModelServiceMessages.getString("WebBrowser.Refresh");
-
- private String message_tp = ModelServiceMessages.getString("WebBrowser.Refresh_tp");
-
- private IWebBrowserNavigationEventListener defaultListener = new DefaultWebBrowserNavigationEventListener();
-
- public RefreshAction() {
- this(true);
- }
-
- public RefreshAction(boolean flag) {
- setText(message);
- setToolTipText(message_tp);
- if (flag)
- setImageDescriptor(ModelUIPlugin.getImageDescriptor("icons/toolbar/reload.png"));
- }
-
- public void run() {
- IModelService modelService = ModelServiceUtils.getActiveModelService();
- if (modelService != null && modelService instanceof IWebBrowserACTF) {
- WebBrowserNavigationEvent event = new WebBrowserNavigationEvent(this, ((IWebBrowserACTF) modelService));
- if (IWebBrowserACTF.WebBrowserNavigationEventListnerHolder.LISTENER != null) {
- IWebBrowserACTF.WebBrowserNavigationEventListnerHolder.LISTENER.refresh(event);
- } else {
- defaultListener.refresh(event);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/StopAction.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/StopAction.java
deleted file mode 100644
index eeea55d..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/StopAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.actions;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.ModelUIPlugin;
-import org.eclipse.actf.model.ui.editor.browser.DefaultWebBrowserNavigationEventListener;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserNavigationEventListener;
-import org.eclipse.actf.model.ui.editor.browser.WebBrowserNavigationEvent;
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.actf.model.ui.util.ModelServiceUtils;
-import org.eclipse.jface.action.Action;
-
-
-
-
-public class StopAction extends Action {
- private String message = ModelServiceMessages.getString("WebBrowser.Stop");
- private String message_tp = ModelServiceMessages.getString("WebBrowser.Stop_tp");
-
- private IWebBrowserNavigationEventListener defaultListener = new DefaultWebBrowserNavigationEventListener();
-
- public StopAction(){
- this(true);
- }
-
- public StopAction(boolean flag) {
- setText(message);
- setToolTipText(message_tp);
- if(flag)
- setImageDescriptor(ModelUIPlugin.getImageDescriptor("icons/toolbar/stop.png"));
- }
-
- public void run() {
- IModelService modelService = ModelServiceUtils.getActiveModelService();
- if (modelService != null && modelService instanceof IWebBrowserACTF) {
- WebBrowserNavigationEvent event = new WebBrowserNavigationEvent(this, ((IWebBrowserACTF) modelService));
- if (IWebBrowserACTF.WebBrowserNavigationEventListnerHolder.LISTENER != null) {
- IWebBrowserACTF.WebBrowserNavigationEventListnerHolder.LISTENER.stop(event);
- } else {
- defaultListener.stop(event);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/TextSizeAction.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/TextSizeAction.java
deleted file mode 100644
index 9c654f8..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/TextSizeAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editor.actions;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.model.ui.util.ModelServiceUtils;
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-
-public class TextSizeAction extends Action {
-
- public static final String ID = TextSizeAction.class.getName();
-
- private int _fontSize = 2;
-
- public TextSizeAction(IWorkbenchWindow window) {
- super(ID, Action.AS_RADIO_BUTTON);
- }
-
- public void run() {
- IModelService modelService = ModelServiceUtils.getActiveModelService();
- if(modelService!=null && modelService instanceof IWebBrowserACTF){
- ((IWebBrowserACTF)modelService).setFontSize(this._fontSize);
- }
- }
-
- public void setFontSize(int fontSize) {
- this._fontSize = fontSize;
- }
-
- public int getFontSize() {
- return this._fontSize;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/TextSizeMenu.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/TextSizeMenu.java
deleted file mode 100644
index 91f4336..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/actions/TextSizeMenu.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editor.actions;
-
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class TextSizeMenu extends MenuManager {
-
- private static final String[] MENUTEXTS = {
- ModelServiceMessages.getString("MenuConst.Largest_3"),
- ModelServiceMessages.getString("MenuConst.Large_4"),
- ModelServiceMessages.getString("MenuConst.Medium_5"),
- ModelServiceMessages.getString("MenuConst.Small_6"),
- ModelServiceMessages.getString("MenuConst.Smallest_7")
- };
-
- public TextSizeMenu(IWorkbenchWindow window) {
- super(ModelServiceMessages.getString("MenuConst.&Font_2"));
-
- int menuNum = 5;
- TextSizeAction[] displayTextSizeAction = new TextSizeAction[menuNum];
-
- // int currFontSize = ADesignerWebPlugin.getDefault().getPartLeftWebBrowser().getFontSize();
- int fontSize = 5;
- for (int i = 0; i < menuNum; i++) {
- displayTextSizeAction[i] = new TextSizeAction(window);
- displayTextSizeAction[i].setText(MENUTEXTS[i]);
- add(displayTextSizeAction[i]);
- fontSize--;
- displayTextSizeAction[i].setFontSize(fontSize);
- // if(currFontSize == fontSize){
- //}
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/DefaultWebBrowserNavigationEventListener.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/DefaultWebBrowserNavigationEventListener.java
deleted file mode 100644
index c68c46b..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/DefaultWebBrowserNavigationEventListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.browser;
-
-
-
-
-public class DefaultWebBrowserNavigationEventListener implements IWebBrowserNavigationEventListener {
-
- public void goBack(WebBrowserNavigationEvent e) {
- IWebBrowserACTF browser = e.getBrowser();
- if(browser !=null){
- browser.goBackward();
- }
- }
-
- public void goForward(WebBrowserNavigationEvent e) {
- IWebBrowserACTF browser = e.getBrowser();
- if(browser !=null){
- browser.goForward();
- }
- }
-
- public void refresh(WebBrowserNavigationEvent e) {
- IWebBrowserACTF browser = e.getBrowser();
- if(browser !=null){
- browser.navigateRefresh();
- }
- }
-
- public void stop(WebBrowserNavigationEvent e) {
- IWebBrowserACTF browser = e.getBrowser();
- if(browser !=null){
- browser.navigateStop();
- }
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/ICurrentStyles.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/ICurrentStyles.java
deleted file mode 100644
index d4368ed..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/ICurrentStyles.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editor.browser;
-
-import java.net.URL;
-
-import org.eclipse.swt.graphics.Rectangle;
-
-public interface ICurrentStyles {
-
- /**
- * @return
- */
- public abstract String getXPath();
-
- /**
- * @return
- */
- public abstract String getTagName();
-
-
- /**
- * @return
- */
- public abstract Rectangle getRectangle();
-
-
- /**
- * @return
- */
- public abstract boolean isLink();
-
- /**
- * @return
- */
- public abstract URL getLinkURL();
-
-
- /**
- * @return
- */
- public abstract String getBackgroundColor();
-
- /**
- * @return
- */
- public abstract String getBackgroundRepeat();
-
- /**
- * @return
- */
- public abstract String getColor();
-
-// /**
-// * @return
-// */
-// public abstract String getCssText(); //style
-//
-// /**
-// * @return
-// */
-// public abstract String getFontWeight(); //style
-
-
- /**
- * @return
- */
- public abstract String getDisplay();
-
- /**
- * @return
- */
- public abstract String getFontFamily();
-
- /**
- * @return
- */
- public abstract String getFontSize();
-
- /**
- * @return
- */
- public abstract String getFontStyle();
-
- /**
- * @return
- */
- public abstract String getFontVariant();
-
- /**
- * @return
- */
- public abstract String getLetterSpacing();
-
- /**
- * @return
- */
- public abstract String getLineHeight();
-
- /**
- * @return
- */
- public abstract String getPosition();
-
- /**
- * @return
- */
- public abstract String getTextAlign();
-
- /**
- * @return
- */
- public abstract String getTextDecoration();
-
-
- /**
- * @return
- */
- public abstract String getVisibility();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserACTF.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserACTF.java
deleted file mode 100644
index 032302c..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserACTF.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editor.browser;
-
-import org.eclipse.actf.model.ui.IModelService;
-
-
-public interface IWebBrowserACTF extends IModelService {
-
- public static final int READYSTATE_UNINITIALIZED = 0;
-
- public static final int READYSTATE_LOADING = 1;
-
- public static final int READYSTATE_LOADED = 2;
-
- public static final int READYSTATE_INTERACTIVE = 3;
-
- public static final int READYSTATE_COMPLETE = 4;
-
-
- public class WebBrowserNavigationEventListnerHolder {
- public static IWebBrowserNavigationEventListener LISTENER = null;
- }
-
- public abstract void setFocusAddressText(boolean selectAll);
- void showAddressText(boolean flag);
-
- /*
- * browse commands
- */
- public abstract void navigate(String url);
-
- public abstract void goBackward();
-
- public abstract void goForward();
-
- public abstract void navigateStop();
-
- public abstract void navigateRefresh();
-
- /*
- * navigation result
- */
-
- public abstract int getReadyState();
-
- public abstract boolean isReady();
-
- public abstract String getLocationName();
-
- public abstract boolean isUrlExists();
-
- public abstract int getNavigateErrorCode();
-
- /*
- * browser property
- */
- public abstract void setHlinkStop(boolean bStop);
-
- public abstract void setWebBrowserSilent(boolean bSilent);
-
- public abstract void setDisableScriptDebugger(boolean bDisable);
-
- public abstract void setDisplayImage(boolean display);
-
- public abstract boolean isDisableScriptDebugger();
-
- /*
- * highligt element
- *
- */
- public abstract void highlightElementById(String id);
-
- public abstract void hightlightElementByAttribute(String name, String value);
-
- public abstract void recoveryHighlight();
-
- /*
- * font size, color, etc.
- *
- */
- public abstract void setFontSize(int fontSize);
-
- public abstract int getFontSize();
-
- public abstract IWebBrowserStyleInfo getStyleInfo();
-
- int getIWebBrowser2();
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserACTFEventListener.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserACTFEventListener.java
deleted file mode 100644
index a28b74b..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserACTFEventListener.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.browser;
-
-
-
-
-public interface IWebBrowserACTFEventListener {
- void navigateComplete(IWebBrowserACTF webBrowser, String url);
- void titleChange(IWebBrowserACTF webBrowser, String title);
- void progressChange(IWebBrowserACTF webBrowser, int progress, int progressMax);
- void myDocumentComplete(IWebBrowserACTF webBrowser);
- void dispose();
- void focusChange(IWebBrowserACTF webBrowser);
- void browserDisposed(IWebBrowserACTF webBrowser, String title);
- void beforeNavigate(IWebBrowserACTF webBrowser, String url, String targetFrameName, boolean isInNavigation);
- void myRefresh(IWebBrowserACTF webBrowser);
- void myRefreshComplete(IWebBrowserACTF webBrowser);
- void navigateStop(IWebBrowserACTF webBrowser);
- void focusGainedOfAddressText(IWebBrowserACTF webBrowser);
- void focusLostOfAddressText(IWebBrowserACTF webBrowser);
- void newWindow(IWebBrowserACTF webBrowser);
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserNavigationEventListener.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserNavigationEventListener.java
deleted file mode 100644
index 93cad6f..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserNavigationEventListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.browser;
-
-
-
-
-public interface IWebBrowserNavigationEventListener {
-
- public void goBack(WebBrowserNavigationEvent e);
- public void goForward(WebBrowserNavigationEvent e);
- public void refresh(WebBrowserNavigationEvent e);
- public void stop(WebBrowserNavigationEvent e);
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserStyleInfo.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserStyleInfo.java
deleted file mode 100644
index f1db1ce..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/IWebBrowserStyleInfo.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.editor.browser;
-
-import java.util.Map;
-
-import org.eclipse.actf.model.ui.ModelServiceSizeInfo;
-import org.eclipse.swt.graphics.RGB;
-
-public interface IWebBrowserStyleInfo {
-
- /**
- * @return Returns the Map between Elements (XPath) and node's current
- * styles.
- */
- public abstract Map<String, ICurrentStyles> getCurrentStyles();
-
- /**
- * @param isWhole
- * if true returns whole page size, if false returns visible area
- * size
- * @return Returns the Browser's size information.
- */
- public abstract ModelServiceSizeInfo getSizeInfo(boolean isWhole);
-
- /**
- * @return Returns the unvisited link color in RGB format.
- */
- public abstract RGB getUnvisitedLinkColor();
-
- /**
- * @return Returns the visited link color in RGB format.
- */
- public abstract RGB getVisitedLinkColor();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/WaitForBrowserReadyHandler.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/WaitForBrowserReadyHandler.java
deleted file mode 100644
index 9740427..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/WaitForBrowserReadyHandler.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.browser;
-
-import org.eclipse.actf.ui.util.timer.WaitExecSyncEventHandler;
-import org.eclipse.swt.widgets.Display;
-
-
-
-
-public class WaitForBrowserReadyHandler implements WaitExecSyncEventHandler {
- public static double INTERVAL = 0.5;
-
- private IWebBrowserACTF browser;
-
- private Runnable runnable;
-
- private boolean waitActive;
-
- private double timeout;
-
- public WaitForBrowserReadyHandler(IWebBrowserACTF browser, double timeout, boolean waitActive, Runnable runnable) {
- this.browser = browser;
- this.runnable = runnable;
- this.waitActive = waitActive;
- this.timeout = timeout;
- }
-
- public double getInterval() {
- return INTERVAL;
- }
-
- public boolean canRun(double elapsed) {
- try {
- // System.out.print("[" + browser.getReadyState() + "]");
- if (browser.isReady() || elapsed > timeout) {
- return !waitActive || null != Display.getCurrent().getActiveShell();
- }
- }
- catch( Exception e ) {
- }
- return false;
- }
-
- public void run() {
- runnable.run();
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/WebBrowserNavigationEvent.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/WebBrowserNavigationEvent.java
deleted file mode 100644
index 5e09da7..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/browser/WebBrowserNavigationEvent.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.browser;
-
-import java.util.EventObject;
-
-
-
-
-
-public class WebBrowserNavigationEvent extends EventObject {
-
- private static final long serialVersionUID = 4659419119012003840L;
-
- private IWebBrowserACTF browser;
-
- public WebBrowserNavigationEvent(Object source, IWebBrowserACTF browser) {
- super(source);
- this.browser = browser;
- }
-
- public IWebBrowserACTF getBrowser() {
- return browser;
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/dialogs/FavoritesAddDialog.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/dialogs/FavoritesAddDialog.java
deleted file mode 100644
index 7cffdd7..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/dialogs/FavoritesAddDialog.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.dialogs;
-
-import java.util.Map;
-
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-public class FavoritesAddDialog extends Dialog{
-
- private Map _map;
-
- private String _name;
-
- private Text _nameText;
-
- public FavoritesAddDialog(Shell shell, Map map, String name) {
- super(shell);
- this._map = map;
- this._name = name;
- };
-
- public String getName(){
- return _name;
- }
-
-
-
- protected void okPressed() {
- _name = _nameText.getText();
- if (_name.equals("")) {
- MessageDialog.openError(getShell(),"Error",ModelServiceMessages.getString("DialogAddFavorite.Text_Empty_Alert"));
- return;
- } else if (_map.containsKey(_name)) {
- MessageDialog.openError(getShell(),"Error",ModelServiceMessages.getString("DialogAddFavorite.Text_Exist_Alert"));
- return;
- }
-
- super.okPressed();
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite)super.createDialogArea(parent);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- GridLayout gridLayout1 = new GridLayout();
- gridLayout1.numColumns = 2;
- composite.setLayout(gridLayout1);
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(ModelServiceMessages.getString("DialogAddFavorite.Name_Label"));
-
- this._nameText = new Text(composite, SWT.BORDER);
- this._nameText.setText(_name);
- GridData gridData = new GridData();
- gridData.widthHint = 250;
- this._nameText.setLayoutData(gridData);
-
- return(composite);
- };
-
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(ModelServiceMessages.getString("DialogAddFavorite.Title"));
- newShell.setLocation(200, 200);
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/dialogs/FavoritesArrangeDialog.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/dialogs/FavoritesArrangeDialog.java
deleted file mode 100644
index a01a6c2..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/dialogs/FavoritesArrangeDialog.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.dialogs;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.actf.model.ui.util.ModelServiceMessages;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-
-
-public class FavoritesArrangeDialog extends Dialog {
-
- private Map<String, String> _favoritesMap;
- private boolean modified = false;
-
- public FavoritesArrangeDialog(Shell shell, Map<String, String> favoritesMap) {
- super(shell);
- this._favoritesMap = favoritesMap;
- };
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite)super.createDialogArea(parent);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- GridLayout gridLayout1 = new GridLayout();
- gridLayout1.numColumns = 2;
- composite.setLayout(gridLayout1);
-
- final Table table = new Table(composite, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 2;
- gridData.heightHint = 100;
- table.setLayoutData(gridData);
-
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
-
- String[] cols = { ModelServiceMessages.getString("DialogConst.Name_Label"), "URL: " };
- TableColumn col = new TableColumn(table, SWT.BEGINNING);
- col.setText(cols[0]);
- col.setWidth(200);
- col = new TableColumn(table, SWT.BEGINNING);
- col.setText(cols[1]);
- col.setWidth(300);
-
- Iterator keyIt = _favoritesMap.keySet().iterator();
- while (keyIt.hasNext()) {
- String name = (String) keyIt.next();
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(0, name);
- item.setText(1, (String) _favoritesMap.get(name));
- }
-
- Button button = new Button(composite, SWT.PUSH);
- button.setText(ModelServiceMessages.getString("DialogArrangeFavorite.Modify_Name"));
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent arg0) {
- if (table.getSelectionCount() > 0) {
- String name = table.getSelection()[0].getText(0);
- FavoritesAddDialog dlg = new FavoritesAddDialog(getShell(), _favoritesMap, name);
- int ret = dlg.open();
- String newName = dlg.getName();
- if (ret == IDialogConstants.OK_ID && !newName.equals(name)) {
- table.getSelection()[0].setText(0, newName);
- _favoritesMap.put(newName, _favoritesMap.get(name));
- _favoritesMap.remove(name);
- modified = true;
- }
- }
- }
- });
-
- button = new Button(composite, SWT.PUSH);
- button.setText(ModelServiceMessages.getString("DialogArrangeFavorite.Delete"));
- button.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent arg0) {
- if (table.getSelectionCount() > 0) {
- TableItem[] items = table.getSelection();
- for (int i = 0; i < items.length; i++) {
- _favoritesMap.remove(items[i].getText(0));
- }
- table.remove(table.getSelectionIndices());
- modified = true;
- }
- }
-
- });
-
- return composite;
- }
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(ModelServiceMessages.getString("DialogArrangeFavorite.Title"));
- }
-
- public Map<String, String> getFavoritesMap() {
- return this._favoritesMap;
- }
-
- public boolean isModified(){
- return modified;
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/preferences/IPreferenceConstants.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/preferences/IPreferenceConstants.java
deleted file mode 100644
index c4db44d..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/editor/preferences/IPreferenceConstants.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.editor.preferences;
-
-
-public interface IPreferenceConstants {
- public static final String NOT_FIRST_TIME = "brwoser.preferences.notFirstTime";
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/BrowserFavoritesExtension.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/BrowserFavoritesExtension.java
deleted file mode 100644
index bb37543..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/BrowserFavoritesExtension.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.internal;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.actf.model.ui.ModelUIPlugin;
-import org.eclipse.actf.util.logging.DebugPrintUtil;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IContributor;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.Platform;
-
-public class BrowserFavoritesExtension {
- private static final String EXTENSION_NAME = "browserFavorites";
-
- private static final String FAVORITES = "favorites";
-
- private static final String ATTR_PREF_FILE = "prefFile";
-
- private static BrowserFavoritesExtension[] extensions;
-
- private static URL[] prefFileURLs = null;
-
- public static URL[] getBrowserFavoritesPrefFileURLs() {
- if (prefFileURLs != null) {
- return prefFileURLs;
- }
-
- BrowserFavoritesExtension[] tmpExtensions = getExtensions();
- ArrayList<URL> tmpList = new ArrayList<URL>();
- if (tmpExtensions != null) {
- for (int i = 0; i < tmpExtensions.length; i++) {
- URL tmpInfo = tmpExtensions[i]
- .getPrefFileURL();
- if (tmpInfo != null) {
- tmpList.add(tmpInfo);
- }
- }
- }
- prefFileURLs = new URL[tmpList.size()];
- tmpList.toArray(prefFileURLs);
- return prefFileURLs;
- }
-
- private static BrowserFavoritesExtension[] getExtensions() {
- if (extensions != null)
- return extensions;
-
- IExtension[] tmpExtensions = Platform.getExtensionRegistry()
- .getExtensionPoint(ModelUIPlugin.PLUGIN_ID, EXTENSION_NAME)
- .getExtensions();
-
- DebugPrintUtil.devOrDebugPrintln(BrowserFavoritesExtension.class.getName()+":"
- + tmpExtensions.length);
-
- List<BrowserFavoritesExtension> l = new ArrayList<BrowserFavoritesExtension>();
- for (int i = 0; i < tmpExtensions.length; i++) {
- IConfigurationElement[] configElements = tmpExtensions[i]
- .getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- BrowserFavoritesExtension ex = parseExtension(configElements[j]);
- if (ex != null) {
- l.add(ex);
- }
- }
- }
- extensions = l.toArray(new BrowserFavoritesExtension[l.size()]);
- return extensions;
- }
-
- private static BrowserFavoritesExtension parseExtension(
- IConfigurationElement configElement) {
- if (!configElement.getName().equals(FAVORITES)) {
- return null;
- }
- try {
- return new BrowserFavoritesExtension(configElement);
- } catch (Exception e) {
- }
- return null;
- }
-
- private URL prefFileUrl = null;
-
- private BrowserFavoritesExtension(IConfigurationElement configElement) {
- try {
- IContributor contributor = configElement.getContributor();
- String prefFile = configElement.getAttribute(ATTR_PREF_FILE);
- prefFileUrl = FileLocator.resolve(Platform.getBundle(contributor.getName()).getEntry(prefFile));
- } catch (Exception e) {
- DebugPrintUtil.devOrDebugPrintStackTrace(e);
- }
-
- }
-
- private URL getPrefFileURL() {
- return prefFileUrl;
- }
-
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/FavoritesChangeEvent.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/FavoritesChangeEvent.java
deleted file mode 100644
index 858fd33..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/FavoritesChangeEvent.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.internal;
-
-import java.util.EventObject;
-import java.util.Map;
-
-
-
-public class FavoritesChangeEvent extends EventObject {
-
- private static final long serialVersionUID = 7558042163036173736L;
-
- private Map _favoritesMap;
-
- public FavoritesChangeEvent(Object obj, Map favoritesMap) {
- super(obj);
- setFavoritesMap(favoritesMap);
- }
-
- public void setFavoritesMap(Map favoritesMap) {
- this._favoritesMap = favoritesMap;
- }
-
- public Map getFavoritesMap() {
- return this._favoritesMap;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/FavoritesChangeListener.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/FavoritesChangeListener.java
deleted file mode 100644
index 002ccfe..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/FavoritesChangeListener.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.internal;
-
-import java.util.EventListener;
-
-
-public interface FavoritesChangeListener extends EventListener {
- public void favoritesChanged(FavoritesChangeEvent e);
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/FavoritesUtil.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/FavoritesUtil.java
deleted file mode 100644
index 3a1c943..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/internal/FavoritesUtil.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.internal;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeMap;
-
-import org.eclipse.actf.model.ui.ModelUIPlugin;
-import org.eclipse.actf.model.ui.editor.preferences.IPreferenceConstants;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.PreferenceStore;
-
-public class FavoritesUtil {
- private static FavoritesUtil INSTANCE = new FavoritesUtil();
-
- Properties favoritesProp = null;
-
- File targetFile;
-
- ModelUIPlugin plugin;
-
- private FavoritesUtil() {
- plugin = ModelUIPlugin.getDefault();
- IPath favoritesPath = plugin.getStateLocation().append(
- "favorites.properties");
- favoritesProp = new Properties();
- String targetFileName = favoritesPath.toOSString();
- try {
- targetFile = new File(targetFileName);
- if (targetFile.canRead()) {
- favoritesProp.load(new FileInputStream(targetFile));
- }
- } catch (Exception e) {
-
- }
-
- if (!plugin.getPreferenceStore().getBoolean(
- IPreferenceConstants.NOT_FIRST_TIME)) {
-
- URL[] prefFiles = BrowserFavoritesExtension
- .getBrowserFavoritesPrefFileURLs();
-
- if (prefFiles.length > 0) {
- for(URL target : prefFiles){
- try {
- InputStream prefIS = target.openStream();
- if (prefIS != null) {
- PreferenceStore tmpStore = new PreferenceStore();
- tmpStore.load(prefIS);
- for (String key : tmpStore.preferenceNames()) {
- favoritesProp.put(key, tmpStore.getString(key));
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- } else {
-
- try {
- InputStream prefIS = FileLocator.openStream(Platform
- .getBundle(ModelUIPlugin.PLUGIN_ID), new Path(
- "config/favorites.pref"), false);
- if (prefIS != null) {
- PreferenceStore tmpStore = new PreferenceStore();
- tmpStore.load(prefIS);
- for (String key : tmpStore.preferenceNames()) {
- favoritesProp.put(key, tmpStore.getString(key));
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- try {
- favoritesProp.store(new FileOutputStream(targetFile), "");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- public static Map<String, String> getFavoritesMap() {
- Map<String, String> favoritesMap = new TreeMap<String, String>();
-
- if (INSTANCE.favoritesProp != null) {
- Set keySet = INSTANCE.favoritesProp.keySet();
- for (Object key : keySet) {
- favoritesMap.put((String) key, INSTANCE.favoritesProp
- .getProperty((String) key));
- }
- }
-
- return favoritesMap;
- }
-
- public static void saveFavoritesMap(Map favoritesMap) {
-
- if (INSTANCE.favoritesProp != null) {
- INSTANCE.favoritesProp.clear();
-
- Iterator favoritesIt = favoritesMap.keySet().iterator();
- String key;
- while (favoritesIt.hasNext()) {
- key = (String) favoritesIt.next();
- INSTANCE.favoritesProp.put(key, (String) favoritesMap.get(key));
- }
- try {
- INSTANCE.favoritesProp.store(new FileOutputStream(
- INSTANCE.targetFile), "");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/util/ModelServiceMessages.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/util/ModelServiceMessages.java
deleted file mode 100644
index 049112c..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/util/ModelServiceMessages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.util;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-
-
-public class ModelServiceMessages {
- private static final String BUNDLE_NAME = "messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private ModelServiceMessages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/util/ModelServiceUtils.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/util/ModelServiceUtils.java
deleted file mode 100644
index 87a27a9..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/util/ModelServiceUtils.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.model.ui.util;
-
-import org.eclipse.actf.model.ui.IModelService;
-import org.eclipse.actf.model.ui.IModelServiceHolder;
-import org.eclipse.actf.model.ui.editor.DummyEditorInput;
-import org.eclipse.actf.model.ui.editor.browser.IWebBrowserACTF;
-import org.eclipse.actf.ui.util.PlatformUIUtil;
-import org.eclipse.actf.util.logging.DebugPrintUtil;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-
-
-
-public class ModelServiceUtils {
-
- private static class EditorNotFoundException extends Exception {
- private static final long serialVersionUID = -5760127077107164112L;
-
- }
-
- public static IEditorPart launch(String targetUrl) {
- IWorkbenchPage activePage = PlatformUIUtil.getActivePage();
- if (activePage == null) {
- return null;
- }
-
- if (targetUrl != null && targetUrl.length() != 0) {
- IEditorReference[] editorRefs = activePage.getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++) {
- IWorkbenchPart part = editorRefs[i].getPart(false);
- if (part instanceof IModelServiceHolder) {
- IModelService modelService = ((IModelServiceHolder) part).getModelService();
- if (targetUrl.equals(modelService.getURL())) {
- activePage.activate(part);
- // reload?
- return null;
- }
- }
- }
-
- targetUrl = targetUrl.trim();
-
- try {
- return(launch(targetUrl, getEditorId(targetUrl)));
- } catch (EditorNotFoundException e) {
- System.err.println("Editor not found: " + targetUrl);
- }
- }
- return null;
- }
-
- private static String getEditorId(String targetUrl) throws EditorNotFoundException {
- // TODO support multiple editor, dialog, preference
- IEditorRegistry editors = PlatformUI.getWorkbench().getEditorRegistry();
- IEditorDescriptor editor;
-
- if (!targetUrl.startsWith("http://") && !targetUrl.startsWith("https://")) {
- editor = editors.getDefaultEditor(targetUrl);
- if (editor == null) {
- editor = editors.getDefaultEditor("default.html");
- }
- } else {
- editor = editors.getDefaultEditor("default.html");
-
- }
- if (editor == null) {
- throw new EditorNotFoundException();
- }
-
- return (editor.getId());
- }
-
- public static IEditorPart launch(String targetUrl, String id) {
-
- // TODO check current url
- IWorkbenchPage activePage = PlatformUIUtil.getActivePage();
- if (activePage == null) {
- return null;
- }
- if (targetUrl != null) {
- targetUrl = targetUrl.trim();
- }else{
- targetUrl = "";
- }
-
- IEditorPart blankEditorPart = getBlankBrowserEditorPart(id);
- if (blankEditorPart != null) {
- activePage.activate(blankEditorPart);
- if (targetUrl != null) {
- ((IModelServiceHolder) blankEditorPart).getModelService().open(targetUrl);
- return blankEditorPart;
- }
- } else {
- IEditorReference[] editorRefs = activePage.getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++) {
- if (editorRefs[i].getId().equals(id)) {
- IWorkbenchPart part = editorRefs[i].getPart(false);
- if (part instanceof IModelServiceHolder) {
- IModelService modelService = ((IModelServiceHolder) part).getModelService();
- if (targetUrl.equals(modelService.getURL())) {
- activePage.activate(part);
- return (IEditorPart)part;
- }
- }
- }
- }
-
- try {
- String editorName = "";
- IEditorRegistry editors = PlatformUI.getWorkbench().getEditorRegistry();
- IEditorDescriptor editorDesc = editors.findEditor(id);
- if (editorDesc != null) {
- editorName = editorDesc.getLabel();
- return activePage.openEditor(
- new DummyEditorInput(targetUrl, editorName), id);
- } else {
- System.err.println("Editor not found: " + id);
- }
- } catch (PartInitException e) {
- e.printStackTrace();
- }
- }
- return null;
- }
-
- private static IEditorPart getBlankBrowserEditorPart(String id) {
- IEditorReference[] editors = PlatformUIUtil.getActivePage()
- .getEditorReferences();
- for (int i = 0; i < editors.length; i++) {
- if (editors[i].getId().equals(id)) {
- IWorkbenchPart part = editors[i].getPart(false);
- if (part instanceof IModelServiceHolder) {
- IModelService modelService = ((IModelServiceHolder) part).getModelService();
- System.out.println(modelService.getURL());
- if (modelService.getURL() == null)
- return (IEditorPart)part;
- if (modelService instanceof IWebBrowserACTF
- && ("about:blank".equals(modelService.getURL()) || ("".equals(modelService.getURL()))))
- return (IEditorPart)part;
- }
- }
- }
- return null;
- }
-
- public static void openInExistingEditor(String targetUrl) {
- targetUrl = targetUrl.trim();
- String editorId;
-
- try {
- editorId = getEditorId(targetUrl);
- } catch (EditorNotFoundException e) {
- System.err.println("Editor not found: " + targetUrl);
- return;
- }
- IWorkbenchPage activePage = PlatformUIUtil.getActivePage();
- if (activePage == null) {
- return;
- }
- if (activateEditorPart(editorId)) {
- IEditorPart editor = activePage.getActiveEditor();
- if (editor instanceof IModelServiceHolder) {
- ((IModelServiceHolder) editor).getModelService().open(targetUrl);
- } else {
- launch(targetUrl);
- }
- } else {
- launch(targetUrl);
- }
-
- }
-
- public static boolean activateEditorPart(String id) {
- if (id != null) {
- IWorkbenchPage activePage = PlatformUIUtil.getActivePage();
- if (activePage == null) {
- return false;
- }
- IEditorPart editor = activePage.getActiveEditor();
- if (editor != null && editor.getSite().getId().equals(id)) {
- return true;
- }
-
- IEditorReference[] editors = activePage.getEditorReferences();
- for (int i = 0; i < editors.length; i++) {
- System.out.println(editors[i].getId());
- if (editors[i].getId().equals(id)) {
- editor = editors[i].getEditor(false);
- if (editor != null) {
- activePage.activate(editor);
- return true;
- }
- }
- }
- }
-
- return false;
- }
-
- public static IModelServiceHolder getActiveModelServiceHolder() {
- IEditorPart editor = PlatformUIUtil.getActiveEditor();
- if (editor != null && editor instanceof IModelServiceHolder) {
- return (IModelServiceHolder) editor;
- }
-
- DebugPrintUtil.devOrDebugPrintln("editor: " + editor + " isn't IModelServiceHolder");
-
- return null;
- }
-
- public static IModelService getActiveModelService() {
- IModelServiceHolder holder = getActiveModelServiceHolder();
- if (holder != null) {
- return (holder.getModelService());
- }
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/util/ScrollBarSizeUtil.java b/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/util/ScrollBarSizeUtil.java
deleted file mode 100644
index 09e0519..0000000
--- a/plugins/org.eclipse.actf.model.ui/src/org/eclipse/actf/model/ui/util/ScrollBarSizeUtil.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.model.ui.util;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-public class ScrollBarSizeUtil {
- private static int HORIZONTALBAR_HEIGHT = 15;
- private static int VERTICALBAR_WIDTH = 15;
- private static boolean isInit = false;
-
- private static void init() {
- //to avoid to use swt.internal
- if (!isInit) {
- try {
- Display display = Display.getCurrent();
- if (null != display) {
- Shell shell = new Shell(display);
- shell.setBounds(0,0,1,1);
- Composite composite = new Composite(shell, SWT.V_SCROLL
- | SWT.H_SCROLL);
- // shell.open();
- HORIZONTALBAR_HEIGHT = composite.getHorizontalBar()
- .getSize().y;
- VERTICALBAR_WIDTH = composite.getVerticalBar().getSize().x;
- composite.dispose();
- shell.dispose();
-
- if(HORIZONTALBAR_HEIGHT < 0){
- HORIZONTALBAR_HEIGHT =15;
- }
- if(VERTICALBAR_WIDTH < 0){
- VERTICALBAR_WIDTH = 15;
- }
-
- isInit = true;
- }
- } catch (Exception e) {
- }
- }
- }
-
- public static int getHorizontalBarHeight() {
- init();
- return HORIZONTALBAR_HEIGHT;
- }
-
- public static int getVerticalBarWidth() {
- init();
- return VERTICALBAR_WIDTH;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/.classpath b/plugins/org.eclipse.actf.util.httpproxy/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.util.httpproxy/.project b/plugins/org.eclipse.actf.util.httpproxy/.project
deleted file mode 100644
index 4711ee8..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.util.httpproxy2</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.util.httpproxy/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.util.httpproxy/META-INF/MANIFEST.MF
deleted file mode 100644
index 72652b2..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF Httpproxy Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.util.httpproxy;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Require-Bundle: org.eclipse.core.runtime
-Eclipse-LazyStart: false
-Export-Package: org.eclipse.actf.util.httpproxy,
- org.eclipse.actf.util.httpproxy.core,
- org.eclipse.actf.util.httpproxy.proxy,
- org.eclipse.actf.util.httpproxy.util
-Bundle-Vendor: Eclipse.org
diff --git a/plugins/org.eclipse.actf.util.httpproxy/about.html b/plugins/org.eclipse.actf.util.httpproxy/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/build.properties b/plugins/org.eclipse.actf.util.httpproxy/build.properties
deleted file mode 100644
index 475da1d..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/build.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/ExternalProxyConfig.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/ExternalProxyConfig.java
deleted file mode 100644
index 019d38c..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/ExternalProxyConfig.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy;
-
-public class ExternalProxyConfig {
- private boolean externalProxyFlag = false;
- private String externalProxyHost = "localhost";
- private int externalProxyPort = 8080;
-
- public ExternalProxyConfig() {
-
- }
-
- public boolean getExternalProxyFlag() {
- return externalProxyFlag;
- }
-
- public void setExternalProxyFlag(boolean flag) {
- this.externalProxyFlag = flag;
- }
-
- public String getExternalProxyHost() {
- return externalProxyHost;
- }
-
- public int getExternalProxyPort() {
- return externalProxyPort;
- }
-
- public void setExternalProxy(String host, int port) {
- this.externalProxyHost = host;
- this.externalProxyPort = port;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/HTTPProxy.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/HTTPProxy.java
deleted file mode 100644
index 5156c81..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/HTTPProxy.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketException;
-
-import org.eclipse.actf.util.httpproxy.core.IClientConnection;
-import org.eclipse.actf.util.httpproxy.core.impl.ClientConnectionListener;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPLocalServerFactory;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyConnection;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyTranscoderFactory;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverriderFactory;
-import org.eclipse.actf.util.httpproxy.proxy.ISecretManager;
-import org.eclipse.actf.util.httpproxy.proxy.impl.ClientStateManager;
-import org.eclipse.actf.util.httpproxy.proxy.impl.HTTPProxyConnection;
-import org.eclipse.actf.util.httpproxy.util.IObjectPool;
-import org.eclipse.actf.util.httpproxy.util.IWorkpileController;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.impl.ObjectPoolImpl;
-import org.eclipse.actf.util.httpproxy.util.impl.WorkpileControllerImpl;
-
-public class HTTPProxy implements ClientConnectionListener {
- private static final Logger LOGGER = Logger.getLogger(HTTPProxy.class);
-
- private final IWorkpileController wpc;
-
- private final ServerSocket fServerSock;
-
- private final long fKeepAlive;
-
- private final int fQueueSize;
-
- // private final AsyncWorkManager fDispatchWorkMan;
-
- private final IObjectPool connectionPool;
-
- private final ISecretManager secretManager;
-
- private final IHTTPSessionOverriderFactory sessionOverriderFactory;
-
- private final IHTTPProxyTranscoderFactory proxyTranscoderFactory;
-
- private final IHTTPLocalServerFactory localServerFactory;
-
- private ExternalProxyConfig externalProxyConfig;
-
- public ISecretManager getSecretManager() {
- return secretManager;
- }
-
- public int getListenPort() {
- return fServerSock.getLocalPort();
- }
-
- public ExternalProxyConfig getExternalProxyConfig(){
- return externalProxyConfig;
- }
-
- public IHTTPSessionOverriderFactory getSessionOverriderFactory() {
- return sessionOverriderFactory;
- }
-
- public IHTTPProxyTranscoderFactory getProxyTranscoderFactory() {
- return proxyTranscoderFactory;
- }
-
- public IHTTPLocalServerFactory getLocalServerFactory() {
- return localServerFactory;
- }
-
- private HTTPProxy(ProxyConfig config, ExternalProxyConfig externalProxyConfig) throws IOException {
- Logger.setConfigPropertyName("WaXcoding.conf.logging");
- this.externalProxyConfig = externalProxyConfig;
- wpc = new WorkpileControllerImpl("WaXcoding");
- fServerSock = new ServerSocket();
- SocketAddress sa = new InetSocketAddress("localhost", config.getPort());
- // SocketAddress sa = new InetSocketAddress(localPort);
- fServerSock.bind(sa);
- fKeepAlive = config.getKeepAliveInterval();
- fQueueSize = config.getMaxQueueSize();
- connectionPool = new ObjectPoolImpl("WaXcoding-clientconnections");
- for (int i = 0; i < config.getMaxConnection(); i++) {
- IHTTPProxyConnection obj = new HTTPProxyConnection(this, fQueueSize,
- config.getTimeout());
- connectionPool.add(obj);
- }
- secretManager = config.getSecretManager();
- sessionOverriderFactory = config.getSessionOverriderFactory();
- proxyTranscoderFactory = config.getProxyTranscoderFactory();
- localServerFactory = config.getLocalServerFactory();
- }
-
- public String getSecret(String id, boolean remove) {
- if(null==secretManager){
- return null;
- }
- return secretManager.getSecret(id, remove);
- }
-
- public synchronized int getCurrentServerGroupIndex() {
- return 0;
- }
-
- public void connectionClosed(IClientConnection obj) {
- connectionPool.add(obj);
- }
-
- private boolean exit = false;
-
- private void startProxy() {
- LOGGER.info("Started WaXcoding, Listening port "
- + fServerSock.getLocalPort());
- while (true) {
- Socket sock = null;
- try {
- HTTPProxyConnection connection = (HTTPProxyConnection) connectionPool
- .take(0);
- sock = fServerSock.accept();
- sock.setSoTimeout(1);
- if (exit)
- break;
- if (sock != null) {
- connection.init(ClientStateManager
- .getClientStateManager(this), sock, fKeepAlive,
- getCurrentServerGroupIndex());
- wpc.input(connection);
- }
- } catch (InterruptedException e) {
- if (exit) {
- LOGGER.info("Stopping WaXcoding...");
- break;
- }
- } catch (SocketException e) {
- // this exception is thrown when the socket is closed.
- } catch (Exception e) {
- e.printStackTrace();
- System.out.println(wpc.toString());
- }
- }
- }
-
- private void cleanup() {
- LOGGER.info("...done");
- }
-
- private class ProxyThread extends Thread {
- private boolean threadExit;
-
- public void exit() {
- exit = true;
- synchronized (this) {
- while (!threadExit) {
- this.interrupt();
- try {
- fServerSock.close();
- wait(1000);
- } catch (IOException e) {
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- public void run() {
- startProxy();
- cleanup();
- synchronized (this) {
- threadExit = true;
- notifyAll();
- }
- }
-
- ProxyThread() {
- super("ProxyThread");
- threadExit = false;
- }
- }
-
- private ProxyThread proxyThread;
-
- public void startThread() {
- if (proxyThread != null)
- return;
- proxyThread = new ProxyThread();
- proxyThread.start();
- }
-
- public void stopThread() {
- proxyThread.exit();
- proxyThread = null;
- }
-
- private static final String USAGE_PARAMS = " <localport>";
-
- private static void PRINT_USAGE(String msg) {
- if (msg != null && msg.length() > 0) {
- System.err.println(msg);
- }
- System.err.println("Usage: java " + HTTPProxy.class.getName()
- + USAGE_PARAMS);
- }
-
- public static HTTPProxy newProxy(ProxyConfig config, ExternalProxyConfig externalProxyConfig, String logName,
- InputStream configIS) {
- try {
- Logger.configure(logName, configIS);
- } catch (Exception e) {
- }
- try {
- HTTPProxy proxy = new HTTPProxy(config, externalProxyConfig);
- return proxy;
- } catch (IOException e) {
- return null;
- }
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- if (args.length < 1) {
- PRINT_USAGE(null);
- System.exit(1);
- }
-
- int argsOffset = 0;
-
- int localport = Integer.parseInt(args[argsOffset++]);
-
- ProxyConfig config = new ProxyConfig();
- ExternalProxyConfig externalProxyConfig = new ExternalProxyConfig();
-// WaXcodingConfig waxConfig = WaXcodingConfig.getInstance();
-
- try {
- Logger.configure("HTTPProxy");
- } catch (Exception e) {
- e.printStackTrace();
- // System.exit(1);
- }
-
-// try {
-// waxConfig.setSWFBootloaderFlag(false);
-// final File imposedSWFPath = new File("bridgeSWF/imposed.swf");
-// SWFTranscoder.setSWFTranscodingImposedFile(new FileInputStream(
-// imposedSWFPath));
-// } catch (FileNotFoundException e1) {
-// e1.printStackTrace();
-// System.exit(1);
-// }
-
- try {
- HTTPProxy proxy = new HTTPProxy(config, externalProxyConfig);
- proxy.startProxy();
- } catch (IOException e) {
- System.err.println("Port is in use: " + localport);
- System.exit(1);
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/ProxyConfig.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/ProxyConfig.java
deleted file mode 100644
index bcee189..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/ProxyConfig.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy;
-
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPLocalServerFactory;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyTranscoderFactory;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverriderFactory;
-import org.eclipse.actf.util.httpproxy.proxy.ISecretManager;
-
-
-public class ProxyConfig {
- private int port = 0;
-
- private int maxConnection = 20;
-
- private int timeout = 30000;
-
- private int keepAliveInterval = 1000;
-
- private int maxQueueSize = 100;
-
- private int keepAliveTimeoutWithoutContentLength = 10;
-
- private IHTTPProxyTranscoderFactory proxyTranscoderFactory = null;
-
- private IHTTPSessionOverriderFactory sessionOverriderFactory = null;
-
- private IHTTPLocalServerFactory localServerFactory = null;
-
- private ISecretManager secretManager = null;
-
- public ProxyConfig() {
- }
-
- public int getPort() {
- return port;
- }
-
- public void setPort(int port) {
- this.port = port;
- }
-
- public int getMaxConnection() {
- return maxConnection;
- }
-
- public void setMaxConnection(int maxConnection) {
- this.maxConnection = maxConnection;
- }
-
- public int getTimeout() {
- return timeout;
- }
-
- public void setTimeout(int timeout) {
- this.timeout = timeout;
- }
-
- public int getKeepAliveInterval() {
- return keepAliveInterval;
- }
-
- public int getMaxQueueSize() {
- return maxQueueSize;
- }
-
- public int getKeepAliveTimeoutWithoutContentLength() {
- return keepAliveTimeoutWithoutContentLength;
- }
-
- public IHTTPProxyTranscoderFactory getProxyTranscoderFactory() {
- return proxyTranscoderFactory;
- }
-
- public void setProxyTranscoderFactory(
- IHTTPProxyTranscoderFactory proxyTranscoderFactory) {
- this.proxyTranscoderFactory = proxyTranscoderFactory;
- }
-
- public IHTTPSessionOverriderFactory getSessionOverriderFactory() {
- return sessionOverriderFactory;
- }
-
- public void setSessionOverriderFactory(IHTTPSessionOverriderFactory sessionOverriderFactory) {
- this.sessionOverriderFactory = sessionOverriderFactory;
- }
-
- public IHTTPLocalServerFactory getLocalServerFactory() {
- return localServerFactory;
- }
-
- public void setLocalServerFactory(IHTTPLocalServerFactory localServerFactory) {
- this.localServerFactory = localServerFactory;
- }
-
- public ISecretManager getSecretManager() {
- return secretManager;
- }
-
- public void setSecretManager(ISecretManager secretManager) {
- this.secretManager = secretManager;
- }
-
-
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IClientConnection.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IClientConnection.java
deleted file mode 100644
index 5de413b..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IClientConnection.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core;
-
-import java.io.IOException;
-import java.net.Socket;
-
-import org.eclipse.actf.util.httpproxy.core.impl.ServerConnection;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-public interface IClientConnection {
-
- public abstract void resetConnection();
-
- public abstract String close();
-
- public abstract Socket getClientSocket();
-
- public abstract int getCurrentServerGroupIndex();
-
- public abstract boolean isHandlingRequest();
-
- public abstract void sendResponse(long timeout,
- IHTTPResponseMessage response, boolean readyToHandleRequest)
- throws InterruptedException, IOException, TimeoutException;
-
- public abstract void sendResponse(long timeout, IHTTPResponseMessage response)
- throws InterruptedException, TimeoutException, IOException;
-
- public abstract void sendResponse(IHTTPResponseMessage response)
- throws InterruptedException, IOException;
-
- public abstract void allowTunnel(IHTTPRequestMessage req,
- ServerConnection sc, long timeout) throws InterruptedException,
- TimeoutException, IOException;
-
- public abstract void rejectTunnel(IHTTPRequestMessage req, long timeout)
- throws InterruptedException, TimeoutException, IOException;
-
- /**
- * Continuously read requests from the client and put them into the send
- * queue of the dispatcher.
- */
- public abstract void run();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPHeader.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPHeader.java
deleted file mode 100644
index 0d7991d..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPHeader.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hideki TAI - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-public interface IHTTPHeader {
-
- public static final String METHOD_OPTIONS = "OPTIONS";
- public static final String METHOD_GET = "GET";
- public static final String METHOD_HEAD = "HEAD";
- public static final String METHOD_POST = "POST";
- public static final String METHOD_PUT = "PUT";
- public static final String METHOD_DELETE = "DELETE";
- public static final String METHOD_TRACE = "TRACE";
- public static final String METHOD_CONNECT = "CONNECT";
- public static final String ACCEPT = "Accept";
- public static final String ACCEPT_CHARSET = "Accept-Charset";
- public static final String ACCEPT_LANGUAGE = "Accept-Language";
- public static final String ACCEPT_ENCODING = "Accept-Encoding";
- public static final String AGE = "Age";
- public static final String ALLOW = "Allow";
- public static final String AUTHORIZATION = "Authorization";
- public static final String CACHE_CONTROL = "Cache-Control";
- public static final String CONNECTION = "Connection";
- public static final String CONTENT_ENCODING = "Content-Encoding";
- public static final String CONTENT_LANGUAGE = "Content-Language";
- public static final String CONTENT_LENGTH = "Content-Length";
- public static final String CONTENT_MD5 = "Content-MD5";
- public static final String CONTENT_RANGE = "Content-Range";
- public static final String CONTENT_TYPE = "Content-Type";
- public static final String DATE = "Date";
- public static final String EXPECT = "Expect";
- public static final String EXPIRES = "Expires";
- public static final String FROM = "From";
- public static final String HOST = "Host";
- public static final String IF_MODIFIED_SINCE = "If-Modified-Since";
- public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since";
- public static final String LAST_MODIFIED = "Last-Modified";
- public static final String LOCATION = "Location";
- public static final String MAX_FORWARDS = "Max-Forwards";
- public static final String PRAGMA = "Pragma";
- public static final String PROXY_CONNECTION = "Proxy-Connection";
- public static final String RANGE = "Range";
- public static final String REFERER = "Referer";
- public static final String RETRY_AFTER = "Retry-After";
- public static final String SERVER = "Server";
- public static final byte[] SERVER_A = SERVER.getBytes();
- public static final String TRANSFER_ENCODING = "Transfer-Encoding";
- public static final String UPGRADE = "Upgrade";
- public static final String USER_AGENT = "User-Agent";
- public static final byte[] USER_AGENT_A = USER_AGENT.getBytes();
- public static final String VARY = "Vary";
- public static final String VIA = "Via";
- public static final String WWW_AUTHENTICATE = "WWW-Authenticate";
- public static final String HTTP_VERSION_1_0 = "HTTP/1.0";
- public static final byte[] HTTP_VERSION_1_0_A = HTTP_VERSION_1_0.getBytes();
- public static final String HTTP_VERSION_1_1 = "HTTP/1.1";
- public static final byte[] HTTP_VERSION_1_1_A = HTTP_VERSION_1_1.getBytes();
- public static final String CONTENT_DISPOSITION = "Content-Disposition";
- public static final String COOKIE = "Cookie";
- public static final String SET_COOKIE = "Set-Cookie";
- public static final byte[] CONTENT_LENGTH_A = CONTENT_LENGTH.getBytes();
- public static final byte[] TRANSFER_ENCODING_A = TRANSFER_ENCODING
- .getBytes();
- public static final byte[] CHUNKED_A = "chunked".getBytes();
- public static final byte[] HOST_A = HOST.getBytes();
- public static final byte[] PROXY_CONNECTION_A = PROXY_CONNECTION.getBytes();
- public static final byte[] CONTENT_TYPE_A = CONTENT_TYPE.getBytes();
- public static final byte[] CONNECTION_A = CONNECTION.getBytes();
- public static final byte[] CACHE_CONTROL_A = CACHE_CONTROL.getBytes();
- public static final byte[] EXPIRES_A = EXPIRES.getBytes();
- public static final byte[] PRAGMA_A = PRAGMA.getBytes();
- public static final byte[] REFERER_A = REFERER.getBytes();
- public static final byte[] IF_MODIFIED_SINCE_A = IF_MODIFIED_SINCE
- .getBytes();
- public static final byte[] ACCEPT_ENCODING_A = ACCEPT_ENCODING.getBytes();
-
- public abstract void setRemoved(boolean removed);
-
- public abstract boolean isRemoved();
-
- public abstract boolean isFieldNameEqualsTo(byte[] name);
-
- public abstract boolean isFieldValueEqualsTo(byte[] value);
-
- public abstract byte[] getName();
-
- public abstract byte[] getValue();
-
- public abstract void setValue(byte[] value);
-
- public abstract boolean compareValue(byte[] value);
-
- public abstract boolean compareValueIgnoreCase(byte[] value);
-
- public abstract void writeLine(OutputStream out) throws IOException;
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPMessage.java
deleted file mode 100644
index 4d40b35..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPMessage.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hideki TAI - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.List;
-
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-public interface IHTTPMessage {
-
- public static final int INIT_NUM_HEADERS = 50;
- public static final int DEFAULT_INITIAL_BUFFER_SIZE = 1024;
- public static final char CR = 0x0d;
- public static final char LF = 0x0a;
- public static final char SP = 0x20;
- public static final char HT = 0x09;
-
- public abstract long getSerial();
-
- public abstract String getHTTPVersionAsString();
-
- public abstract byte[] getHTTPVersionAsBytes();
-
- public abstract IMessageBody getMessageBody();
-
- public abstract List<IHTTPHeader> getHeaders();
-
- public abstract IHTTPHeader removeHeader(byte[] name);
-
- public abstract void setHeader(byte[] name, byte[] value);
-
- public abstract void addTrailingHeader(IHTTPHeader trailer);
-
- public abstract IHTTPHeader getHeader(byte[] name);
-
- public abstract byte[] getHeaderAsBytes(byte[] name);
-
- public abstract boolean isChunkedEncoding();
-
- public abstract void setChunkedEncoding(boolean isChunked);
-
- public abstract void setTid(long tid);
-
- public abstract long getTid();
-
- public abstract void writeBody(long timeout, IMessageBody msgBody,
- OutputStream out) throws IOException, TimeoutException;
-
- public abstract void write(long timeout, OutputStream out)
- throws IOException, TimeoutException;
-
- public abstract boolean isHTTPVersion1_1();
-
- public abstract void setConnectionHeader(boolean keepalive);
-
- public abstract boolean isConnectionToBeClosed();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPRequestMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPRequestMessage.java
deleted file mode 100644
index fd6b0fa..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPRequestMessage.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core;
-
-import org.eclipse.actf.util.httpproxy.core.impl.BufferRange;
-
-public interface IHTTPRequestMessage extends IHTTPMessage{
-
- public abstract BufferRange getMethod();
-
- public abstract byte[] getMethodAsBytes();
-
- public abstract String getMethodAsString();
-
- public abstract BufferRange getRequestURI();
-
- public abstract void setRequestURIString(String newRequestURI);
-
- public abstract String getOriginalRequestURIString();
-
- public abstract String getRequestURIString();
-
- public abstract BufferRange getHTTPVersion();
-
- public abstract boolean isMethodEqualsTo(byte[] method);
-
- public abstract boolean isResponseBodyEmpty();
-
- public abstract boolean isConnectionShutdownRequired();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPResponseMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPResponseMessage.java
deleted file mode 100644
index 072342b..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPResponseMessage.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core;
-
-public interface IHTTPResponseMessage extends IHTTPMessage{
-
- public static final byte[] EMPTY_BODY = new byte[0];
-
- public abstract String getStatusCodeAsString();
-
- public abstract byte[] getStatusCodeAsBytes();
-
- public abstract String getReasonPhraseAsString();
-
- public abstract byte[] getReasonPhraseAsBytes();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPResponsePushbackMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPResponsePushbackMessage.java
deleted file mode 100644
index 55eaf78..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IHTTPResponsePushbackMessage.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Shin SAITO - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core;
-
-import java.io.IOException;
-
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-public interface IHTTPResponsePushbackMessage extends IHTTPResponseMessage{
-
- // Caution!!!! Without pushback option, body will be invalidated.
- public abstract byte[] readBody(long timeout, boolean pushback)
- throws IOException, TimeoutException;
-
- public abstract IPushbackMessageBody getPushbackMessageBody();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IMessageBody.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IMessageBody.java
deleted file mode 100644
index da5f604..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IMessageBody.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core;
-
-import java.io.InputStream;
-
-public interface IMessageBody {
-
- /**
- * Returns content length of this message body. If no content length is
- * specified, e.g. when chunked encoding, -1 is returned.
- *
- * return content length, or -1 if no content length is specified.
- */
- public abstract int getContentLength();
-
- public abstract boolean isChunkedEncoding();
-
- public abstract InputStream getMessageBodyTimeoutInputStream();
-
- public abstract InputStream getMessageBodyInputStream();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IPushbackMessageBody.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IPushbackMessageBody.java
deleted file mode 100644
index bf15982..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/IPushbackMessageBody.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Shin SAITO - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core;
-
-import java.io.PushbackInputStream;
-
-public interface IPushbackMessageBody extends IMessageBody{
-
- // Caution!!!! Without pushback option, body will be invalidated.
- public abstract PushbackInputStream getMessageBodyPushBackInputStream();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/BifurcatedOutputStream.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/BifurcatedOutputStream.java
deleted file mode 100644
index 284b033..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/BifurcatedOutputStream.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class BifurcatedOutputStream extends FilterOutputStream {
- private OutputStream o2;
-
- public void close() throws IOException {
- super.close();
- o2.close();
- }
-
- public void flush() throws IOException {
- super.flush();
- o2.flush();
- }
-
- public void write(int b) throws IOException {
- super.write(b);
- o2.write(b);
- }
-
- public BifurcatedOutputStream(OutputStream o1, OutputStream o2) {
- super(o1);
- this.o2 = o2;
- }
-}
-
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/BufferRange.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/BufferRange.java
deleted file mode 100644
index a09e6ba..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/BufferRange.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-public class BufferRange {
- private int fStart;
- private int fLength;
-
- public BufferRange() {
- }
-
- public void reset() {
- fStart = 0;
- fLength = 0;
- }
-
- public void setStart(int start) {
- fStart = start;
- }
-
- public void setLength(int length) {
- fLength = length;
- }
-
- public int getStart() {
- return fStart;
- }
-
- public int getLength() {
- return fLength;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append('[').append(Integer.toString(fStart));
- sb.append(',').append(Integer.toString(fLength));
- sb.append(']');
- return sb.toString();
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ByteBuffer.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ByteBuffer.java
deleted file mode 100644
index 6d49d4b..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ByteBuffer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-public class ByteBuffer {
- private int fIdx;
- private byte[] fBuffer;
-
- public ByteBuffer() {
- fIdx = 0;
- fBuffer = null;
- }
-
- public void init(int bufferSize) {
- fIdx = 0;
- fBuffer = new byte[bufferSize];
- }
-
- public final void add(byte data) {
- if (fIdx >= fBuffer.length) {
- byte[] newBuffer = new byte[fBuffer.length * 2];
- System.arraycopy(fBuffer, 0, newBuffer, 0, fBuffer.length);
- fBuffer = newBuffer;
- }
- fBuffer[fIdx++] = data;
- }
-
- public byte[] close() {
- if (fIdx <= 0) {
- return null;
- }
- byte[] buf = new byte[fIdx];
- System.arraycopy(fBuffer, 0, buf, 0, fIdx);
- return buf;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkDecoder.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkDecoder.java
deleted file mode 100644
index fc45119..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkDecoder.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.SocketTimeoutException;
-
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-public class ChunkDecoder extends FilterInputStream {
- static final Logger LOGGER = Logger.getLogger(ChunkDecoder.class);
-
- public static final char CR = 0x0d;
- public static final char LF = 0x0a;
- public static final char SP = 0x20;
- public static final char HT = 0x09;
- public static final int EOF = -1;
-
- private int fChunkSize = 0;
- private int fNumChunk = 0;
- private int fReadBytes = 0;
- private long fLastReadTime = 0;
- private ChunkListener fChunkListener = null;
-// private OutputStream fReplica = null;
-
- public ChunkDecoder(InputStream in) {
- super(in);
- }
-
- public void setChunkListener(ChunkListener l) {
- if (fChunkListener != null && l != null) {
- throw new IllegalStateException("ChunkListener is already set: " + fChunkListener);
- }
- fChunkListener = l;
- }
-
- public int getChunkSize() {
- if (fReadBytes == 0) {
- throw new IllegalStateException("ChunkSize is unknown");
- }
- return fChunkSize;
- }
-
-// public ChunkDecoder(InputStream in, OutputStream replica) {
-// super(in);
-// fReplica = replica;
-// }
-
- private int getAvailableInput(long timeout) throws IOException, TimeoutException {
- int data;
- while (true) {
- try {
- data = in.read();
-// if (data >= 0 && fReplica != null) {
-// fReplica.write(data);
-// }
- break;
- } catch (SocketTimeoutException e) {
- if (timeout > 0) {
- if (fLastReadTime == 0) {
- fLastReadTime = System.currentTimeMillis();
- }
- if (System.currentTimeMillis() - fLastReadTime > timeout) {
- fLastReadTime = System.currentTimeMillis();
- throw new TimeoutException("HTTPReader.getAvailableInput");
- }
- }
- }
- }
- fLastReadTime = System.currentTimeMillis();
- return data;
-/*
- if (timeout > 0) {
- int available;
- while ((available = in.available()) <= 0) {
- if (available < 0) {
- return EOF;
- }
- // available == 0
- if (fLastReadTime == 0) {
- fLastReadTime = System.currentTimeMillis();
- } else {
- if (System.currentTimeMillis() - fLastReadTime > timeout) {
- fLastReadTime = System.currentTimeMillis();
- throw new TimeoutException("HTTPReader.getAvailableInput");
- } else {
- try {
- Thread.sleep(1);
- } catch (InterruptedException e) {
- // ignore
- }
- }
- }
- }
- }
- data = in.read();
- fLastReadTime = System.currentTimeMillis();
- return data;
-*/
- }
-
- private int getAvailableInput(long timeout, byte b[], int off, int len) throws IOException, TimeoutException {
- if (len <= 0) {
- return 0;
- }
- int available;
- int nread = 0;
- while ((available = in.available()) <= 0) {
- if (available < 0) {
- return EOF;
- }
- // available == 0
- try {
- int data = in.read();
- b[off++] = (byte) data;
- nread = 1;
- len -= 1;
- available = in.available();
- break;
- } catch (SocketTimeoutException e) {
- if (timeout > 0) {
- if (fLastReadTime == 0) {
- fLastReadTime = System.currentTimeMillis();
- }
- if (System.currentTimeMillis() - fLastReadTime > timeout) {
- fLastReadTime = System.currentTimeMillis();
- throw new TimeoutException();
- }
- }
- }
- }
- if (available == 0) {
- return nread;
- }
- if (len > available) {
- len = available;
- }
- int read = in.read(b, off, len);
- fLastReadTime = System.currentTimeMillis();
- return read + nread;
- }
-
- private String readChunkSizeLine(long timeout) throws IOException, TimeoutException {
- int data = getAvailableInput(timeout);
- if (data == EOF) {
- return null;
- }
- boolean cr = false;
- boolean crlf = false;
- StringBuffer token = new StringBuffer();
- while (data != EOF) {
- switch (data) {
- case CR:
- cr = true;
- break;
- case LF:
- if (cr) {
- crlf = true;
- break;
- }
- case ';':
- case SP:
- case HT:
- cr = false;
- break;
- default:
- cr = false;
- token.append((char) data);
- }
- if (crlf) {
- if (token.length() > 0) {
- break;
- }
- cr = false;
- crlf = false;
- }
- data = getAvailableInput(timeout);
- }
- return token.toString();
- }
-
- // 1*(HEX) CR LF
- private void readChunkSize(long timeout) throws IOException, TimeoutException {
- String token = readChunkSizeLine(timeout);
- fNumChunk += 1;
- //String token = readNextToken(timeout, out);
- if (token == null || token.length() == 0) {
- fChunkSize = EOF;
- } else {
- token = token.trim();
- try {
- fChunkSize = Integer.parseInt(token, 16); // Parse a HEX number
- if (fChunkListener != null) {
- fChunkListener.newChankRead(fNumChunk, fChunkSize);
- }
- } catch (NumberFormatException e) {
- fChunkSize = -1;
- throw new IOException("Invalid chunk size line: '" + token + "'");
- }
- }
- }
-
- public int read(long timeout) throws IOException, TimeoutException {
- if (fReadBytes == fChunkSize) {
- fReadBytes = 0;
- readChunkSize(timeout);
- }
- if (fChunkSize == EOF || fChunkSize == 0) {
- fChunkSize = EOF;
- return EOF;
- }
- int data = getAvailableInput(timeout);
- fReadBytes += 1;
- return data;
- }
-
- public int read() throws IOException {
- try {
- return read(0);
- } catch (TimeoutException e) {
- throw new RuntimeException("Impossible exception");
- }
- }
-
- public int read(long timeout, byte b[], int off, int len) throws IOException, TimeoutException {
- if (fReadBytes == fChunkSize) {
- fReadBytes = 0;
- readChunkSize(timeout);
- }
- if (fChunkSize == EOF || fChunkSize == 0) {
- fChunkSize = EOF;
- return EOF;
- }
- int max = fChunkSize - fReadBytes;
- if (len > max) {
- len = max;
- }
- int read = getAvailableInput(timeout, b, off, len);
- fReadBytes += read;
- return read;
- }
-
- public int read(byte b[], int off, int len) throws IOException {
- try {
- return read(0, b, off, len);
- } catch (TimeoutException e) {
- throw new RuntimeException("Impossible exception");
- }
- }
-
- public void close() throws IOException {
- in.close();
- }
-
- public int available() throws IOException {
- int available = in.available();
- if (available <= 0) {
- return available;
- }
- // available > 0
- if (fReadBytes == fChunkSize) {
- fReadBytes = 0;
- try {
- readChunkSize(1);
- } catch (TimeoutException e) {
- return 0;
- }
- }
- // fReadBytes < fChunkSize
- if (fChunkSize == EOF || fChunkSize == 0) {
- fChunkSize = EOF;
- return 0;
- }
- available = in.available();
- int left = fChunkSize - fReadBytes;
- return (available < left) ? available : left;
- }
-
- public long skip(long n) throws IOException {
- for (long i = 0; i < n; i++) {
- int data = this.read();
- if (data < 0) {
- return i;
- }
- }
- return n;
- }
-
- public synchronized void mark(int readlimit) {
- // nop
- }
-
- public synchronized void reset() throws IOException {
- // nop
- }
-
- public boolean markSupported() {
- return false;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkEncoder.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkEncoder.java
deleted file mode 100644
index 78b1eb7..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkEncoder.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.eclipse.actf.util.httpproxy.util.Logger;
-
-
-public class ChunkEncoder extends FilterOutputStream {
- static final Logger LOGGER = Logger.getLogger(ChunkEncoder.class);
- public static final int DEFAULT_CHUNK_SIZE = 1024;
-
- private int fMaxChunkSize;
- private byte[] fChunkBuffer;
- private int fChunkSize;
-
- public ChunkEncoder(OutputStream out) {
- this(out, DEFAULT_CHUNK_SIZE);
- }
-
- public ChunkEncoder(OutputStream out, int maxChunkSize) {
- super(out);
- fMaxChunkSize = maxChunkSize;
- fChunkSize = 0;
- fChunkBuffer = new byte[maxChunkSize];
- }
-
- public void setMaxChunkSize(int maxChunkSize) throws IOException {
- if (fMaxChunkSize == maxChunkSize) {
- return;
- }
- if (fChunkSize > 0) {
- flushChunk();
- }
- fMaxChunkSize = maxChunkSize;
- fChunkBuffer = new byte[maxChunkSize];
- }
-
- public void write(int b) throws IOException {
- fChunkBuffer[fChunkSize++] = (byte) b;
- if (fChunkSize == fMaxChunkSize) {
- flushChunk();
- }
- }
-
- public void flush() throws IOException {
- flushChunk();
- out.flush();
- }
-
- public void close() throws IOException {
- flushChunk();
- out.write('0');
- out.write(HTTPReader.CR);
- out.write(HTTPReader.LF);
- out.write(HTTPReader.CR);
- out.write(HTTPReader.LF);
- out.close();
- }
-
- private void flushChunk() throws IOException {
- if (fChunkSize > 0) {
- byte[] size = Integer.toHexString(fChunkSize).getBytes();
- out.write(size);
- out.write(HTTPReader.CR);
- out.write(HTTPReader.LF);
- out.write(fChunkBuffer, 0, fChunkSize);
- out.write(HTTPReader.CR);
- out.write(HTTPReader.LF);
- fChunkSize = 0;
- }
- }
-
- public static void main(String[] args) throws Exception {
- ByteArrayOutputStream buf = new ByteArrayOutputStream();
- ChunkEncoder encoder = new ChunkEncoder(buf, 10);
- final int size = 39;
- for (int i = 0; i < size; i++) {
- int b = i & 0xff;
- encoder.write(b);
- }
- encoder.close();
-
- byte[] a = buf.toByteArray();
- for (int i = 0; i < a.length; i++) {
- int b = a[i];
- StringBuffer sb = new StringBuffer();
- sb.append('[');
- sb.append(Integer.toString(i));
- sb.append("] ");
- //sb.append("0x").append(Integer.toString(b >> 8, 16)).append(Integer.toString(b & 0xf, 16));
- sb.append(Integer.toString(b));
- if (Character.isLetterOrDigit((char) b)) {
- sb.append(" '").append((char) b).append('\'');
- }
- String line = sb.toString();
- System.out.println(line);
- }
-
- System.out.println();
- ChunkDecoder decoder = new ChunkDecoder(new ByteArrayInputStream(a));
- for (int i = 0; true; i++) {
- int b = decoder.read();
- if (b < 0) {
- break;
- }
- StringBuffer sb = new StringBuffer();
- sb.append('[');
- sb.append(Integer.toString(i));
- sb.append("] ");
- sb.append(Integer.toString(b));
- String line = sb.toString();
- System.out.println(line);
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkListener.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkListener.java
deleted file mode 100644
index 25b86ef..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkListener.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-public interface ChunkListener {
- void newChankRead(int n, int size);
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkedMessageBodyReader.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkedMessageBodyReader.java
deleted file mode 100644
index 6b0fe61..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ChunkedMessageBodyReader.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-public class ChunkedMessageBodyReader extends HTTPReader {
- static final Logger LOGGER = Logger.getLogger(ChunkedMessageBodyReader.class);
-
- public ChunkedMessageBodyReader(InputStream in) {
- super(in);
- }
-
- public int readChunkedMessage(long timeout, OutputStream out, HTTPMessage msg) throws IOException, TimeoutException {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("readChunkedMessage: timeout=" + timeout);
- }
- int totalChunkSize = readChunkedMessageBody(timeout, out);
-
- HTTPMessageBuffer buf = msg.getBuffer();
- HeaderInBuffer header = readHeader(timeout, buf);
- while (header != null) {
- msg.addTrailingHeader(header);
- header = readHeader(timeout, buf);
- }
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("readChunkedMessage: totalChunkSize=" + totalChunkSize);
- }
- return totalChunkSize;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ClientConnection.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ClientConnection.java
deleted file mode 100644
index 9e871ed..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ClientConnection.java
+++ /dev/null
@@ -1,513 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-
-import org.eclipse.actf.util.httpproxy.core.IClientConnection;
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-
-
-public abstract class ClientConnection implements Runnable, IClientConnection {
- private static final Logger LOGGER = Logger.getLogger(ClientConnection.class);
-
- private final ClientConnectionListener clientConnectionListener;
-
- private final int fQueueSize;
-
- // private final AsyncWorkManager fDispatchWorkMan;
-
- private long fKeepAlive;
-
- private Socket fClientSocket;
-
- private InputStream fClientIn;
-
- private BufferedOutputStream fClientOut;
-
- private HTTPRequestReader fReader;
-
- private RequestDispatcher fDispatcher;
-
- private long fLastReadTime = 0;
-
- private long fMessageSerial = 0;
-
- private boolean isHandlingRequest;
-
- private String connectionName;
-
- protected void setConnectionName(String name) {
- this.connectionName = name;
- }
-
- protected int getQueueSize() {
- return fQueueSize;
- }
-
- protected ClientConnection(ClientConnectionListener clientConnectionListener, int queueSize) {
- this.clientConnectionListener = clientConnectionListener;
- fQueueSize = queueSize;
- // fDispatchWorkMan = dispatchWorkMan;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#resetConnection()
- */
- public void resetConnection() {
- try {
- if (fClientSocket != null) {
- if (fClientIn != null) {
- fClientIn.close();
- }
- if (fClientOut != null) {
- fClientOut.close();
- }
- if (!fClientSocket.isClosed()) {
- fClientSocket.setSoLinger(true, 0);
- fClientSocket.close();
- }
- fClientSocket = null;
- }
- } catch (IOException ex) {
- WARNING("Failed to shut down a client output connection (IOException): " + ex.getMessage());
- ex.printStackTrace();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#close()
- */
- public String close() {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Shutdown a client socket: lastReadTime=" + fLastReadTime);
- }
- if (fDispatcher != null) {
- fDispatcher.close();
- }
- if (fClientSocket != null) {
- try {
- fClientSocket.shutdownInput();
- if (fClientIn != null) {
- fClientIn.close();
- }
- } catch (IOException ex) {
- WARNING("Failed to close a client connection (IOException): " + ex.getMessage());
- }
- }
-
- String cNameTmp = connectionName;
- connectionName = null;
- fClientSocket = null;
- fClientOut = null;
- fReader = null;
- fDispatcher = null;
- // System.out.println("CLOSE");
- clientConnectionListener.connectionClosed(this);
- return cNameTmp;
- }
-
- protected void initInternal(Socket clientSock, long keepAlive, int timeout, RequestDispatcher dispatcher)
- throws IOException {
- fClientSocket = clientSock;
- fClientSocket.setSoTimeout(timeout);
- fClientIn = clientSock.getInputStream();
- fClientOut = new BufferedOutputStream(new SocketTimeoutRetryOutputStream(clientSock.getOutputStream()));
- fKeepAlive = keepAlive;
- fReader = dispatcher.createHTTPRequestReader(fClientIn);
- isHandlingRequest = false;
- fDispatcher = dispatcher;
- fDispatcher.start();
- DEBUG("Initialized");
- }
-
- protected HTTPRequestMessage createHTTPRequestMessage(long msgSerial) {
- return new HTTPRequestMessage(msgSerial);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#getClientSocket()
- */
- public Socket getClientSocket() {
- return fClientSocket;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#getCurrentServerGroupIndex()
- */
- public int getCurrentServerGroupIndex() {
- return clientConnectionListener.getCurrentServerGroupIndex();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#isHandlingRequest()
- */
- public synchronized boolean isHandlingRequest() {
- return isHandlingRequest;
- }
-
- private synchronized void setHandlingRequest(boolean b) {
- isHandlingRequest = b;
- if (!isHandlingRequest) {
- this.notify();
- }
- }
-
- private synchronized void waitHandlingRequestFinish() throws InterruptedException {
- while (isHandlingRequest) {
- this.wait();
- }
- }
-
- protected void requestReceived(IHTTPRequestMessage request) {
- // nop
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#sendResponse(long, org.eclipse.actf.util.httpproxy.core.HTTPResponseMessage, boolean)
- */
- public void sendResponse(long timeout, IHTTPResponseMessage response, boolean readyToHandleRequest)
- throws InterruptedException, IOException, TimeoutException
- {
- if (fClientOut == null) return;
-
- if (!isHandlingRequest()) {
- System.err.println("*****INVALID STATE: response=" + response);
- System.exit(-1);
- return;
- }
- try {
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append("Send a response to the client: serial=").append(response.getSerial());
- sb.append(", tid=").append(response.getTid());
- DEBUG(sb.toString());
- }
-
- // System.out.println(new String(response.getMessageBody()));
- // response.writeHeaders(System.out);
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append("Response arrived: tid=").append(response.getTid());
- sb.append(", msgSerial=").append(response.getSerial());
- sb.append("\n_______________________________________________________\n");
- try {
- ByteArrayOutputStream ob = new ByteArrayOutputStream();
- BifurcatedOutputStream o = new BifurcatedOutputStream(fClientOut, ob);
- response.write(timeout, o);
- ob.close();
- sb.append(ob.toString());
- } catch (Exception e) {
- // nop
- }
- sb.append("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
- DEBUG(sb.toString());
- } else {
- response.write(timeout, fClientOut);
- }
- fClientOut.flush();
- if (response.isConnectionToBeClosed()) {
- fClientSocket.shutdownOutput();
- throw new InterruptedException("This connection is no longer available.");
- }
-/*
- } catch (IOException e) {
- StringBuffer sb = new StringBuffer();
- sb.append("Failed to send a response to the client (IOException) : tid=");
- sb.append(response.getTid());
- sb.append(", message=").append(e.getMessage());
- LOGGER.warning(sb.toString());
-*/
- } finally {
- assert isHandlingRequest();
- if (readyToHandleRequest) {
- setHandlingRequest(false);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#sendResponse(long, org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage)
- */
- public void sendResponse(long timeout, IHTTPResponseMessage response)
- throws InterruptedException, TimeoutException, IOException
- {
- sendResponse(timeout, response, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#sendResponse(org.eclipse.actf.util.httpproxy.core.HTTPResponseInMemoryMessage)
- */
- public void sendResponse(IHTTPResponseMessage response)
- throws InterruptedException, IOException
- {
- try {
- sendResponse(0, response);
- } catch (TimeoutException e) {
- throw new IOException("Timeout: " + e.getMessage());
- }
- }
-
- private class TunnelThread extends Thread {
- private byte[] buffer;
-
- private static final int DEFUALT_TUNNEL_BUFFER_SIZE = 1024;
-
- private InputStream is;
-
- private OutputStream os;
-
- private boolean exited;
-
- synchronized private void exit() {
- exited = true;
- notifyAll();
- }
-
- synchronized public void waitExit() {
- while (true) {
- try {
- wait();
- if (exited) {
- return;
- }
- } catch (InterruptedException e) {
- }
- }
- }
-
- public void run() {
- try {
- while (true) {
- try {
- int size = is.available();
- if (size < 0) {
- break;
- }
- if (size > buffer.length) {
- buffer = new byte[size];
- }
- size = is.read(buffer);
- if (size < 0) {
- break;
- }
- if (LOGGER.isDebugEnabled()) {
- DEBUG("----TUNNEL--->\n"
- + ((size > 0) ? new String(buffer, 0, size) : "")
- +"\n----TUNNEL--->\n");
- }
- os.write(buffer, 0, size);
- os.flush();
- } catch (IOException e) {
- break;
- }
- }
- } finally {
- try {
- is.close();
- os.close();
- } catch (IOException e) {
- }
- exit();
- }
- }
-
- TunnelThread(InputStream is, OutputStream os) {
- this.is = is;
- this.os = os;
- this.buffer = new byte[DEFUALT_TUNNEL_BUFFER_SIZE];
- this.exited = false;
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#allowTunnel(org.eclipse.actf.util.httpproxy.core.HTTPRequestMessage, org.eclipse.actf.util.httpproxy.core.ServerConnection, long)
- */
- public void allowTunnel(IHTTPRequestMessage req, ServerConnection sc, long timeout) throws InterruptedException, TimeoutException, IOException {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("CONNECT to " + sc.toString());
- }
- try {
- sendResponse(timeout,
- new HTTPResponseInMemoryMessage(req.getSerial(),
- IHTTPHeader.HTTP_VERSION_1_0_A,
- "200".getBytes(),
- "OK".getBytes(),
- IHTTPResponseMessage.EMPTY_BODY),
- false);
- TunnelThread c2s = new TunnelThread(fClientIn, sc.getOutputStream());
- TunnelThread s2c = new TunnelThread(sc.getInputStream(), fClientOut);
- DEBUG("Tunnel is started.");
- c2s.start();
- s2c.start();
- c2s.waitExit();
- s2c.waitExit();
- DEBUG("Tunnel is finished.");
- } finally {
- setHandlingRequest(false);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#rejectTunnel(org.eclipse.actf.util.httpproxy.core.HTTPRequestMessage, long)
- */
- public void rejectTunnel(IHTTPRequestMessage req, long timeout) throws InterruptedException, TimeoutException, IOException {
- sendResponse(timeout,
- new HTTPResponseInMemoryMessage(req.getSerial(),
- IHTTPHeader.HTTP_VERSION_1_0_A,
- "405".getBytes(),
- "Method Not Allowed".getBytes(),
- IHTTPResponseMessage.EMPTY_BODY));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IClientConnection#run()
- */
- public void run() {
- DEBUG("Reader thread started");
- String cNameTmp;
- try {
- fLastReadTime = System.currentTimeMillis();
-
- setHandlingRequest(false);
- HTTPRequestMessage receivedRequest = null;
- long timeout = fKeepAlive;
- do {
- waitHandlingRequestFinish();
-
- // Read next request
- if (receivedRequest == null) {
- try {
- setHandlingRequest(true);
- long msgSerial = fMessageSerial + 1;
- if (msgSerial == 0) {
- fMessageSerial = 1;
- }
- receivedRequest = createHTTPRequestMessage(msgSerial);
- if (timeout > 0) {
- DEBUG("read w/ timeout: " + timeout);
- fReader.readMessage(receivedRequest, timeout, false);
- } else {
- DEBUG("read w/o timeout");
- fReader.readMessage(receivedRequest, false);
- }
- fLastReadTime = System.currentTimeMillis();
- timeout = fKeepAlive;
- requestReceived(receivedRequest);
- // receivedRequest.setTid(fTidGen.getID());
- fMessageSerial = msgSerial;
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append("Read a request: ").append(connectionName);
- sb.append(", serial=").append(receivedRequest.getSerial());
- sb.append(", tid=").append(receivedRequest.getTid());
- DEBUG(sb.toString());
- }
- // receivedRequest.writeHeaders(System.out);
- } catch (TimeoutException e) {
- setHandlingRequest(false);
- receivedRequest = null;
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append("Request reading timeout: lastReadTime=").append(fLastReadTime);
- sb.append(", elapsed=").append(System.currentTimeMillis() - fLastReadTime);
- DEBUG(sb.toString());
- }
- }
- }
-
- // Send a request to a server
- if (receivedRequest != null) {
- try {
- fDispatcher.putRequest(receivedRequest, 10);
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append("Sent a request: serial=").append(receivedRequest.getSerial());
- sb.append(", tid=").append(receivedRequest.getTid());
- DEBUG(sb.toString());
- }
- receivedRequest = null;
- } catch (InterruptedException e) {
- // ignore, try again in the next loop
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append("Thread interrupted (Dispatcher.putRequest): serial=").append(
- receivedRequest.getSerial());
- DEBUG(sb.toString());
- }
- } catch (TimeoutException e) {
- // ignore, try again in the next loop
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append("Queue overflow (Dispatcher.putRequest): serial=").append(
- receivedRequest.getSerial());
- DEBUG(sb.toString());
- }
- }
- }
- } while (isHandlingRequest() || System.currentTimeMillis() - fLastReadTime < fKeepAlive);
- // WARNING("ZZZZ FINISHING: isHandlingRequest=" +
- // isHandlingRequest);
- } catch (InterruptedException interrupted) {
- // nop
- // WARNING("Interrupted");
- } catch (HTTPConnectionException e) {
- DEBUG("The connection is closed by the peer.");
- } catch (IOException ioe) {
- // Exception from the InputStream
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Client connection is lost: " + ioe.getMessage());
- ioe.printStackTrace();
- }
- } finally {
- cNameTmp = close();
- }
- DEBUG(cNameTmp, "Reader thread stopped");
- }
-
- private void DEBUG(String name, String msg) {
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append(name).append(": ");
- sb.append(msg);
- LOGGER.debug(sb.toString());
- }
- }
-
- private final void DEBUG(String msg) {
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append(connectionName).append(": ");
- sb.append(msg);
- LOGGER.debug(sb.toString());
- }
- }
-
- private final void WARNING(String msg) {
- StringBuffer sb = new StringBuffer();
- sb.append(connectionName).append(": ");
- sb.append(msg);
- LOGGER.warning(sb.toString());
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ClientConnectionListener.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ClientConnectionListener.java
deleted file mode 100644
index 966aaf5..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ClientConnectionListener.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import org.eclipse.actf.util.httpproxy.core.IClientConnection;
-
-
-public interface ClientConnectionListener {
- void connectionClosed(IClientConnection con);
- int getCurrentServerGroupIndex();
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/FixedSizeQueue.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/FixedSizeQueue.java
deleted file mode 100644
index c5c6e58..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/FixedSizeQueue.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.util.Comparator;
-
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-public class FixedSizeQueue {
- private Object[] fQueue;
- private int fSize;
- private int fNextIndex = 0;
- private int fMinIndex = 0;
-
- public FixedSizeQueue(int queueSize) {
- fQueue = new Object[queueSize];
- fSize = queueSize;
- }
-
- public int getQueueSize() {
- return fSize;
- }
-
- public synchronized void clear() {
- if (fMinIndex != fNextIndex) {
- do {
- fQueue[fMinIndex++] = null;
- if (fMinIndex > fSize) {
- fMinIndex = 0;
- }
- } while (fMinIndex != fNextIndex);
- }
- fNextIndex = 0;
- fMinIndex = 0;
- fQueue[0] = null;
- }
-
- public synchronized boolean isEmpty() {
- return (fNextIndex == fMinIndex);
- }
-
- public synchronized int getSize() {
- int d = fNextIndex - fMinIndex;
- return (d >= 0) ? d : d + fSize;
- }
-
- public synchronized void put(Object obj) throws InterruptedException {
- if (obj == null) {
- throw new IllegalArgumentException("null");
- }
- while (fQueue[fNextIndex] != null) {
- this.wait();
- }
- fQueue[fNextIndex++] = obj;
- if (fNextIndex >= fSize) {
- fNextIndex = 0;
- }
- this.notifyAll();
- }
-
- public synchronized void put(Object obj, long timeout) throws TimeoutException, InterruptedException {
- if (timeout == 0) {
- put(obj);
- } else {
- if (obj == null) {
- throw new IllegalArgumentException("null");
- }
- if (fQueue[fNextIndex] != null) {
- long t0 = System.currentTimeMillis();
- long wait = timeout;
- boolean timedout = true;
- do {
- this.wait(wait);
- if (fQueue[fNextIndex] == null) {
- timedout = false;
- break;
- }
- long elapsed = System.currentTimeMillis() - t0;
- wait = timeout - elapsed;
- } while (wait > 0);
- if (timedout) {
- throw new TimeoutException("FixedSizeQueue.put");
- }
- }
- fQueue[fNextIndex++] = obj;
- if (fNextIndex >= fSize) {
- fNextIndex = 0;
- }
- this.notifyAll();
- }
- }
-
- public synchronized Object remove() throws InterruptedException {
- Object req;
- while ((req = fQueue[fMinIndex]) == null) {
- this.wait();
- }
- fQueue[fMinIndex++] = null;
- if (fMinIndex >= fSize) {
- fMinIndex = 0;
- }
- this.notifyAll();
- return req;
- }
-
- public synchronized Object remove(long timeout) throws TimeoutException, InterruptedException {
- Object req = fQueue[fMinIndex];
- if (req == null) {
- long t0 = System.currentTimeMillis();
- long wait = timeout;
- do {
- this.wait(wait);
- if ((req = fQueue[fMinIndex]) != null) {
- break;
- }
- long elapsed = System.currentTimeMillis() - t0;
- wait = timeout - elapsed;
- } while (wait > 0);
- if (req == null) {
- throw new TimeoutException("FixedSizeQueue.remove");
- }
- }
- fQueue[fMinIndex++] = null;
- if (fMinIndex >= fSize) {
- fMinIndex = 0;
- }
- this.notifyAll();
- return req;
- }
-
- public synchronized Object nonBlockingRemove() {
- Object req = fQueue[fMinIndex];
- if (req != null) {
- fQueue[fMinIndex++] = null;
- if (fMinIndex >= fSize) {
- fMinIndex = 0;
- }
- this.notifyAll();
- }
- return req;
- }
-
- public synchronized Object matchAndRemove(Object o, Comparator comparator) {
- if (o == null) {
- throw new IllegalArgumentException();
- }
- Object req = fQueue[fMinIndex];
- if (req == null) {
- return null;
- }
- if (comparator.compare(o, req) == 0) {
- fQueue[fMinIndex++] = null;
- if (fMinIndex >= fSize) {
- fMinIndex = 0;
- }
- this.notifyAll();
- return req;
- } else {
- return null;
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPConnectionException.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPConnectionException.java
deleted file mode 100644
index e316c2c..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPConnectionException.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-
-public class HTTPConnectionException extends IOException {
- private static final long serialVersionUID = 6151717323077488641L;
-
- public HTTPConnectionException(String message) {
- super(message);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPHeader.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPHeader.java
deleted file mode 100644
index 68894f2..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPHeader.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-
-public abstract class HTTPHeader implements IHTTPHeader {
- public static byte toUpcase(byte b) {
- if ((b >= 'a') && (b <= 'z')) {
- return (byte) (b - ('a' - 'A'));
- }
- return b;
- }
-
- public static boolean compare(byte[] v1, byte[] v2) {
- int len = v1.length;
- if (len != v2.length) {
- return false;
- }
- for (int i = len - 1; i >= 0; i--) {
- if (v1[i] != v2[i]) {
- return false;
- }
- }
- return true;
- }
-
- public static boolean compareIgnoreCase(byte[] v1, byte[] v2) {
- int len = v1.length;
- if (len != v2.length) {
- return false;
- }
- for (int i = len - 1; i >= 0; i--) {
- if (HTTPHeader.toUpcase(v1[i]) != HTTPHeader.toUpcase(v2[i])) {
- return false;
- }
- }
- return true;
- }
-
- private boolean isRemoved = false;
-
- protected HTTPHeader() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPHeader#setRemoved(boolean)
- */
- public void setRemoved(boolean removed) {
- isRemoved = removed;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPHeader#isRemoved()
- */
- public boolean isRemoved() {
- return isRemoved;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPHeader#isFieldNameEqualsTo(byte[])
- */
- public abstract boolean isFieldNameEqualsTo(byte[] name);
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPHeader#isFieldValueEqualsTo(byte[])
- */
- public abstract boolean isFieldValueEqualsTo(byte[] value);
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPHeader#getName()
- */
- public abstract byte[] getName();
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPHeader#getValue()
- */
- public abstract byte[] getValue();
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPHeader#setValue(byte[])
- */
- public abstract void setValue(byte[] value);
-
- protected abstract void write(OutputStream out) throws IOException;
-
- protected void writeHeaderSeparator(OutputStream out) throws IOException {
- out.write(':');
- out.write(HTTPReader.SP);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPHeader#compareValue(byte[])
- */
- public boolean compareValue(byte[] value) {
- return compare(getValue(), value);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPHeader#compareValueIgnoreCase(byte[])
- */
- public boolean compareValueIgnoreCase(byte[] value) {
- return compareIgnoreCase(getValue(), value);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPHeader#writeLine(java.io.OutputStream)
- */
- public void writeLine(OutputStream out) throws IOException {
- if (!isRemoved) {
- write(out);
- out.write(HTTPReader.CR);
- out.write(HTTPReader.LF);
- }
- }
-
- public String toString() {
- return "Header:" + new String(getName()) + ":" + new String(getValue());
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMalformedResponseMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMalformedResponseMessage.java
deleted file mode 100644
index 721d373..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMalformedResponseMessage.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-
-public class HTTPMalformedResponseMessage extends HTTPResponseMessage {
- private IOException exception;
-
- public IOException getIOException() {
- return exception;
- }
-
- HTTPMalformedResponseMessage(long serial, IOException exception) {
- super(serial);
- this.exception = exception;
- }
-
- public String getHTTPVersionAsString() {
- return null;
- }
-
- public byte[] getHTTPVersionAsBytes() {
- return null;
- }
-
- public String getStatusCodeAsString() {
- return null;
- }
-
- public byte[] getStatusCodeAsBytes() {
- return null;
- }
-
- public String getReasonPhraseAsString() {
- return null;
- }
-
- public byte[] getReasonPhraseAsBytes() {
- return null;
- }
-
- protected void writeFirstLine(OutputStream out) throws IOException {
- throw new IOException("HTTPMalformedResponseMessage cannot be output.");
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMessage.java
deleted file mode 100644
index a963ed2..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMessage.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hideki TAI - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IHTTPMessage;
-import org.eclipse.actf.util.httpproxy.core.IMessageBody;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-public abstract class HTTPMessage implements IHTTPMessage {
- static final Logger LOGGER = Logger.getLogger(HTTPMessage.class);
-
- private transient long fSerial;
- private HTTPMessageBuffer fBuffer;
- private IMessageBody fOriginalMessageBody;
- private IMessageBody fTransformedMessageBody = null;
- private List<IHTTPHeader> fHeaders = new ArrayList<IHTTPHeader>(
- INIT_NUM_HEADERS);
- private List<IHTTPHeader> fTrailingHeaders;
- private boolean isChunkedEncoding = false;
-
- private long fTid = 0;
-
- public HTTPMessage(long serial) {
- this(serial, DEFAULT_INITIAL_BUFFER_SIZE);
- }
-
- public HTTPMessage(long serial, int initBufferSize) {
- fSerial = serial;
- fBuffer = new HTTPMessageBuffer(initBufferSize);
- fOriginalMessageBody = null;
- }
-
- protected HTTPMessage(long serial, byte[] body) {
- fSerial = serial;
- fBuffer = new HTTPMessageBuffer();
- setOriginalMessageBody(new MessageBody(new ByteArrayInputStream(body),
- body.length));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#getSerial()
- */
- public long getSerial() {
- return fSerial;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#getHTTPVersionAsString()
- */
- public abstract String getHTTPVersionAsString();
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#getHTTPVersionAsBytes()
- */
- public abstract byte[] getHTTPVersionAsBytes();
-
- protected abstract boolean isBodyEmpty();
-
- final void setOriginalMessageBody(IMessageBody msgBody) {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("setOriginalMessageBody: " + msgBody);
- }
- updateContentLengthHeader(msgBody);
- fOriginalMessageBody = msgBody;
- }
-
- final void updateContentLengthHeader(IMessageBody msgBody) {
- int oldContentLength = (fOriginalMessageBody == null) ? -1
- : fOriginalMessageBody.getContentLength();
- int contentLength = (msgBody == null) ? -1 : msgBody.getContentLength();
- if (contentLength >= 0) {
- setHeader(IHTTPHeader.CONTENT_LENGTH_A, Integer.toString(
- contentLength).getBytes());
- } else if (oldContentLength >= 0) {
- removeHeader(IHTTPHeader.CONTENT_LENGTH_A);
- }
- }
-
- protected IMessageBody getOriginalMessageBody() {
- return fOriginalMessageBody;
- }
-
- protected IMessageBody getTransformedMessageBody() {
- return fTransformedMessageBody;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#getMessageBody()
- */
- public IMessageBody getMessageBody() {
- return (fTransformedMessageBody != null) ? fTransformedMessageBody
- : fOriginalMessageBody;
- }
-
- protected abstract void writeFirstLine(OutputStream out) throws IOException;
-
- protected HTTPMessageBuffer getBuffer() {
- return fBuffer;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#getHeaders()
- */
- public final List<IHTTPHeader> getHeaders() {
- return fHeaders;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#removeHeader(byte[])
- */
- public final IHTTPHeader removeHeader(byte[] name) {
- for (IHTTPHeader h : fHeaders) {
- if (!h.isRemoved() && h.isFieldNameEqualsTo(name)) {
- h.setRemoved(true);
- return h;
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#setHeader(byte[],
- * byte[])
- */
- public final void setHeader(byte[] name, byte[] value) {
- HeaderToAdd header = new HeaderToAdd();
- header.init(name, value);
- removeHeader(name);
- fHeaders.add(header);
- }
-
- final void addHeader(HeaderInBuffer header) {
- fHeaders.add(header);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#addTrailingHeader(org.eclipse.actf.util.httpproxy.core.IHTTPHeader)
- */
- public final void addTrailingHeader(IHTTPHeader trailer) {
- if (fTrailingHeaders == null) {
- fTrailingHeaders = new ArrayList<IHTTPHeader>(INIT_NUM_HEADERS);
- }
- fTrailingHeaders.add(trailer);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#getHeader(byte[])
- */
- public final IHTTPHeader getHeader(byte[] name) {
- for (IHTTPHeader header : fHeaders) {
- if (header.isFieldNameEqualsTo(name)) {
- return header;
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#getHeaderAsBytes(byte[])
- */
- public final byte[] getHeaderAsBytes(byte[] name) {
- IHTTPHeader header = getHeader(name);
- return (header == null) ? null : header.getValue();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#isChunkedEncoding()
- */
- public final boolean isChunkedEncoding() {
- return isChunkedEncoding;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#setChunkedEncoding(boolean)
- */
- public final void setChunkedEncoding(boolean isChunked) {
- isChunkedEncoding = isChunked;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#setTid(long)
- */
- public final void setTid(long tid) {
- fTid = tid;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#getTid()
- */
- public long getTid() {
- return fTid;
- }
-
- /*
- * private void DEBUG(int ch) { System.out.print("Buf[" + fIdx + "]="); if
- * (ch < 0) { System.out.print("" + ch); } else { int high = ch >>> 4; int
- * low = (ch & 0x0f); if (high < 10) { high = '0' + high; } else { high =
- * 'a' + high - 10; } if (low < 10) { low = '0' + low; } else { low = 'a' +
- * low - 10; } System.out.print((char) high); System.out.print((char) low); }
- * if (ch > 0x20) { System.out.print(" (" + (char) ch + ")"); }
- * System.out.println(); }
- */
-
- protected void writeHeaders(OutputStream out) throws IOException {
- writeFirstLine(out);
- for (IHTTPHeader header : fHeaders) {
- header.writeLine(out);
- }
- out.write(CR);
- out.write(LF);
- }
-
- protected abstract void writeBodyWithoutContentLength(long timeout,
- IMessageBody msgBody, OutputStream out) throws IOException,
- TimeoutException;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#writeBody(long,
- * org.eclipse.actf.util.httpproxy.core.impl.MessageBody,
- * java.io.OutputStream)
- */
- public void writeBody(long timeout, IMessageBody msgBody, OutputStream out)
- throws IOException, TimeoutException {
- if (msgBody == null) {
- return;
- }
- InputStream body = msgBody.getMessageBodyInputStream();
- int contentLength = msgBody.getContentLength();
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("super.writeBody: contentLength=" + contentLength
- + ", body=" + body + ", isChunkedEncoding="
- + msgBody.isChunkedEncoding());
- }
- if (body != null) {
- if (contentLength >= 0) {
- // normal encoding
- for (int i = 0; i < contentLength; i++) {
- int b = body.read();
- if (b < 0) {
- LOGGER.debug("Unexpected connection shutdown...:" + i
- + ":" + body);
- }
- out.write(b);
- }
- } else if (msgBody.isChunkedEncoding()) {
- // chunked encoding
- ChunkedMessageBodyReader chunkReader = new ChunkedMessageBodyReader(
- body);
- chunkReader.readChunkedMessage(timeout, out, this);
- } else {
- writeBodyWithoutContentLength(timeout, msgBody, out);
- }
- }
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("super.writeBody: done");
- }
- }
-
- protected IMessageBody transformMessageBody(long timeout, IMessageBody src)
- throws IOException, TimeoutException {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#write(long,
- * java.io.OutputStream)
- */
- public void write(long timeout, OutputStream out) throws IOException,
- TimeoutException {
- if (fTransformedMessageBody == null) {
- fTransformedMessageBody = transformMessageBody(timeout,
- fOriginalMessageBody);
- if (fTransformedMessageBody != null) {
- updateContentLengthHeader(fTransformedMessageBody);
- }
- }
-
- writeHeaders(out);
-
- writeBody(timeout, getMessageBody(), out);
- }
-
- /*
- * public final void writeTrailingHeaders(OutputStream out) throws
- * IOException { boolean output = false; for (Iterator it =
- * fTrailingHeaders.iterator(); it.hasNext(); ) { HTTPHeader header =
- * (HTTPHeader) it.next(); header.write(out); output = true; } if (output) {
- * out.write(CR); out.write(LF); } }
- */
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#isHTTPVersion1_1()
- */
- public boolean isHTTPVersion1_1() {
- if (Arrays.equals(IHTTPHeader.HTTP_VERSION_1_1_A,
- getHTTPVersionAsBytes()))
- return true;
- return false;
- }
-
- private static final byte[] CLOSE_A = "close".getBytes();
- private static final byte[] KEEP_ALIVE_A = "Keep-Alive".getBytes();
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#setConnectionHeader(boolean)
- */
- public void setConnectionHeader(boolean keepalive) {
- if (keepalive) {
- setHeader(IHTTPHeader.CONNECTION_A, "Keep-Alive".getBytes());
- } else {
- setHeader(IHTTPHeader.CONNECTION_A, "close".getBytes());
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPMessage#isConnectionToBeClosed()
- */
- public boolean isConnectionToBeClosed() {
- IHTTPHeader h = getHeader(IHTTPHeader.CONNECTION_A);
- if (isHTTPVersion1_1()) {
- // When HTTP version is 1.1, we assume the connection is reused by
- // default.
- if (h == null)
- return false;
- return h.compareValueIgnoreCase(CLOSE_A);
- } else {
- // When HTTP version is 1.0, we assume the connection will be
- // shutdown by default.
- if (h == null)
- return true;
- if (h.compareValueIgnoreCase(KEEP_ALIVE_A))
- return false;
- return true;
- }
- }
-
- public String toString() {
- return "HTTPMessage " + fSerial + ":" + fBuffer.toString();
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMessageBuffer.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMessageBuffer.java
deleted file mode 100644
index a578f1c..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMessageBuffer.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-
-public class HTTPMessageBuffer extends ByteArrayOutputStream {
- public static final int DEFAULT_INITIAL_BUFFER_SIZE = 1024;
-
- public HTTPMessageBuffer() {
- super(DEFAULT_INITIAL_BUFFER_SIZE);
- }
-
- public HTTPMessageBuffer(int initBufferSize) {
- super(initBufferSize);
- }
-
- protected HTTPMessageBuffer(byte[] body) {
- super.buf = body;
- super.count = body.length;
- }
-
- public byte[] getByteArray() {
- return super.buf;
- }
-
- public final int getLength() {
- return super.count;
- }
-
- public String getAsString(BufferRange range) {
- return new String(super.buf, range.getStart(), range.getLength());
- }
-
- public byte[] getAsBytes(BufferRange range) {
- int len = range.getLength();
- if (len <= 0) {
- return new byte[0];
- }
- byte[] bytes = new byte[len];
- System.arraycopy(super.buf, range.getStart(), bytes, 0, len);
- return bytes;
- }
-
- public final void writeTo(OutputStream out, BufferRange range) throws IOException {
- out.write(super.buf, range.getStart(), range.getLength());
- }
-
- public boolean equals(BufferRange range, byte[] data) {
- int len = data.length;
- if (len != range.getLength()) {
- return false;
- }
- int offset = range.getStart();
- byte[] buffer = super.buf;
- for (int i = len - 1; i >= 0; i--) {
- if (data[i] != buffer[offset + i]) {
- return false;
- }
- }
- return true;
- }
-
- public boolean equalsIgnoreCase(BufferRange range, byte[] data) {
- int len = data.length;
- if (len != range.getLength()) {
- return false;
- }
- int offset = range.getStart();
- byte[] buffer = super.buf;
- for (int i = len - 1; i >= 0; i--) {
- if (HTTPHeader.toUpcase(data[i])
- != HTTPHeader.toUpcase(buffer[offset + i])) {
- return false;
- }
- }
- return true;
- }
-
- public String toString() {
- return new String(super.buf, 0, super.count);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMessageReader.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMessageReader.java
deleted file mode 100644
index 953c749..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPMessageReader.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IMessageBody;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-public abstract class HTTPMessageReader extends HTTPReader {
- private static final Logger LOGGER = Logger.getLogger(HTTPMessageReader.class);
-
- protected HTTPMessageReader(InputStream in) {
- super(in);
- }
-
- protected abstract void readFirstLine(HTTPMessage msg, long timeout) throws IOException, TimeoutException;
-
- protected void processHeader(HTTPMessage msg, IHTTPHeader header) {
- }
-
- public void readMessage(HTTPMessage msg, boolean isBodyEmpty) throws IOException {
- try {
- readMessage(msg, 0, isBodyEmpty);
- } catch (TimeoutException e) {
- LOGGER.fatal("Impossible exception", e);
- System.exit(1);
- }
- }
-
- public boolean readMessage(HTTPMessage msg, long timeout, boolean isBodyEmpty)
- throws IOException, TimeoutException {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("read: isBodyEmpty=" + isBodyEmpty);
- }
- // Read the first line
- readFirstLine(msg, timeout);
-
- int contentLength = -1;
- while (fLastByte >= 0) {
- HeaderInBuffer header = readHeader(timeout, msg.getBuffer());
- if (header == null) {
- // EOF
- break;
- }
- msg.addHeader(header);
- if (LOGGER.isDebugEnabled()) {
- String name = new String(header.getName());
- String value = new String(header.getValue());
- LOGGER.debug(name + ": " + value);
- }
-
- if (header.isFieldNameEqualsTo(IHTTPHeader.CONTENT_LENGTH_A)) {
- String v = new String(header.getValue());
- if (v != null && v.length() > 0) {
- try {
- contentLength = Integer.parseInt(v);
- } catch (NumberFormatException e) {
- LOGGER.warning("Illegal header fieald (CONTENT_LENGTH) ignored: " + v);
- }
- }
- } else if (header.isFieldNameEqualsTo(IHTTPHeader.TRANSFER_ENCODING_A)
- && header.isFieldValueEqualsTo(IHTTPHeader.CHUNKED_A)) {
- msg.setChunkedEncoding(true);
- }
- processHeader(msg, header);
- }
-
- isBodyEmpty |= msg.isBodyEmpty();
-
- if (isBodyEmpty) {
- LOGGER.debug("The message body is empty.");
- } else {
- IMessageBody msgBody;
- if (msg.isChunkedEncoding()) {
- msgBody = new MessageBody(getInputStream());
- } else {
- msgBody = new MessageBody(getInputStream(), contentLength);
- }
- msg.setOriginalMessageBody(msgBody);
- }
-
- return true;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPReader.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPReader.java
deleted file mode 100644
index ecb65c7..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPReader.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hideki TAI - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PushbackInputStream;
-import java.net.SocketTimeoutException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-public abstract class HTTPReader {
- static final Logger LOGGER = Logger.getLogger(HTTPReader.class);
-
- public static final int INIT_NUM_HEADERS = 50;
- public static final char CR = 0x0d;
- public static final char LF = 0x0a;
- public static final char SP = 0x20;
- public static final char HT = 0x09;
-
- public static final int EOF = -1;
-
- private PushbackInputStream fIn;
- private long fLastReadTime = 0;
- protected int fLastByte = -1;
-
- protected HTTPReader(InputStream in) {
- if (in instanceof PushbackInputStream) {
- fIn = (PushbackInputStream) in;
- } else {
- fIn = new PushbackInputStream(in, 1);
- }
- }
-
- protected InputStream getInputStream() {
- return fIn;
- }
-
- protected final long getLastReadTime() {
- return fLastReadTime;
- }
-
- protected final int getLastByte() {
- return fLastByte;
- }
-
- private int getAvailableInput(long timeout) throws IOException, TimeoutException {
- int data;
- if (false) {
- if (timeout > 0) {
- int available;
- while ((available = fIn.available()) <= 0) {
- if (available < 0) {
- return -1;
- }
- // available == 0
- if (fLastReadTime == 0) {
- fLastReadTime = System.currentTimeMillis();
- } else {
- if (System.currentTimeMillis() - fLastReadTime > timeout) {
- fLastReadTime = System.currentTimeMillis();
- throw new TimeoutException("HTTPReader.getAvailableInput");
- } else {
- try {
- Thread.sleep(1);
- } catch (InterruptedException e) {
- // ignore
- }
- }
- }
- }
- }
- data = fIn.read();
- } else {
- while (true) {
- try {
- data = fIn.read();
- break;
- } catch (SocketTimeoutException e) {
- if (timeout > 0) {
- if (fLastReadTime == 0) {
- fLastReadTime = System.currentTimeMillis();
- }
- if (System.currentTimeMillis() - fLastReadTime > timeout) {
- fLastReadTime = System.currentTimeMillis();
- throw new TimeoutException("HTTPReader.getAvailableInput");
- }
- }
- }
- }
- }
- fLastReadTime = System.currentTimeMillis();
- return data;
- }
-
- protected final boolean nextByte(long timeout, OutputStream replica) throws IOException, TimeoutException {
- fLastByte = getAvailableInput(timeout);
- if (fLastByte != -1) {
- replica.write(fLastByte);
- return true;
- }
- return false;
- }
-
- private final boolean hasContinuedLine(long timeout) throws IOException, TimeoutException {
- // Assertion
- if (fLastByte != LF) {
- return false;
- }
- int nextChar = getAvailableInput(timeout);
- fIn.unread(nextChar);
- return (nextChar == SP || nextChar == HT);
- }
-
- protected final int readBytes(long timeout, OutputStream out, int len) throws IOException, TimeoutException {
- int i = 0;
- while (i < len) {
- if (!nextByte(timeout, out)) break;
- i++;
- }
- return i;
- }
-
- public static final int INIT_NUM_TRAILERS = 2;
-
- protected List<IHTTPHeader> readChunkedMessageTrailers(long timeout, HTTPMessageBuffer buf) throws IOException, TimeoutException {
- List<IHTTPHeader> trailers = null;
- while (true) {
- HeaderInBuffer header = readHeader(timeout, buf);
- if (header == null) {
- break;
- }
- if (trailers == null) {
- trailers = new ArrayList<IHTTPHeader>(INIT_NUM_TRAILERS);
- }
- trailers.add(header);
- }
- return trailers;
- }
-
- protected HeaderInBuffer readHeader(long timeout, HTTPMessageBuffer buf) throws IOException, TimeoutException {
- // Read 'field-name'
- BufferRange fieldName = new BufferRange();
- readNextToken(timeout, buf, fieldName, ':');
- if (fLastByte == EOF || fLastByte == LF) {
- return null;
- }
- if (fLastByte != ':') {
- // Unexpected line
- throw new IOException("Unexpected char (" + fLastByte + ".) Expected was (':')");
- }
-
- skipSpaces(timeout, buf);
-
- // Read 'field-value'
- BufferRange fieldValue = new BufferRange();
- readNextToken(timeout, buf, fieldValue);
- while (hasContinuedLine(timeout)) {
- readContinuedLine(timeout, buf, fieldValue);
- }
-
- HeaderInBuffer header = new HeaderInBuffer();
- header.init(buf, fieldName, fieldValue);
- return header;
- }
-
- private final int readContinuedLine(long timeout, HTTPMessageBuffer buf, BufferRange range) throws IOException, TimeoutException {
- // Read until CRLF
- int start = buf.getLength();
- boolean cr = false;
- boolean crlf = false;
- while (fLastByte != EOF) {
- nextByte(timeout, buf);
- if (fLastByte == CR) {
- cr = true;
- } else if (fLastByte == LF && cr) {
- crlf = true;
- break;
- } else {
- cr = false;
- }
- }
- int length = buf.getLength() - start;
- if (crlf) {
- length -= 2;
- }
- range.setLength(range.getLength() + length);
- return fLastByte;
- }
-
- protected final void skipSpaceCRAndLFs(long timeout)
- throws IOException, TimeoutException {
- fLastByte = getAvailableInput(timeout);
- while ((fLastByte == SP)
- || (fLastByte == CR)
- || (fLastByte == LF)) {
- fLastByte = SocketTimeoutRetryInputStream.read(fIn);
- }
- fIn.unread(fLastByte);
- }
-
- protected final void skipSpaces(long timeout, OutputStream replica) throws IOException, TimeoutException {
- fLastByte = getAvailableInput(timeout);
- while (fLastByte == SP) {
- replica.write(fLastByte);
- fLastByte = SocketTimeoutRetryInputStream.read(fIn);
- }
- fIn.unread(fLastByte);
- }
-
- protected final int readNextToken(long timeout, HTTPMessageBuffer buf, BufferRange marker) throws IOException, TimeoutException {
- return readNextToken(timeout, buf, marker, (char) 0);
- }
-
- protected final int readNextToken(long timeout, HTTPMessageBuffer buf, BufferRange marker, char delim) throws IOException, TimeoutException {
- int start = buf.getLength();
- nextByte(timeout, buf);
- int length = 0;
- boolean cr = false;
- while (fLastByte != EOF) {
- if (delim != 0 && fLastByte == delim) {
- break;
- }
- if (fLastByte == CR) {
- cr = true;
- } else if (fLastByte == LF && cr) {
- length -= 1;
- break;
- } else {
- cr = false;
- }
- nextByte(timeout, buf);
- length += 1;
- }
- if (length > 0) {
- marker.setStart(start);
- marker.setLength(length);
- }
- return fLastByte;
- }
-
- /*
- private final boolean isTokenChar(int ch) {
- if (ch < 0 || isCtrlChar(ch)) {
- return false;
- } else {
- return isSeperator(ch);
- }
- }
-
- private final boolean isCtrlChar(int ch) {
- return ((ch >= 0 && ch <= 0x1F) || ch == 0x7F);
- }
-
- private final boolean isTextChar(int ch) {
- if (ch == SP || ch == HT) {
- return true;
- } else {
- return !isCtrlChar(ch);
- }
- }
-
- private final boolean isSeperator(int ch) {
- switch (ch) {
- case HT: // 0x09
- case SP: // 0x20
- case '"': // 0x22
- case '(': // 0x28
- case ')': // 0x29
- case ',': // 0x2c
- case '/': // 0x2f
- case ':': // 0x3a
- case ';': // 0x3b
- case '<': // 0x3c
- case '=': // 0x3d
- case '>': // 0x3e
- case '?': // 0x3f
- case '@': // 0x40
- case '[': // 0x5b
- case '\\': // 0x5c
- case ']': // 0x5d
- case '{': // 0x7b
- case '}': // 0x7d
- return true;
- default:
- return false;
- }
- }
- */
-
- // ----------------------------------------------------------------
- // field-value = *( field-content | LWS )
- // field-content = <the OCTETs making up the field-value
- // and consisting of either *TEXT or combinations
- // of token, separators, and quoted-string>
- // TEXT = <any OCTET except CTLs, but including LWS>
- // quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
- // qdtext = <any TEXT except <">>
- // quoted-pair = "\" CHAR
- // CHAR = <any US-ASCII character (octets 0 - 127)>
- // ----------------------------------------------------------------
-
- // CR LF
- protected void readCRLF(long timeout, OutputStream out) throws IOException, TimeoutException {
- nextByte(timeout, out);
- if (fLastByte != CR) {
- throw new IOException("Unexpected char (" + fLastByte +".) Expected was (" + Integer.toString(CR) + ")");
- }
- nextByte(timeout, out);
- if (fLastByte != LF) {
- throw new IOException("Unexpected char (" + fLastByte +".) Expected was (" + Integer.toString(LF) + ")");
- }
- }
-
- protected final String readNextToken(long timeout, OutputStream out) throws IOException, TimeoutException {
- return readNextToken(timeout, out, (char) 0);
- }
-
- protected final String readNextToken(long timeout, OutputStream out, char delim) throws IOException, TimeoutException {
- nextByte(timeout, out);
- if (fLastByte == EOF) {
- return null;
- }
- boolean cr = false;
- StringBuffer token = new StringBuffer();
- while (fLastByte != EOF) {
- if (delim != 0 && fLastByte == delim) {
- break;
- }
- if (fLastByte == CR) {
- cr = true;
- } else if (fLastByte == LF && cr) {
- break;
- } else {
- cr = false;
- token.append((char) fLastByte);
- }
- nextByte(timeout, out);
- }
- return token.toString();
- }
-
- public int readChunkedMessageBody(long timeout, OutputStream out) throws IOException, TimeoutException {
- final ChunkDecoder decoder = new ChunkDecoder(fIn);
- final ChunkEncoder encoder = new ChunkEncoder(out);
- decoder.setChunkListener(new ChunkListener() {
- public void newChankRead(int n, int size) {
- try {
- encoder.setMaxChunkSize(size);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- });
-
- try {
- int b;
- int n = 0;
- while ((b = decoder.read(timeout)) != -1) {
- encoder.write(b);
- n += 1;
- }
- return n;
- } finally {
- encoder.close();
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPRequestMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPRequestMessage.java
deleted file mode 100644
index b7435df..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPRequestMessage.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IMessageBody;
-
-public class HTTPRequestMessage extends HTTPMessage implements IHTTPRequestMessage{
- // Request = Request-Line
- // *(( general-header
- // | request-header
- // | entity-header ) CRLF)
- // CRLF
- // [ message-body ]
-
- private BufferRange fMethod;
- private BufferRange fRequestURI;
- private String modifiedRequestURI;
- private BufferRange fHTTPVersion;
-
- public HTTPRequestMessage(long serial) {
- super(serial);
- fMethod = new BufferRange();
- fRequestURI = new BufferRange();
- fHTTPVersion = new BufferRange();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#getMethod()
- */
- public BufferRange getMethod() {
- return fMethod;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#getMethodAsBytes()
- */
- public byte[] getMethodAsBytes() {
- return getBuffer().getAsBytes(fMethod);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#getMethodAsString()
- */
- public String getMethodAsString() {
- return getBuffer().getAsString(fMethod);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#getRequestURI()
- */
- public BufferRange getRequestURI() {
- if (modifiedRequestURI != null) return null;
- return fRequestURI;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#setRequestURIString(java.lang.String)
- */
- public void setRequestURIString(String newRequestURI) {
- this.modifiedRequestURI = newRequestURI;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#getOriginalRequestURIString()
- */
- public String getOriginalRequestURIString() {
- return getBuffer().getAsString(fRequestURI);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#getRequestURIString()
- */
- public String getRequestURIString() {
- if (modifiedRequestURI != null) return modifiedRequestURI;
- return getOriginalRequestURIString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#getHTTPVersion()
- */
- public BufferRange getHTTPVersion() {
- return fHTTPVersion;
- }
-
- public byte[] getHTTPVersionAsBytes() {
- return getBuffer().getAsBytes(fHTTPVersion);
- }
-
- public String getHTTPVersionAsString() {
- return getBuffer().getAsString(fHTTPVersion);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#isMethodEqualsTo(byte[])
- */
- public boolean isMethodEqualsTo(byte[] method) {
- return getBuffer().equals(fMethod, method);
- }
-
- protected void writeFirstLine(OutputStream out) throws IOException {
- HTTPMessageBuffer buf = getBuffer();
- buf.writeTo(out, fMethod);
- out.write(SP);
- if (modifiedRequestURI == null) {
- buf.writeTo(out, fRequestURI);
- } else {
- out.write(modifiedRequestURI.getBytes());
- }
- out.write(SP);
- buf.writeTo(out, fHTTPVersion);
- out.write(CR);
- out.write(LF);
- }
-
- protected boolean isBodyEmpty() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#isResponseBodyEmpty()
- */
- public boolean isResponseBodyEmpty() {
- return (IHTTPHeader.METHOD_CONNECT.equals(getMethodAsString())
- || IHTTPHeader.METHOD_HEAD.equals(getMethodAsString()));
- }
-
- private boolean contentLengthInvalidMessage;
- final void recalculateContentLength() {
- IMessageBody body = getMessageBody();
- if (body.getContentLength() == -1) {
- contentLengthInvalidMessage = true;
- InputStream is = body.getMessageBodyInputStream();
- if (false) {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- int b;
- try {
- while (true) {
- b = is.read();
- if (b < 0) break;
- os.write(b);
- }
- } catch (IOException e) {
- }
- byte[] bodyByteArray = os.toByteArray();
- ByteArrayInputStream newIs = new ByteArrayInputStream(bodyByteArray);
- setOriginalMessageBody(new MessageBody(newIs, bodyByteArray.length));
- } else {
- // We regard body is empty.
- setOriginalMessageBody(new MessageBody(is, 0));
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage#isConnectionShutdownRequired()
- */
- public boolean isConnectionShutdownRequired() {
- if (!isConnectionToBeClosed()) return false;
- IMessageBody body = getMessageBody();
- if (body.isChunkedEncoding()) return false;
- if (!contentLengthInvalidMessage && (body.getContentLength() >= 0)) return false;
- return true;
- }
-
- protected void writeBodyWithoutContentLength(long timeout,
- IMessageBody msgBody,
- OutputStream out) {
- // do nothing. We regard body is empty.
- return;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPRequestReader.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPRequestReader.java
deleted file mode 100644
index e76a370..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPRequestReader.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-public class HTTPRequestReader extends HTTPMessageReader {
- static final Logger LOGGER = Logger.getLogger(HTTPRequestReader.class);
-
- // Request = Request-Line
- // *(( general-header
- // | request-header
- // | entity-header ) CRLF)
- // CRLF
- // [ message-body ]
-
- public HTTPRequestReader(InputStream in) {
- super(in);
- }
-
- protected void readFirstLine(HTTPMessage msg, long timeout) throws IOException, TimeoutException {
- // Request-Line = Method SP Request-URI SP HTTP-Version CRLF
- IHTTPRequestMessage req = (IHTTPRequestMessage) msg;
- HTTPMessageBuffer buf = msg.getBuffer();
-
- // Although skipping whitespaces is not actually correct, a message sometimes starts with whitespaces.
- skipSpaceCRAndLFs(timeout);
-
- readNextToken(timeout, buf, req.getMethod(), SP);
- if (getLastByte() == -1) {
- throw new HTTPConnectionException("Request connection is closed.");
- }
- if (getLastByte() != SP) {
- throw new IOException("Unexpected char (expected=SP): "
- + Integer.toString(getLastByte())
- + "/" + buf.getAsString(req.getMethod()));
- }
- skipSpaces(timeout, buf);
- readNextToken(timeout, buf, req.getRequestURI(), SP);
- if (getLastByte() != SP) {
- throw new IOException("Unexpected char (expected=SP): " + Integer.toString(getLastByte()));
- }
- skipSpaces(timeout, buf);
- readNextToken(timeout, buf, req.getHTTPVersion());
- if (getLastByte() != LF) {
- throw new IOException("Unexpected char (expected=LF): " + Integer.toString(getLastByte()));
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseInMemoryMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseInMemoryMessage.java
deleted file mode 100644
index 7e8b3c0..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseInMemoryMessage.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IHTTPMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.core.IMessageBody;
-
-public class HTTPResponseInMemoryMessage extends HTTPResponseMessage implements IHTTPResponseMessage{
- // Request = Status-Line
- // *(( general-header
- // | request-header
- // | entity-header ) CRLF)
- // CRLF
- // [ message-body ]
- // Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
-
- private final byte[] version;
-
- private final byte[] statusCode;
-
- private final byte[] reasonPhrase;
-
- protected HTTPResponseInMemoryMessage(long serial,
- byte[] version,
- byte[] statusCode,
- byte[] reasonPhrase) {
- super(serial);
- this.version = version;
- this.statusCode = statusCode;
- this.reasonPhrase = reasonPhrase;
- }
-
- public HTTPResponseInMemoryMessage(long serial,
- byte[] version,
- byte[] statusCode,
- byte[] reasonPhrase,
- byte[] body) {
- this(serial, version, statusCode, reasonPhrase);
- IMessageBody msgBody = new MessageBody(new ByteArrayInputStream(body), body.length);
- super.setOriginalMessageBody(msgBody);
- }
-
- protected void setBaseHeaders(IHTTPMessage base) {
- for (IHTTPHeader h : base.getHeaders()) {
- if (!h.isFieldNameEqualsTo(IHTTPHeader.CONTENT_LENGTH_A)) {
- setHeader(h.getName(), h.getValue());
- }
- }
- }
-
- public HTTPResponseInMemoryMessage(IHTTPResponseMessage base,
- byte[] body) {
- this(base.getSerial(),
- base.getHTTPVersionAsBytes(),
- base.getStatusCodeAsBytes(),
- base.getReasonPhraseAsBytes(),
- body);
- setBaseHeaders(base);
- }
-
- public String getHTTPVersionAsString() {
- return new String(version);
- }
-
- public byte[] getHTTPVersionAsBytes() {
- return version;
- }
-
- public String getStatusCodeAsString() {
- return new String(statusCode);
- }
-
- public byte[] getStatusCodeAsBytes() {
- return statusCode;
- }
-
- public String getReasonPhraseAsString() {
- return new String(reasonPhrase);
- }
-
- public byte[] getReasonPhraseAsBytes() {
- return reasonPhrase;
- }
-
- protected void writeFirstLine(OutputStream out) throws IOException {
- out.write(version);
- out.write(SP);
- out.write(statusCode);
- out.write(SP);
- out.write(reasonPhrase);
- out.write(CR);
- out.write(LF);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseMessage.java
deleted file mode 100644
index c2fe750..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseMessage.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.SocketTimeoutException;
-import java.util.Arrays;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.core.IMessageBody;
-
-public abstract class HTTPResponseMessage extends HTTPMessage implements IHTTPResponseMessage {
- // Request = Status-Line
- // *(( general-header
- // | request-header
- // | entity-header ) CRLF)
- // CRLF
- // [ message-body ]
- // Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
- private static final byte[] STATUS_NO_CONTENT_A = "204".getBytes();
- private static final byte[] STATUS_NOT_MODIFIED_A = "304".getBytes();
-
- private static final int WRITEBODY_DEFAULT_WAIT_DENOM = 10;
-
- protected HTTPResponseMessage(long serial) {
- super(serial);
- }
-
- protected boolean isBodyEmpty() {
- byte[] statCode = getStatusCodeAsBytes();
- return (Arrays.equals(statCode, STATUS_NO_CONTENT_A)
- || Arrays.equals(statCode, STATUS_NOT_MODIFIED_A));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage#getStatusCodeAsString()
- */
- public abstract String getStatusCodeAsString();
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage#getStatusCodeAsBytes()
- */
- public abstract byte[] getStatusCodeAsBytes();
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage#getReasonPhraseAsString()
- */
- public abstract String getReasonPhraseAsString();
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage#getReasonPhraseAsBytes()
- */
- public abstract byte[] getReasonPhraseAsBytes();
-
- protected void writeBodyWithoutContentLength(long timeout,
- IMessageBody msgBody,
- OutputStream out)
- throws IOException {
- if (isConnectionToBeClosed()) {
- InputStream body = msgBody.getMessageBodyInputStream();
- // Write until the connection is closed.
- for (;;) {
- int b = body.read();
- if (b < 0) break;
- out.write(b);
- }
- } else {
- InputStream body = msgBody.getMessageBodyTimeoutInputStream();
- // Try to read the incoming data as much as we can.
- long keepAliveTimeout = timeout / WRITEBODY_DEFAULT_WAIT_DENOM;
- if (LOGGER.isDebugEnabled()) { // DEBUG
- StringBuffer sb = new StringBuffer(); // DEBUG
- sb.append("keepAliveTimeout=" + keepAliveTimeout + " ms"); // DEBUG
- LOGGER.debug(sb.toString()); // DEBUG
- System.out.println(sb.toString()); // DEBUG
- }
- final long start = System.currentTimeMillis();
- long before = System.currentTimeMillis();
- while ((System.currentTimeMillis() - before) < keepAliveTimeout) {
- int b;
- try {
- b = body.read();
- if (b < 0) break;
- before = System.currentTimeMillis();
- } catch (SocketTimeoutException e) {
- continue;
- }
- out.write(b);
- }
- if (LOGGER.isDebugEnabled()) { // DEBUG
- StringBuffer sb = new StringBuffer(); // DEBUG
- sb.append("elapsed " + (System.currentTimeMillis() - start) + " ms"); // DEBUG
- LOGGER.debug(sb.toString()); // DEBUG
- System.out.println(sb.toString()); // DEBUG
- } // DEBUG
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponsePushbackMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponsePushbackMessage.java
deleted file mode 100644
index de81038..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponsePushbackMessage.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Shin SAITO - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PushbackInputStream;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponsePushbackMessage;
-import org.eclipse.actf.util.httpproxy.core.IMessageBody;
-import org.eclipse.actf.util.httpproxy.core.IPushbackMessageBody;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-public class HTTPResponsePushbackMessage extends HTTPResponseInMemoryMessage implements IHTTPResponsePushbackMessage{
-
- public HTTPResponsePushbackMessage(long serial,
- byte[] version,
- byte[] statusCode,
- byte[] reasonPhrase,
- IMessageBody body,
- int pushbackBufferSize) {
- super(serial, version, statusCode, reasonPhrase);
- if (body != null) {
- InputStream is = body.getMessageBodyTimeoutInputStream();
- IMessageBody msgBody;
- if (body.isChunkedEncoding()) {
- msgBody = new PushbackMessageBody(is, pushbackBufferSize);
- } else {
- msgBody = new PushbackMessageBody(is, pushbackBufferSize, body.getContentLength());
- }
- super.setOriginalMessageBody(msgBody);
- }
- }
-
- // Caution!!!! Without pushback option, body will be invalidated.
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IHTTPResponsePushbackMessage#readBody(long, boolean)
- */
- public byte[] readBody(long timeout, boolean pushback)
- throws IOException, TimeoutException {
- PushbackMessageBody msgBody = (PushbackMessageBody) getMessageBody();
- if (msgBody == null) return null;
- InputStream body = msgBody.getMessageBodyInputStream();
- int contentLength = msgBody.getContentLength();
- if (body == null) return null;
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- if (contentLength >= 0) {
- // normal encoding
- for (int i = 0; i < contentLength; i++) {
- os.write(body.read());
- }
- } else {
- // chunked encoding
- ChunkedMessageBodyReader chunkReader = new ChunkedMessageBodyReader(body);
- chunkReader.readChunkedMessage(timeout, os, this);
- }
- byte[] outBytes = os.toByteArray();
- if (pushback) {
- PushbackInputStream is = msgBody.getMessageBodyPushBackInputStream();
- is.unread(outBytes);
- }
- return outBytes;
- }
-
-
- public HTTPResponsePushbackMessage(IHTTPResponseMessage base,
- int pushbackBufferSize) {
- this(base.getSerial(),
- base.getHTTPVersionAsBytes(),
- base.getStatusCodeAsBytes(),
- base.getReasonPhraseAsBytes(),
- base.getMessageBody(),
- pushbackBufferSize);
- setBaseHeaders(base);
- }
-
- public IPushbackMessageBody getPushbackMessageBody() {
- return (PushbackMessageBody) getMessageBody();
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseReader.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseReader.java
deleted file mode 100644
index 08457c6..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseReader.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-public class HTTPResponseReader extends HTTPMessageReader {
- private static final Logger LOGGER = Logger.getLogger(HTTPResponseReader.class);
-
- private final int id;
-
- // Request = Status-Line
- // *(( general-header
- // | request-header
- // | entity-header ) CRLF)
- // CRLF
- // [ message-body ]
- // Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
-
- public HTTPResponseReader(int id, InputStream in) {
- super(in);
- this.id = id;
- }
-
- protected void readFirstLine(HTTPMessage msg, long timeout) throws IOException, TimeoutException {
- // Request-Line = Method SP Request-URI SP HTTP-Version CRLF
- HTTPResponseStreamMessage response = (HTTPResponseStreamMessage) msg;
- HTTPMessageBuffer buf = msg.getBuffer();
-
- readNextToken(timeout, buf, response.getHTTPVersion(), SP);
- if (getLastByte() != SP) {
- throw new IOException("Unexpected char (expected=SP): " + Integer.toString(getLastByte()));
- }
- skipSpaces(timeout, buf);
- readNextToken(timeout, buf, response.getStatusCode(), SP);
- if (getLastByte() != SP) {
- throw new IOException("Unexpected char (expected=SP): " + Integer.toString(getLastByte()));
- }
- skipSpaces(timeout, buf);
- readNextToken(timeout, buf, response.getReasonPhrase());
- if (getLastByte() != LF) {
- throw new IOException("Unexpected char (expected=LF): " + Integer.toString(getLastByte()));
- }
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("Response-RFL:" + response.getHTTPVersionAsString()
- + " " + response.getStatusCodeAsString()
- + " " + response.getReasonPhraseAsString());
- }
- }
-
- /*
- protected HTTPMessage readMessageBody(HTTPMessage msg, int contentLength, long timeout)
- throws IOException, TimeoutException {
- if (msg.isChunkedEncoding()) {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("ChankedEncoding:" + msg.getSerial() + "\n");
- }
- readChunkedMessageBody(0, msg);
- } else if (contentLength >= 0) {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Content-Length:" + contentLength + " " + msg.getSerial() + "\n");
- }
- int readBytes = readBytes(0, msg, contentLength);
- msg.markMessageBodyEnd();
- if (readBytes != contentLength) {
- FATAL("Illegal message body: read=" + readBytes + ", contentLength=" + contentLength);
- }
- } else {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("End is marked by CS." + msg.getSerial() + "\n");
- }
- readBytes(0, msg);
- msg.markMessageBodyEnd();
- }
- return msg;
- }
- */
-
- private final void WARNING(String msg) {
- StringBuffer sb = new StringBuffer();
- sb.append("[id:").append(id).append("] HTTPResponseReader: ");
- sb.append(msg);
- LOGGER.warning(sb.toString());
- }
-
- private final void DEBUG(String msg) {
- StringBuffer sb = new StringBuffer();
- sb.append("[id:").append(id).append("] HTTPResponseReader: ");
- sb.append(msg);
- LOGGER.debug(sb.toString());
- }
-
- private final void FATAL(String msg) {
- StringBuffer sb = new StringBuffer();
- sb.append("[id:").append(id).append("] HTTPResponseReader: ");
- sb.append(msg);
- LOGGER.fatal(sb.toString());
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseStreamMessage.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseStreamMessage.java
deleted file mode 100644
index c10343b..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HTTPResponseStreamMessage.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-
-public class HTTPResponseStreamMessage extends HTTPResponseMessage {
- // Request = Status-Line
- // *(( general-header
- // | request-header
- // | entity-header ) CRLF)
- // CRLF
- // [ message-body ]
- // Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
-
- private BufferRange fHTTPVersion;
- private BufferRange fStatusCode;
- private BufferRange fReasonPhrase;
-
- public HTTPResponseStreamMessage(long serial) {
- super(serial);
- fHTTPVersion = new BufferRange();
- fStatusCode = new BufferRange();
- fReasonPhrase = new BufferRange();
- }
-
- public BufferRange getHTTPVersion() {
- return fHTTPVersion;
- }
-
- public String getHTTPVersionAsString() {
- return getBuffer().getAsString(fHTTPVersion);
- }
-
- public byte[] getHTTPVersionAsBytes() {
- return getBuffer().getAsBytes(fHTTPVersion);
- }
-
- public BufferRange getStatusCode() {
- return fStatusCode;
- }
-
- public String getStatusCodeAsString() {
- return getBuffer().getAsString(fStatusCode);
- }
-
- public byte[] getStatusCodeAsBytes() {
- return getBuffer().getAsBytes(fStatusCode);
- }
-
- public BufferRange getReasonPhrase() {
- return fReasonPhrase;
- }
-
- public String getReasonPhraseAsString() {
- return getBuffer().getAsString(fReasonPhrase);
- }
-
- public byte[] getReasonPhraseAsBytes() {
- return getBuffer().getAsBytes(fReasonPhrase);
- }
-
- protected void writeFirstLine(OutputStream out) throws IOException {
- HTTPMessageBuffer buf = getBuffer();
- buf.writeTo(out, fHTTPVersion);
- out.write(SP);
- buf.writeTo(out, fStatusCode);
- out.write(SP);
- buf.writeTo(out, fReasonPhrase);
- out.write(CR);
- out.write(LF);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HeaderInBuffer.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HeaderInBuffer.java
deleted file mode 100644
index 93d6d62..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HeaderInBuffer.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-
-public final class HeaderInBuffer extends HTTPHeader {
- private HTTPMessageBuffer fBuffer;
- private BufferRange fName;
- private BufferRange fValue;
- private byte[] fReplacedValue;
-
- public HeaderInBuffer() {
- fName = null;
- fValue = null;
- fReplacedValue = null;
- }
-
- public void init(HTTPMessageBuffer buffer, BufferRange name, BufferRange value) {
- fBuffer = buffer;
- fName = name;
- fValue = value;
- fReplacedValue = null;
- }
-
- public void reset() {
- fName = null;
- fValue = null;
- fReplacedValue = null;
- }
-
- public BufferRange getNameAsBufferRange() {
- return fName;
- }
-
- public BufferRange getValueAsBufferRange() {
- return fValue;
- }
-
- public boolean isFieldNameEqualsTo(byte[] name) {
- return fBuffer.equalsIgnoreCase(fName, name);
- }
-
- public boolean isFieldValueEqualsTo(byte[] value) {
- return fBuffer.equals(fValue, value);
- }
-
- public byte[] getName() {
- return fBuffer.getAsBytes(fName);
- }
-
- public byte[] getValue() {
- return fBuffer.getAsBytes(fValue);
- }
-
- public void setValue(byte[] value) {
- fValue = null;
- fReplacedValue = value;
- }
-
- protected void write(OutputStream out) throws IOException {
- fBuffer.writeTo(out, fName);
- writeHeaderSeparator(out);
- if (fValue != null) {
- fBuffer.writeTo(out, fValue);
- } else if (fReplacedValue != null) {
- out.write(fReplacedValue);
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HeaderToAdd.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HeaderToAdd.java
deleted file mode 100644
index 234b95b..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/HeaderToAdd.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-
-public final class HeaderToAdd extends HTTPHeader {
- private byte[] fName;
- private byte[] fValue;
-
- public HeaderToAdd() {
- fName = null;
- fValue = null;
- }
-
- public void init(byte[] name, byte[] value) {
- fName = name;
- fValue = value;
- }
-
- public void reset() {
- fName = null;
- fValue = null;
- }
-
- public boolean isFieldNameEqualsTo(byte[] name) {
- return compareIgnoreCase(name, fName);
- }
-
- public boolean isFieldValueEqualsTo(byte[] value) {
- return compare(value, fValue);
- }
-
- public byte[] getName() {
- return fName;
- }
-
- public byte[] getValue() {
- return fValue;
- }
-
- public void setValue(byte[] value) {
- fValue = value;
- }
-
- protected void write(OutputStream out) throws IOException {
- out.write(fName);
- writeHeaderSeparator(out);
- out.write(fValue);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/MessageBody.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/MessageBody.java
deleted file mode 100644
index 51525e0..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/MessageBody.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.InputStream;
-
-import org.eclipse.actf.util.httpproxy.core.IMessageBody;
-
-
-public class MessageBody implements IMessageBody {
- private final InputStream fMessageBody;
- private final SocketTimeoutRetryInputStream fMessageBodySocketTimeoutRetry;
-
- private int fContentLength;
-
- private boolean isChunkedEncoding;
-
- /**
- * Create a message body of content length encoding.
- *
- * @param msgBody
- * @param contentLength
- */
- public MessageBody(InputStream msgBody, int contentLength) {
- fMessageBody = msgBody;
- fMessageBodySocketTimeoutRetry = new SocketTimeoutRetryInputStream(msgBody);
- fContentLength = contentLength;
- isChunkedEncoding = false;
- }
-
- /**
- * Create a message body of chunked encoding.
- *
- * @param msgBody
- */
- public MessageBody(InputStream msgBody) {
- fMessageBody = msgBody;
- fMessageBodySocketTimeoutRetry = new SocketTimeoutRetryInputStream(msgBody);
- fContentLength = -1;
- isChunkedEncoding = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IMessageBody#getContentLength()
- */
- public int getContentLength() {
- return fContentLength;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IMessageBody#isChunkedEncoding()
- */
- public boolean isChunkedEncoding() {
- return isChunkedEncoding;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IMessageBody#getMessageBodyTimeoutInputStream()
- */
- public InputStream getMessageBodyTimeoutInputStream() {
- return fMessageBody;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IMessageBody#getMessageBodyInputStream()
- */
- public InputStream getMessageBodyInputStream() {
- return fMessageBodySocketTimeoutRetry;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("MessageBody[");
- if (isChunkedEncoding) {
- sb.append("chunked");
- } else {
- sb.append("ContentLength=").append(fContentLength);
- }
- sb.append(']');
- return sb.toString();
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/PushbackMessageBody.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/PushbackMessageBody.java
deleted file mode 100644
index 54d573f..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/PushbackMessageBody.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.InputStream;
-import java.io.PushbackInputStream;
-
-import org.eclipse.actf.util.httpproxy.core.IPushbackMessageBody;
-
-
-
-public class PushbackMessageBody extends MessageBody implements IPushbackMessageBody {
- private final PushbackInputStream pushbackInputStream;
-
- /**
- * Create a message body of content length encoding.
- *
- * @param msgBody
- * @param contentLength
- */
- PushbackMessageBody(InputStream msgBodyInputStream,
- int pushbackBuffersize,
- int contentLength) {
- super(msgBodyInputStream, contentLength);
- this.pushbackInputStream = new PushbackInputStream(super.getMessageBodyInputStream(),
- pushbackBuffersize);
- }
-
- /**
- * Create a message body of chunked encoding.
- *
- * @param msgBody
- */
- PushbackMessageBody(InputStream msgBodyInputStream, int pushbackBuffersize) {
- super(msgBodyInputStream);
- this.pushbackInputStream = new PushbackInputStream(super.getMessageBodyInputStream(),
- pushbackBuffersize);
- }
-
- public InputStream getMessageBodyInputStream() {
- return pushbackInputStream;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.core.IPushbackMessageBody#getMessageBodyPushBackInputStream()
- */
- public PushbackInputStream getMessageBodyPushBackInputStream() {
- return pushbackInputStream;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/RequestDispatcher.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/RequestDispatcher.java
deleted file mode 100644
index bb9350e..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/RequestDispatcher.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.InputStream;
-import java.net.Socket;
-
-import org.eclipse.actf.util.httpproxy.core.IClientConnection;
-import org.eclipse.actf.util.httpproxy.core.IHTTPMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-public abstract class RequestDispatcher extends Thread {
- private static final Logger LOGGER = Logger.getLogger(RequestDispatcher.class);
-
- private final int fId;
-
- /** Message which just arrived from a client */
- private FixedSizeQueue fArrivedMsgs;
-
- private IHTTPRequestMessage fNextMsg = null;
-
- protected final Session fSession;
-
- protected RequestDispatcher(String name, Session session, IClientConnection client, Socket clientSock, int queueSize) {
- super(name);
- this.fSession = session;
- fId = clientSock.getPort();
- fArrivedMsgs = new FixedSizeQueue(queueSize);
- }
-
- public int getDispatcherId() {
- return fId;
- }
-
- public void putRequest(IHTTPRequestMessage req, long timeout) throws InterruptedException, TimeoutException {
- fArrivedMsgs.put(req, timeout);
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append("Request received from a client: ");
- sb.append("tid=").append(req.getTid());
- sb.append(", msgSerial=").append(req.getSerial());
- /*
- sb.append("\n[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\n");
- try {
- ByteArrayOutputStream o = new ByteArrayOutputStream();
- req.write(o);
- o.close();
- sb.append(o.toString());
- } catch (Exception e) {
- //nop
- }
- sb.append("]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\n");
- */
- DEBUG(sb.toString());
- }
- }
-
- // Called by ServerConnections
- synchronized boolean responseArrived(ServerConnection conn, IHTTPResponseMessage response) throws InterruptedException {
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append("Response arrived from a server (").append(conn);
- sb.append("): tid=").append(response.getTid());
- sb.append(", msgSerial=").append(response.getSerial());
- /*
- sb.append("\n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
- try {
- ByteArrayOutputStream o = new ByteArrayOutputStream();
- response.write(o);
- o.close();
- sb.append(o.toString());
- } catch (Exception e) {
- //nop
- }
- sb.append("\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
- */
- DEBUG(sb.toString());
- }
- boolean received = fSession.receiveResponse(response);
- if (received) {
- return true;
- } else {
- return false;
- }
- }
-
- private String msgToString(IHTTPMessage msg) {
- StringBuffer sb = new StringBuffer();
- if (msg == null) {
- sb.append("null");
- } else {
- sb.append("(ser=").append(msg.getSerial());
- sb.append(",tid=").append(msg.getTid()).append(')');
- }
- return sb.toString();
- }
-
- private String dumpMessages() {
- StringBuffer sb = new StringBuffer();
- sb.append("Sent=").append(msgToString(fSession.getRequestMessage()));
- sb.append(", Next=").append(msgToString(fNextMsg));
- sb.append(", Arrived=").append(fArrivedMsgs.getSize());
- return sb.toString();
- }
-
- public HTTPRequestReader createHTTPRequestReader(InputStream is) {
- return new HTTPRequestReader(is);
- }
-
- public HTTPResponseReader createHTTPResponseReader(InputStream is) {
- return new HTTPResponseReader(getDispatcherId(), is);
- }
-
- // Called only by run()
- protected IHTTPRequestMessage getNextRequest() throws InterruptedException {
- if (fNextMsg != null) {
- DEBUG("Reuse the same request");
- return fNextMsg;
- } else {
- fNextMsg = (IHTTPRequestMessage) fArrivedMsgs.remove();
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Filled a message: msgSerial=" + fNextMsg.getSerial() + ", tid=" + fNextMsg.getTid());
- DEBUG(dumpMessages());
- }
- return fNextMsg;
- }
- }
-
- protected void clearNextRequest() {
- fNextMsg = null;
- }
-
- protected void startSessionAndSendRequest(IHTTPRequestMessage request, ServerConnection conn, long timeout)
- throws InterruptedException, TimeoutException {
- fSession.start(request);
- conn.putRequest(request, timeout);
- }
-
- public abstract void run();
-
- public void close() {
- DEBUG("Closing a RequestDispatcher");
- this.interrupt();
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("RequestDispatcher-").append(fId);
- return sb.toString();
- }
-
- protected void DEBUG(String msg) {
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append(this.toString()).append(": ").append(msg);
- LOGGER.debug(sb.toString());
- }
- }
-
- protected void WARNING(String msg) {
- StringBuffer sb = new StringBuffer();
- sb.append(this.toString()).append(": ").append(msg);
- LOGGER.warning(sb.toString());
- }
-
- protected void INFO(String msg) {
- StringBuffer sb = new StringBuffer();
- sb.append(this.toString()).append(": ").append(msg);
- LOGGER.info(sb.toString());
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ServerConnection.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ServerConnection.java
deleted file mode 100644
index 4a2bc3a..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ServerConnection.java
+++ /dev/null
@@ -1,689 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-
-public abstract class ServerConnection implements Runnable {
- private static final Logger LOGGER = Logger.getLogger(ServerConnection.class);
-
- private static class SocketOpener implements Runnable {
- private ServerConnection fSocketReceiver;
-
- private String fHost;
-
- private int fPort;
-
- private int fSOTimeout;
-
- private boolean isValid;
-
- SocketOpener(String host, int port, int soTimeout, ServerConnection socketReceiver) {
- fHost = host;
- fPort = port;
- fSOTimeout = soTimeout;
- fSocketReceiver = socketReceiver;
- isValid = true;
- }
-
- synchronized void setValid(boolean v) {
- isValid = v;
- }
-
- synchronized boolean isValid() {
- return isValid;
- }
-
- public void run() {
- fSocketReceiver.DEBUG("SocketOpener started");
- try {
- Socket sock = null;
- OutputStream out = null;
- InputStream in = null;
- if (isValid()) {
- if (LOGGER.isDebugEnabled()) {
- fSocketReceiver.DEBUG("Trying to create a Socket: " + fHost + "@" + fPort);
- }
- sock = new Socket(fHost, fPort);
- // sock = new Socket();
- // sock.setSoTimeout((int) fSOTimeout);
- // sock.setTcpNoDelay(true);
- // SocketAddress dest = new
- // InetSocketAddress(fInfo.getHost(), fInfo.getPort());
- // sock.connect(dest, (int) fSOTimeout);
- sock.setSoTimeout(1);
- out = sock.getOutputStream();
- in = sock.getInputStream();
- if (LOGGER.isDebugEnabled()) {
- fSocketReceiver.DEBUG("Created a Socket: " + fHost + "@" + fPort);
- }
- }
- if (sock != null && out != null && in != null && isValid()) {
- if (LOGGER.isDebugEnabled()) {
- fSocketReceiver.DEBUG("Set a Socket to the ServerConnection: " + fHost + "@" + fPort);
- }
- fSocketReceiver.notifyConnected(sock, out, in);
- }
- } catch (IOException e) {
- // e.printStackTrace();
- if (LOGGER.isDebugEnabled()) {
- fSocketReceiver.DEBUG("Failed to create a Socket (" + e.getClass().getName() + "): " + fHost + "@" + fPort);
- }
- if (isValid()) {
- fSocketReceiver.notifyConnectFailed(e);
- }
- }
- }
- }
-
- private static class Status {
- private int fStat = STAT_INIT;
-
- private int fNumWaiters = 0;
-
- Status() {
- // nop
- }
-
- synchronized void set(int stat) {
- fStat = stat;
- this.notifyAll();
- }
-
- synchronized int get() {
- return fStat;
- }
-
- synchronized boolean equals(int stat) {
- return (fStat == stat);
- }
-
- synchronized boolean waitFor(int stat, long timeout)
- throws InterruptedException, TimeoutException {
- if (fStat == stat) return true;
- if (fStat == STAT_CLOSED) return false;
-
- fNumWaiters += 1;
- long deadline = System.currentTimeMillis() + timeout;
- long wait = timeout;
- while (wait > 0) {
- this.wait(wait);
- if (fStat == stat) return true;
- if (fStat == STAT_CLOSED) return false;
- wait = deadline - System.currentTimeMillis();
- }
- throw new TimeoutException();
- }
-
- public String toString() {
- switch (fStat) {
- case STAT_CLOSED:
- return "CLOSED";
- case STAT_INIT:
- return "INIT";
- case STAT_CONNECTING:
- return "CONNECTING";
- case STAT_CONNECTED:
- return "CONNECTED";
- default:
- return "Unkown";
- }
- }
- }
-
- public static final int STAT_CLOSED = -2;
-
- public static final int STAT_FINALIZING = -1;
-
- public static final int STAT_INIT = 0;
-
- public static final int STAT_CONNECTING = 1;
-
- public static final int STAT_CONNECTED = 2;
-
- private final ServerKey fKey;
-
- private final String name;
-
- private final String host;
-
- public String getHost() {
- return host;
- }
-
- private final int port;
-
- public int getPort() {
- return port;
- }
-
- private final RequestDispatcher fDispatcher;
-
- private final int fRetryTime;
-
- private final int timeout;
-
- private long fActivatedTime;
-
- private Thread fThread;
-
- private SocketOpener fSocketOpener = null;
-
- private Thread fSocketOpenerThread = null;
-
- private IHTTPRequestMessage fRequest;
-
- private long fFirstTimeout = 0;
-
- private Socket fSocket = null;
-
- private IOException fSocketException = null;
-
- private InputStream fInputStream = null;
-
- InputStream getInputStream() {
- return fInputStream;
- }
-
- private BufferedOutputStream fOutputStream = null;
-
- OutputStream getOutputStream() {
- return fOutputStream;
- }
-
- private HTTPResponseReader fReader = null;
-
- private long fMessageSerial;
-
- private Status fStat = new Status();
-
- /**
- *
- */
- protected ServerConnection(String name, String host, int port, int group, int index, RequestDispatcher dispatcher,
- int retryTime, int timeout) {
- this.name = name;
- this.host = host;
- this.port = port;
- fKey = new ServerKey(group, index);
- fRetryTime = retryTime;
- fDispatcher = dispatcher;
- this.timeout = timeout;
- fRequest = null;
- fMessageSerial = 0;
- }
-
- protected abstract HTTPResponseMessage createHTTPResponseMessage(long msgSerial);
-
- public synchronized void reset() {
- deactivate();
- setStat(STAT_INIT);
- }
-
- public ServerKey getKey() {
- return fKey;
- }
-
- public synchronized boolean isActive() {
- return (fThread != null);
- }
-
- // synchronized
- public synchronized void activate() {
- if (isActive()) {
- DEBUG("activate: already active");
- return;
- }
- DEBUG("activate");
- setStat(STAT_CONNECTING);
- fActivatedTime = System.currentTimeMillis();
- fMessageSerial = 0;
- setTimeout(false);
- fThread = new Thread(this, "ServerConnection-" + name);
- fThread.start();
-
- fSocket = null;
- fSocketException = null;
- fOutputStream = null;
- fReader = null;
-
- fSocketOpener = new SocketOpener(host, port, (int) timeout * 2, this);
- fSocketOpenerThread = new Thread(fSocketOpener, "SocketOpener-" + this.toString());
- fSocketOpenerThread.start();
- }
-
- public void activateAndConnect(long timeout) throws IOException, TimeoutException, InterruptedException {
- activate();
- waitUntilConnected(timeout);
- }
-
- public void waitUntilConnected(long timeout) throws IOException, TimeoutException, InterruptedException {
- DEBUG("waitUntilConnected");
- int stat;
- synchronized (fStat) {
- if (fStat.equals(STAT_CONNECTING)) {
- fStat.waitFor(STAT_CONNECTED, timeout);
- }
- stat = fStat.get();
- }
- if (stat == STAT_CONNECTED) {
- DEBUG("connected");
- return;
- } else if (stat == STAT_CONNECTING) {
- throw new TimeoutException("ServerConnection.waitUntilConnected");
- } else if (stat == STAT_INIT) {
- throw new IOException("This connection is not activated yet");
- } else if (stat == STAT_CLOSED) {
- throw new IOException("This connection is already closed");
- }
- }
-
- /**
- * Deactivate this connection.
- */
- public synchronized void deactivate() {
- DEBUG("deactivate");
- if (!isActive()) {
- DEBUG("deactivate: already deactive");
- return;
- }
-
- // Stop the thread
- try {
- if (fSocket != null && !fSocket.isOutputShutdown()) {
- fSocket.shutdownOutput();
- }
- } catch (IOException e) {
- // ignore
- WARNING("Failed to shutdown a socket (IOException): " + e.getMessage());
- }
- fThread.interrupt();
- fThread = null;
-
- fSocketOpener.setValid(false);
- fSocketOpenerThread.interrupt();
-
- fSocketOpener = null;
- fSocketOpenerThread = null;
- fSocket = null;
- fOutputStream = null;
- fReader = null;
-
- fActivatedTime = 0;
- fMessageSerial = 0;
- setTimeout(false);
- setStat(STAT_CLOSED);
- }
-
- synchronized void notifyConnected(Socket sock, OutputStream out, InputStream in) {
- if (sock == null) {
- throw new IllegalArgumentException("null");
- }
- DEBUG("setSocket");
- fSocket = sock;
- fSocketException = null;
- fOutputStream = new BufferedOutputStream(new SocketTimeoutRetryOutputStream(out));
- fInputStream = in;
- fReader = fDispatcher.createHTTPResponseReader(in);
- setStat(STAT_CONNECTED);
- }
-
- synchronized void notifyConnectFailed(IOException e) {
- WARNING("setSocketException: failed to create a socket (IOException): " + e.getMessage());
- fSocket = null;
- fSocketException = e;
- fOutputStream = null;
- fReader = null;
- deactivate();
- }
-
- public synchronized void setTimeout(boolean timeout) {
- if (timeout) {
- if (fFirstTimeout == 0) {
- fFirstTimeout = System.currentTimeMillis();
- }
- } else {
- fFirstTimeout = 0;
- }
- }
-
- private synchronized boolean isTimeout() {
- return (fFirstTimeout != 0);
- }
-
- public synchronized boolean isInvalid() {
- if (fFirstTimeout == 0) {
- return false;
- }
- return (System.currentTimeMillis() - fFirstTimeout < fRetryTime);
- }
-
- public int getStat() {
- return fStat.get();
- }
-
- private void setStat(int stat) {
- fStat.set(stat);
- }
-
- // synchronized
- private boolean startSession(long msgSerial, long timeout) throws TimeoutException, InterruptedException {
- if (fMessageSerial != 0) {
- if (msgSerial == fMessageSerial) {
- // Avoid sending the same message
- return false;
- }
- // There is a message whose response is not yet arrived.
- // Wait until a response arrives, or timeout.
- long deadline = System.currentTimeMillis() + timeout;
- long wait = timeout;
- while (wait > 0) {
- this.wait(wait); // <--
- if (fMessageSerial == 0) {
- break;
- }
- wait = deadline - System.currentTimeMillis();
- }
- if (fMessageSerial != 0) {
- throw new TimeoutException("ServerConnection.startSession");
- }
- }
- // (fMessageSerial == 0) && (fMessageSerial != msgSerial)
- fMessageSerial = msgSerial;
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Session started: msgSerial=" + fMessageSerial);
- }
- return true;
- }
-
- private synchronized void finishSession() {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Session finished: msgSerial=" + fMessageSerial);
- }
- assert (fMessageSerial != 0);
- fMessageSerial = 0; // -->startSession
- this.notifyAll();
- }
-
- /**
- * Send a message asynchronously.
- *
- * @param req
- * @param timeout
- * @return
- */
- public synchronized void putRequest(IHTTPRequestMessage req, long timeout)
- throws TimeoutException, InterruptedException
- {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("putRequest: msgSerial=" + req.getSerial() + ", tid=" + req.getTid());
- }
- boolean sessionStarted = startSession(req.getSerial(), timeout);
- assert (req.getSerial() == fMessageSerial);
- if (sessionStarted) {
- // fMessageSerial != null
- fRequest = req; // -->nextRequest
- this.notifyAll();
- }
- }
-
- /*
- public synchronized HTTPResponseMessage getResponse(long timeout)
- throws TimeoutException, InterruptedException
- {
- while (fResponse == null) {
- this.wait();
- }
- HTTPResponseMessage response = fResponse;
- fResponse = null;
- fMessageSerial = 0; //-->startSession (putRequest)
- this.notifyAll();
- return response;
- }
- */
-
- private synchronized IHTTPRequestMessage nextRequest() throws InterruptedException {
- while (fRequest == null || fMessageSerial == 0) {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("nextRequest waiting: request=" + fRequest + ", msgSerial=" + fMessageSerial);
- }
- this.wait();
- }
- // (fRequest != null) && (fMessageSerial != 0)
- if (LOGGER.isDebugEnabled()) {
- DEBUG("nextRequest waiting done: request=" + fRequest + ", msgSerial=" + fMessageSerial);
- }
- IHTTPRequestMessage req = fRequest;
- fRequest = null;
- return req;
- }
-
- // run()
- private IHTTPResponseMessage receiveResponse(long timeout, boolean isBodyEmpty) throws InterruptedException,
- IOException, TimeoutException {
- HTTPResponseReader reader;
- long msgSerial;
- synchronized (this) {
- assert (fStat.equals(STAT_CONNECTED)) && (fReader != null) && (fMessageSerial != 0);
- if (fReader == null || fMessageSerial == 0) {
- throw new IOException("Deactivated");
- }
- reader = fReader;
- msgSerial = fMessageSerial;
- }
-
- // if (fMessageSerial == 0) {
- // long start = System.currentTimeMillis();
- // long deadline = start + timeout;
- // long wait = timeout;
- // while (wait > 0) {
- // this.wait(wait);
- // if (fMessageSerial != 0) {
- // break;
- // }
- // wait = deadline - System.currentTimeMillis();
- // }
- // timeout -= System.currentTimeMillis() - start;
- // }
- // if (fMessageSerial == 0 || timeout <= 0) {
- // throw new TimeoutException("ServerConnection.receiveResponse");
- // }
- // (fMessageSerial != 0) && (timeout > 0)
-
- HTTPResponseMessage response = createHTTPResponseMessage(msgSerial);
- DEBUG("Try to read response...");
- reader.readMessage(response, timeout, isBodyEmpty);
-
- // if (LOGGER.isDebugEnabled()) {
- // DEBUG("Received a response: msgSerial=" + response.getSerial());
- // System.out.println("#######Response from server group " + fGroup.getIndex());
- // try { response.write(System.out); } catch (Exception e) {}
- // System.out.println("####################################################################");
- // }
- // fInfo.decrementProcessingRequest();
- // if (response.getFFFResultCode() == FFFServletHeader.RC_SUCCESS) {
- // fInfo.updateLastActivityTime();
- // }
- return response;
- }
-
- private synchronized void sendRequest(IHTTPRequestMessage request,
- long timeout)
- throws IOException, InterruptedException, TimeoutException {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("sendRequest....");
- }
- long t0 = System.currentTimeMillis();
- waitUntilConnected(timeout);
- assert (fOutputStream != null);
- long t1 = System.currentTimeMillis();
- timeout -= t1 - t0;
- if (timeout <= 0) {
- throw new TimeoutException();
- }
-
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Sent a request: msgSerial=" + request.getSerial() + ", tid=" + request.getTid());
- StringBuffer sb = new StringBuffer();
- ByteArrayOutputStream ob = new ByteArrayOutputStream();
- BifurcatedOutputStream o = new BifurcatedOutputStream(fOutputStream, ob);
- request.write(timeout, o);
- ob.close();
- sb.append("\n===============>====>====>====>=============>\n");
- sb.append(ob.toString());
- sb.append("===============<====<====<====<=============<\n");
- DEBUG(sb.toString());
- } else {
- request.write(timeout, fOutputStream);
- }
- fOutputStream.flush();
-
- fMessageSerial = request.getSerial();
-
- // fInfo.incrementProcessingRequest();
- }
-
- /**
- * Reciever a response from the server. Keep trying to read a response and
- * pass it to the dispatcher.
- */
- public void run() {
- DEBUG("receiver thread started");
- // long lastActivityTime = System.currentTimeMillis();
- try {
- boolean serverError = false;
- int counter = 0;
- while (!Thread.interrupted() && !serverError) {
- counter += 1;
- IHTTPRequestMessage request = nextRequest();
-
- // Send a request to the server
- try {
- if (request.isConnectionShutdownRequired()) {
- request.setConnectionHeader(false);
- sendRequest(request, timeout);
- fSocket.shutdownOutput();
- setStat(STAT_FINALIZING);
- } else {
- request.setConnectionHeader(true);
- sendRequest(request, timeout);
- }
- // fInfo.notifySuccessfulSend();
- // lastActivityTime = System.currentTimeMillis();
- } catch (TimeoutException timeout) {
- DEBUG("sendRequest() timeout");
- setTimeout(true);
- continue;
- }
-
- assert (fStat.equals(STAT_CONNECTED) || fStat.equals(STAT_FINALIZING));
-
- // Recieve a resposne from the server
- int loop = 0;
- long start = System.currentTimeMillis();
- while (!Thread.currentThread().isInterrupted() && !serverError) {
- try {
- DEBUG("ReceiveResponse...");
- IHTTPResponseMessage response = receiveResponse(timeout, request.isResponseBodyEmpty());
-
- // Send the response to the client
- DEBUG("ResponseArrived...");
- if (response.isConnectionToBeClosed()) {
- DEBUG("Since the response is not keep-alive, we do not reuse this connection.");
- setStat(STAT_FINALIZING);
- }
- fDispatcher.responseArrived(this, response); // Interrupted
- finishSession();
-
- break;
- } catch (TimeoutException timeout) {
- // continue;
- // setTimeout(true);
- if (LOGGER.isDebugEnabled()) {
- DEBUG("response receiving timeout (" + timeout.getMessage() + "): retry=" + loop
- + ", elapsed=" + (System.currentTimeMillis() - start));
- }
- }
- loop += 1;
- long delay = System.currentTimeMillis() - start;
- if (delay > 60 * 1000) {
- throw new IOException("Shutdown this connection");
- }
- }
- }
- } catch (HTTPConnectionException e) {
- DEBUG("The connection is closed by the peer.");
- } catch (IOException e) {
- DEBUG("IOException: " + e.getMessage());
- HTTPMalformedResponseMessage response = new HTTPMalformedResponseMessage(fMessageSerial, e);
- try {
- fDispatcher.responseArrived(this, response);
- } catch (InterruptedException interrupted) {
- }
- finishSession();
- } catch (InterruptedException e) {
- DEBUG("reader thread interrupted");
- // ignore
- } finally {
- DEBUG("receiver thread stopped");
- deactivate();
- }
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append(host).append(':').append(port).append('.').append(fKey.toString());
- return sb.toString();
- }
-
- private final void DEBUG(String msg) {
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append(name).append(" [");
- sb.append(this.toString()).append("] ").append(msg);
- LOGGER.debug(sb.toString());
- }
- }
-
- private final void WARNING(String msg) {
- StringBuffer sb = new StringBuffer();
- sb.append(name).append(" [");
- sb.append(this.toString()).append("] ").append(msg);
- LOGGER.warning(sb.toString());
- }
-
- public synchronized String dump() {
- StringBuffer sb = new StringBuffer();
- sb.append(this.toString()).append(": stat=").append(fStat);
- sb.append(", thread=");
- sb.append((fThread == null) ? "null" : Boolean.toString(fThread.isAlive()));
- sb.append(", socketOpener=");
- sb.append((fSocketOpener == null) ? "null" : "exists");
- sb.append(", socketOpenerThread=");
- sb.append((fSocketOpenerThread == null) ? "null" : Boolean.toString(fSocketOpenerThread.isAlive()));
- sb.append(", socket=");
- sb.append((fSocket == null) ? "null" : Boolean.toString(fSocket.isConnected()));
- sb.append(", invalid=").append(isInvalid());
- return sb.toString();
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ServerKey.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ServerKey.java
deleted file mode 100644
index ed01019..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/ServerKey.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-public class ServerKey {
- private int fGroupId;
- private int fServerIndex;
-
- public ServerKey(int group, int server) {
- fGroupId = group;
- fServerIndex = server;
- }
-
- public int getGroupId() {
- return fGroupId;
- }
-
- public int getServerIndex() {
- return fServerIndex;
- }
-
- public boolean equals(Object o) {
- if (!(o instanceof ServerKey)) {
- return false;
- }
- ServerKey key = (ServerKey) o;
- return (fGroupId == key.fGroupId) || (fServerIndex == key.fServerIndex);
- }
-
- public int hashCode() {
- return (fGroupId << 16) | fServerIndex | (fGroupId >>> 16);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append(Integer.toString(fGroupId)).append('.').append(Integer.toString(fServerIndex));
- return sb.toString();
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/Session.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/Session.java
deleted file mode 100644
index f4d5ca8..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/Session.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-
-import org.eclipse.actf.util.httpproxy.core.IClientConnection;
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-
-public class Session {
- static final Logger LOGGER = Logger.getLogger(Session.class);
-
- private IHTTPRequestMessage fRequestMsg = null;
- private IHTTPResponseMessage fResponseMsg = null;
-
- synchronized public IHTTPRequestMessage getRequestMessage() {
- return fRequestMsg;
- }
-
- synchronized public void start(IHTTPRequestMessage req) throws InterruptedException {
- if (req == fRequestMsg) {
- // Restart
- return;
- }
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("A session started: stat=" + fRequestMsg + ", req=" + req);
- }
- while (fRequestMsg != null) {
- this.wait();
- }
- // fRequestMsg == null
- fRequestMsg = req;
- this.notifyAll(); // --> receiveResponse()
- }
-
- synchronized public void start(IHTTPRequestMessage req, long timeout) throws InterruptedException, TimeoutException {
- if (req == fRequestMsg) {
- // Restart
- return;
- }
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("A session started: stat=" + fRequestMsg + ", req=" + req);
- }
- if (fRequestMsg != null) {
- long deadLine = System.currentTimeMillis() + timeout;
- long wait = timeout;
- while (wait > 0) {
- this.wait(wait); // <--getAndSendResponse()
- if (fResponseMsg == null) {
- break;
- }
- wait = deadLine - System.currentTimeMillis();
- }
- if (fRequestMsg == null) {
- throw new TimeoutException("Session.start");
- }
- }
- // fRequestMsg == null
- fRequestMsg = req;
- this.notifyAll(); // --> receiveResponse()
- }
-
- synchronized public boolean receiveResponse(IHTTPResponseMessage response) throws InterruptedException {
- if (fRequestMsg != null && fRequestMsg.getSerial() != response.getSerial()) {
- return false;
- }
- while (fResponseMsg != null) {
- this.wait();
- }
- fResponseMsg = response;
- this.notifyAll(); // --> getAndSendResponse()
- return true;
- }
-
- synchronized protected IHTTPResponseMessage waitResponse(long timeout)
- throws InterruptedException, TimeoutException {
- if (fResponseMsg == null) {
- long deadLine = System.currentTimeMillis() + timeout;
- long wait = timeout;
- while (wait > 0) {
- this.wait(wait);
- if (fResponseMsg != null) {
- break;
- }
- wait = deadLine - System.currentTimeMillis();
- }
- if (fResponseMsg == null) {
- throw new TimeoutException("ResponseSync.get");
- }
- }
- // fResponseMsg != null
- IHTTPResponseMessage response = fResponseMsg;
- fResponseMsg = null;
- return response;
- }
-
- synchronized protected void notifyCompletion() {
- fRequestMsg = null;
- this.notifyAll(); //-->start()
- }
-
- synchronized public IHTTPResponseMessage getAndSendResponse(IClientConnection client, long timeout)
- throws InterruptedException, TimeoutException, IOException {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("getAndSendResponse: entrered");
- }
- long t0 = System.currentTimeMillis();
- IHTTPResponseMessage response = waitResponse(timeout);
- if (response instanceof HTTPMalformedResponseMessage) {
- throw ((HTTPMalformedResponseMessage) response).getIOException();
- }
- long t1 = System.currentTimeMillis();
- timeout -= t1 - t0;
- if (timeout <= 0) {
- timeout = 1;
- }
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("getAndSendResponse: got a response");
- }
- try {
- client.sendResponse(timeout, response);
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("getAndSendResponse: sent a response");
- }
- } catch (IOException e) {
- return response;
- } catch (TimeoutException e) {
- return response;
- }
- notifyCompletion();
- return null;
- }
-
- synchronized public IHTTPResponseMessage getResponse(long timeout)
- throws InterruptedException, TimeoutException, IOException {
- IHTTPResponseMessage response = waitResponse(timeout);
- notifyCompletion();
- if (response instanceof HTTPMalformedResponseMessage) {
- throw ((HTTPMalformedResponseMessage) response).getIOException();
- }
- return response;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/SocketTimeoutRetryInputStream.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/SocketTimeoutRetryInputStream.java
deleted file mode 100644
index a084f77..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/SocketTimeoutRetryInputStream.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.SocketTimeoutException;
-
-public class SocketTimeoutRetryInputStream extends FilterInputStream {
- public static int read(InputStream is) throws IOException {
- while (true) {
- try {
- return is.read();
- } catch (SocketTimeoutException e) {
- }
- }
- }
-
- public static int read(InputStream is, byte[] buf, int offset, int length) throws IOException {
- while (true) {
- try {
- return is.read(buf, offset, length);
- } catch (SocketTimeoutException e) {
- }
- }
- }
-
- public static int read(InputStream is, byte[] buf) throws IOException {
- while (true) {
- try {
- return is.read(buf);
- } catch (SocketTimeoutException e) {
- }
- }
- }
-
- public int available() throws IOException {
- while (true) {
- try {
- return in.available();
- } catch (SocketTimeoutException e) {
- }
- }
- }
-
- public void close() throws IOException {
- while (true) {
- try {
- in.close();
- break;
- } catch (SocketTimeoutException e) {
- }
- }
- }
-
- public void mark(int readlimit) {
- in.mark(readlimit);
- }
-
- public boolean markSupported() {
- return in.markSupported();
- }
-
- public int read() throws IOException {
- return read(in);
- }
-
- public int read(byte[] buf) throws IOException {
- return read(in, buf);
- }
-
- public int read(byte[] buf, int offset, int len) throws IOException {
- return read(in, buf, offset, len);
- }
-
- public void reset() throws IOException {
- while (true) {
- try {
- in.reset();
- break;
- } catch (SocketTimeoutException e) {
- }
- }
- }
-
- public long skip(long n) throws IOException {
- while (true) {
- try {
- return in.skip(n);
- } catch (SocketTimeoutException e) {
- }
- }
- }
-
- SocketTimeoutRetryInputStream(InputStream is) {
- super(is);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/SocketTimeoutRetryOutputStream.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/SocketTimeoutRetryOutputStream.java
deleted file mode 100644
index 96b35a0..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/core/impl/SocketTimeoutRetryOutputStream.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.core.impl;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.SocketTimeoutException;
-
-public class SocketTimeoutRetryOutputStream extends OutputStream {
- public static void write(OutputStream os, byte[] buf) throws IOException {
- while (true) {
- try {
- os.write(buf);
- break;
- } catch(SocketTimeoutException e) {
- }
- }
- }
-
- public static void write(OutputStream os, byte[] buf, int offset, int len)
- throws IOException {
- while (true) {
- try {
- os.write(buf, offset, len);
- break;
- } catch(SocketTimeoutException e) {
- }
- }
- }
-
- public static void write(OutputStream os, int b) throws IOException {
- while (true) {
- try {
- os.write(b);
- break;
- } catch(SocketTimeoutException e) {
- }
- }
- }
-
- public void close() throws IOException {
- while (true) {
- try {
- outputStream.close();
- break;
- } catch(SocketTimeoutException e) {
- }
- }
- }
-
- public void flush() throws IOException {
- while (true) {
- try {
- outputStream.flush();
- break;
- } catch(SocketTimeoutException e) {
- }
- }
- }
-
- public void write(byte[] buf) throws IOException {
- write(outputStream, buf);
- }
-
- public void write(byte[] buf, int offset, int len) throws IOException {
- write(outputStream, buf, offset, len);
- }
-
- public void write(int b) throws IOException {
- write(outputStream, b);
- }
-
- private final OutputStream outputStream;
-
- SocketTimeoutRetryOutputStream(OutputStream outputStream) {
- this.outputStream = outputStream;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IClientStateManager.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IClientStateManager.java
deleted file mode 100644
index a7df0d8..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IClientStateManager.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.proxy;
-
-public interface IClientStateManager {
-
- // We should use read-write lock instead of mutex.
- public abstract void put(Object stateKey, Object stateValue);
-
- public abstract Object get(Object stateKey);
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPLocalServer.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPLocalServer.java
deleted file mode 100644
index 5cb0420..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPLocalServer.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.proxy;
-
-import java.io.IOException;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-
-public interface IHTTPLocalServer {
-
- public abstract boolean processRequest(int id, IHTTPProxyConnection fClient,
- IHTTPRequestMessage request, IHTTPProxyTranscoder transcoder)
- throws InterruptedException, IOException;
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPLocalServerFactory.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPLocalServerFactory.java
deleted file mode 100644
index efc649d..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPLocalServerFactory.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.proxy;
-
-
-public interface IHTTPLocalServerFactory {
- public IHTTPLocalServer newInstance();
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPProxyConnection.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPProxyConnection.java
deleted file mode 100644
index c1276f0..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPProxyConnection.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.proxy;
-
-import java.io.IOException;
-import java.net.Socket;
-
-import org.eclipse.actf.util.httpproxy.core.IClientConnection;
-
-public interface IHTTPProxyConnection extends IClientConnection {
-
- public abstract ISecretManager getSecretManager();
-
- public abstract int getListenPort();
-
- public abstract void init(IClientStateManager clientStateManager,
- Socket clientSock, long keepAlive, int initServerGroupIdx)
- throws IOException;
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPProxyTranscoder.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPProxyTranscoder.java
deleted file mode 100644
index 79cad22..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPProxyTranscoder.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.proxy;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-
-public interface IHTTPProxyTranscoder {
- public IHTTPResponseMessage transcode(int id, IHTTPRequestMessage request,
- IHTTPResponseMessage response);
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPProxyTranscoderFactory.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPProxyTranscoderFactory.java
deleted file mode 100644
index 6c0ed98..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPProxyTranscoderFactory.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.proxy;
-
-public interface IHTTPProxyTranscoderFactory {
- IHTTPProxyTranscoder newInstance(int id);
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPSessionOverrider.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPSessionOverrider.java
deleted file mode 100644
index 94efda3..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPSessionOverrider.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.proxy;
-
-import java.io.IOException;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-public interface IHTTPSessionOverrider {
-
- public abstract IHTTPRequestMessage getSessionRequest();
-
- public abstract IHTTPResponseMessage getSessionResponse();
-
- public abstract boolean replaceRequest(IClientStateManager csm,
- IHTTPRequestMessage request) throws IOException;
-
- public abstract boolean replaceResponse(IClientStateManager csm,
- IHTTPRequestMessage request, IHTTPResponseMessage response,
- int timeout) throws IOException, TimeoutException;
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPSessionOverriderFactory.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPSessionOverriderFactory.java
deleted file mode 100644
index 295f9ec..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/IHTTPSessionOverriderFactory.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.proxy;
-
-public interface IHTTPSessionOverriderFactory {
- public IHTTPSessionOverrider newInstance(int id);
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/ISecretManager.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/ISecretManager.java
deleted file mode 100644
index a522c52..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/ISecretManager.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.proxy;
-
-public interface ISecretManager {
-
- public abstract String getSecret(String id, boolean remove);
-
- public abstract byte[] requestSecret();
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/ClientStateManager.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/ClientStateManager.java
deleted file mode 100644
index 62e3d84..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/ClientStateManager.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.actf.util.httpproxy.proxy.impl;
-
-import java.util.HashMap;
-
-import org.eclipse.actf.util.httpproxy.proxy.IClientStateManager;
-
-
-
-public class ClientStateManager implements IClientStateManager {
- private Object key;
- private static HashMap clientStateManagers = new HashMap();
-
- private HashMap stateMap;
-
- // We should use read-write lock instead of mutex.
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.IClientStateManager#put(java.lang.Object, java.lang.Object)
- */
- public synchronized void put(Object stateKey, Object stateValue) {
- stateMap.put(stateKey, stateValue);
- }
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.IClientStateManager#get(java.lang.Object)
- */
- public synchronized Object get(Object stateKey) {
- return stateMap.get(stateKey);
- }
-
- private ClientStateManager(Object key) {
- this.key = key;
- this.stateMap = new HashMap();
- }
-
- public static IClientStateManager getClientStateManager(Object key) {
- IClientStateManager csm = (IClientStateManager) clientStateManagers.get(key);
- if (csm == null) {
- csm = new ClientStateManager(key);
- clientStateManagers.put(key, csm);
- }
- return csm;
- }
-}
-
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/HTTPProxyConnection.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/HTTPProxyConnection.java
deleted file mode 100644
index c8235bb..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/HTTPProxyConnection.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.proxy.impl;
-
-import java.io.IOException;
-import java.net.Socket;
-
-import org.eclipse.actf.util.httpproxy.ExternalProxyConfig;
-import org.eclipse.actf.util.httpproxy.HTTPProxy;
-import org.eclipse.actf.util.httpproxy.core.impl.ClientConnection;
-import org.eclipse.actf.util.httpproxy.core.impl.ServerConnection;
-import org.eclipse.actf.util.httpproxy.proxy.IClientStateManager;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyConnection;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyTranscoderFactory;
-import org.eclipse.actf.util.httpproxy.proxy.ISecretManager;
-
-
-public class HTTPProxyConnection extends ClientConnection implements IHTTPProxyConnection {
- private final HTTPProxy fProxy;
-
- HTTPProxy getProxy() {
- return fProxy;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyConnection#getSecretManager()
- */
- public ISecretManager getSecretManager() {
- return fProxy.getSecretManager();
- }
-
- ExternalProxyConfig getExternalProxyConfig(){
- return fProxy.getExternalProxyConfig();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyConnection#getListenPort()
- */
- public int getListenPort(){
- return fProxy.getListenPort();
- }
-
- private final int timeout;
-
- void notifySuccessfulServerConnection(ServerConnection conn) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyConnection#init(org.eclipse.actf.util.httpproxy.ClientStateManager, java.net.Socket, long, int)
- */
- public void init(IClientStateManager clientStateManager,
- Socket clientSock,
- long keepAlive,
- int initServerGroupIdx) throws IOException {
- // setConnectionName("HTTPProxyConnection-" + clientSock.getPort());
- setConnectionName("[id:" + clientSock.getPort() + "] HTTPProxyConnection");
- HTTPRequestDispatcher dispatcher = new HTTPRequestDispatcher(this,
- clientStateManager,
- clientSock,
- getQueueSize(), timeout);
- IHTTPProxyTranscoderFactory factory = fProxy.getProxyTranscoderFactory();
- if(factory!=null){
- dispatcher.setTranscoder(factory.newInstance(dispatcher.getDispatcherId()));
- }
- initInternal(clientSock, keepAlive, timeout, dispatcher);
- }
-
- public HTTPProxyConnection(HTTPProxy fProxy, int queueSize, int timeout) {
- super(fProxy, queueSize);
- this.fProxy = fProxy;
- this.timeout = timeout;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/HTTPRequestDispatcher.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/HTTPRequestDispatcher.java
deleted file mode 100644
index 7a7e8ac..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/HTTPRequestDispatcher.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.proxy.impl;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.util.ArrayList;
-
-import org.eclipse.actf.util.httpproxy.ExternalProxyConfig;
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.core.impl.HTTPResponseInMemoryMessage;
-import org.eclipse.actf.util.httpproxy.core.impl.HeaderToAdd;
-import org.eclipse.actf.util.httpproxy.core.impl.RequestDispatcher;
-import org.eclipse.actf.util.httpproxy.core.impl.ServerConnection;
-import org.eclipse.actf.util.httpproxy.core.impl.Session;
-import org.eclipse.actf.util.httpproxy.proxy.IClientStateManager;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPLocalServer;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPLocalServerFactory;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyTranscoder;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverrider;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPSessionOverriderFactory;
-import org.eclipse.actf.util.httpproxy.util.Logger;
-import org.eclipse.actf.util.httpproxy.util.ParseURI;
-import org.eclipse.actf.util.httpproxy.util.TimeoutException;
-
-public class HTTPRequestDispatcher extends RequestDispatcher {
- private static final Logger LOGGER = Logger
- .getLogger(HTTPRequestDispatcher.class);
-
- private final IClientStateManager clientStateManager;
-
- private final HTTPProxyConnection fClient;
-
- private final ExternalProxyConfig fExProxyConf;
-
- private final int timeout;
-
- static private final int HTTP_WELL_KNOWN_PORT = 80;
- static private final int HTTPS_WELL_KNOWN_PORT = 443;
-
- private static class CacheConfig {
- public final String urlPattern;
- public final byte[] control;
-
- public CacheConfig(String urlPattern, String control) {
- this.urlPattern = urlPattern;
- this.control = control.getBytes();
- }
- }
-
- private static CacheConfig[] cacheConfigs = { // new
- // CacheConfig("http://disney\\.go\\.com/.*",
- // "max-age=" + 24 * 60 *
- // 60),
- new CacheConfig("http://.*\\abcnews\\.go\\.com/Video/.*", "no-cache") };
-
- private IHTTPResponseMessage addCacheControl(String uriStr,
- IHTTPResponseMessage response) {
- // System.err.println("U:" + uriStr);
- for (int i = 0; i < cacheConfigs.length; i++) {
- if (uriStr.matches(cacheConfigs[i].urlPattern)) {
- System.err.println("match-to:" + cacheConfigs[i].urlPattern);
- response.setHeader(IHTTPHeader.CACHE_CONTROL_A,
- cacheConfigs[i].control);
- return response;
- }
- }
- return response;
- }
-
- private IHTTPSessionOverrider overrider = null;
- private IHTTPLocalServer localServer = null;
-
- public HTTPRequestDispatcher(HTTPProxyConnection client,
- IClientStateManager clientStateManager, Socket clientSock,
- int queueSize, int timeout) {
- super("HTTPRequestDispatcher-" + clientSock.getLocalPort(),
- new Session(), client, clientSock, queueSize);
- this.fClient = client;
- this.fExProxyConf = client.getExternalProxyConfig();
- this.clientStateManager = clientStateManager;
- this.timeout = timeout;
-
- //this.localServer = new HTTPLocalServerSWF(client.getSecretManager());
- //this.overrider = new SWFBootloader(getDispatcherId());
-
- IHTTPLocalServerFactory localServerFactory = client.getProxy().getLocalServerFactory();
- IHTTPSessionOverriderFactory overriderFactory = client.getProxy().getSessionOverriderFactory();
-
- if(null!=localServerFactory){
- this.localServer = localServerFactory.newInstance();
- }
- if(null!=overriderFactory){
- this.overrider = overriderFactory.newInstance(getDispatcherId());
- }
- }
-
- private boolean processLocalServerRequest(IHTTPRequestMessage request)
- throws InterruptedException, IOException {
- if(null==localServer){
- return false;
- }
- return localServer.processRequest(getDispatcherId(), fClient, request,
- transcoder);
- }
-
- private ArrayList serverConnectionCache = new ArrayList();
-
- private HTTPServerConnection getConnection(String host, int port) {
- HTTPServerConnection sc;
- int len = serverConnectionCache.size();
- int i = 0;
- while (i < len) {
- sc = (HTTPServerConnection) serverConnectionCache.get(i);
- if (host.equals(sc.getHost()) && (port == sc.getPort())) {
- if (sc.getStat() < 0) {
- sc.deactivate();
- sc = HTTPServerConnection.newConnection(this, host, port,
- timeout);
- serverConnectionCache.set(i, sc);
- }
- return sc;
- } else {
- if (sc.getStat() < 0) {
- sc.deactivate();
- serverConnectionCache.remove(i);
- len--;
- } else {
- i++;
- }
- }
- }
- sc = HTTPServerConnection.newConnection(this, host, port, timeout);
- serverConnectionCache.add(sc);
- return sc;
- }
-
- private HTTPServerConnection newConnectionForServer(
- IHTTPRequestMessage request, boolean modeConnect) {
- String host;
- int port;
- String uriStr = request.getRequestURIString();
- String authority = ParseURI.getAuthority(uriStr);
- IHTTPHeader hostHeader = request.getHeader(IHTTPHeader.HOST_A);
- if (modeConnect) {
- host = ParseURI.parseHost(uriStr);
- port = ParseURI.parsePort(uriStr, HTTPS_WELL_KNOWN_PORT);
- } else if (hostHeader != null) {
- String hostStr = new String(hostHeader.getValue());
- host = ParseURI.parseHost(hostStr);
- port = ParseURI.parsePort(hostStr, HTTP_WELL_KNOWN_PORT);
- } else if (authority != null) {
- /*
- * URI uri = null; try { uri = new URI(uriStr); } catch
- * (URISyntaxException e) { WARNING("URI is invalid:" + uriStr);
- * return null; } host = uri.getHost(); port = uri.getPort();
- */
- host = ParseURI.parseHost(authority);
- port = ParseURI.parsePort(authority, HTTP_WELL_KNOWN_PORT);
-
- HeaderToAdd header = new HeaderToAdd();
- // header.init(HTTPHeader.HOST, host);
- // request.addHeader(header);
- request.setHeader(IHTTPHeader.HOST_A, host.getBytes());
- } else {
- return null;
- }
- if (authority != null) {
- String absPath = ParseURI.getAbsolutePath(uriStr);
- request.setRequestURIString(absPath);
- }
-
- IHTTPHeader pcHeader = request.getHeader(IHTTPHeader.PROXY_CONNECTION_A);
- if (pcHeader != null) {
- pcHeader.setRemoved(true);
- request.setHeader(IHTTPHeader.CONNECTION_A, pcHeader.getValue());
- }
-
- IHTTPHeader pragmaHeader = request.getHeader(IHTTPHeader.PRAGMA_A);
- if (pragmaHeader != null)
- pragmaHeader.setRemoved(true);
-
- return getConnection(host, port);
- }
-
- private HTTPServerConnection newConnectionForProxy() {
- return getConnection(fExProxyConf.getExternalProxyHost(), fExProxyConf
- .getExternalProxyPort());
- }
-
- private IHTTPProxyTranscoder transcoder = null;
-
- public void setTranscoder(IHTTPProxyTranscoder transcoder) {
- this.transcoder = transcoder;
- }
-
- private IHTTPResponseMessage transcode(IHTTPRequestMessage request,
- IHTTPResponseMessage response) {
- if (transcoder != null) {
- return transcoder.transcode(getDispatcherId(), request, response);
- }
- return response;
- }
-
- private void sendGatewayTimeout(IHTTPRequestMessage request)
- throws InterruptedException, IOException {
- fClient.sendResponse(new HTTPResponseInMemoryMessage(request
- .getSerial(), IHTTPHeader.HTTP_VERSION_1_0_A, "504".getBytes(),
- "Gateway Timeout".getBytes(),
- IHTTPResponseMessage.EMPTY_BODY));
- }
-
- private void sendBadGateway(IHTTPRequestMessage request)
- throws InterruptedException, IOException {
- fClient.sendResponse(new HTTPResponseInMemoryMessage(request
- .getSerial(), IHTTPHeader.HTTP_VERSION_1_0_A, "502".getBytes(),
- "Bad Gateway".getBytes(),
- IHTTPResponseMessage.EMPTY_BODY));
- }
-
- private void sendNotFound(IHTTPRequestMessage request)
- throws InterruptedException, IOException {
- fClient
- .sendResponse(new HTTPResponseInMemoryMessage(request
- .getSerial(), IHTTPHeader.HTTP_VERSION_1_0_A, "404"
- .getBytes(), "Not Found".getBytes(),
- IHTTPResponseMessage.EMPTY_BODY));
- }
-
- public void run() {
- // Sender thread.
- // Pickup a message (QueuedMsg | RetryMsg) and
- // The sent request is put into the waiting queue.
- try {
- IHTTPRequestMessage request = null;
- IHTTPResponseMessage response = null;
- ServerConnection conn = null;
- while (true) {
- // Get next request
- if (request == null) {
- DEBUG("Trying to get next request");
- // Wait while (fNextMsg == null && fRetryMsg == null &&
- // fArrivedMsgs.isEmpty())
- request = getNextRequest();
- }
- assert (request != null);
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append("nextRequest: msgSerial=").append(
- request.getSerial());
- sb.append(", tid=").append(request.getTid());
- DEBUG(sb.toString());
- }
- String uriStr = request.getRequestURIString();
-
- boolean modeConnect;
- if (IHTTPHeader.METHOD_CONNECT.equals(request
- .getMethodAsString())) {
- modeConnect = true;
- } else {
- modeConnect = false;
- }
-
- if (null!=overrider && overrider.replaceRequest(clientStateManager, request)) {
- request = overrider.getSessionRequest();
- response = overrider.getSessionResponse();
- if (response != null) {
- try {
- fClient.sendResponse(timeout, response);
- fClient.notifySuccessfulServerConnection(conn);
- DEBUG("SUCCESS");
- } catch (TimeoutException e) {
- sendGatewayTimeout(request);
- DEBUG("Timeout. Failed to send original SWF to the client.");
- }
- request = null;
- clearNextRequest();
- continue;
- }
- }
- if (processLocalServerRequest(request)) {
- request = null;
- clearNextRequest();
- continue;
- }
-
- // Send a request to a server
- if (fExProxyConf.getExternalProxyFlag()) {
- conn = newConnectionForProxy();
- } else {
- conn = newConnectionForServer(request, modeConnect);
- }
- if (conn == null) {
- request = null;
- continue;
- }
-
- try {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Trying to connect to " + conn);
- }
- conn.activateAndConnect(timeout);
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Trying to send a request to " + conn);
- }
- if (conn.getStat() == ServerConnection.STAT_CONNECTED) {
- if (modeConnect
- && !fExProxyConf.getExternalProxyFlag()) {
- fClient.allowTunnel(request, conn, timeout);
- clearNextRequest();
- request = null;
- conn.deactivate();
- continue;
- }
- startSessionAndSendRequest(request, conn, timeout);
- } else {
- fClient.sendResponse(new HTTPResponseInMemoryMessage(
- request.getSerial(),
- IHTTPHeader.HTTP_VERSION_1_0_A,
- "503".getBytes(), "Service Unavailable"
- .getBytes(),
- IHTTPResponseMessage.EMPTY_BODY));
- continue;
- }
- DEBUG("Sent a request to " + conn);
- } catch (TimeoutException timeout) {
- DEBUG("sendRequest() timeout, try again");
- sendGatewayTimeout(request);
- conn.deactivate();
- continue;
- } catch (IOException ioe) {
- DEBUG("connection closed");
- sendNotFound(request);
- break;
- }
-
- // Get a response from a server, and send it back to the client.
- if (LOGGER.isDebugEnabled()) {
- DEBUG("Trying to receive a response from " + conn);
- }
-
- try {
- response = fSession.getResponse(timeout);
- response = addCacheControl(uriStr, response);
- if (response != null) {
- if (modeConnect) {
- if ("200".equals(response.getStatusCodeAsString())) {
- fClient.allowTunnel(request, conn, timeout);
- } else {
- fClient.sendResponse(0, response);
- }
- } else {
- IHTTPResponseMessage newResponse = transcode(
- request, response);
- if (null!=overrider && overrider.replaceResponse(
- clientStateManager, request, response,
- timeout)) {
- newResponse = overrider
- .getSessionResponse();
- }
- fClient.sendResponse(timeout, newResponse);
- }
-
- request = null;
- clearNextRequest();
- fClient.notifySuccessfulServerConnection(conn);
-
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer("SUCCESS\n");
- sb.append("Received a response from ").append(conn);
- DEBUG(sb.toString());
- }
- }
- } catch (TimeoutException e) {
- sendGatewayTimeout(request);
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb
- .append(
- "Timeout. Failed to send/receive a message to a server (")
- .append(conn);
- sb.append(") Try another server.");
- DEBUG(sb.toString());
- }
- // TODO
- } catch (IOException e) {
- if (fClient.isHandlingRequest()) {
- sendBadGateway(request);
- }
- throw e;
- }
- // conn.deactivate();
- }
- } catch (InterruptedException interrupted) {
- // nop
- DEBUG("Interrupted");
- } catch (IOException e) {
- if (LOGGER.isDebugEnabled()) {
- DEBUG("RequestDispatcher is stopped by IOException.");
- e.printStackTrace();
- }
- // fClient.resetConnection();
- } finally {
- int len = serverConnectionCache.size();
- for (int i = 0; i < len; i++) {
- HTTPServerConnection c = (HTTPServerConnection) serverConnectionCache
- .get(i);
- c.deactivate();
- }
- DEBUG("RequestDispatcher stopped");
- }
- }
-
- public void close() {
- super.close();
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- // sb.append("HTTPRequestDispatcher-").append(getDispatcherId());
- sb.append("[id:").append(getDispatcherId()).append(
- "] HTTPRequestDispatcher");
- return sb.toString();
- }
-
- protected final void DEBUG(String msg) {
- if (LOGGER.isDebugEnabled()) {
- StringBuffer sb = new StringBuffer();
- sb.append(this.toString()).append(": ").append(msg);
- LOGGER.debug(sb.toString());
- }
- }
-
- protected final void WARNING(String msg) {
- StringBuffer sb = new StringBuffer();
- sb.append(this.toString()).append(": ").append(msg);
- LOGGER.warning(sb.toString());
- }
-
- protected final void INFO(String msg) {
- StringBuffer sb = new StringBuffer();
- sb.append(this.toString()).append(": ").append(msg);
- LOGGER.info(sb.toString());
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/HTTPServerConnection.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/HTTPServerConnection.java
deleted file mode 100644
index 6c8b802..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/proxy/impl/HTTPServerConnection.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.proxy.impl;
-
-import org.eclipse.actf.util.httpproxy.core.impl.HTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.core.impl.HTTPResponseStreamMessage;
-import org.eclipse.actf.util.httpproxy.core.impl.ServerConnection;
-
-
-public class HTTPServerConnection extends ServerConnection {
- private HTTPServerConnection(String host, int port, HTTPRequestDispatcher dispatcher, int retryTime, int timeout) {
- super("[id:" + dispatcher.getDispatcherId() + "] HTTPServerConnection", host, port, 0, 0, dispatcher,
- retryTime, timeout);
- }
-
- static HTTPServerConnection newConnection(HTTPRequestDispatcher dispatcher, String host, int port, int timeout) {
- return new HTTPServerConnection(host, port, dispatcher, timeout, timeout);
- }
-
- protected HTTPResponseMessage createHTTPResponseMessage(long msgSerial) {
- return new HTTPResponseStreamMessage(msgSerial);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/CacheMap.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/CacheMap.java
deleted file mode 100644
index 6b2c717..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/CacheMap.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.util;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-
-
-public class CacheMap extends TreeMap implements Map {
- private static final long serialVersionUID = 6681131647931821052L;
-
- private final int maxSize;
- private final int evictSize;
-
- private final LinkedList accessList = new LinkedList();
-
- public CacheMap(int maxSize, int evictSize) {
- this.maxSize = maxSize;
- this.evictSize = evictSize;
- }
-
- private void evict() {
- Iterator it = accessList.iterator();
- for (int i = 0; i < evictSize; i++) {
- if (!it.hasNext()) return;
- Object key = it.next();
- this.remove(key);
- it.remove();
- }
- }
-
- private int searchAccessList(Object key) {
- return accessList.indexOf(key);
- }
-
- private void accessEntry(Object key) {
- int idx = searchAccessList(key);
- if (idx >= 0) {
- accessList.remove(idx);
- }
- accessList.add(key);
- }
-
- public Object put(Object key, Object val) {
- if (size() >= maxSize) evict();
- accessEntry(key);
- return super.put(key, val);
- }
-
- public Object get(Object key) {
- accessEntry(key);
- return super.get(key);
- }
-
- public Object matchStartsWith(String prefix) {
- SortedMap smap = super.tailMap(prefix);
- Object okey;
- try {
- okey = smap.firstKey();
- } catch (NoSuchElementException e) {
- return null;
- }
- if (!(okey instanceof String)) return null;
- String key = (String) okey;
- // System.err.println("MSW:" + key + " / " + prefix);
- if (!key.startsWith(prefix)) return null;
- return super.get(key);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/HTTPUtil.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/HTTPUtil.java
deleted file mode 100644
index db6e791..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/HTTPUtil.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Hisashi MIYASHITA - initial API and implementation
- * Kentarou FUKUDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.util;
-
-import java.io.IOException;
-
-import org.eclipse.actf.util.httpproxy.core.IHTTPHeader;
-import org.eclipse.actf.util.httpproxy.core.IHTTPRequestMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage;
-import org.eclipse.actf.util.httpproxy.core.IHTTPResponsePushbackMessage;
-import org.eclipse.actf.util.httpproxy.core.impl.HTTPResponseInMemoryMessage;
-import org.eclipse.actf.util.httpproxy.core.impl.HTTPResponsePushbackMessage;
-import org.eclipse.actf.util.httpproxy.proxy.IHTTPProxyConnection;
-
-public class HTTPUtil {
- public static void sendFailedToClient(IHTTPProxyConnection fClient,
- IHTTPRequestMessage request) throws InterruptedException,IOException {
- fClient.sendResponse(new HTTPResponseInMemoryMessage(request
- .getSerial(), IHTTPHeader.HTTP_VERSION_1_0_A, "404"
- .getBytes(), "Not found".getBytes(),
- IHTTPResponseMessage.EMPTY_BODY));
- }
-
- public static IHTTPResponseMessage createHTTPResponseInMemoryMessage(
- IHTTPResponseMessage base, byte[] body) {
- return new HTTPResponseInMemoryMessage(base, body);
- }
-
- public static IHTTPResponseMessage createHTTPResponseInMemoryMessage(
- long serial, byte[] version, byte[] statusCode,
- byte[] reasonPhrase, byte[] body) {
- return new HTTPResponseInMemoryMessage(serial, version, statusCode, reasonPhrase, body);
- }
-
- public static IHTTPResponsePushbackMessage createHTTPResponsePushbackMessage(IHTTPResponseMessage base,
- int pushbackBufferSize){
- return new HTTPResponsePushbackMessage(base, pushbackBufferSize);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/IObjectPool.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/IObjectPool.java
deleted file mode 100644
index 40845f8..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/IObjectPool.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.util;
-
-
-public interface IObjectPool {
- String getName();
- boolean add(Object o);
- Object take();
- Object take(int timeout) throws InterruptedException;
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/IWorkpileController.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/IWorkpileController.java
deleted file mode 100644
index deb2c65..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/IWorkpileController.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.util;
-
-
-public interface IWorkpileController {
- void input(Runnable work);
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/Logger.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/Logger.java
deleted file mode 100644
index 0af0b8c..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/Logger.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.util;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Properties;
-import java.util.logging.Level;
-
-
-public class Logger {
- public static void setConfigPropertyName(String name) {
- PROP_LOGGING_CONFIGURATION = name;
- }
- private static String PROP_LOGGING_CONFIGURATION = "httpproxy.conf.logging";
- public static final String DEFAULT_LOGGING_CONFIGURATION = "logging.conf";
-
- private static String sName;
-
- public static Logger getLogger(Class clazz) {
- return new Logger(clazz);
- }
-
- public static void configure(String name) throws Exception {
- sName = name;
- String config = System.getProperty(PROP_LOGGING_CONFIGURATION, DEFAULT_LOGGING_CONFIGURATION);
- Properties props = new Properties();
- Exception exception = null;
- if (config != null) {
- try {
- FileInputStream in = new FileInputStream(config);
- java.util.logging.LogManager.getLogManager().readConfiguration(in);
-
- in = new FileInputStream(config);
- props.load(in);
-
- exception = null;
- } catch (FileNotFoundException e) {
- //System.err.println("WARNING: File not found " + config);
- exception = e;
- } catch (IOException e) {
- //System.err.println("WARNING: Cannot read file " + config);
- exception = e;
- }
- }
-
- java.util.logging.Logger l = java.util.logging.Logger.getLogger("");
- l.setLevel(Level.ALL);
-
- //Set a FileHandler... disabled now. We can use Chainsaw or some other log viewers via network.
- //setFileHandler(l, name, props);
-
- if (exception != null) {
- throw exception;
- }
- }
-
- public static void configure(String name, InputStream configIS) throws Exception {
- sName = name;
- Exception exception = null;
- if (configIS != null) {
- try {
- java.util.logging.LogManager.getLogManager().readConfiguration(configIS);
- exception = null;
- } catch (FileNotFoundException e) {
- //System.err.println("WARNING: File not found " + config);
- exception = e;
- } catch (IOException e) {
- //System.err.println("WARNING: Cannot read file " + config);
- exception = e;
- }
- }
-
- java.util.logging.Logger l = java.util.logging.Logger.getLogger("");
- l.setLevel(Level.ALL);
-
- if (exception != null) {
- throw exception;
- }
- }
-
-/*
- private static void setFileHandler(java.util.logging.Logger l, String name, Properties props) throws IOException {
- String pattern = props.getProperty("java.util.logging.FileHandler.pattern", "logs/%s_%u.log");
- pattern = pattern.replaceAll("%s", name);
- Handler fileHandler = new FileHandler(pattern);
- String formatterName = props.getProperty("java.util.logging.FileHandler.formatter");
- if (formatterName != null) {
- try {
- Class formatterClass = Class.forName(formatterName);
- Object o = formatterClass.newInstance();
- if (o instanceof Formatter) {
- fileHandler.setFormatter((Formatter) o);
- }
- } catch (Exception e) {
- // ignore
- }
- }
- //fileHandler.setLevel(Level.ALL);
- //l.addHandler(fileHandler);
- final MemoryHandler mh = new MemoryHandler(fileHandler, 1000, Level.ALL);
- l.addHandler(mh);
-
- Timer timer = new Timer(true);
- timer.schedule(new TimerTask() {
- public void run() {
- mh.push();
- mh.flush();
- }
- }, 0, 1000L);
- }
-*/
-
- private final java.util.logging.Logger fDelegate;
- private final String fName;
-
- private Logger(Class clazz) {
- fName = sName;
- fDelegate = java.util.logging.Logger.getLogger(clazz.getName());
- }
-
- public final boolean isDebugEnabled() {
- return fDelegate.isLoggable(Level.FINE);
- }
-
- public final boolean isMethodTracingEnabled() {
- return fDelegate.isLoggable(Level.FINER);
- }
-
- private final String createMessage(String msg) {
- StringBuffer sb = new StringBuffer();
- //sb.append('[');
- //sb.append(fName);
- //sb.append("] ");
- sb.append(msg);
- return sb.toString();
- }
-
- public void entering(String methodName) {
- fDelegate.entering(fDelegate.getName(), methodName);
- }
-
- private Object arrayToString(Object obj1) {
- if (!obj1.getClass().isArray() || obj1.getClass().getComponentType().isPrimitive()) {
- return obj1;
- }
- Object[] objs = (Object[]) obj1;
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < objs.length; ++i) {
- if (i != 0) {
- buf.append(",");
- }
- buf.append(arrayToString(objs[i]));
- }
- return buf.toString();
- }
-
- public void entering(String methodName, Object obj1) {
- if (obj1 != null && obj1.getClass().isArray()) {
- obj1 = arrayToString(obj1);
- }
- fDelegate.entering(fDelegate.getName(), methodName, obj1);
- }
-
- public void entering(String methodName, Object obj1, Object obj2) {
- if (obj1 != null && obj1.getClass().isArray()) {
- obj1 = arrayToString(obj1);
- }
- if (obj2 != null && obj2.getClass().isArray()) {
- obj2 = arrayToString(obj2);
- }
- fDelegate.entering(fDelegate.getName(), methodName, new Object[] { obj1, obj2 });
- }
-
- public void entering(String methodName, Object obj1, Object obj2, Object obj3) {
- if (obj1 != null && obj1.getClass().isArray()) {
- obj1 = arrayToString(obj1);
- }
- if (obj2 != null && obj2.getClass().isArray()) {
- obj2 = arrayToString(obj2);
- }
- if (obj3 != null && obj3.getClass().isArray()) {
- obj3 = arrayToString(obj3);
- }
- fDelegate.entering(fDelegate.getName(), methodName, new Object[] { obj1, obj2, obj3 });
- }
-
- public void entering(String methodName, Object obj1, Object obj2, Object obj3, Object obj4) {
- if (obj1 != null && obj1.getClass().isArray()) {
- obj1 = arrayToString(obj1);
- }
- if (obj2 != null && obj2.getClass().isArray()) {
- obj2 = arrayToString(obj2);
- }
- if (obj3 != null && obj3.getClass().isArray()) {
- obj3 = arrayToString(obj3);
- }
- if (obj4 != null && obj4.getClass().isArray()) {
- obj4 = arrayToString(obj4);
- }
- fDelegate.entering(fDelegate.getName(), methodName, new Object[] { obj1, obj2, obj3, obj4 });
- }
-
- public void exiting(String methodName) {
- fDelegate.exiting(fDelegate.getName(), methodName);
- }
-
- public void exiting(String methodName, Object obj1) {
- if (obj1 != null && obj1.getClass().isArray()) {
- obj1 = arrayToString(obj1);
- }
- fDelegate.exiting(fDelegate.getName(), methodName, obj1);
- }
-
- public void exiting(String methodName, Object obj1, Object obj2) {
- if (obj1 != null && obj1.getClass().isArray()) {
- obj1 = arrayToString(obj1);
- }
- if (obj2 != null && obj2.getClass().isArray()) {
- obj2 = arrayToString(obj2);
- }
- fDelegate.exiting(fDelegate.getName(), methodName, new Object[] { obj1, obj2 });
- }
-
- public void exiting(String methodName, Object obj1, Object obj2, Object obj3) {
- if (obj1 != null && obj1.getClass().isArray()) {
- obj1 = arrayToString(obj1);
- }
- if (obj2 != null && obj2.getClass().isArray()) {
- obj2 = arrayToString(obj2);
- }
- if (obj3 != null && obj3.getClass().isArray()) {
- obj3 = arrayToString(obj3);
- }
- fDelegate.exiting(fDelegate.getName(), methodName, new Object[] { obj1, obj2, obj3 });
- }
-
- public void exiting(String methodName, Object obj1, Object obj2, Object obj3, Object obj4) {
- if (obj1 != null && obj1.getClass().isArray()) {
- obj1 = arrayToString(obj1);
- }
- if (obj2 != null && obj2.getClass().isArray()) {
- obj2 = arrayToString(obj2);
- }
- if (obj3 != null && obj3.getClass().isArray()) {
- obj3 = arrayToString(obj3);
- }
- if (obj4 != null && obj4.getClass().isArray()) {
- obj4 = arrayToString(obj4);
- }
- fDelegate.exiting(fDelegate.getName(), methodName, new Object[] { obj1, obj2, obj3, obj4 });
- }
-
- /**
- * Write a log message for serious situation.
- * @param msg
- */
- public void fatal(String msg) {
- fDelegate.severe(createMessage(msg));
- }
-
- public void fatal(String msg, Throwable e) {
- StringBuffer sb = new StringBuffer();
- sb.append(msg);
- sb.append(", ");
- sb.append(dumpStackTrace(e));
- fDelegate.severe(sb.toString());
- }
-
- /**
- * Write a log message notifying a potential problem.
- * @param msg
- */
- public void warning(String msg) {
- fDelegate.warning(createMessage(msg));
- }
-
- public void warning(String msg, Throwable e) {
- StringBuffer sb = new StringBuffer();
- sb.append(msg);
- sb.append(", ");
- sb.append(dumpStackTrace(e));
- fDelegate.warning(sb.toString());
- }
-
- /**
- * Write a log message for informational messages.
- * @param msg
- */
- public void info(String msg) {
- fDelegate.info(createMessage(msg));
- }
-
- /**
- * Write a log message for debug.
- * @param msg
- */
- public void debug(String msg) {
- fDelegate.fine(createMessage(msg));
- }
-
- public void debug(String msg, Throwable e) {
- StringBuffer sb = new StringBuffer();
- sb.append(msg);
- sb.append(", ");
- sb.append(dumpStackTrace(e));
- fDelegate.fine(sb.toString());
- }
-
- /**
- * Write a log message for debug.
- * @param msg
- */
- public void debug2(String msg) {
- fDelegate.finest(createMessage(msg));
- }
-
- public void debug2(String msg, Throwable e) {
- StringBuffer sb = new StringBuffer();
- sb.append(msg);
- sb.append(", ");
- sb.append(dumpStackTrace(e));
- fDelegate.finest(sb.toString());
- }
-
- private StringBuffer dumpStackTrace(Throwable e) {
- StringWriter w = new StringWriter();
- PrintWriter pw = new PrintWriter(w);
- e.printStackTrace(pw);
- pw.flush();
- return w.getBuffer();
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/ParseURI.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/ParseURI.java
deleted file mode 100644
index f5d8ce1..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/ParseURI.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.util;
-
-
-public class ParseURI {
- static public String getAuthority(String uri) {
- int pos = uri.indexOf(':');
- if (uri.length() <= (pos + 3)) {
- // Authority needs "://"
- return null;
- }
- if (uri.charAt(pos + 1) != '/') return null;
- if (uri.charAt(pos + 2) != '/') return null;
- pos += 3;
- int posEnd = uri.indexOf('/', pos);
- if (posEnd >= 0) {
- // scheme "://" authority abs-path
- return uri.substring(pos, posEnd);
- } else {
- // scheme "://" authority
- return uri.substring(pos);
- }
- }
-
- static public String getAbsolutePath(String uri) {
- int pos = uri.indexOf(':');
- if (uri.length() <= (pos + 3)) {
- // Authority needs "://"
- return uri;
- }
- if (uri.charAt(pos + 1) != '/') return uri;
- if (uri.charAt(pos + 2) != '/') return uri;
- pos += 3;
- int posEnd = uri.indexOf('/', pos);
- if (posEnd >= 0) {
- // scheme "://" authority abs-path
- return uri.substring(posEnd);
- } else {
- // scheme "://" authority
- return "/";
- }
- }
-
- static public String parseHost(String hostStr) {
- int sepIdx = hostStr.indexOf(':');
- if (sepIdx < 0) {
- return hostStr;
- } else {
- return hostStr.substring(0, sepIdx);
- }
- }
-
- static public int parsePort(String hostStr, int defaultPort) {
- int sepIdx = hostStr.indexOf(':');
- if (sepIdx < 0) {
- return defaultPort;
- } else {
- String portStr = hostStr.substring(sepIdx + 1).trim();
- try {
- return Integer.parseInt(portStr);
- } catch (NumberFormatException e) {
- return defaultPort;
- }
- }
- }
-
- static public String eliminateQuery(String uri) {
- int idx = uri.indexOf('?');
- if (idx < 0) return uri;
- return uri.substring(0, idx);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/ThrowableUtil.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/ThrowableUtil.java
deleted file mode 100644
index 9c854cb..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/ThrowableUtil.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.httpproxy.util;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-
-
-public class ThrowableUtil {
- public static String stackTraceToString(Throwable t) {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- PrintStream ps = new PrintStream(os);
- t.printStackTrace(ps);
- return os.toString();
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/TimeoutException.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/TimeoutException.java
deleted file mode 100644
index 0dba2ea..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/TimeoutException.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hideki TAI - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.httpproxy.util;
-
-public class TimeoutException extends Exception {
- private static final long serialVersionUID = 2697832049495326392L;
-
- public TimeoutException() {
- super();
- }
-
- public TimeoutException(String msg) {
- super(msg);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/impl/ObjectPoolImpl.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/impl/ObjectPoolImpl.java
deleted file mode 100644
index cb4aafa..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/impl/ObjectPoolImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.actf.util.httpproxy.util.impl;
-
-import java.util.ArrayList;
-
-import org.eclipse.actf.util.httpproxy.util.IObjectPool;
-
-
-
-
-public class ObjectPoolImpl implements IObjectPool {
- private final String name;
- private ArrayList pool;
- private int waitInLine;
-
- synchronized public boolean add(Object o) {
- boolean flag = pool.add(o);
- if (flag && (waitInLine > 0)) notify();
- return flag;
- }
-
- synchronized public Object take() {
- if (pool.size() == 0) return null;
- return pool.remove(0);
- }
-
- synchronized public Object take(int timeout)
- throws InterruptedException {
- long startTime = System.currentTimeMillis();
-
- waitInLine++;
- while (pool.size() == 0) {
- wait(timeout);
- if (timeout > 0) {
- if ((System.currentTimeMillis() - startTime) > timeout) {
- waitInLine--;
- return null;
- }
- }
- }
- waitInLine--;
- return pool.remove(0);
- }
-
- public ObjectPoolImpl(String name) {
- this.name = name;
- this.pool = new ArrayList();
- this.waitInLine = 0;
- }
-
- public String getName() {
- return name;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/impl/WorkpileControllerImpl.java b/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/impl/WorkpileControllerImpl.java
deleted file mode 100644
index 2bb7d26..0000000
--- a/plugins/org.eclipse.actf.util.httpproxy/src/org/eclipse/actf/util/httpproxy/util/impl/WorkpileControllerImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-
-package org.eclipse.actf.util.httpproxy.util.impl;
-
-import java.util.ArrayList;
-
-import org.eclipse.actf.util.httpproxy.util.IWorkpileController;
-
-
-
-
-public class WorkpileControllerImpl implements IWorkpileController {
- private final String name;
- private final ThreadGroup threadGroup;
- private final ArrayList workpile;
-
- public void input(Runnable work) {
- Thread th;
- synchronized (this) {
- th = new Thread(threadGroup, work, name + "-" + workpile.size());
- workpile.add(th);
- }
- th.setDaemon(true);
- th.start();
- }
-
- public String toString() {
- return "WPC:[" + name + "]:" + threadGroup.toString();
- }
-
- public WorkpileControllerImpl(String name) {
- this.name = name;
- this.threadGroup = new ThreadGroup(name);
- this.workpile = new ArrayList();
- }
-}
diff --git a/plugins/org.eclipse.actf.util.jxpath/.classpath b/plugins/org.eclipse.actf.util.jxpath/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.util.jxpath/.project b/plugins/org.eclipse.actf.util.jxpath/.project
deleted file mode 100644
index 04d59b9..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.util.jxpath</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.util.jxpath/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.util.jxpath/META-INF/MANIFEST.MF
deleted file mode 100644
index 2cc4980..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF Jxpath Fragment (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.util.jxpath;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Fragment-Host: org.eclipse.actf.core
-Require-Bundle: org.eclipse.core.runtime,
- org.apache.commons.jxpath
-Eclipse-LazyStart: true
-Bundle-ClassPath: .
-Bundle-Vendor: Eclipse.org
diff --git a/plugins/org.eclipse.actf.util.jxpath/about.html b/plugins/org.eclipse.actf.util.jxpath/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.jxpath/about_files/asl-v20.txt b/plugins/org.eclipse.actf.util.jxpath/about_files/asl-v20.txt
deleted file mode 100644
index d645695..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/about_files/asl-v20.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/plugins/org.eclipse.actf.util.jxpath/build.properties b/plugins/org.eclipse.actf.util.jxpath/build.properties
deleted file mode 100644
index e6e7c5e..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about_files/,\
- about.html
-src.includes = about_files/,\
- about.html
diff --git a/plugins/org.eclipse.actf.util.jxpath/fragment.xml b/plugins/org.eclipse.actf.util.jxpath/fragment.xml
deleted file mode 100644
index 1dabb0c..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/fragment.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<fragment>
-<!-- plugin-id=""
- plugin-version="">
--->
-</fragment>
diff --git a/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/DOMExNodeIterator.java b/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/DOMExNodeIterator.java
deleted file mode 100644
index d8cec19..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/DOMExNodeIterator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.jxpath;
-
-import org.apache.commons.jxpath.ri.compiler.NodeTest;
-import org.apache.commons.jxpath.ri.model.NodePointer;
-import org.apache.commons.jxpath.ri.model.dom.DOMNodeIterator;
-import org.apache.commons.jxpath.ri.model.dom.DOMNodePointer;
-
-
-
-public class DOMExNodeIterator extends DOMNodeIterator {
- DOMExNodeIterator(NodePointer parent,
- NodeTest test,
- boolean reverse,
- NodePointer startWith) {
- super(parent, test, reverse, startWith);
- }
-
- @Override
- public NodePointer getNodePointer() {
- DOMNodePointer ptOrg = (DOMNodePointer) super.getNodePointer();
- return new DOMExNodePointer(ptOrg);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/DOMExNodePointer.java b/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/DOMExNodePointer.java
deleted file mode 100644
index 2cfba40..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/DOMExNodePointer.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.jxpath;
-
-import java.util.Locale;
-
-import org.apache.commons.jxpath.JXPathContext;
-import org.apache.commons.jxpath.Pointer;
-import org.apache.commons.jxpath.ri.Compiler;
-import org.apache.commons.jxpath.ri.compiler.NodeNameTest;
-import org.apache.commons.jxpath.ri.compiler.NodeTest;
-import org.apache.commons.jxpath.ri.compiler.NodeTypeTest;
-import org.apache.commons.jxpath.ri.model.NodeIterator;
-import org.apache.commons.jxpath.ri.model.NodePointer;
-import org.apache.commons.jxpath.ri.model.beans.NullPointer;
-import org.apache.commons.jxpath.ri.model.dom.DOMNodePointer;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-
-public class DOMExNodePointer extends DOMNodePointer {
- private static final long serialVersionUID = 7107226604740248209L;
-
- private Node getDOMNode() {
- return (Node) getImmediateNode();
- }
-
- public DOMExNodePointer(Node node, Locale locale) {
- super(node, locale);
- }
-
- public DOMExNodePointer(Node node, Locale locale, String id) {
- super(node, locale, id);
- }
-
- public DOMExNodePointer(NodePointer parent, Node node) {
- super(parent, node);
- }
-
- public DOMExNodePointer(DOMNodePointer ptOrg) {
- super(ptOrg.getParent(), (Node) ptOrg.getImmediateNode());
- }
-
- /********************************************************************************
- Overriding Methods.
- ********************************************************************************/
-
- @Override
- public boolean testNode(NodeTest test) {
- if (test instanceof NodeTypeTest) {
- NodeTypeTest ntt = (NodeTypeTest) test;
- if (ntt.getNodeType() == Compiler.NODE_TYPE_NODE)
- return true;
- } else if (test instanceof NodeNameTest) {
- NodeNameTest nnt = (NodeNameTest) test;
- String nsTest = nnt.getNamespaceURI();
- if (nsTest == null) {
- test = new NodeNameTest(nnt.getNodeName(), "");
- }
- }
- return super.testNode(test);
- }
-
- @Override
- public Pointer getPointerByID(JXPathContext context, String id) {
- Node node = getDOMNode();
- Document doc = node.getOwnerDocument();
- Element element = doc.getElementById(id);
- if (element == null) {
- return new NullPointer(getLocale(), id);
- }
- return new DOMExNodePointer(element, getLocale(), id);
- }
-
- @Override
- public NodePointer getParent() {
- NodePointer pointer = getImmediateParentPointer();
- while (pointer != null && pointer.isContainer()) {
- pointer = pointer.getImmediateParentPointer();
- }
- return pointer;
- }
-
- @Override
- public NodePointer getImmediateParentPointer() {
- if (parent != null) return parent;
- Node node = getDOMNode();
- Node parentNode = node.getParentNode();
- if (parentNode == null) return null;
- return new DOMExNodePointer(parentNode, getLocale());
- }
-
- @Override
- public Object getRootNode() {
- Node node = getDOMNode();
- return node.getOwnerDocument();
- }
-
- @Override
- public NodeIterator childIterator(NodeTest test,
- boolean reverse,
- NodePointer startWith) {
- if (test instanceof NodeNameTest) {
- NodeNameTest nnt = (NodeNameTest) test;
- String nsTest = nnt.getNamespaceURI();
- if (nsTest == null) {
- test = new NodeNameTest(nnt.getNodeName(), "");
- }
- }
- return new DOMExNodeIterator(this, test, reverse, startWith);
- }
-
- @Override
- public String getNamespaceURI() {
- Node node = getDOMNode();
- String ns = node.getNamespaceURI();
- // Treat the default namespace, "", as null.
- if (ns.length() == 0) return null;
- return ns;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/DOMExNodePointerFactory.java b/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/DOMExNodePointerFactory.java
deleted file mode 100644
index 75553bf..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/DOMExNodePointerFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.jxpath;
-
-import java.util.Locale;
-
-import org.apache.commons.jxpath.ri.JXPathContextReferenceImpl;
-import org.apache.commons.jxpath.ri.QName;
-import org.apache.commons.jxpath.ri.model.NodePointer;
-import org.apache.commons.jxpath.ri.model.NodePointerFactory;
-import org.w3c.dom.Node;
-
-
-
-public class DOMExNodePointerFactory implements NodePointerFactory {
- public static void initialize() {
- JXPathContextReferenceImpl.addNodePointerFactory(new DOMExNodePointerFactory());
- }
-
- private static final int FACTORY_ORDER = 0;
- public int getOrder() {
- return FACTORY_ORDER;
- }
-
- public NodePointer createNodePointer(QName name,
- Object nodeObj,
- Locale locale) {
- if (!(nodeObj instanceof Node)) return null;
- Node node = (Node) nodeObj;
- return new DOMExNodePointer(node, locale);
- }
-
- public NodePointer createNodePointer(NodePointer parent,
- QName name,
- Object nodeObj) {
- if (!(nodeObj instanceof Node)) return null;
- Node node = (Node) nodeObj;
- return new DOMExNodePointer(parent, node);
- }
-
- private DOMExNodePointerFactory() {
- }
-}
-
-
diff --git a/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/XPathServiceFactoryImpl.java b/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/XPathServiceFactoryImpl.java
deleted file mode 100644
index b13cc39..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/XPathServiceFactoryImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.jxpath;
-
-import org.eclipse.actf.util.xpath.XPathService;
-import org.eclipse.actf.util.xpath.XPathServiceFactory;
-
-
-
-public class XPathServiceFactoryImpl extends XPathServiceFactory {
- private static XPathService xpathServiceInstance;
-
- @Override
- protected XPathService getService() {
- return xpathServiceInstance;
- }
-
- public static XPathServiceFactory newInstance() {
- if (xpathServiceInstance == null) {
- xpathServiceInstance = XPathServiceImpl.newInstance();
- if (xpathServiceInstance == null) return null;
- }
- return new XPathServiceFactoryImpl();
- }
-
- private XPathServiceFactoryImpl() {
-
- }
-}
diff --git a/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/XPathServiceImpl.java b/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/XPathServiceImpl.java
deleted file mode 100644
index 29fcddf..0000000
--- a/plugins/org.eclipse.actf.util.jxpath/src/org/eclipse/actf/util/jxpath/XPathServiceImpl.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.jxpath;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.commons.jxpath.CompiledExpression;
-import org.apache.commons.jxpath.JXPathContext;
-import org.apache.commons.jxpath.Pointer;
-import org.eclipse.actf.util.xpath.XPathService;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-
-
-class XPathServiceImpl extends XPathService {
- static {
- DOMExNodePointerFactory.initialize();
- }
-
- @Override
- public Object compile(String path) {
- return JXPathContext.compile(path);
- }
-
- private static class NodeListImpl implements NodeList {
- private List<Node> nodeList;
-
- public Node item(int index) {
- if ((index < 0) || (index >= nodeList.size()))
- return null;
- return nodeList.get(index);
- }
-
- public int getLength() {
- return nodeList.size();
- }
-
- NodeListImpl(List<Node> nodeList) {
- if (nodeList == null) {
- this.nodeList = new ArrayList<Node>(0);
- } else {
- this.nodeList = nodeList;
- }
- }
- }
-
- @Override
- public NodeList evalForNodeList(Object compiled, Node base) {
- CompiledExpression ce = (CompiledExpression) compiled;
- JXPathContext bctx = JXPathContext.newContext(base.getOwnerDocument());
- Pointer ptr = new DOMExNodePointer(base, null);
- JXPathContext ctx = bctx.getRelativeContext(ptr);
- Iterator it = ce.iteratePointers(ctx);
- if (!it.hasNext()) return null;
- List<Node> result = new ArrayList<Node>();
- do {
- Pointer pt = (Pointer) it.next();
- Object o = pt.getNode();
- if (!(o instanceof Node)) continue;
- Node n = (Node) o;
- result.add(n);
- } while (it.hasNext());
- return new NodeListImpl(result);
- }
-
- @Override
- public String evalForString(Object compiled, Node base) {
- CompiledExpression ce = (CompiledExpression) compiled;
- JXPathContext bctx = JXPathContext.newContext(base.getOwnerDocument());
- Pointer ptr = new DOMExNodePointer(base, null);
- JXPathContext ctx = bctx.getRelativeContext(ptr);
- return ce.getValue(ctx).toString();
- }
-
- public static XPathService newInstance() {
- return new XPathServiceImpl();
- }
-
- private XPathServiceImpl() {
- }
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/.classpath b/plugins/org.eclipse.actf.util.vocab/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.util.vocab/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.util.vocab/.project b/plugins/org.eclipse.actf.util.vocab/.project
deleted file mode 100644
index 62f5aaa..0000000
--- a/plugins/org.eclipse.actf.util.vocab/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.util.vocab</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.util.vocab/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.util.vocab/META-INF/MANIFEST.MF
deleted file mode 100644
index 76a4cf4..0000000
--- a/plugins/org.eclipse.actf.util.vocab/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF Vocab Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.util.vocab;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.actf.util.vocab.VocabPlugin
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.actf.util.vocab
diff --git a/plugins/org.eclipse.actf.util.vocab/about.html b/plugins/org.eclipse.actf.util.vocab/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.util.vocab/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.vocab/build.properties b/plugins/org.eclipse.actf.util.vocab/build.properties
deleted file mode 100644
index 8f739ba..0000000
--- a/plugins/org.eclipse.actf.util.vocab/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- .,\
- plugin.xml
diff --git a/plugins/org.eclipse.actf.util.vocab/plugin.xml b/plugins/org.eclipse.actf.util.vocab/plugin.xml
deleted file mode 100644
index dc8e70f..0000000
--- a/plugins/org.eclipse.actf.util.vocab/plugin.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.actf.ui.preferences.RootPreferencePage"
- class="org.eclipse.actf.util.vocab.preferences.VocabPreferencePage"
- id="org.eclipse.actf.util.vocab.preferences.VocabPreferencePage"
- name="DOM Vocabulary"/>
- </extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.actf.util.vocab.preferences.VocabPreferenceInitializer"/>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/AbstractTerms.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/AbstractTerms.java
deleted file mode 100644
index 4ae7644..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/AbstractTerms.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab;
-
-import org.w3c.dom.Node;
-
-/**
- * AbstractTerms is the default term definition. All methods return <i>false</i>.
- * Each class extends AbstractTerms should implements methods which used in
- * itself.
- *
- * @see Vocabulary
- */
-public abstract class AbstractTerms {
-
- public boolean isClickable(IEvalTarget target) {
- return false;
- }
-
- public boolean isEditable(IEvalTarget target) {
- return false;
- }
-
- public boolean hasContent(IEvalTarget target) {
- return false;
- }
-
- public boolean isEnabled(IEvalTarget target) {
- return false;
- }
-
- public boolean isInputable(IEvalTarget target) {
- return false;
- }
-
- public boolean isSelectable(IEvalTarget target) {
- return false;
- }
-
- public boolean isButton(IEvalTarget target) {
- return false;
- }
-
- public boolean isCheckbox(IEvalTarget target) {
- return false;
- }
-
- public boolean isLabel(IEvalTarget target) {
- return false;
- }
-
- public boolean isLink(IEvalTarget target) {
- return false;
- }
-
- public boolean isRadio(IEvalTarget target) {
- return false;
- }
-
- public boolean isCombobox(IEvalTarget target) {
- return false;
- }
-
- public boolean isSubmit(IEvalTarget target) {
- return false;
- }
-
- public boolean isTextarea(IEvalTarget target) {
- return false;
- }
-
- public boolean isTextbox(IEvalTarget target) {
- return false;
- }
-
- public boolean isPassword(IEvalTarget target) {
- return false;
- }
-
- public boolean isValidNode(IEvalTarget target) {
- return false;
- }
-
- public boolean isVisibleNode(IEvalTarget target) {
- return false;
- }
-
- public boolean isEmbeddedObject(IEvalTarget target) {
- return false;
- }
-
- public boolean isImage(IEvalTarget target) {
- return false;
- }
-
- public boolean isMultilineEdit(IEvalTarget node) {
- return false;
- }
-
- public boolean isReducible(IEvalTarget node) {
- return false;
- }
-
- public boolean isConnectable(IEvalTarget node) {
- return false;
- }
-
- public boolean find(String str, boolean exact, IEvalTarget node) {
- return false;
- }
-
- public boolean startsWith(String str, boolean exact, IEvalTarget node) {
- return false;
- }
-
- public boolean isHeading(int level, IEvalTarget node) {
- return false;
- }
-
- public boolean nodeLocation(Node refNode, boolean backward, IEvalTarget node) {
- return false;
- }
-
- public boolean isHeadingJumpPoint(IEvalTarget node) {
- return false;
- }
-
- public boolean hasReadingContent(IEvalTarget node) {
- return false;
- }
-
- public boolean isListItemJumpPoint(IEvalTarget node) {
- return false;
- }
-
- public boolean isBlockJumpPointF(IEvalTarget node) {
- return false;
- }
-
- public boolean isBlockJumpPointB(IEvalTarget node) {
- return false;
- }
-
- public boolean isFileEdit(IEvalTarget node) {
- return false;
- }
-
- public boolean isChecked(IEvalTarget node) {
- return false;
- }
-
- public boolean isListItem(IEvalTarget node) {
- return false;
- }
-
- public boolean isListTop(IEvalTarget node) {
- return false;
- }
-
- public boolean isSelectOption(IEvalTarget node) {
- return false;
- }
-
- public boolean isVisitedLink(IEvalTarget node) {
- return false;
- }
-
- public boolean isMultiSelectable(IEvalTarget node) {
- return false;
- }
-
- public boolean isAccessKey(char key, IEvalTarget node) {
- return false;
- }
-
- public boolean isMedia(IEvalTarget node) {
- return false;
- }
-
- public boolean isFlashTopNode(IEvalTarget node) {
- return false;
- }
-
- public boolean isFlashLastNode(IEvalTarget node) {
- return false;
- }
-
- public boolean isMSAAFlash(IEvalTarget node) {
- return false;
- }
-
- public boolean isReachable(IEvalTarget node, Node target) {
- return false;
- }
-
- public boolean isAlterable(IEvalTarget target) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/DelegationTerms.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/DelegationTerms.java
deleted file mode 100644
index e9a8b3c..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/DelegationTerms.java
+++ /dev/null
@@ -1,493 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Hisashi MIYASHITA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab;
-
-import org.w3c.dom.Node;
-
-
-
-/**
- * This class delegates the evaluation to the delegation target.
- */
-public class DelegationTerms extends AbstractTerms {
-
- private final IEvalTarget delegationTarget;
-
- //private AbstractTerms nextCandidate;
-
- /**
- * @param delegationTarget the delegation target.
- */
- public DelegationTerms(IEvalTarget delegationTarget) {
- this.delegationTarget = delegationTarget;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isClickable(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isClickable(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isClickable(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isEditable(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isEditable(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isEditable(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#hasContent(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean hasContent(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().hasContent(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#hasReadingContent(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean hasReadingContent(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().hasReadingContent(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isEnabled(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isEnabled(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isEnabled(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isInputable(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isInputable(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isInputable(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isSelectable(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isSelectable(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isSelectable(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isMultiSelectable(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isMultiSelectable(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isMultiSelectable(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isButton(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isButton(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isButton(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isListItem(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isListItem(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isListItem(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isListTop(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isListTop(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isListTop(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isCheckbox(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isCheckbox(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isCheckbox(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isChecked(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isChecked(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isChecked(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isLabel(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isLabel(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isLabel(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isLink(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isLink(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isLink(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isVisitedLink(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isVisitedLink(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isVisitedLink(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isRadio(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isRadio(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isRadio(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isCombobox(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isCombobox(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isCombobox(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isSubmit(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isSubmit(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isSubmit(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isFileEdit(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isFileEdit(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isFileEdit(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isTextarea(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isTextarea(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isTextarea(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isTextbox(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isTextbox(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isTextbox(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isPassword(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isPassword(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isPassword(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isValidNode(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isValidNode(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isValidNode(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isVisibleNode(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isVisibleNode(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isVisibleNode(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isEmbeddedObject(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isEmbeddedObject(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isEmbeddedObject(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isImage(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isImage(IEvalTarget target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isImage(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isMultilineEdit(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isMultilineEdit(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isMultilineEdit(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isSelectOption(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isSelectOption(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isSelectOption(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isReducible(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isReducible(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isReducible(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isConnectable(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isConnectable(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isConnectable(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#find(java.lang.String, boolean, org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean find(String str, boolean exact, IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().find(str, exact, delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#startsWith(java.lang.String, boolean, org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean startsWith(String str, boolean exact, IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().startsWith(str, exact, delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isHeading(int, org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isHeading(int level, IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isHeading(level, delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isHeadingJumpPoint(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isHeadingJumpPoint(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isHeadingJumpPoint(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#nodeLocation(org.w3c.dom.Node, boolean, org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean nodeLocation(Node refNode, boolean backward, IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().nodeLocation(refNode, backward, delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isAccessKey(char, org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isAccessKey(char key, IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isAccessKey(key, delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isListItemJumpPoint(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isListItemJumpPoint(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isListItemJumpPoint(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isBlockJumpPointF(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isBlockJumpPointF(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isBlockJumpPointF(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isBlockJumpPointB(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isBlockJumpPointB(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isBlockJumpPointB(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isMedia(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isMedia(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isMedia(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isFlashTopNode(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isFlashTopNode(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isFlashTopNode(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isFlashLastNode(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isFlashLastNode(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isFlashLastNode(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isMSAAFlash(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isMSAAFlash(IEvalTarget node) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isMSAAFlash(delegationTarget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isReachable(org.eclipse.actf.util.vocab.IEvalTarget, org.w3c.dom.Node)
- */
- @Override
- public boolean isReachable(IEvalTarget node, Node target) {
- if (delegationTarget == null)
- return false;
- return delegationTarget.getTerms().isReachable(delegationTarget, target);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.vocab.AbstractTerms#isAlterable(org.eclipse.actf.util.vocab.IEvalTarget)
- */
- @Override
- public boolean isAlterable(IEvalTarget node) {
- if (delegationTarget == null) return false;
- return delegationTarget.getTerms().isAlterable(delegationTarget);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IEvalTarget.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IEvalTarget.java
deleted file mode 100644
index 5655a7d..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IEvalTarget.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab;
-
-/**
- * IEvalTarget interface should be implemented by the element or node to be
- * checked through the Vocabulary.
- */
-public interface IEvalTarget {
- /**
- * @return the associated term.
- */
- AbstractTerms getTerms();
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IOperator.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IOperator.java
deleted file mode 100644
index a702da7..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IOperator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab;
-
-/**
- * IOperator interface defines the methods to be implemented by the operator
- * between propositions. For example, "and operator" and "or operator".
- */
-public interface IOperator extends IProposition {
- /**
- * @return the size of the arguments for the operator.
- */
- int size();
-
- /**
- * @param index
- * the index of the proposition.
- * @return the instance specified by the index.
- */
- IProposition get(int index);
-
- /**
- * Add a proposition to the arguments of this operator.
- *
- * @param prop
- * the proposition to be added.
- */
- void add(IProposition prop);
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IOperator1.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IOperator1.java
deleted file mode 100644
index c01ef7b..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IOperator1.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab;
-
-
-/**
- * IOperator1 interface defines the methods to be implemented by the operator
- * which has an argument. For example, "not operator".
- */
-public interface IOperator1 extends IProposition{
- /**
- * @return the proposition to be used for argument of the operator.
- */
- IProposition getProposition();
-
-
- /**
- * @param prop the proposition to be used for argument of the operator.
- */
- void setProposition(IProposition prop);
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IProposition.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IProposition.java
deleted file mode 100644
index 898f4ee..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/IProposition.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab;
-
-/**
- * IProposition interface the methods to be implemented by the representation of
- * a proposition. It returns true or false in evaluating.
- */
-public interface IProposition {
- /**
- * @return the name of the proposition.
- */
- String getName();
-
- /**
- * @param target
- * the target to be evaluated.
- * @return whether the target is matched with the proposition.
- */
- boolean eval(IEvalTarget target);
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/VocabPlugin.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/VocabPlugin.java
deleted file mode 100644
index fb4962a..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/VocabPlugin.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.vocab;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class VocabPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.actf.util.vocab";
-
- // The shared instance
- private static VocabPlugin plugin;
-
- /**
- * The constructor
- */
- public VocabPlugin() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static VocabPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/Vocabulary.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/Vocabulary.java
deleted file mode 100644
index 215232a..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/Vocabulary.java
+++ /dev/null
@@ -1,605 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab;
-
-import java.util.HashMap;
-
-import org.eclipse.actf.util.vocab.impl.AndOperator;
-import org.eclipse.actf.util.vocab.impl.Function;
-import org.eclipse.actf.util.vocab.impl.OrOperator;
-import org.eclipse.actf.util.vocab.preferences.VocabPreferenceConstants;
-import org.w3c.dom.Node;
-
-/**
- * Vocabulary treats the meaning of instances of {@link IEvalTarget} by using
- * {@link IProposition}. {@link IProposition} represents a question whether a
- * {@link IEvalTarget} instance is matched with the proposition or not. Actual
- * meaning is provided by the term implementation which extends
- * {@link AbstractTerms}. Each instance of the {@link IEvalTarget} is
- * associated with a term implementation.
- *
- * The following is the flow to get the meaning of the {@link IEvalTarget}
- * instance.
- *
- * <pre>
- * 1. get an {@link IProposition} from Vocabulary.
- * 2. call {@link IProposition#eval(IEvalTarget)} method with an {@link IEvalTarget}.
- * 3. {@link IProposition#eval(IEvalTarget)} method gets the associated term.
- * 4. {@link IProposition#eval(IEvalTarget)} method calls the method corresponding to itself with the {@link IEvalTarget}.
- * For example, {@link Vocabulary#isClickable()} calls {@link AbstractTerms#isClickable(IEvalTarget)}.
- * </pre>
- */
-public class Vocabulary {
- private static HashMap<String, IProposition> propMap = new HashMap<String, IProposition>();
-
- private static class IsClickable implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isClickable(node);
- }
-
- public String getName() {
- return "isClickable";
- }
- }
-
- private static class IsInputable implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isInputable(node);
- }
-
- public String getName() {
- return "isInputable";
- }
- }
-
- private static class IsSelectable implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isSelectable(node);
- }
-
- public String getName() {
- return "isSelectable";
- }
- }
-
- private static class IsMultiSelectable implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isMultiSelectable(node);
- }
-
- public String getName() {
- return "isMultiSelectable";
- }
- }
-
- private static class IsValidNode implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isValidNode(node);
- }
-
- public String getName() {
- return "isValidNode";
- }
- }
-
- private static class HasContent implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().hasContent(node);
- }
-
- public String getName() {
- return "hasContent";
- }
- }
-
- private static class HasReadingContent implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().hasReadingContent(node);
- }
-
- public String getName() {
- return "hasReadingContent";
- }
- }
-
- private static class IsVisibleNode implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isVisibleNode(node);
- }
-
- public String getName() {
- return "isVisibleNode";
- }
- }
-
- private static class IsEmbeddedObject implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isEmbeddedObject(node);
- }
-
- public String getName() {
- return "isEmbeddedObject";
- }
- }
-
- private static class IsReducible implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isReducible(node);
- }
-
- public String getName() {
- return "isReducible";
- }
- }
-
- private static class IsBlockJumpPointF implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isBlockJumpPointF(node);
- }
-
- public String getName() {
- return "isBlockJumpPointF";
- }
- }
-
- private static class IsBlockJumpPointB implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isBlockJumpPointB(node);
- }
-
- public String getName() {
- return "isBlockJumpPointB";
- }
- }
-
- private static class IsMedia implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isMedia(node);
- }
-
- public String getName() {
- return "isMedia";
- }
- }
-
- private static class IsReachable implements IProposition {
- private Node target;
-
- public IsReachable(Node target) {
- this.target = target;
- }
-
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isReachable(node, target);
- }
-
- public String getName() {
- return "isReachable";
- }
- }
-
- private static class IsConnectable implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isConnectable(node);
- }
-
- public String getName() {
- return "isConnectable";
- }
- }
-
- private static class IsAlterable implements IProposition { // TODO awesome
- // method
- // name... :(
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isAlterable(node);
- }
-
- public String getName() {
- return "isAlterable";
- }
- }
-
- static {
- WidgetsVocabulary.initialize();
-
- add("Clickable", new IsClickable());
- add("Clickable", or("Button", "Checkbox", "Submit", "Link"));
- add("Inputable", new IsInputable());
- add("Inputable", or("Textbox", "Textarea", "Password"));
- add("Selectable", new IsSelectable());
- add("MultiSelectable", new IsMultiSelectable());
- add("Selectable", or("Combobox", "Radio"));
- add("ValidNode", new IsValidNode());
- add("HasContent", new HasContent());
- add("HasReadingContent", new HasReadingContent());
- add("VisibleNode", new IsVisibleNode());
- add("EmbeddedObject", new IsEmbeddedObject());
- add("Reducible", new IsReducible());
- add("BlockJumpPointF", new IsBlockJumpPointF());
- add("BlockJumpPointB", new IsBlockJumpPointB());
- add("Media", new IsMedia());
- add("Connectable", new IsConnectable());
- add("Alterable", new IsAlterable());
- }
-
- static void addFunc(String name, String funcName, String... args) {
- add(name, new Function(funcName, args));
- }
-
- static void add(String name, IProposition prop) {
- IProposition existProp = propMap.get(name);
- if (existProp == null) {
- propMap.put(name, prop);
- } else {
- IProposition newProp = new OrOperator(existProp, prop);
- propMap.put(name, newProp);
- }
- }
-
- private static IProposition or(String... args) {
- OrOperator ret = new OrOperator();
- for (String s : args) {
- ret.add(get(s));
- }
- return ret;
- }
-
- // private static IProposition and(String... args) {
- // AndOperator ret = new AndOperator();
- // for (String s : args) {
- // ret.add(get(s));
- // }
- // return ret;
- // }
-
- public static IProposition or(IProposition... args) {
- OrOperator ret = new OrOperator();
- for (IProposition ip : args) {
- ret.add(ip);
- }
- return ret;
- }
-
- public static IProposition and(IProposition... args) {
- AndOperator ret = new AndOperator();
- for (IProposition ip : args) {
- ret.add(ip);
- }
- return ret;
- }
-
- private static class FindProposition implements IProposition {
- private final String str;
-
- private final boolean exact;
-
- public FindProposition(String str, boolean exact) {
- this.str = str;
- this.exact = exact;
- }
-
- public boolean eval(IEvalTarget node) {
- return node.getTerms().find(str, exact, node);
- }
-
- public String getName() {
- return "find(" + str + ")";
- }
- }
-
- private static class StartsWithProposition implements IProposition {
- private final String str;
-
- private final boolean exact;
-
- public StartsWithProposition(String str, boolean exact) {
- this.str = str;
- this.exact = exact;
- }
-
- public boolean eval(IEvalTarget node) {
- return node.getTerms().startsWith(str, exact, node);
- }
-
- public String getName() {
- return "startsWith(" + str + ")";
- }
- }
-
- private static class NodeLocationProposition implements IProposition {
- private final Node refNode;
- private final boolean backward;
-
- public NodeLocationProposition(Node refNode, boolean backward) {
- this.refNode = refNode;
- this.backward = backward;
- }
-
- public boolean eval(IEvalTarget node) {
- return node.getTerms().nodeLocation(refNode, backward, node);
- }
-
- public String getName() {
- return "nodeLocation(" + refNode + ":" + backward + ")";
- }
- }
-
- private static class IsAccessKey implements IProposition {
- private final char key;
-
- public IsAccessKey(char key) {
- this.key = key;
- }
-
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isAccessKey(key, node);
- }
-
- public String getName() {
- return "accessKey(" + key + ")";
- }
- }
-
- // public interface
-
- public static IProposition get(String name) {
- return propMap.get(name);
- }
-
- public static IProposition isClickable() {
- return get("Clickable");
- }
-
- public static IProposition hasContent() {
- return get("HasContent");
- }
-
- public static IProposition isEditable() {
- return get("Editable");
- }
-
- public static IProposition isSelectable() {
- return get("Selectable");
- }
-
- public static IProposition isEmbeddedObject() {
- return get("EmbeddedObject");
- }
-
- public static IProposition isValidNode() {
- return get("ValidNode");
- }
-
- public static IProposition isVisibleNode() {
- return get("VisibleNode");
- }
-
- public static IProposition isInputable() {
- return get("Inputable");
- }
-
- public static IProposition isButton() {
- return get("Button");
- }
-
- public static IProposition isListItem() {
- return get("ListItem");
- }
-
- public static IProposition isListTop() {
- return get("ListTop");
- }
-
- public static IProposition isCheckbox() {
- return get("Checkbox");
- }
-
- public static IProposition isChecked() {
- return get("Checked");
- }
-
- public static IProposition isLabel() {
- return get("Label");
- }
-
- public static IProposition isLink() {
- return get("Link");
- }
-
- public static IProposition isVisitedLink() {
- return get("VisitedLink");
- }
-
- public static IProposition isRadio() {
- return get("Radio");
- }
-
- public static IProposition isSubmit() {
- return get("Submit");
- }
-
- public static IProposition isFileEdit() {
- return get("FileEdit");
- }
-
- public static IProposition isCombobox() {
- return get("Combobox");
- }
-
- public static IProposition isTextarea() {
- return get("Textarea");
- }
-
- public static IProposition isTextbox() {
- return get("Textbox");
- }
-
- public static IProposition isPassword() {
- return get("Password");
- }
-
- public static IProposition isSelectOption() {
- return get("SelectOption");
- }
-
- public static IProposition isImage() {
- return get("Image");
- }
-
- public static IProposition isMultilineEdit() {
- return get("MultilineEdit");
- }
-
- public static IProposition isReducible() {
- return get("Reducible");
- }
-
- public static IProposition isHeading() {
- return get("Heading");
- }
-
- public static IProposition isHeading1() {
- return get("Heading1");
- }
-
- public static IProposition isHeading2() {
- return get("Heading2");
- }
-
- public static IProposition isHeading3() {
- return get("Heading3");
- }
-
- public static IProposition isHeading4() {
- return get("Heading4");
- }
-
- public static IProposition isHeading5() {
- return get("Heading5");
- }
-
- public static IProposition isHeading6() {
- return get("Heading6");
- }
-
- public static IProposition find(String str, boolean exact) {
- return new FindProposition(str, exact);
- }
-
- public static IProposition startsWith(String str, boolean exact) {
- return new StartsWithProposition(str, exact);
- }
-
- public static IProposition nodeLocation(Node refNode, boolean backward) {
- return new NodeLocationProposition(refNode, backward);
- }
-
- public static IProposition isAccessKey(char key) {
- return new IsAccessKey(key);
- }
-
- public static IProposition isConnectable() {
- return get("Connectable");
- }
-
- public static IProposition hasReadingContent() {
- return get("HasReadingContent");
- }
-
- public static IProposition isBlockJumpPointF() {
- return get("BlockJumpPointF");
- }
-
- public static IProposition isBlockJumpPointB() {
- return get("BlockJumpPointB");
- }
-
- public static IProposition isMultiSelectable() {
- return get("MultiSelectable");
- }
-
- public static IProposition isMedia() {
- return get("Media");
- }
-
- public static IProposition isFlashTopNode() {
- return get("FlashTopNode");
- }
-
- public static IProposition isFlashLastNode() {
- return get("FlashLastNode");
- }
-
- public static IProposition isMSAAFlash() {
- return get("MSAAFlash");
- }
-
- public static IProposition isReachable(Node baseNode) {
- return new IsReachable(baseNode);
- }
-
- public static IProposition isAlterable() {
- return get("Alterable");
- }
-
- public enum FlashMode {
- MSAA, FLASH_DOM, NO_FLASH
- }
-
- public static FlashMode getNormalFlashMode() {
- String mode = VocabPlugin.getDefault().getPreferenceStore().getString(
- VocabPreferenceConstants.NORMAL_FLASH);
- if (VocabPreferenceConstants.VALUE_MSAA_FLASH.equals(mode))
- return FlashMode.MSAA;
- if (VocabPreferenceConstants.VALUE_FLASH_DOM.equals(mode))
- return FlashMode.FLASH_DOM;
- if (VocabPreferenceConstants.VALUE_NO_FLASH.equals(mode))
- return FlashMode.NO_FLASH;
- return FlashMode.NO_FLASH;
- }
-
- public static FlashMode getWindowlessFlashMode() {
- String mode = VocabPlugin.getDefault().getPreferenceStore().getString(
- VocabPreferenceConstants.WNDLESS_FLASH);
- if (VocabPreferenceConstants.VALUE_FLASH_DOM.equals(mode))
- return FlashMode.FLASH_DOM;
- if (VocabPreferenceConstants.VALUE_NO_FLASH.equals(mode))
- return FlashMode.NO_FLASH;
- return FlashMode.NO_FLASH;
- }
-
- public static boolean isReadNoAltImage() {
- return VocabPlugin.getDefault().getPreferenceStore().getBoolean(
- VocabPreferenceConstants.READ_NO_ALT);
- }
-
- public static boolean isReadNullAltImage() {
- return VocabPlugin.getDefault().getPreferenceStore().getBoolean(
- VocabPreferenceConstants.READ_NULL_ALT);
- }
-
- public static boolean isReadNoAltImageLink() {
- return VocabPlugin.getDefault().getPreferenceStore().getBoolean(
- VocabPreferenceConstants.READ_NO_ALT_LINK);
- }
-
- public static boolean isReadNullAltImageLink() {
- return VocabPlugin.getDefault().getPreferenceStore().getBoolean(
- VocabPreferenceConstants.READ_NULL_ALT_LINK);
- }
-
- public static boolean isSkipIconLink() {
- return VocabPlugin.getDefault().getPreferenceStore().getBoolean(
- VocabPreferenceConstants.SKIP_ICON_LINK);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/WidgetsVocabulary.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/WidgetsVocabulary.java
deleted file mode 100644
index ba930b0..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/WidgetsVocabulary.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab;
-
-/**
- * WidgetsVocabulary defines propositions related to widgets such as button and
- * radio button.
- */
-public class WidgetsVocabulary {
- private static class IsButton implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isButton(node);
- }
-
- public String getName() {
- return "isButton";
- }
- }
-
- private static class IsListItem implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isListItem(node);
- }
-
- public String getName() {
- return "isListItem";
- }
- }
-
- private static class IsListTop implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isListTop(node);
- }
-
- public String getName() {
- return "isListTop";
- }
- }
-
- private static class IsCheckbox implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isCheckbox(node);
- }
-
- public String getName() {
- return "isCheckbox";
- }
- }
-
- private static class IsChecked implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isChecked(node);
- }
-
- public String getName() {
- return "isChecked";
- }
- }
-
- private static class IsRadio implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isRadio(node);
- }
-
- public String getName() {
- return "isRadio";
- }
- }
-
- private static class IsCombobox implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isCombobox(node);
- }
-
- public String getName() {
- return "isCombobox";
- }
- }
-
- private static class IsSubmit implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isSubmit(node);
- }
-
- public String getName() {
- return "isSubmit";
- }
- }
-
- private static class IsFileEdit implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isFileEdit(node);
- }
-
- public String getName() {
- return "isFileEdit";
- }
- }
-
- private static class IsLabel implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isLabel(node);
- }
-
- public String getName() {
- return "isLabel";
- }
- }
-
- private static class IsLink implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isLink(node);
- }
-
- public String getName() {
- return "isLink";
- }
- }
-
- private static class IsVisitedLink implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isVisitedLink(node);
- }
-
- public String getName() {
- return "isVisitedLink";
- }
- }
-
- private static class IsTextarea implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isTextarea(node);
- }
-
- public String getName() {
- return "isTextarea";
- }
- }
-
- private static class IsTextbox implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isTextbox(node);
- }
-
- public String getName() {
- return "isTextbox";
- }
- }
-
- private static class IsPassword implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isPassword(node);
- }
-
- public String getName() {
- return "isPassword";
- }
- }
-
- private static class IsMultilineEdit implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isMultilineEdit(node);
- }
-
- public String getName() {
- return "isMulti";
- }
- }
-
- private static class IsSelectOption implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isSelectOption(node);
- }
-
- public String getName() {
- return "isSelectOption";
- }
- }
-
- private static class IsImage implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isImage(node);
- }
-
- public String getName() {
- return "isImage";
- }
- }
-
- private static class IsFlashTopNode implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isFlashTopNode(node);
- }
-
- public String getName() {
- return "isFlashTopNode";
- }
- }
-
- private static class IsFlashLastNode implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isFlashLastNode(node);
- }
-
- public String getName() {
- return "isFlashLastNode";
- }
- }
-
- private static class IsMSAAFlash implements IProposition {
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isMSAAFlash(node);
- }
-
- public String getName() {
- return "isMSAAFlash";
- }
- }
-
- private static class IsHeading implements IProposition {
- private int level = 0;
-
- public IsHeading() {
- }
-
- public IsHeading(int level) {
- this.level = level;
- }
-
- public boolean eval(IEvalTarget node) {
- return node.getTerms().isHeading(level, node);
- }
-
- public String getName() {
- if (level != 0)
- return "isHeading" + level;
- return "isHeading";
- }
- }
-
- static void initialize() {
- Vocabulary.add("Button", new IsButton());
- Vocabulary.add("ListItem", new IsListItem());
- Vocabulary.add("ListTop", new IsListTop());
- Vocabulary.add("Checkbox", new IsCheckbox());
- Vocabulary.add("Checked", new IsChecked());
- Vocabulary.add("Radio", new IsRadio());
- Vocabulary.add("Combobox", new IsCombobox());
- Vocabulary.add("Submit", new IsSubmit());
- Vocabulary.add("FileEdit", new IsFileEdit());
- Vocabulary.add("Label", new IsLabel());
- Vocabulary.add("Link", new IsLink());
- Vocabulary.add("VisitedLink", new IsVisitedLink());
- Vocabulary.add("Textarea", new IsTextarea());
- Vocabulary.add("Textbox", new IsTextbox());
- Vocabulary.add("Password", new IsPassword());
- Vocabulary.add("MultilineEdit", new IsMultilineEdit());
- Vocabulary.add("SelectOption", new IsSelectOption());
- Vocabulary.add("Image", new IsImage());
- Vocabulary.add("Heading", new IsHeading());
- Vocabulary.add("Heading1", new IsHeading(1));
- Vocabulary.add("Heading2", new IsHeading(2));
- Vocabulary.add("Heading3", new IsHeading(3));
- Vocabulary.add("Heading4", new IsHeading(4));
- Vocabulary.add("Heading5", new IsHeading(5));
- Vocabulary.add("Heading6", new IsHeading(6));
-
- Vocabulary.add("FlashTopNode", new IsFlashTopNode());
- Vocabulary.add("FlashLastNode", new IsFlashLastNode());
- Vocabulary.add("MSAAFlash", new IsMSAAFlash());
- }
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/AbstractOperator.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/AbstractOperator.java
deleted file mode 100644
index f371b4f..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/AbstractOperator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab.impl;
-
-import java.util.ArrayList;
-
-import org.eclipse.actf.util.vocab.IOperator;
-import org.eclipse.actf.util.vocab.IProposition;
-
-
-
-
-public abstract class AbstractOperator implements IOperator {
-
- private ArrayList<IProposition> props = new ArrayList<IProposition>();
-
- public AbstractOperator(IProposition... args){
- for(IProposition p: args){
- props.add(p);
- }
- }
-
- public void add(IProposition prop){
- props.add(prop);
- }
-
- public int size(){
- return props.size();
- }
-
- public IProposition get(int index){
- return props.get(index);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/AbstractOperator1.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/AbstractOperator1.java
deleted file mode 100644
index 800246d..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/AbstractOperator1.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab.impl;
-
-import org.eclipse.actf.util.vocab.IOperator1;
-import org.eclipse.actf.util.vocab.IProposition;
-
-
-
-public abstract class AbstractOperator1 implements IOperator1 {
-
- private IProposition proposition;
-
- public AbstractOperator1(IProposition proposition){
- this.proposition = proposition;
- }
-
- public IProposition getProposition() {
- return proposition;
- }
-
- public void setProposition(IProposition proposition){
- this.proposition = proposition;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/AndOperator.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/AndOperator.java
deleted file mode 100644
index d9f58d2..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/AndOperator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab.impl;
-
-import org.eclipse.actf.util.vocab.IEvalTarget;
-import org.eclipse.actf.util.vocab.IProposition;
-
-
-
-public class AndOperator extends AbstractOperator {
-
- public AndOperator(IProposition... args){
- super(args);
- }
-
- public boolean eval(IEvalTarget node){
- for(int i=0; i<size(); i++){
- IProposition p = get(i);
- boolean result = p.eval(node);
- if(result == false){
- return false;
- }
- }
- return true;
- }
-
- public String getName() {
- return "and";
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/FalseImpl.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/FalseImpl.java
deleted file mode 100644
index 10dc9cb..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/FalseImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab.impl;
-
-import org.eclipse.actf.util.vocab.IEvalTarget;
-import org.eclipse.actf.util.vocab.IProposition;
-
-
-
-public class FalseImpl implements IProposition {
-
- private static FalseImpl instance = new FalseImpl();
-
- private FalseImpl(){
- }
-
- public boolean eval(IEvalTarget node){
- return false;
- }
-
- public String getName() {
- return "false";
- }
-
- public static FalseImpl getInstance() {
- return instance;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/Function.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/Function.java
deleted file mode 100644
index 4f1ea9e..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/Function.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import org.eclipse.actf.util.vocab.IEvalTarget;
-import org.eclipse.actf.util.vocab.IProposition;
-
-
-
-
-public class Function implements IProposition {
- private String name;
-
- private Object[] args;
-
- private Method method;
-
- public Function(String name, String... args) {
- this.name = name;
- this.args = new Object[args.length+1];
- for(int i=0; i<args.length; i++){
- this.args[i+1] = args[i];
- }
- }
-
- public boolean eval(IEvalTarget node){
- if (method == null) {
- Class[] classes = new Class[args.length];
- for (int i = 0; i < classes.length; i++) {
- classes[i] = args[i].getClass();
- }
- Class clazz = node.getTerms().getClass();
- try {
- method = clazz.getMethod(getName(), classes);
- } catch (SecurityException e) {
- e.printStackTrace();
- } catch (NoSuchMethodException e) {
- e.printStackTrace();
- }
- }
- if(method != null){
- try {
- this.args[0] = node;
- return (Boolean)method.invoke(node.getTerms(), (Object[])args);
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- }
- //throw new RuntimeException("Fails to invoke method \""+getName()+"\" for "+node);
- return false;
- }
-
- public String getName() {
- return name;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/ImplyOperator.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/ImplyOperator.java
deleted file mode 100644
index 2b5bd6b..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/ImplyOperator.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab.impl;
-
-import org.eclipse.actf.util.vocab.IProposition;
-
-
-
-public class ImplyOperator extends OrOperator {
-
- public ImplyOperator(IProposition left, IProposition right) {
- super(new NotOperator(left), right);
- }
-
- @Override
- public String getName() {
- return "implies";
- }
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/NotOperator.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/NotOperator.java
deleted file mode 100644
index 9276d6d..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/NotOperator.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab.impl;
-
-import org.eclipse.actf.util.vocab.IEvalTarget;
-import org.eclipse.actf.util.vocab.IProposition;
-
-
-
-public class NotOperator extends AbstractOperator1 {
-
-
- public NotOperator(IProposition proposition) {
- super(proposition);
- }
-
- public boolean eval(IEvalTarget node){
- return !getProposition().eval(node);
- }
-
- public String getName() {
- return "not";
- }
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/OrOperator.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/OrOperator.java
deleted file mode 100644
index d3fbb3f..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/impl/OrOperator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.vocab.impl;
-
-import org.eclipse.actf.util.vocab.IEvalTarget;
-import org.eclipse.actf.util.vocab.IProposition;
-
-
-
-public class OrOperator extends AbstractOperator {
-
- public OrOperator(IProposition... args){
- super(args);
- }
-
- public boolean eval(IEvalTarget node){
- for(int i=0; i<size(); i++){
- IProposition p = get(i);
- boolean result = p.eval(node);
- if(result == true){
- return true;
- }
- }
- return false;
- }
-
- public String getName() {
- return "or";
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/preferences/VocabPreferenceConstants.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/preferences/VocabPreferenceConstants.java
deleted file mode 100644
index 08b8653..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/preferences/VocabPreferenceConstants.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.vocab.preferences;
-
-/**
- * Constant definitions for plug-in preferences
- */
-public class VocabPreferenceConstants {
-
- public static final String NORMAL_FLASH = "normal_flash";
- public static final String WNDLESS_FLASH = "wndless_flash";
-
- public static final String VALUE_FLASH_DOM = "flash_dom";
-
- public static final String VALUE_MSAA_FLASH = "msaa_flash";
-
- public static final String VALUE_NO_FLASH = "no_flash";
-
- public static final String READ_NO_ALT = "read_no_alt";
-
- public static final String READ_NULL_ALT = "read_null_alt";
-
- public static final String READ_NO_ALT_LINK = "read_no_alt_link";
-
- public static final String READ_NULL_ALT_LINK = "read_null_alt_link";
-
- public static final String SKIP_ICON_LINK = "skip_icon_link";
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/preferences/VocabPreferenceInitializer.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/preferences/VocabPreferenceInitializer.java
deleted file mode 100644
index 25977af..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/preferences/VocabPreferenceInitializer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.vocab.preferences;
-
-import org.eclipse.actf.util.vocab.VocabPlugin;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-
-/**
- * Class used to initialize default preference values.
- */
-public class VocabPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- @Override
- public void initializeDefaultPreferences() {
- IPreferenceStore store = VocabPlugin.getDefault().getPreferenceStore();
- store.setDefault(VocabPreferenceConstants.NORMAL_FLASH, VocabPreferenceConstants.VALUE_MSAA_FLASH);
- store.setDefault(VocabPreferenceConstants.WNDLESS_FLASH, VocabPreferenceConstants.VALUE_FLASH_DOM);
- store.setDefault(VocabPreferenceConstants.READ_NO_ALT, true);
- store.setDefault(VocabPreferenceConstants.READ_NULL_ALT, false);
- store.setDefault(VocabPreferenceConstants.READ_NO_ALT_LINK, true);
- store.setDefault(VocabPreferenceConstants.READ_NULL_ALT_LINK, true);
- store.setDefault(VocabPreferenceConstants.SKIP_ICON_LINK, true);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/preferences/VocabPreferencePage.java b/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/preferences/VocabPreferencePage.java
deleted file mode 100644
index eae94c5..0000000
--- a/plugins/org.eclipse.actf.util.vocab/src/org/eclipse/actf/util/vocab/preferences/VocabPreferencePage.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.vocab.preferences;
-
-import org.eclipse.actf.util.vocab.VocabPlugin;
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.RadioGroupFieldEditor;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-/**
- * This class represents a preference page that
- * is contributed to the Preferences dialog. By
- * subclassing <samp>FieldEditorPreferencePage</samp>, we
- * can use the field support built into JFace that allows
- * us to create a page that is small and knows how to
- * save, restore and apply itself.
- * <p>
- * This page is used to modify preferences only. They
- * are stored in the preference store that belongs to
- * the main plug-in class. That way, preferences can
- * be accessed directly via the preference store.
- */
-
-public class VocabPreferencePage
- extends FieldEditorPreferencePage
- implements IWorkbenchPreferencePage {
-
- public VocabPreferencePage() {
- super(GRID);
- setPreferenceStore(VocabPlugin.getDefault().getPreferenceStore());
- setDescription("DOM Vocabulary Preferences");
- }
-
- /**
- * Creates the field editors. Field editors are abstractions of
- * the common GUI blocks needed to manipulate various types
- * of preferences. Each field editor knows how to save and
- * restore itself.
- */
- @Override
- public void createFieldEditors() {
-
- addField(new RadioGroupFieldEditor(VocabPreferenceConstants.NORMAL_FLASH,
- "Extract normal Flash content information by", 1,
- new String[][]{
- {"MSAA", VocabPreferenceConstants.VALUE_MSAA_FLASH},
- {"Flash DOM", VocabPreferenceConstants.VALUE_FLASH_DOM},
- {"None", VocabPreferenceConstants.VALUE_NO_FLASH}},
- getFieldEditorParent()));
-
- addField(new RadioGroupFieldEditor(VocabPreferenceConstants.WNDLESS_FLASH,
- "Extract windowless Flash content information by", 1,
- new String[][]{
- {"Flash DOM", VocabPreferenceConstants.VALUE_FLASH_DOM},
- {"None", VocabPreferenceConstants.VALUE_NO_FLASH}},
- getFieldEditorParent()));
-
- addField(new BooleanFieldEditor(VocabPreferenceConstants.READ_NO_ALT,
- "Read image with no alt text", getFieldEditorParent()));
- addField(new BooleanFieldEditor(VocabPreferenceConstants.READ_NULL_ALT,
- "Read image with null alt text", getFieldEditorParent()));
- addField(new BooleanFieldEditor(VocabPreferenceConstants.READ_NO_ALT_LINK,
- "Read image link with no alt text", getFieldEditorParent()));
- addField(new BooleanFieldEditor(VocabPreferenceConstants.READ_NULL_ALT_LINK,
- "Read image link with null alt text", getFieldEditorParent()));
- addField(new BooleanFieldEditor(VocabPreferenceConstants.SKIP_ICON_LINK,
- "Skip image link following text link with the same link", getFieldEditorParent()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.win32/.classpath b/plugins/org.eclipse.actf.util.win32/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.actf.util.win32/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.actf.util.win32/.cvsignore b/plugins/org.eclipse.actf.util.win32/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.actf.util.win32/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.actf.util.win32/.project b/plugins/org.eclipse.actf.util.win32/.project
deleted file mode 100644
index d32d042..0000000
--- a/plugins/org.eclipse.actf.util.win32/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.actf.util.win32</name>
- <comment></comment>
- <projects>
- </projects>
- <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/plugins/org.eclipse.actf.util.win32/AccessibiltyWin32Library.dll b/plugins/org.eclipse.actf.util.win32/AccessibiltyWin32Library.dll
deleted file mode 100644
index 556f1e7..0000000
--- a/plugins/org.eclipse.actf.util.win32/AccessibiltyWin32Library.dll
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.actf.util.win32/META-INF/MANIFEST.MF b/plugins/org.eclipse.actf.util.win32/META-INF/MANIFEST.MF
deleted file mode 100644
index cc451c2..0000000
--- a/plugins/org.eclipse.actf.util.win32/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse ACTF Win32 Toolkit (Incubation)
-Bundle-SymbolicName: org.eclipse.actf.util.win32
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.actf.util.win32.Win32Plugin
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.actf.util.comclutch.win32
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.actf.util.win32
diff --git a/plugins/org.eclipse.actf.util.win32/about.html b/plugins/org.eclipse.actf.util.win32/about.html
deleted file mode 100644
index 481dbcf..0000000
--- a/plugins/org.eclipse.actf.util.win32/about.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</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/legal/epl-v10.html</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.util.win32/build.properties b/plugins/org.eclipse.actf.util.win32/build.properties
deleted file mode 100644
index da504d3..0000000
--- a/plugins/org.eclipse.actf.util.win32/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- .,\
- AccessibiltyWin32Library.dll
diff --git a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/.cvsignore b/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/.cvsignore
deleted file mode 100644
index 4776fff..0000000
--- a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Debug
-Release
-*.ncb
-*.suo
-*.user
diff --git a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/AccessibiltyWin32Library.cpp b/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/AccessibiltyWin32Library.cpp
deleted file mode 100644
index 61216da..0000000
--- a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/AccessibiltyWin32Library.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-// AccessibiltyWin32Library.cpp : Defines the entry point for the DLL application.
-//
-
-#include "stdafx.h"
-
-
-#ifdef _MANAGED
-#pragma managed(push, off)
-#endif
-
-BOOL APIENTRY DllMain( HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
-{
- return TRUE;
-}
-
-#ifdef _MANAGED
-#pragma managed(pop)
-#endif
-
diff --git a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/AccessibiltyWin32Library.sln b/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/AccessibiltyWin32Library.sln
deleted file mode 100644
index 2e70d74..0000000
--- a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/AccessibiltyWin32Library.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AccessibiltyWin32Library", "AccessibiltyWin32Library.vcproj", "{435B97C0-D202-4842-AD93-BDE0334C0D1D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {435B97C0-D202-4842-AD93-BDE0334C0D1D}.Debug|Win32.ActiveCfg = Debug|Win32
- {435B97C0-D202-4842-AD93-BDE0334C0D1D}.Debug|Win32.Build.0 = Debug|Win32
- {435B97C0-D202-4842-AD93-BDE0334C0D1D}.Release|Win32.ActiveCfg = Release|Win32
- {435B97C0-D202-4842-AD93-BDE0334C0D1D}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/AccessibiltyWin32Library.vcproj b/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/AccessibiltyWin32Library.vcproj
deleted file mode 100644
index 842dd19..0000000
--- a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/AccessibiltyWin32Library.vcproj
+++ /dev/null
@@ -1,235 +0,0 @@
-<?xml version="1.0" encoding="shift_jis"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="AccessibiltyWin32Library"
- ProjectGUID="{435B97C0-D202-4842-AD93-BDE0334C0D1D}"
- RootNamespace="AccessibiltyWin32Library"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;ACCESSIBILTYWIN32LIBRARY_EXPORTS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;ACCESSIBILTYWIN32LIBRARY_EXPORTS"
- RuntimeLibrary="0"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\AccessibiltyWin32Library.cpp"
- >
- </File>
- <File
- RelativePath=".\org_eclipse_actf_util_win32_COMUtil.cpp"
- >
- </File>
- <File
- RelativePath=".\org_eclipse_actf_util_win32_WindowUtil.cpp"
- >
- </File>
- <File
- RelativePath=".\stdafx.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\stdafx.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- <File
- RelativePath=".\ReadMe.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_COMUtil.cpp b/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_COMUtil.cpp
deleted file mode 100644
index 144bc61..0000000
--- a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_COMUtil.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-#include "stdafx.h"
-#include "org_eclipse_actf_util_win32_COMUtil.h"
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__III
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- jint rc = 0;
- try {
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jint, jint))(*(jint **)arg1)[arg0])(arg1, arg2);
- }
- catch(...) {
- rc = 1;
- }
- return rc;
-}
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIII
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- jint rc = 0;
- try {
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jint, jint, jint))(*(jint **)arg1)[arg0])(arg1, arg2, arg3);
- }
- catch(...) {
- rc = 1;
- }
- return rc;
-}
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIII
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
-{
- jint rc = 0;
- try {
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jint, jint, jint, jint))(*(jint **)arg1)[arg0])(arg1, arg2, arg3, arg4);
- }
- catch(...) {
- rc = 1;
- }
- return rc;
-}
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIIII
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5)
-{
- jint rc = 0;
- try {
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jint, jint, jint, jint, jint))(*(jint **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5);
- }
- catch(...) {
- rc = 1;
- }
- return rc;
-}
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIIIII
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6)
-{
- jint rc = 0;
- try {
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jint, jint, jint, jint, jint, jint))(*(jint **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6);
- }
- catch(...) {
- rc = 1;
- }
- return rc;
-}
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIIIIII
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7)
-{
- jint rc = 0;
- try {
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jint, jint, jint, jint, jint, jint, jint))(*(jint **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- }
- catch(...) {
- rc = 1;
- }
- return rc;
-}
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIIIIIII
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
-{
- jint rc = 0;
- try {
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jint, jint, jint, jint, jint, jint, jint, jint))(*(jint **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
- }
- catch(...) {
- rc = 1;
- }
- return rc;
-}
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIIIIIIII
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9)
-{
- jint rc = 0;
- try {
- rc = (jint)((jint (STDMETHODCALLTYPE *)(jint, jint, jint, jint, jint, jint, jint, jint, jint))(*(jint **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
- }
- catch(...) {
- rc = 1;
- }
- return rc;
-}
diff --git a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_COMUtil.h b/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_COMUtil.h
deleted file mode 100644
index 34e27cf..0000000
--- a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_COMUtil.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_eclipse_actf_util_win32_COMUtil */
-
-#ifndef _Included_org_eclipse_actf_util_win32_COMUtil
-#define _Included_org_eclipse_actf_util_win32_COMUtil
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_eclipse_actf_util_win32_COMUtil
- * Method: VtblCall
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__III
- (JNIEnv *, jclass, jint, jint, jint);
-
-/*
- * Class: org_eclipse_actf_util_win32_COMUtil
- * Method: VtblCall
- * Signature: (IIII)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIII
- (JNIEnv *, jclass, jint, jint, jint, jint);
-
-/*
- * Class: org_eclipse_actf_util_win32_COMUtil
- * Method: VtblCall
- * Signature: (IIIII)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIII
- (JNIEnv *, jclass, jint, jint, jint, jint, jint);
-
-/*
- * Class: org_eclipse_actf_util_win32_COMUtil
- * Method: VtblCall
- * Signature: (IIIIII)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIIII
- (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint);
-
-/*
- * Class: org_eclipse_actf_util_win32_COMUtil
- * Method: VtblCall
- * Signature: (IIIIIII)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIIIII
- (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint);
-
-/*
- * Class: org_eclipse_actf_util_win32_COMUtil
- * Method: VtblCall
- * Signature: (IIIIIIII)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIIIIII
- (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint, jint);
-
-/*
- * Class: org_eclipse_actf_util_win32_COMUtil
- * Method: VtblCall
- * Signature: (IIIIIIIII)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIIIIIII
- (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint, jint, jint);
-
-/*
- * Class: org_eclipse_actf_util_win32_COMUtil
- * Method: VtblCall
- * Signature: (IIIIIIIIII)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_COMUtil_VtblCall__IIIIIIIIII
- (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_WindowUtil.cpp b/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_WindowUtil.cpp
deleted file mode 100644
index 8404a44..0000000
--- a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_WindowUtil.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-#include "stdafx.h"
-#include "org_eclipse_actf_util_win32_WindowUtil.h"
-
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_WindowUtil_SetLayeredWindowAttributes
- (JNIEnv *env, jclass that, jint hwnd, jint crKey, jchar bAlpha, jint dwFlags)
-{
- return SetLayeredWindowAttributes((HWND)hwnd, crKey, bAlpha, dwFlags);
-}
diff --git a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_WindowUtil.h b/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_WindowUtil.h
deleted file mode 100644
index 28725a2..0000000
--- a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/org_eclipse_actf_util_win32_WindowUtil.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_eclipse_actf_util_win32_WindowUtil */
-
-#ifndef _Included_org_eclipse_actf_util_win32_WindowUtil
-#define _Included_org_eclipse_actf_util_win32_WindowUtil
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_eclipse_actf_util_win32_WindowUtil
- * Method: SetLayeredWindowAttributes
- * Signature: (IICI)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_actf_util_win32_WindowUtil_SetLayeredWindowAttributes
- (JNIEnv *, jclass, jint, jint, jchar, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/stdafx.cpp b/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/stdafx.cpp
deleted file mode 100644
index fdf258b..0000000
--- a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/stdafx.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-// stdafx.cpp : source file that includes just the standard includes
-// AccessibiltyWin32Library.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
diff --git a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/stdafx.h b/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/stdafx.h
deleted file mode 100644
index 69391c8..0000000
--- a/plugins/org.eclipse.actf.util.win32/library_src/AccessibiltyWin32Library/stdafx.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#pragma once
-
-// Modify the following defines if you have to target a platform prior to the ones specified below.
-// Refer to MSDN for the latest info on corresponding values for different platforms.
-#ifndef WINVER // Allow use of features specific to Windows XP or later.
-#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
-#endif
-
-#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
-#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
-#endif
-
-#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
-#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
-#endif
-
-#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
-#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
-#endif
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-// Windows Header Files:
-#include <windows.h>
-
-
-
-// TODO: reference additional headers your program requires here
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/AccessibleHilighter.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/AccessibleHilighter.java
deleted file mode 100644
index 074c5b4..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/AccessibleHilighter.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.actf.util.win32.impl.DrawUtil;
-import org.eclipse.swt.graphics.Rectangle;
-
-
-
-public class AccessibleHilighter {
-
- private static Thread lastThread = null;
- private static final int COLOR_YELLOW = 0x00FFFF;
- private static final int COLOR_GREEN = 0x00FF00;
- private static final int[][] FLASHING_COLORS = {
- { COLOR_YELLOW, 250 }, { COLOR_GREEN, 250 },
- { COLOR_YELLOW, 250 }, { COLOR_GREEN, 250 },
- { COLOR_YELLOW, 250 }, { COLOR_GREEN, 250 },
- { COLOR_YELLOW, 1000 }
- };
-
- /**
- * Flash rectangle without using OverlayWindow.
- *
- * Note: This function may leave garbages on the screen.
- *
- * @param rect
- */
- public static void flashRectangle(final Rectangle rect) {
- if (null != lastThread) {
- lastThread.interrupt();
- }
- if( null != rect ) {
- lastThread = new Thread(new Runnable() {
- public void run() {
- int hwndDraw = WindowUtil.GetDesktopWindow();
- try {
- for( int i=0; i<FLASHING_COLORS.length; i++ ) {
- DrawUtil.drawRectangle(hwndDraw, rect, FLASHING_COLORS[i][0]);
- Thread.sleep(FLASHING_COLORS[i][1]);
- }
- } catch (InterruptedException e) {
- }
- DrawUtil.redrawRectangle(hwndDraw, rect);
- if (lastThread == Thread.currentThread()) {
- lastThread = null;
- }
- }
- });
- lastThread.start();
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/COMUtil.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/COMUtil.java
deleted file mode 100644
index 739b95b..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/COMUtil.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.swt.internal.ole.win32.COM;
-import org.eclipse.swt.internal.ole.win32.GUID;
-import org.eclipse.swt.ole.win32.OLE;
-
-/**
- * COM related utilities. Calling v table method, creating GUID, and creating
- * dispatch object from GUID.
- */
-public class COMUtil {
-
- static {
- try {
- System.loadLibrary("AccessibiltyWin32Library"); //$NON-NLS-1$
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static int createDispatch(GUID rclsid) {
- int[] ppv = new int[1];
- int result = COM.CoCreateInstance(rclsid, 0, COM.CLSCTX_INPROC_HANDLER
- | COM.CLSCTX_INPROC_SERVER | COM.CLSCTX_LOCAL_SERVER
- | COM.CLSCTX_REMOTE_SERVER, COM.IIDIDispatch, ppv);
- if (result != OLE.S_OK)
- OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);
- return ppv[0];
- }
-
- public static final native int VtblCall(int fnNumber, int ppVtbl, int arg0);
-
- public static final native int VtblCall(int fnNumber, int ppVtbl, int arg0,
- int arg1);
-
- public static final native int VtblCall(int fnNumber, int ppVtbl, int arg0,
- int arg1, int arg2);
-
- public static final native int VtblCall(int fnNumber, int ppVtbl, int arg0,
- int arg1, int arg2, int arg3);
-
- public static final native int VtblCall(int fnNumber, int ppVtbl, int arg0,
- int arg1, int arg2, int arg3, int arg4);
-
- public static final native int VtblCall(int fnNumber, int ppVtbl, int arg0,
- int arg1, int arg2, int arg3, int arg4, int arg5);
-
- public static final native int VtblCall(int fnNumber, int ppVtbl, int arg0,
- int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
-
- public static final native int VtblCall(int fnNumber, int ppVtbl, int arg0,
- int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7);
-
- public static GUID IIDFromString(String lpsz) {
- int length = lpsz.length();
- char[] buffer = new char[length + 1];
- lpsz.getChars(0, length, buffer, 0);
- GUID lpiid = new GUID();
- if (COM.IIDFromString(buffer, lpiid) == OLE.S_OK)
- return lpiid;
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/COPYDATASTRUCT.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/COPYDATASTRUCT.java
deleted file mode 100644
index 21811bf..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/COPYDATASTRUCT.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.swt.internal.win32.OS;
-
-public class COPYDATASTRUCT {
-
- public static final int WM_COPYDATA = 0x4a;
- public static final int sizeof = 12;
-
- public int dwData;
- public int cbData;
- public int lpData;
- public byte[] data;
-
- /**
- * Create a COPYDATASTRUCT object using String data
- *
- * @param dwData
- * @param strData
- */
- public COPYDATASTRUCT(int dwData, String strData ) {
- this(dwData,strData.getBytes());
- }
-
- /**
- * Create a COPYDATASTRUCT object using binary data
- *
- * @param dwData
- * @param data
- */
- public COPYDATASTRUCT(int dwData, byte[] data ) {
- this.dwData = dwData;
- if( null != data ) {
- this.cbData = data.length;
- this.data = new byte[data.length];
- System.arraycopy(data, 0, this.data, 0, data.length);
- }
- }
-
- /**
- * Create a COPYDATASTRUCT object using lParam
- *
- * @param lParam
- */
- public COPYDATASTRUCT(int lParam) {
- int[] pEntries = new int[3];
- OS.MoveMemory(pEntries, lParam, sizeof);
- dwData = pEntries[0];
- cbData = pEntries[1];
- lpData = pEntries[2];
- if( 0 != lpData && cbData > 0 ) {
- data = new byte[cbData];
- OS.MoveMemory(data, lpData, cbData);
- }
- else {
- data = new byte[0];
- }
- }
-
- /**
- * Copy a COPYDATASTRUCT object to memory
- *
- * @param pData
- */
- public void setData(int pData){
- int p = 0;
- if( null != data ) {
- p = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cbData);
- OS.MoveMemory(p, data, cbData);
- }
- OS.MoveMemory(pData, new int[] {dwData, cbData, p}, sizeof);
- }
-
- /**
- * Send a COPYDATASTRUCT object to another window using WM_COPYDATA
- *
- * @param hwndTo
- * @param hwndFrom
- * @return
- */
- public int sendMessage(int hwndTo, int hwndFrom) {
- int lpData = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, sizeof);
- try {
- setData(lpData);
- return OS.SendMessage(hwndTo, WM_COPYDATA, hwndFrom, lpData);
- }
- finally {
- OS.GlobalFree(lpData);
- }
- }
-
- /**
- * Retrieve a String data
- * @return
- */
- public String getStringData() {
- try {
- return new String(data);
- }
- catch( Exception e ) {
- return null;
- }
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return "dwData="+dwData+", cbData="+cbData+", lpData=0x"+Integer.toHexString(lpData)+", data=\""+new String(data)+"\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- }
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/FlashMSAAObject.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/FlashMSAAObject.java
deleted file mode 100644
index b669d65..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/FlashMSAAObject.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.actf.util.win32.comclutch.ComService;
-import org.eclipse.actf.util.win32.comclutch.IDispatch;
-import org.eclipse.actf.util.win32.msaa.IAccessible;
-import org.eclipse.actf.util.win32.msaa.MSAA;
-
-public class FlashMSAAObject {
-
- FlashMSAAObject parent;
- IAccessible iacc;
- int childId = MSAA.CHILDID_SELF;
-
- public FlashMSAAObject(IAccessible iacc) {
- this.iacc = iacc;
- }
-
- public FlashMSAAObject(FlashMSAAObject parent, int childId) {
- this.parent = parent;
- this.childId = childId;
- }
-
- private int getInt() {
- return childId;
- }
-
- public IAccessible getIAccessible() {
- if (iacc != null)
- return iacc;
- if (parent != null)
- return parent.getIAccessible();
- return null;
- }
-
- public String getAccKeyboardShortcut() {
- return getIAccessible().getAccKeyboardShortcut(getInt());
- }
-
- public int getAccRole() {
- return getIAccessible().getAccRole(getInt());
- }
-
- public String getAccDescription() {
- return getIAccessible().getAccDescription(getInt());
- }
-
- public int getAccState() {
- return getIAccessible().getAccState(getInt());
- }
-
- public boolean doDefaultAction() {
- try {
- return getIAccessible().accDoDefaultAction(getInt());
- } catch (Exception e) {
- }
- return false;
- }
-
- public int getChildCount() {
- if (iacc != null) {
- return iacc.getAccChildCount();
- }
- return 0;
- }
-
- public String getAccName() {
- return getIAccessible().getAccName(getInt());
- }
-
- public boolean select(int selflagTakefocus) {
- getIAccessible().accSelect(selflagTakefocus, getInt());
- return true;
- }
-
- private FlashMSAAObject[] cachedChildren = new FlashMSAAObject[0];
-
- public FlashMSAAObject[] getChildren() {
- int childCount = Math.max(0, getChildCount());
- if (childCount == cachedChildren.length) {
- return cachedChildren;
- }
- if (childCount > 32 * 1024) {
- System.err
- .println("Too many children(" + childCount + "), we don't fectch."); //$NON-NLS-1$ //$NON-NLS-2$
-
- return new FlashMSAAObject[0];
- }
- cachedChildren = new FlashMSAAObject[childCount];
- if (childCount > 0) {
- Object[] children = MSAA.getAccessibleChildren(getIAccessible(), 0,
- childCount);
- for (int i = 0; i < childCount; i++) {
- if (children[i] != null) {
- if (children[i] instanceof Integer) {
- cachedChildren[i] = new FlashMSAAObject(this,
- (Integer) children[i]);
- } else if (children[i] instanceof IDispatch) {
- // IAccessible iacc = (IAccessible) ((IDispatch)
- // children[i]).queryInterface(IUnknown.IID_IAccessible);
-
- IAccessible iacc = ComService
- .newIAccessible((IDispatch) children[i]);
-
- cachedChildren[i] = new FlashMSAAObject(iacc);
- }
- }
- }
- }
- return cachedChildren;
- }
-
- private String strClassName;
-
- public String getClassName() {
- if (null == strClassName) {
- long hwnd = this.getWindow();
- strClassName = null;
- if (0 != hwnd) {
- strClassName = WindowUtil.GetWindowClassName((int) hwnd);
- }
- }
- return strClassName;
- }
-
- private long accWindow = -1;
-
- public int getWindow() {
- if (-1 == accWindow) {
- try {
- accWindow = MSAA.WindowFromAccessibleObject(getIAccessible()
- .getPtr());
- } catch (Exception e) {
- accWindow = 0;
- }
- }
- return (int) accWindow;
- }
-
- public int getPtr() {
- return (int) getIAccessible().getPtr();
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/FlashMSAAObjectFactory.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/FlashMSAAObjectFactory.java
deleted file mode 100644
index 62aeea2..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/FlashMSAAObjectFactory.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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:
- * Daisuke SATO - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.actf.util.win32.comclutch.ComService;
-import org.eclipse.actf.util.win32.comclutch.IServiceProvider;
-import org.eclipse.actf.util.win32.comclutch.IUnknown;
-import org.eclipse.actf.util.win32.comclutch.ResourceManager;
-import org.eclipse.actf.util.win32.msaa.IAccessible;
-import org.eclipse.actf.util.win32.msaa.MSAA;
-
-/**
- * The factory class of IAccessibleObject
- */
-public class FlashMSAAObjectFactory {
- private static ResourceManager resouceManager = null;
-
- /**
- * @param hwnd
- * the window handle to be used to obtain IAccessibleObject
- * @return the instance of the IAccessibleObject corresponding to the <i>hwnd</i>
- * @see IAccessibleObject
- */
- public static FlashMSAAObject getFlashMSAAObjectFromWindow(long hwnd) {
- if (resouceManager == null) {
- resouceManager = ResourceManager.newResourceManager(null);
- }
- long iaccPtr = MSAA.getAccessibleObjectFromWindow(hwnd);
- IAccessible iacc = ComService.newIAccessible(resouceManager, iaccPtr, true);
- return new FlashMSAAObject(iacc);
- }
-
- /**
- * @param iacc
- * the address of IAccessible
- * @return the instance of the IAccessibleObject corresponding to the <i>hwnd</i>
- * @see IAccessibleObject
- */
- public static FlashMSAAObject getFlashMSAAObjectFromPtr(long address) {
- if (resouceManager == null) {
- resouceManager = ResourceManager.newResourceManager(null);
- }
- IAccessible iacc = ComService.newIAccessible(resouceManager, address, true);
- return new FlashMSAAObject(iacc);
- }
-
- /**
- * @param iunk
- * the IUnknown interface of the HTML element to be used to
- * obtain IAccessibleObject
- * @return the instance of the IAccessibleObject corresponding to the <i>iunk</i>
- */
- public static FlashMSAAObject getFlashMSAAObjectFromElement(IUnknown iunk) {
- IServiceProvider isp = (IServiceProvider) iunk
- .queryInterface(IUnknown.IID_IServiceProvider);
- if (isp != null) {
- IUnknown iacc = isp.queryService(IUnknown.IID_IAccessible,
- IUnknown.IID_IAccessible);
- if (iunk != null) {
- return new FlashMSAAObject(ComService.newIAccessible(iacc));
- }
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/HighlightComposite.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/HighlightComposite.java
deleted file mode 100644
index f03d74a..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/HighlightComposite.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.actf.util.win32.impl.IIntervalExec;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-
-
-
-/**
- * HighlightComposite is used to highlight an object. The composite is used
- * in {@link OverlayWindow}.
- */
-public class HighlightComposite extends Composite implements IIntervalExec {
-
- private static final int BORDER_WIDTH = 3;
-
- private static HighlightComposite instance;
-
- private StyledText text;
-
- private Display display;
-
- private int flashingIndex = -1;
-
- private static int suppressRefCount = 0;
-
- private static boolean needRedraw = true;
-
- private static final int[][] FLASHING_COLORS = {
- { SWT.COLOR_YELLOW, 250 }, { SWT.COLOR_GREEN, 250 },
- { SWT.COLOR_YELLOW, 250 }, { SWT.COLOR_GREEN, 250 },
- { SWT.COLOR_YELLOW, 250 }, { SWT.COLOR_GREEN, 250 },
- { SWT.COLOR_YELLOW, 1000 }
- };
-
- private static final int MESSAGE_COLOR = SWT.COLOR_INFO_FOREGROUND;
-
- private static final int MESSAGE_BACK = SWT.COLOR_INFO_BACKGROUND;
-
- private HighlightComposite(Composite parent, int style) {
- super(parent, style);
- display = getDisplay();
- GridLayout layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = BORDER_WIDTH;
- setLayout(layout);
- text = new StyledText(this, SWT.NONE);
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- text.setBackground(parent.getBackground());
- }
-
- private void show(Rectangle rect, String message) {
- if( -1 != flashingIndex ) {
- needRedraw = true;
- }
- flashingIndex = 0;
- if (null != message) {
- text.setText(message);
- StyleRange range = new StyleRange();
- range.start = 0;
- range.length = text.getCharCount();
- range.foreground = display.getSystemColor(MESSAGE_COLOR);
- range.background = display.getSystemColor(MESSAGE_BACK);
- text.setStyleRange(range);
- }
- getOverlayWindow().getComposite().moveAbove(null);
- moveAbove(null);
- setBounds(rect.x, rect.y, Math.max(BORDER_WIDTH, rect.width), Math.max(BORDER_WIDTH, rect.height));
- setVisible(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.actf.util.win32.IIntervalExec#exec()
- */
- public int exec() {
- if( -1 != flashingIndex ) {
- if (flashingIndex < FLASHING_COLORS.length) {
- setBackground(display.getSystemColor(FLASHING_COLORS[flashingIndex][0]));
- return FLASHING_COLORS[flashingIndex++][1];
- } else {
- flashingIndex = -1;
- setVisible(false);
- if( needRedraw ) {
- needRedraw = false;
- getOverlayWindow().getComposite().redraw(); // Clear black block
- }
- }
- }
- return 0;
- }
-
- /**
- * @param rect the position to be highlighted.
- */
- public static void flashRectangle(Rectangle rect) {
- if (null != rect && 0 == suppressRefCount ) {
- if( OverlayWindow.getVisible() ) {
- OverlayWindow window = getOverlayWindow();
- if( null == instance ) {
- instance = new HighlightComposite(window.getComposite(), SWT.NONE);
- }
- instance.show(rect,""); //$NON-NLS-1$
- window.run();
- }
- else {
- AccessibleHilighter.flashRectangle(rect);
- }
- }
- }
-
- /**
- * This method is used to synchronize the view updating.
- * @param increment the increment(+) / decrement(-) width.
- * @return the current suppress count.
- */
- public static int updateSuppressCount(int increment) {
- suppressRefCount += increment;
- return suppressRefCount;
- }
-
- /**
- * @param show whether the object for highlight is shown or not.
- */
- public static void show(boolean show) {
- if( null != instance ) {
- instance.setVisible(show);
- }
- }
-
- /**
- * @return the default overlay window.
- */
- public static OverlayWindow getOverlayWindow() {
- return OverlayWindow.getInstance(OverlayWindow.INDEX_HIGHLIGHT,true);
- }
-
- /**
- * @return the instance of HighlightComposite which is created the most recently
- * by {@link HighlightComposite#flashRectangle(Rectangle)}.
- */
- public static HighlightComposite getInstance() {
- return instance;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/MemoryUtil.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/MemoryUtil.java
deleted file mode 100644
index bca95b6..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/MemoryUtil.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.swt.internal.ole.win32.COM;
-import org.eclipse.swt.internal.win32.OS;
-
-
-
-public class MemoryUtil {
-
- public static int GlobalAlloc(int dwBytes) {
- return OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, dwBytes);
- }
-
- public static int GlobalFree(int hMem) {
- return OS.GlobalFree(hMem);
- }
-
- public static int SysAllocString(char [] sz) {
- return COM.SysAllocString(sz);
- }
-
- public static void SysFreeString(int bstr) {
- COM.SysFreeString(bstr);
- }
-
- public static void MoveMemory(int[] Destination, int Source, int Length) {
- OS.MoveMemory(Destination, Source, Length);
- }
-
- public static void MoveMemory(short[] Destination, int SourcePtr, int Length) {
- OS.MoveMemory(Destination, SourcePtr, Length);
- }
-
- public static void MoveMemory(char[] Destination, int SourcePtr, int Length) {
- OS.MoveMemory(Destination, SourcePtr, Length);
- }
-
- public static void MoveMemory(int DestinationPtr, short[] Source, int Length) {
- OS.MoveMemory(DestinationPtr, Source, Length);
- }
-
- public static void MoveMemory (int DestinationPtr, int [] Source, int Length) {
- OS.MoveMemory(DestinationPtr, Source, Length);
- }
-
- public static void MoveMemory (int DestinationPtr, char [] Source, int Length) {
- OS.MoveMemory(DestinationPtr, Source, Length);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/NativeIntAccess.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/NativeIntAccess.java
deleted file mode 100644
index 226be51..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/NativeIntAccess.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32;
-
-
-
-public class NativeIntAccess {
- private int pIntAddress = 0;
-
- public NativeIntAccess() {
- this(1);
- }
-
- public NativeIntAccess(int size) {
- pIntAddress = MemoryUtil.GlobalAlloc(4 * size);
- }
-
- public void dispose() {
- MemoryUtil.GlobalFree(pIntAddress);
- }
-
- public int getAddress() {
- return getAddress(0);
- }
-
- public int getAddress(int index) {
- return pIntAddress + index * 4;
- }
-
- public int getInt() {
- return getInt(0);
- }
-
- public int getInt(int index) {
- int[] pInt = new int[1];
- MemoryUtil.MoveMemory(pInt, getAddress(index), 4);
- return pInt[0];
- }
-
- public void setInt(int value) {
- setInt(0,value);
- }
-
- public void setInt(int index, int value) {
- int[] pInt = new int[1];
- pInt[0] = value;
- MemoryUtil.MoveMemory(getAddress(index), pInt, 4);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/NativeStringAccess.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/NativeStringAccess.java
deleted file mode 100644
index c7bef0b..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/NativeStringAccess.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.swt.internal.ole.win32.COM;
-
-
-
-public class NativeStringAccess {
- private int pBSTRAddress = 0;
-
- private int[] hMem = new int[1];
-
- public NativeStringAccess() {
- pBSTRAddress = MemoryUtil.GlobalAlloc(4);
- }
-
- public void dispose() {
- if (0 != hMem[0]) {
- COM.SysFreeString(hMem[0]);
- }
- MemoryUtil.GlobalFree(pBSTRAddress);
- }
-
- public int getAddress() {
- return pBSTRAddress;
- }
-
- public String getString() {
- MemoryUtil.MoveMemory(hMem, pBSTRAddress, 4);
- if (0 != hMem[0]) {
- int size = COM.SysStringByteLen(hMem[0]);
- if (size > 0) {
- char[] buffer = new char[(size + 1) / 2];
- MemoryUtil.MoveMemory(buffer, hMem[0], size);
- return new String(buffer);
- }
- }
- return null;//""; //$NON-NLS-1$
- }
-
- public void setString(String text) {
- MemoryUtil.MoveMemory(hMem, pBSTRAddress, 4);
- if (0 != hMem[0]) {
- COM.SysFreeString(hMem[0]);
- }
- char[] data = (text + "\0").toCharArray(); //$NON-NLS-1$
- int ptr = COM.SysAllocString(data);
- COM.MoveMemory(pBSTRAddress, new int[] { ptr }, 4);
- MemoryUtil.MoveMemory(hMem, pBSTRAddress, 4);
- }
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/NativeVariantAccess.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/NativeVariantAccess.java
deleted file mode 100644
index df74400..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/NativeVariantAccess.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.swt.internal.ole.win32.COM;
-import org.eclipse.swt.internal.ole.win32.IDispatch;
-import org.eclipse.swt.ole.win32.OLE;
-import org.eclipse.swt.ole.win32.Variant;
-
-
-
-public class NativeVariantAccess {
- private int size;
-
- private int pVariantAddress;
-
- public NativeVariantAccess() {
- this(1);
- }
-
- public NativeVariantAccess(int size) {
- this.size = size;
- this.pVariantAddress = MemoryUtil.GlobalAlloc(Variant.sizeof * size);
- for (int i = 0; i < size; i++) {
- COM.VariantInit(getAddress(i));
- }
- }
-
- public void dispose() {
- for (int i = 0; i < size; i++) {
- COM.VariantClear(getAddress(i));
- }
- MemoryUtil.GlobalFree(pVariantAddress);
- }
-
- public int getAddress() {
- return getAddress(0);
- }
-
- public int getAddress(int index) {
- return pVariantAddress + Variant.sizeof * index;
- }
-
- public short getType() {
- return getType(0);
- }
-
- public short getType(int index) {
- short[] pType = new short[1];
- MemoryUtil.MoveMemory(pType, getAddress(index), 2);
- return pType[0];
- }
-
- public int getInt() {
- return getInt(0);
- }
-
- public int getInt(int index) {
- if (OLE.VT_I4 == getType(index)) {
- int[] pInt = new int[1];
- MemoryUtil.MoveMemory(pInt, getAddress(index) + 8, 4);
- return pInt[0];
- }
- return -1;
- }
-
- public IDispatch getDispatch() {
- return getDispatch(0);
- }
-
- public IDispatch getDispatch(int index) {
- if (OLE.VT_DISPATCH == getType(index)) {
- int[] pInt = new int[1];
- MemoryUtil.MoveMemory(pInt, getAddress(index) + 8, 4);
- return new IDispatch(pInt[0]);
- }
- return null;
- }
-
- public String getString() {
- return getString(0);
- }
-
- public String getString(int index) {
- if (OLE.VT_BSTR == getType(index)) {
- int[] hMem = new int[1];
- MemoryUtil.MoveMemory(hMem, getAddress(index) + 8, 4);
- if (0 != hMem[0]) {
- int size = COM.SysStringByteLen(hMem[0]);
- if (size > 0) {
- char[] buffer = new char[(size + 1) / 2];
- MemoryUtil.MoveMemory(buffer, hMem[0], size);
- return new String(buffer);
- }
- }
- }
- return null;
- }
-
- public Variant getVariant() {
- return getVariant(0);
- }
-
- public Variant getVariant(int index) {
- switch( getType(index) ) {
- case OLE.VT_I4:
- return new Variant(getInt(index));
- case OLE.VT_BSTR:
- return new Variant(getString(index));
- case OLE.VT_EMPTY:
- return new Variant();
- }
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/OverlayLabel.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/OverlayLabel.java
deleted file mode 100644
index 3b35bd5..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/OverlayLabel.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-
-
-/**
- * OverlayLabel is used to show some information on the application windows.
- */
-public class OverlayLabel extends CLabel {
-
- public Object associatedObject;
-
- private Menu popupMenu;
-
- private static String ownerId = null;
-
- private OverlayLabel(Composite parent, int style) {
- super(parent, style);
- setForeground(getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
- setBackground(getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- setLayoutData(new GridData());
- addPaintListener(new PaintListener(){
- public void paintControl(PaintEvent event) {
- Rectangle rect = getClientArea();
- event.gc.drawRectangle(rect.x,rect.y,rect.width-1,rect.height-1);
- }
- });
- }
-
- /**
- * Remove all label from the overlay window for overlay labels.
- * All labels will be removed with synchronization.
- */
- public static void removeAll() {
- removeAll(true);
- }
-
- /**
- * remove all label from the overlay window for overlay labels.
- * @param force whether remove without synchronize or not.
- */
- public static void removeAll(boolean force) {
- final Composite composite = getOverlayComposite(false);
- if( null != composite ) {
- if( force ) {
- removeChildren(composite);
- }
- else {
- composite.getDisplay().asyncExec(new Runnable(){
- public void run() {
- if( !composite.isDisposed() && null == composite.getDisplay().getActiveShell() ) {
- removeChildren(composite);
- }
- }
- });
- }
- }
- }
-
- private static void removeChildren(Composite composite) {
- Control[] controls = composite.getChildren();
- for( int i=0; i<controls.length; i++ ) {
- if( controls[i] instanceof OverlayLabel ) {
- controls[i].dispose();
- }
- }
- }
-
- /**
- * @param associatedObject the content of the label.
- * @return the new OverlayLabel instance if the <i>associatedObject</i> is not arleady used.
- */
- public static OverlayLabel create(Object associatedObject) {
- Composite composite = getOverlayComposite(true);
- composite.moveAbove(null);
- Control[] controls = composite.getChildren();
- for( int i=0; i<controls.length; i++ ) {
- if( controls[i] instanceof OverlayLabel ) {
- if( associatedObject.equals(((OverlayLabel)controls[i]).associatedObject) ) {
- return null;
- }
- }
- }
- OverlayLabel label = new OverlayLabel(composite,SWT.NONE);
- label.associatedObject = associatedObject;
- return label;
- }
-
- /**
- * @param position the position to be used.
- * @return the arrays of OverlayLabels placed at the <i>position</i>.
- */
- public static OverlayLabel[] getLabelsAtPosition(Point position) {
- List<OverlayLabel> labelList = new ArrayList<OverlayLabel>();
- Composite composite = getOverlayComposite(false);
- if( null != composite ) {
- Control[] controls = composite.getChildren();
- for( int i=0; i<controls.length; i++ ) {
- if( controls[i] instanceof OverlayLabel ) {
- if( controls[i].getBounds().contains(position) ) {
- labelList.add((OverlayLabel) controls[i]);
- }
- }
- }
- }
- return (OverlayLabel[])labelList.toArray(new OverlayLabel[labelList.size()]);
- }
-
- private static Composite getOverlayComposite(boolean create) {
- OverlayWindow window = OverlayWindow.getInstance(OverlayWindow.INDEX_LABELS,create);
- if( null != window ) {
- return window.getComposite();
- }
- return null;
- }
-
- /**
- * @return the popup menu.
- */
- public Menu createPopupMenu() {
- if( null != popupMenu && !popupMenu.isDisposed() ) {
- popupMenu.dispose();
- }
- popupMenu = new Menu(this);
- return popupMenu;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Widget#dispose()
- */
- public void dispose() {
- if( null != popupMenu && !popupMenu.isDisposed() ) {
- popupMenu.dispose();
- }
- super.dispose();
- }
-
- /**
- * @return the id of the owner view.
- */
- public static String getOwnerId() {
- return ownerId;
- }
-
- /**
- * @param the id of the owner view.
- */
- public static void setOwnerId(String id) {
- ownerId = id;
- }
-
- private static final String MENU_SEPARATOR = "\n----------------"; //$NON-NLS-1$
-
- /**
- * Set the tooltip text of the label.
- * @param text the tooltip text
- * @param properties the set of property names and values. [0]=name, [1]=value.
- */
- public void setTooltop(String text, String[][] properties) {
- text += MENU_SEPARATOR;
- for( int i=0; i<properties.length; i++ ) {
- if( properties[i][1].length()>0 ) {
- text += "\n"+properties[i][0]+": "+properties[i][1]; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- setToolTipText(text);
- }
-
- /**
- * @return the text to be shown on menu.
- */
- public String getMenuText() {
- String text = getToolTipText();
- int sep = text.indexOf(MENU_SEPARATOR);
- if( sep > 0 ) {
- text = text.substring(0,sep);
- }
- text = text.replaceAll("\n"," | "); //$NON-NLS-1$ //$NON-NLS-2$
- return text;
-
- }
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/OverlayWindow.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/OverlayWindow.java
deleted file mode 100644
index f786514..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/OverlayWindow.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32;
-
-import java.awt.GraphicsEnvironment;
-import java.awt.Rectangle;
-
-import org.eclipse.actf.util.win32.impl.IIntervalExec;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * OverlayWindow is transparent window. The purpose of this class is to overlay
- * some labels and highlight borders on the application windows. The OverlayWindow
- * covers the entire screen. Currently it supports only the main screen.
- */
-public class OverlayWindow implements Runnable {
-
- public static final String WINDOW_TEXT = "[Overlay Window]"; //$NON-NLS-1$
- public static final int INDEX_HIGHLIGHT = 0;
- public static final int INDEX_LABELS = 1;
- private static boolean visible = true;
-
- private Shell shell;
-
- private Display display;
-
- private static OverlayWindow[] instance = new OverlayWindow[2];
-
- private OverlayWindow(int index) {
- // Create OverlayWindow shell
- shell = new Shell(SWT.MODELESS | SWT.NO_TRIM | SWT.ON_TOP);
- shell.setText(WINDOW_TEXT);
- shell.setBackground(shell.getBackground()); // Fix for color change
- display = shell.getDisplay();
- Shell activeShell = display.getActiveShell();
- if( null != activeShell ) {
- activeShell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- shell.dispose();
- }
- });
- }
-
- // Make shell window transparent
- WindowUtil.setLayered(shell, INDEX_HIGHLIGHT==index);
-
- // Init the shell
- shell.setLayout(new GridLayout());
- GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
- Rectangle rect = env.getDefaultScreenDevice().getDefaultConfiguration().getBounds();
- shell.setBounds(0, 0, rect.width, rect.height);
- //shell.setBounds(0, 0, OS.GetSystemMetrics(OS.SM_CXSCREEN), OS.GetSystemMetrics(OS.SM_CYSCREEN));
- shell.setVisible(visible);
-
- //
- if( INDEX_LABELS == index ) {
- shell.addShellListener(new ShellAdapter(){
- public void shellDeactivated(ShellEvent e) {
- OverlayLabel.removeAll();
- }
- });
- }
- }
-
- /**
- * @param index the index of the overlay, it must be INDEX_HIGHLIGHT or INDEX_LABELS
- * @param create whether create a new intance or not
- * @return the instance of the OverlayWindow
- * @see #INDEX_HIGHLIGHT
- * @see #INDEX_LABELS
- */
- public static OverlayWindow getInstance(int index, boolean create) {
- if( index < instance.length ) {
- if (create && null == instance[index]) {
- instance[index] = new OverlayWindow(index);
- }
- return instance[index];
- }
- return null;
- }
-
- /**
- * @return whether the overlay window is visible or not
- */
- public static boolean getVisible() {
- return visible;
- }
-
- /**
- * @param newVisible whether the overlay window is visible or not
- */
- public static void setVisible(boolean newVisible) {
- if( visible != newVisible ) {
- visible = newVisible;
- for( int i=0; i<instance.length; i++ ) {
- if( null != instance[i] ) {
- instance[i].shell.setVisible(visible);
- }
- }
- }
- }
-
- /**
- * @return the internal composite object. OverlayLabel and HighlightComposite are
- * added to this composite.
- */
- public Composite getComposite() {
- return shell;
- }
-
-
- /* (non-Javadoc)
- * @see java.lang.Runnable#run()
- */
- public void run() {
- if (!shell.isDisposed()) {
- Control[] children = shell.getChildren();
- for( int i=0; i<children.length; i++ ) {
- if( children[i] instanceof IIntervalExec ) {
- int nextInterval = ((IIntervalExec)children[i]).exec();
- if( nextInterval > 0 ) {
- display.timerExec(nextInterval, this);
- }
- }
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/WMCMonitor.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/WMCMonitor.java
deleted file mode 100644
index 132ebab..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/WMCMonitor.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.core.runtime.IProduct;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.internal.Callback;
-import org.eclipse.swt.internal.win32.OS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-public abstract class WMCMonitor {
-
- private static String productName = "Unknown"; //$NON-NLS-1$
- static {
- IProduct product = Platform.getProduct();
- if( null != product) {
- productName = product.getName();
- }
- }
- private int oldShellProc = 0;
-
- /**
- * Create a WMCMonitor with default title
- */
- public WMCMonitor() {
- this("WMCWindow:"+productName); //$NON-NLS-1$
- }
-
- /**
- * Create a WMCMonitor
- *
- * @param title
- */
- public WMCMonitor(String title) {
- Display display = Display.getCurrent();
- if( null != display ) {
- Shell activeShell = display.getActiveShell();
- if( null != activeShell ) {
- Callback callback = new Callback(this, "shellWindowProc", 4); //$NON-NLS-1$
- int address = callback.getAddress();
- if( address != 0 ) {
- final Shell shell = new Shell();
- shell.setVisible(false);
- shell.setBounds(0, 0, 0, 0);
- shell.setText(title);
- oldShellProc = OS.GetWindowLong (shell.handle, OS.GWL_WNDPROC);
- OS.SetWindowLong (shell.handle, OS.GWL_WNDPROC, address);
- activeShell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- shell.dispose();
- }
- });
- }
- else {
- callback.dispose();
- }
- }
- }
- }
-
- /**
- * Window procedure
- *
- * @param hwnd
- * @param msg
- * @param wParam
- * @param lParam
- * @return
- */
- int shellWindowProc(int hwnd, int msg, int wParam, int lParam) {
- try {
- if( COPYDATASTRUCT.WM_COPYDATA == msg ) {
- return onCopyData(hwnd,wParam,new COPYDATASTRUCT(lParam));
- }
- return OS.CallWindowProc (oldShellProc, hwnd, msg, wParam, lParam);
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- return 0;
- }
-
- /**
- * WM_COPYDATA handler
- *
- * @param hwnd
- * @param hwndFrom
- * @param cds
- * @return 1 if processed
- */
- protected abstract int onCopyData(int hwnd, int hwndFrom, COPYDATASTRUCT cds);
-
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/Win32Plugin.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/Win32Plugin.java
deleted file mode 100644
index 076e08d..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/Win32Plugin.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Win32Plugin extends AbstractUIPlugin {
-
- //The shared instance.
- private static Win32Plugin plugin;
-
- /**
- * The constructor.
- */
- public Win32Plugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static Win32Plugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.actf.util.win32", path); //$NON-NLS-1$
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/WindowUtil.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/WindowUtil.java
deleted file mode 100644
index 83fdf29..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/WindowUtil.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.actf.util.win32;
-
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.internal.win32.OS;
-import org.eclipse.swt.internal.win32.RECT;
-import org.eclipse.swt.internal.win32.TCHAR;
-import org.eclipse.swt.widgets.Control;
-
-
-
-
-public class WindowUtil {
-
- public static String GetWindowText(int hWnd) {
- int size = OS.GetWindowTextLength(hWnd);
- if (0 == size) {
- return ""; //$NON-NLS-1$
- }
- TCHAR buffer = new TCHAR(0, size + 1);
- return buffer.toString(0, OS.GetWindowText(hWnd, buffer, buffer.length()));
- }
-
- public static String GetWindowClassName(int hWnd) {
- TCHAR buffer = new TCHAR(0, 256);
- return buffer.toString(0, OS.GetClassName(hWnd, buffer, buffer.length()));
- }
-
- public static Rectangle GetWindowRectangle(int hWnd) {
- RECT rect = new RECT();
- OS.GetWindowRect(hWnd, rect);
- return new Rectangle(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
- }
-
- public static boolean IsWindowVisible(int hWnd) {
- return OS.IsWindowVisible(hWnd);
- }
-
- public static int GetDesktopWindow() {
- return OS.GetDesktopWindow();
- }
-
- public static int GetChildWindow(int hWnd) {
- return OS.GetWindow(hWnd, OS.GW_CHILD);
- }
-
- public static int GetNextWindow(int hWnd) {
- return OS.GetWindow(hWnd, OS.GW_HWNDNEXT);
- }
-
- public static int GetOwnerWindow(int hWnd) {
- return OS.GetWindow(hWnd, OS.GW_OWNER);
- }
-
- public static int GetParentWindow(int hWnd) {
- return OS.GetParent(hWnd);
- }
-
- public static boolean isPopupMenu(int hwnd) {
- if( "#32768".equals(GetWindowClassName(hwnd)) ) { //$NON-NLS-1$
- return 0 == GetOwnerWindow(hwnd);
- }
- return false;
- }
-
- public static void setLayered(Control control, boolean transparent) {
- int ws = OS.GetWindowLongW(control.handle, OS.GWL_EXSTYLE);
- ws |= WindowUtil.WS_EX_LAYERED;
- if (transparent) {
- ws |= OS.WS_EX_TRANSPARENT;
- }
- OS.SetWindowLong(control.handle, OS.GWL_EXSTYLE, ws);
- WindowUtil.SetLayeredWindowAttributes(control.handle, control.getBackground().handle, (char) 0,
- WindowUtil.LWA_COLORKEY);
- }
-
- static {
- try {
- System.loadLibrary("AccessibiltyWin32Library"); //$NON-NLS-1$
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static final int WS_EX_LAYERED = 0x80000;
-
- public static final int LWA_COLORKEY = 0x01;
-
- public static final int LWA_ALPHA = 0x02;
-
- public static final native int SetLayeredWindowAttributes(int hwnd, int crKey, char bAlpha, int dwFlags);
-
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/impl/DrawUtil.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/impl/DrawUtil.java
deleted file mode 100644
index 0b03180..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/impl/DrawUtil.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32.impl;
-
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.internal.win32.OS;
-import org.eclipse.swt.internal.win32.RECT;
-
-
-
-public class DrawUtil {
-
- private static final int bandWidth = 3;
-
- public static void drawRectangle(int hwndDraw, Rectangle rect, int color) {
- int hDC = OS.GetDCEx(hwndDraw, 0, OS.DCX_CACHE);
- int oldBrush = OS.SelectObject(hDC, OS.CreateSolidBrush(color));
- OS.PatBlt(hDC, rect.x, rect.y, rect.width, bandWidth, OS.PATCOPY);
- OS.PatBlt(hDC, rect.x, rect.y + bandWidth, bandWidth, rect.height - (bandWidth * 2), OS.PATCOPY);
- OS.PatBlt(hDC, rect.x + rect.width - bandWidth, rect.y + bandWidth, bandWidth, rect.height - (bandWidth * 2),
- OS.PATCOPY);
- OS.PatBlt(hDC, rect.x, rect.y + rect.height - bandWidth, rect.width, bandWidth, OS.PATCOPY);
- OS.DeleteObject(OS.SelectObject(hDC, oldBrush));
- OS.ReleaseDC(hwndDraw, hDC);
- }
-
- public static void redrawRectangle(int hwndDraw, Rectangle rect) {
- RECT osRect = new RECT();
- osRect.left = rect.x - bandWidth;
- osRect.top = rect.y - bandWidth;
- osRect.right = rect.x + rect.width + bandWidth;
- osRect.bottom = rect.y + rect.height + bandWidth;
- OS.RedrawWindow(hwndDraw, osRect, 0, OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN);
- }
-
-}
diff --git a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/impl/IIntervalExec.java b/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/impl/IIntervalExec.java
deleted file mode 100644
index 5fadad7..0000000
--- a/plugins/org.eclipse.actf.util.win32/src/org/eclipse/actf/util/win32/impl/IIntervalExec.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Takashi ITOH - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.util.win32.impl;
-
-
-/**
- * IIntervalExec interface defines a method to be implemented by the object which will be
- * executed in certain interval. It has the same function of {@link Runnable}, but the
- * exec() method has a return value.
- */
-public interface IIntervalExec {
- /**
- * @return the next interval time in milliseconds.
- */
- public int exec();
-}