diff options
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml')
14 files changed, 0 insertions, 1169 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/CollectingErrorHandler.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/CollectingErrorHandler.java deleted file mode 100644 index 31337e73b..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/CollectingErrorHandler.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - - - -import java.util.ArrayList; -import java.util.List; - -import org.xml.sax.ErrorHandler; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -/** - * Insert the type's description here. - * Creation date: (03/19/01 11:10:38 AM) - * @author: Administrator - */ -public class CollectingErrorHandler implements ErrorHandler { - protected List caughtExceptions; -/** - * CollectingErrorHandler constructor comment. - */ -public CollectingErrorHandler() { - super(); -} -/** - * @see org.xml.sax.ErrorHandler - */ -public void error(SAXParseException exception) throws SAXException { - getCaughtExceptions().add(exception); -} -/** - * @see org.xml.sax.ErrorHandler - */ -public void fatalError(SAXParseException exception) throws SAXException { - getCaughtExceptions().add(exception); -} -public List getCaughtExceptions() { - if (caughtExceptions == null) { - caughtExceptions = new ArrayList(); - } - return caughtExceptions; -} - -/** - * @see org.xml.sax.ErrorHandler - */ -public void warning(SAXParseException exception) throws SAXException { - getCaughtExceptions().add(exception); -} -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/DeploymentDescriptorXmlMapperI.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/DeploymentDescriptorXmlMapperI.java deleted file mode 100644 index 63218d104..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/DeploymentDescriptorXmlMapperI.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - - - - -/** - * This interface represents a catalog of all the tag names which may be shared in - * a deployment descriptor for EJBJars, ears, and wars. Interface shared by readers and - * writers to have access to common constants - */ - -public interface DeploymentDescriptorXmlMapperI { - String DESCRIPTION = "description";//$NON-NLS-1$ - String DISPLAY_NAME = "display-name";//$NON-NLS-1$ - String EJB_LINK = "ejb-link";//$NON-NLS-1$ - String ENV_ENTRY = "env-entry";//$NON-NLS-1$ - String ENV_ENTRY_NAME = "env-entry-name";//$NON-NLS-1$ - String ENV_ENTRY_TYPE = "env-entry-type";//$NON-NLS-1$ - String ENV_ENTRY_VALUE = "env-entry-value";//$NON-NLS-1$ - String EJB_LOCAL_REF = "ejb-local-ref"; //$NON-NLS-1$ // J2EE1.3 - String EJB_REF = "ejb-ref";//$NON-NLS-1$ - String EJB_REF_NAME = "ejb-ref-name";//$NON-NLS-1$ - String EJB_REF_TYPE = "ejb-ref-type";//$NON-NLS-1$ - String HOME = "home";//$NON-NLS-1$ - String ICON = "icon";//$NON-NLS-1$ - String ID = "id";//$NON-NLS-1$ - String LARGE_ICON = "large-icon";//$NON-NLS-1$ - String LARGE_ICON_PATH = "icon/large-icon";//$NON-NLS-1$ - String LOCAL = "local";//$NON-NLS-1$ // J2EE1.3 - String LOCAL_HOME = "local-home";//$NON-NLS-1$ // J2EE1.3 - String REMOTE = "remote";//$NON-NLS-1$ - String RES_AUTH = "res-auth";//$NON-NLS-1$ - String RES_REF_NAME = "res-ref-name";//$NON-NLS-1$ - String RES_SHARING_SCOPE = "res-sharing-scope";//$NON-NLS-1$ // J2EE1.3 - String RES_TYPE = "res-type";//$NON-NLS-1$ - String RESOURCE_ENV_REF = "resource-env-ref"; //$NON-NLS-1$ // J2EE1.3 - String RESOURCE_ENV_REF_NAME = "resource-env-ref-name";//$NON-NLS-1$ // J2EE1.3 - String RESOURCE_ENV_REF_TYPE = "resource-env-ref-type";//$NON-NLS-1$ // J2EE1.3 - String RESOURCE_REF = "resource-ref";//$NON-NLS-1$ - String ROLE_LINK = "role-link";//$NON-NLS-1$ - String ROLE_NAME = "role-name";//$NON-NLS-1$ - String RUN_AS = "run-as"; //$NON-NLS-1$ // J2EE1.3 - String SECURITY_IDENTITY = "security-identity"; //$NON-NLS-1$ // J2EE1.3 - String SECURITY_ROLE = "security-role";//$NON-NLS-1$ - String SECURITY_ROLE_REF = "security-role-ref";//$NON-NLS-1$ - String SMALL_ICON = "small-icon";//$NON-NLS-1$ - String SMALL_ICON_PATH = "icon/small-icon";//$NON-NLS-1$ - String USE_CALLER_IDENTITY = "use-caller-identity";//$NON-NLS-1$ // J2EE1.3 - - - // J2EE 1.4 - String LANG = "xml:lang";//$NON-NLS-1$ - String DEPLOY_EXT = "deployment-extension"; //$NON-NLS-1$ // J2EE1.4 - String EXT_ELEMENT = "extension-element"; //$NON-NLS-1$ // J2EE1.4 - String MESSAGE_DEST_REF = "message-destination-ref";//$NON-NLS-1$ // J2EE1.4 - String MESSAGE_DEST_REF_NAME = "message-destination-ref-name";//$NON-NLS-1$ // J2EE1.4 - String MESSAGE_DEST_TYPE = "message-destination-type";//$NON-NLS-1$ // J2EE1.4 - String MESSAGE_DEST_LINK = "message-destination-link"; //$NON-NLS-1$ // J2EE1.4 - String MESSAGE_DEST_USAGE = "message-destination-usage";//$NON-NLS-1$ // J2EE1.4 - String MESSAGE_DEST = "message-destination"; //$NON-NLS-1$ // J2EE1.4 - String MESSAGE_DEST_NAME = "message-destination-name"; //$NON-NLS-1$ // J2EE1.4 - String SERVICE_REF = "service-ref";//$NON-NLS-1$ - String SERVICE_REF_NAME = "service-ref-name";//$NON-NLS-1$ - String SERVICE_INTERFACE = "service-interface";//$NON-NLS-1$ - String WSDL_FILE = "wsdl-file";//$NON-NLS-1$ - String JAXRPC_MAPPING_FILE = "jaxrpc-mapping-file";//$NON-NLS-1$ - String SERVICE_QNAME = "service-qname";//$NON-NLS-1$ - String PORT_COMPONENT_REF = "port-component-ref";//$NON-NLS-1$ - String HANDLER = "handler";//$NON-NLS-1$ - String SERVICE_ENPOINT_INTERFACE = "service-endpoint-interface";//$NON-NLS-1$ - String PORT_COMPONENT_LINK = "port-component-link";//$NON-NLS-1$ - String HANDLER_NAME = "handler-name";//$NON-NLS-1$ - String HANDLER_CLASS = "handler-class";//$NON-NLS-1$ - String HANDLER_INIT_PARAM = "init-param";//$NON-NLS-1$ - String SOAP_HEADER = "soap-header";//$NON-NLS-1$ - String SOAP_ROLE = "soap-role";//$NON-NLS-1$ - String PORT_NAME = "port-name";//$NON-NLS-1$ - String VERSION = "version";//$NON-NLS-1$ - String XML_NS = "xmlns";//$NON-NLS-1$ - String XML_NS_XSI = "xmlns:xsi";//$NON-NLS-1$ - String XSI_SCHEMA_LOCATION = "xsi:schemaLocation";//$NON-NLS-1$ - String NAMESPACE = "namespace";//$NON-NLS-1$ - String MUSTUNDERSTAND = "mustUnderstand";//$NON-NLS-1$ - String PARAM_NAME = "param-name";//$NON-NLS-1$ - String PARAM_VALUE = "param-value";//$NON-NLS-1$ - String LISTENER_CLASS = "listener-class";//$NON-NLS-1$ // Servlet2.3 - - - -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/EarDeploymentDescriptorXmlMapperI.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/EarDeploymentDescriptorXmlMapperI.java deleted file mode 100644 index 45c82e298..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/EarDeploymentDescriptorXmlMapperI.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - - - -/** - * This interface represents a catalog of all the tag names which occur in - * an EAR deployment descriptor. Interface shared by readers and - * writers to have access to common constants - */ -public interface EarDeploymentDescriptorXmlMapperI extends DeploymentDescriptorXmlMapperI { - String ALT_DD = "alt-dd";//$NON-NLS-1$ - String APPLICATION = "application";//$NON-NLS-1$ - String CONTEXT_ROOT = "context-root";//$NON-NLS-1$ - String EJB = "ejb";//$NON-NLS-1$ - String JAVA = "java";//$NON-NLS-1$ - String MODULE = "module";//$NON-NLS-1$ - String WEB = "web";//$NON-NLS-1$ - String WEB_URI = "web-uri";//$NON-NLS-1$ - String CONNECTOR = "connector";//$NON-NLS-1$ -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/EjbDeploymentDescriptorXmlMapperI.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/EjbDeploymentDescriptorXmlMapperI.java deleted file mode 100644 index b57ecb14c..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/EjbDeploymentDescriptorXmlMapperI.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - - - -/** - * This interface represents a catalog of all the tag names which occur in - * an EJB Jar deployment descriptor. Interface shared by readers and - * writers to have access to common constants - */ - -public interface EjbDeploymentDescriptorXmlMapperI extends DeploymentDescriptorXmlMapperI { - String ABSTRACT_SCHEMA_NAME = "abstract-schema-name"; //$NON-NLS-1$ // EJB2.0 - String ACKNOWLEDGE_MODE = "acknowledge-mode";//$NON-NLS-1$ // EJB2.0 - String ASSEMBLY_DESCRIPTOR = "assembly-descriptor";//$NON-NLS-1$ - String BEAN = "Bean";//$NON-NLS-1$ - String CASCADE_DELETE = "cascade-delete";//$NON-NLS-1$ // EJB2.0 - String CMP_FIELD = "cmp-field";//$NON-NLS-1$ - String CMP_VERSION = "cmp-version"; //$NON-NLS-1$ // EJB2.0 - String CMR_FIELD = "cmr-field"; //$NON-NLS-1$ // EJB2.0 - String CMR_FIELD_NAME = "cmr-field-name";//$NON-NLS-1$ // EJB2.0 - String CMR_FIELD_TYPE = "cmr-field-type";//$NON-NLS-1$ // EJB2.0 - String CONTAINER = "Container";//$NON-NLS-1$ - String CONTAINER_TRANSACTION = "container-transaction";//$NON-NLS-1$ - String DESTINATION_TYPE = "destination-type"; //$NON-NLS-1$ // EJB2.0 - String EJB_CLASS = "ejb-class";//$NON-NLS-1$ - String EJB_CLIENT_JAR = "ejb-client-jar";//$NON-NLS-1$ - String EJB_JAR = "ejb-jar";//$NON-NLS-1$ - String EJB_NAME = "ejb-name";//$NON-NLS-1$ - String EJB_QL = "ejb-ql"; //$NON-NLS-1$ // EJB2.0 - String EJB_RELATION = "ejb-relation";//$NON-NLS-1$ // EJB2.0 - String EJB_RELATION_NAME = "ejb-relation-name"; //$NON-NLS-1$ // EJB2.0 - String EJB_RELATIONSHIP_ROLE = "ejb-relationship-role";//$NON-NLS-1$ // EJB2.0 - String EJB_RELATIONSHIP_ROLE_NAME = "ejb-relationship-role-name";//$NON-NLS-1$ // EJB2.0 - String ENTERPRISE_BEANS = "enterprise-beans";//$NON-NLS-1$ - String ENTITY = "entity";//$NON-NLS-1$ - String EXCLUDE_LIST = "exclude-list"; //$NON-NLS-1$// EJB2.0 - MODELED??? - String FIELD_NAME = "field-name";//$NON-NLS-1$ - String MESSAGE_DRIVEN = "message-driven"; //$NON-NLS-1$ // EJB2.0 - String MESSAGE_DRIVEN_DESTINATION = "message-driven-destination"; //$NON-NLS-1$// EJB2.0 - String MESSAGE_SELECTOR = "message-selector"; //$NON-NLS-1$ // EJB2.0 - String METHOD = "method";//$NON-NLS-1$ - String METHOD_INTF = "method-intf";//$NON-NLS-1$ - String METHOD_NAME = "method-name";//$NON-NLS-1$ - String METHOD_PARAM = "method-param";//$NON-NLS-1$ - String METHOD_PARAMS = "method-params";//$NON-NLS-1$ - String METHOD_PERMISSION = "method-permission";//$NON-NLS-1$ - String MULTIPLICITY = "multiplicity";//$NON-NLS-1$ // EJB2.0 - String PERSISTENCE_TYPE = "persistence-type";//$NON-NLS-1$ - String PRIM_KEY_CLASS = "prim-key-class";//$NON-NLS-1$ - String PRIMKEY_FIELD = "primkey-field";//$NON-NLS-1$ - String REENTRANT = "reentrant";//$NON-NLS-1$ - String RELATIONSHIP_ROLE_SOURCE = "relationship-role-source";//$NON-NLS-1$ // EJB2.0 - String RELATIONSHIPS = "relationships"; //$NON-NLS-1$ // EJB2.0 - String RESULT_TYPE_MAPPING = "result-type-mapping"; //$NON-NLS-1$ // EJB2.0 - String QUERY = "query"; //$NON-NLS-1$ // EJB2.0 - String QUERY_METHOD = "query-method"; //$NON-NLS-1$ // EJB2.0 - String SESSION = "session";//$NON-NLS-1$ - String SESSION_TYPE = "session-type";//$NON-NLS-1$ - String SUBSCRIPTION_DURABILITY = "subscription-durability";//$NON-NLS-1$ // EJB2.0 - String TRANS_ATTRIBUTE = "trans-attribute";//$NON-NLS-1$ - String TRANSACTION_TYPE = "transaction-type";//$NON-NLS-1$ - String UNCHECKED = "unchecked"; //$NON-NLS-1$ // EJB2.0 - - //EJB 2.1 - String SERVICE_ENDPOINT = "service-endpoint";//$NON-NLS-1$ - String MESSAGING_TYPE = "messaging-type";//$NON-NLS-1$ - String MESSAGE_DEST_TYPE = "message-destination-type";//$NON-NLS-1$ - String MESSAGE_DEST_LINK = "message-destination-link";//$NON-NLS-1$ - String ACTIVATION_CONF = "activation-config";//$NON-NLS-1$ - String ACTIVATION_CONF_PROPERTY = "activation-config-property";//$NON-NLS-1$ - String ACTIVATION_CONF_PROPERTY_NAME = "activation-config-property-name";//$NON-NLS-1$ - String ACTIVATION_CONF_PROPERTY_VALUE = "activation-config-property-value";//$NON-NLS-1$ -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/GeneralXmlDocumentReader.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/GeneralXmlDocumentReader.java deleted file mode 100644 index 4cba97aff..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/GeneralXmlDocumentReader.java +++ /dev/null @@ -1,329 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - -import java.lang.reflect.InvocationTargetException; - -import org.eclipse.jem.util.logger.proxy.Logger; -import org.w3c.dom.Document; -import org.xml.sax.EntityResolver; -import org.xml.sax.ErrorHandler; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -/** - * Insert the type's description here. - * Creation date: (4/11/2001 11:58:50 AM) - * @author: Administrator - */ -public class GeneralXmlDocumentReader -{ - protected InputSource inputSource; - protected EntityResolver entityResolver; - protected ErrorHandler errorHandler; - protected boolean doValidate = false; - protected boolean doAllowJavaEncodings = false; - -/** - * GeneralXmlDocumentReader constructor comment. - */ - public GeneralXmlDocumentReader() - { - super(); - } -/** - * GeneralXmlDocumentReader constructor comment. - */ - public GeneralXmlDocumentReader(InputSource source) - { - super(); - setInputSource(source); - } -/** - * GeneralXmlDocumentReader constructor comment. - */ - public GeneralXmlDocumentReader(InputSource source, EntityResolver resolver, ErrorHandler handler) - { - super(); - setInputSource(source); - setEntityResolver(resolver); - setErrorHandler(handler); - } -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:04:18 PM) - * @return org.xml.sax.EntityResolver - */ - protected org.xml.sax.EntityResolver createDefaultEntityResolver() - { - return null; - } -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:04:18 PM) - * @return org.xml.sax.ErrorHandler - */ - protected org.xml.sax.ErrorHandler createDefaultErrorHandler() - { - return new ErrorHandler() { - /* (non-Javadoc) - * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException) - */ - public void error(SAXParseException exception) throws SAXException { - throw exception; - } - /* (non-Javadoc) - * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException) - */ - public void fatalError(SAXParseException exception) throws SAXException { - throw exception; - } - /* (non-Javadoc) - * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException) - */ - public void warning(SAXParseException exception) throws SAXException { - Logger.getLogger().logWarning(exception); - } - }; - } - protected javax.xml.parsers.DocumentBuilder createNewDOMParser() - { - try - { - javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); - setFeatures(dbf); - return dbf.newDocumentBuilder(); - - } - catch (Exception ie) - { - handleException(J2EEXMLResourceHandler.getString(XMLParseResourceHandler.failed_instantiating_EXC_, (new Object[] {"Failed to instantiate parser"})), ie); //$NON-NLS-1$ // = "Failed instantiating: " - } - return null; - } -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:01:34 PM) - * @return boolean - */ - public boolean doAllowJavaEncodings() - { - return doAllowJavaEncodings; - } -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:01:34 PM) - * @return boolean - */ - public boolean doValidate() - { - return doValidate; - } -/** - * Insert the method's description here. - * Creation date: (4/11/2001 1:34:14 PM) - * @return java.lang.ClassLoader - */ - public java.lang.ClassLoader getClassLoader() - { - ClassLoader cl = getClass().getClassLoader(); - if (cl == null) - cl = Thread.currentThread().getContextClassLoader(); - if (cl == null) - cl = ClassLoader.getSystemClassLoader(); - - return cl; - } - public Document getDocument() - { - return parseDocument(); - } - - protected Document getDocument(javax.xml.parsers.DocumentBuilder domParser) - { - return domParser.newDocument(); - } - - -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:04:18 PM) - * @return org.xml.sax.EntityResolver - */ - public org.xml.sax.EntityResolver getEntityResolver() - { - if (entityResolver == null) - entityResolver = createDefaultEntityResolver(); - return entityResolver; - } -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:04:18 PM) - * @return org.xml.sax.ErrorHandler - */ - public org.xml.sax.ErrorHandler getErrorHandler() - { - if (errorHandler == null) - { - errorHandler = createDefaultErrorHandler(); - } - return errorHandler; - } - -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:04:18 PM) - * @return org.xml.sax.InputSource - */ - public org.xml.sax.InputSource getInputSource() - { - return inputSource; - } - - protected void handleException(String aMessage, Throwable anException) - { - if (anException instanceof InvocationTargetException) - { - InvocationTargetException invocationEx = - (InvocationTargetException) anException; - if (invocationEx.getTargetException() != null) - handleException(aMessage, invocationEx.getTargetException()); - } - else - primHandleException(aMessage, anException); - } - - protected Document parse(javax.xml.parsers.DocumentBuilder domParser, InputSource is) - { - try - { - return domParser.parse(is); - } - catch (org.xml.sax.SAXException ex) - { - handleException(J2EEXMLResourceHandler.getString(XMLParseResourceHandler.failed_instantiating_EXC_, (new Object[] {"SAX Parser error"})), ex); //$NON-NLS-1$ // = "Failed instantiating: " - - } - catch (java.io.IOException ex) - { - handleException(J2EEXMLResourceHandler.getString(XMLParseResourceHandler.failed_instantiating_EXC_, (new Object[] {"IO Exception on input stream"})), ex); //$NON-NLS-1$ // = "Failed instantiating: " - } - return null; - } - - - public Document parseDocument() - { - ClassLoader prevClassLoader = Thread.currentThread().getContextClassLoader(); - try { - Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); - javax.xml.parsers.DocumentBuilder parser = createNewDOMParser(); - setEntityResolver(parser); - setErrorHandler(parser); - return parse(parser, getInputSource()); - } finally { - Thread.currentThread().setContextClassLoader(prevClassLoader); - } - - - - - - } - - protected void primHandleException(String aMessage, Throwable anException) - { - org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(anException); - throw new RuntimeException(aMessage); - - } -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:01:34 PM) - * @param newAllowJavaEncodings boolean - */ - public void setAllowJavaEncodings(boolean newAllowJavaEncodings) - { - doAllowJavaEncodings = newAllowJavaEncodings; - } - - protected void setEntityResolver(javax.xml.parsers.DocumentBuilder domParser) - { - if (getEntityResolver() != null) - { - domParser.setEntityResolver(getEntityResolver()); - } - } - - -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:04:18 PM) - * @param newEntityResolver org.xml.sax.EntityResolver - */ - public void setEntityResolver(org.xml.sax.EntityResolver newEntityResolver) - { - entityResolver = newEntityResolver; - } - - - protected void setErrorHandler(javax.xml.parsers.DocumentBuilder domParser) - { - if (getErrorHandler() != null) - { - domParser.setErrorHandler(getErrorHandler()); - } - } - - -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:04:18 PM) - * @param newErrorHandler org.xml.sax.ErrorHandler - */ - public void setErrorHandler(org.xml.sax.ErrorHandler newErrorHandler) - { - errorHandler = newErrorHandler; - } - - protected void setFeatures(javax.xml.parsers.DocumentBuilderFactory domParser) - { - try { - domParser.setValidating(doValidate()); - domParser.setAttribute("http://apache.org/xml/features/allow-java-encodings", new Boolean(doAllowJavaEncodings())); //$NON-NLS-1$ - domParser.setExpandEntityReferences(true); - } catch(IllegalArgumentException e) { - //Ignore - } - } - - -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:04:18 PM) - * @param newInputSource org.xml.sax.InputSource - */ - public void setInputSource(org.xml.sax.InputSource newInputSource) - { - inputSource = newInputSource; - } -/** - * Insert the method's description here. - * Creation date: (4/11/2001 12:01:34 PM) - * @param newValidate boolean - */ - public void setValidate(boolean newValidate) - { - doValidate = newValidate; - } -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/J2EEXMLResourceHandler.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/J2EEXMLResourceHandler.java deleted file mode 100644 index 92f8095fd..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/J2EEXMLResourceHandler.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - -import org.eclipse.osgi.util.NLS; - -public class J2EEXMLResourceHandler extends NLS { - private static final String BUNDLE_NAME = "j2eexml";//$NON-NLS-1$ - - private J2EEXMLResourceHandler() { - // Do not instantiate - } - - public static String Valid_values_are___EXC_; - public static String RAR_file_support__IO_excep_EXC_; - public static String Failure_occurred_reading_x_EXC_; - public static String missing_req_field_EXC_; - public static String An_IO_Exception_occurred_w_EXC_; - public static String must_be_boolean_EXC_; - public static String unsupported_encoding_EXC_; - public static String rar_dtd_not_found_EXC_; - public static String empty_collection_EXC_; - public static String must_be_int_EXC_; - public static String Invalid_value_for__EXC_; - public static String An_Exception_occurred_whil_EXC_; - public static String dtd_not_found_EXC_; - public static String Not_supported_in_this_rele_EXC_; - public static String io_ex_saving_EXC_; - public static String could_not_create_file_EXC_; - public static String unsupported_type_EXC_; - public static String Key1; - - static { - NLS.initializeMessages(BUNDLE_NAME, J2EEXMLResourceHandler.class); - } - - public static String getString(String key, Object[] args) { - return NLS.bind(key, args); - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/J2EEXmlDtDEntityResolver.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/J2EEXmlDtDEntityResolver.java deleted file mode 100644 index ec6b64d93..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/J2EEXmlDtDEntityResolver.java +++ /dev/null @@ -1,135 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - - - -import java.io.FileNotFoundException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.jst.j2ee.internal.J2EEConstants; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - - -public class J2EEXmlDtDEntityResolver implements org.xml.sax.EntityResolver { - - /** All the dtds that this resolver knows about; import strategies register these - * at startup */ - protected static Map supportedDtDs; - static { - registerDtD("http://www.w3.org/2001/xml.xsd", "xml.xsd"); //$NON-NLS-1$ //$NON-NLS-2$ - registerDtD("XMLSchema.dtd", "XMLSchema.dtd"); //$NON-NLS-1$ //$NON-NLS-2$ - registerDtD("datatypes.dtd", "datatypes.dtd"); //$NON-NLS-1$ //$NON-NLS-2$ - } - public static J2EEXmlDtDEntityResolver INSTANCE = new J2EEXmlDtDEntityResolver(); -/** - * EjbXmlEntityResolver constructor comment. - */ -public J2EEXmlDtDEntityResolver() { - super(); -} -public static Map getSupportedDtDs() { - if (supportedDtDs == null) - supportedDtDs = new HashMap(); - return supportedDtDs; -} -/** - * Maps the system id for the dtd to a local id to be retrieved loaded from the class path - */ -public static void registerDtD(String systemID, String localID) { - //Make sure local file exists on classpath first. - - ClassLoader loader = J2EEXmlDtDEntityResolver.class.getClassLoader(); - URL url = null; - if (loader == null) { - url = ClassLoader.getSystemResource(localID); - } else { - url = loader.getResource(localID); - } - if (url == null) { - return; - } - getSupportedDtDs().put(systemID, localID); - getSupportedDtDs().put(getShortName(systemID), localID); -} -/** - * for a system id with a URL that begins with "http://java.sun.com/", check to see if that is a recognized dtd; - * if so, load the dtd from the class path using the value of the registered dtd. - * - * @return an Input source on a locally resolved dtd, or null of the systemid does not start with "http://java.sun.com/" - * - * @throws SAXException with a nested NotSupportedException if the dtd is not recognized - * @throws FileNotFoundException if the resolved dtd cannot be loaded from the classpath - */ -public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) throws java.io.IOException, org.xml.sax.SAXException { - String localResourceName = null; - //boolean isJavaSytemId = false; - if (shouldBeRegistered(systemId)) { - localResourceName = (String)getSupportedDtDs().get(systemId); - //isJavaSytemId = true; - } else { - String shortName = getShortName(systemId); - localResourceName = (String)getSupportedDtDs().get(shortName); - if (localResourceName != null) - systemId = localResourceName; - } - - if (localResourceName == null) { - return null; - } - ClassLoader loader = getClass().getClassLoader(); - URL url = null; - if (loader == null) { - url = ClassLoader.getSystemResource(localResourceName); - } else { - url = loader.getResource(localResourceName); - } - - - if (url == null) { - String message = J2EEXMLResourceHandler.getString(J2EEXMLResourceHandler.dtd_not_found_EXC_, (new Object[] {localResourceName}));// = "Could not parse xml because the resolved resource "{0}" could not be found in classpath" - throw new java.io.FileNotFoundException(message); - } - - InputSource result = new InputSource(url.toString()); - result.setPublicId(publicId); - // force the encoding to be UTF8 - result.setEncoding("UTF-8"); //$NON-NLS-1$ - - return result; -} -protected boolean shouldBeRegistered(String systemId) { - - return systemId.startsWith(J2EEConstants.JAVA_SUN_COM_URL) - || systemId.startsWith(J2EEConstants.WWW_W3_ORG_URL) - || systemId.startsWith(J2EEConstants.WWW_IBM_COM_URL); -} - -/** - * Returns the filename from the uri, or the segment after the last occurrence of a separator - */ -private static String getShortName(String uri) { - String tempURI = uri.replace('\\', '/'); - while (tempURI.endsWith("/")) //$NON-NLS-1$ - tempURI = tempURI.substring(0, tempURI.length()-1); - int lastIndex = tempURI.lastIndexOf('/'); - if (lastIndex == -1) - return uri; - return uri.substring(lastIndex+1, tempURI.length()); -} -} - - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/MissingRequiredDataException.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/MissingRequiredDataException.java deleted file mode 100644 index 4d1f229a8..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/MissingRequiredDataException.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - - - -public class MissingRequiredDataException extends RuntimeException { - -private static final long serialVersionUID = -301039854542561304L; -/** - * MissingRequiredDataException constructor comment. - */ -public MissingRequiredDataException() { - super(); -} -/** - * MissingRequiredDataException constructor comment. - * @param s java.lang.String - */ -public MissingRequiredDataException(String s) { - super(s); -} -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/NotSupportedException.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/NotSupportedException.java deleted file mode 100644 index dbb5d1a2f..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/NotSupportedException.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - -import org.eclipse.jst.j2ee.internal.WrappedRuntimeException; - - - - -public class NotSupportedException extends WrappedRuntimeException { -private static final long serialVersionUID = -3535594720987598196L; -/** - * NotSupportedException constructor comment. - */ -public NotSupportedException() { - super(); -} -/** - * NotSupportedException constructor comment. - * @param e java.lang.Exception - */ -public NotSupportedException(Exception e) { - super(e); -} -/** - * NotSupportedException constructor comment. - * @param s java.lang.String - */ -public NotSupportedException(String s) { - super(s); -} -/** - * NotSupportedException constructor comment. - * @param s java.lang.String - * @param e java.lang.Exception - */ -public NotSupportedException(String s, Exception e) { - super(s, e); -} -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/RarDeploymentDescriptorXmlMapperI.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/RarDeploymentDescriptorXmlMapperI.java deleted file mode 100644 index 78993cebb..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/RarDeploymentDescriptorXmlMapperI.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - - - -/** - * This interface represents a catalog of all the tag names which occur in - * an RAR deployment descriptor. Interface shared by readers and - * writers to have access to common constants - */ -public interface RarDeploymentDescriptorXmlMapperI extends DeploymentDescriptorXmlMapperI { - public String AUTH_MECHANISM = "authentication-mechanism";//$NON-NLS-1$ - public String AUTH_MECH_TYPE = "authentication-mechanism-type";//$NON-NLS-1$ - public String CONFIG_PROPERTY = "config-property";//$NON-NLS-1$ - public String CONFIG_PROPERTY_NAME = "config-property-name";//$NON-NLS-1$ - public String CONFIG_PROPERTY_VALUE = "config-property-value";//$NON-NLS-1$ - public String CONFIG_PROPERTY_TYPE = "config-property-type";//$NON-NLS-1$ - public String CONNECTOR = "connector";//$NON-NLS-1$ - public String CONNECTIONFACTORY_INTERFACE = "connectionfactory-interface";//$NON-NLS-1$ - public String CONNECTIONFACTORY_IMPL_CLASS = "connectionfactory-impl-class";//$NON-NLS-1$ - public String CONNECTION_INTERFACE = "connection-interface";//$NON-NLS-1$ - public String CONNECTION_IMPL_CLASS = "connection-impl-class";//$NON-NLS-1$ - public String CREDENTIAL_INTERFACE = "credential-interface";//$NON-NLS-1$ - public String EIS_TYPE = "eis-type";//$NON-NLS-1$ - public String LICENSE = "license";//$NON-NLS-1$ - public String LICENSE_REQUIRED = "license-required";//$NON-NLS-1$ - public String MANAGEDCONNECTIONFACTORY_CLASS = "managedconnectionfactory-class";//$NON-NLS-1$ - public String REAUTHENTICATION_SUPPORT = "reauthentication-support";//$NON-NLS-1$ - public String RESOURCEADAPTER = "resourceadapter";//$NON-NLS-1$ - public String SECURITY_PERMISSION = "security-permission";//$NON-NLS-1$ - public String SECURITY_PERMISSION_SPEC = "security-permission-spec";//$NON-NLS-1$ - public String SPEC_VERSION = "spec-version";//$NON-NLS-1$ - public String TRANSACTION_SUPPORT = "transaction-support";//$NON-NLS-1$ - public String VENDOR_NAME = "vendor-name";//$NON-NLS-1$ - //JCA 1.5 - public String RESOURCEADAPTER_VERSION = "resourceadapter-version";//$NON-NLS-1$ - public String RESOURCEADAPTER_CLASS = "resourceadapter-class";//$NON-NLS-1$ - public String OUTBOUND_RESOURCEADAPTER = "outbound-resourceadapter";//$NON-NLS-1$ - public String INBOUND_RESOURCEADAPTER = "inbound-resourceadapter";//$NON-NLS-1$ - - public String CONNECTION_DEFINITION = "connection-definition";//$NON-NLS-1$ - public String MESSAGEADAPTER = "messageadapter";//$NON-NLS-1$ - public String MESSAGELISTENER = "messagelistener";//$NON-NLS-1$ - public String MESSAGELISTENER_TYPE = "messagelistener-type";//$NON-NLS-1$ - public String ACTIVATIONSPEC = "activationspec";//$NON-NLS-1$ - public String ACTIVATIONSPEC_CLASS = "activationspec-class";//$NON-NLS-1$ - public String REQUIRED_CONFIG_PROPERTY = "required-config-property";//$NON-NLS-1$ - - public String ADMINOBJECT = "adminobject";//$NON-NLS-1$ - public String ADMINOBJECT_CLASS = "adminobject-class";//$NON-NLS-1$ - public String ADMINOBJECT_INTERFACE = "adminobject-interface"; //$NON-NLS-1$ -} - - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/WarDeploymentDescriptorXmlMapperI.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/WarDeploymentDescriptorXmlMapperI.java deleted file mode 100644 index acf0eaee3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/WarDeploymentDescriptorXmlMapperI.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - - - -/** - * This interface represents a catalog of all the tag names which occur in - * an WAR deployment descriptor. Interface shared by readers and - * writers to have access to common constants - */ -public interface WarDeploymentDescriptorXmlMapperI extends DeploymentDescriptorXmlMapperI { - public String AUTH_CONSTRAINT = "auth-constraint";//$NON-NLS-1$ - public String AUTH_METHOD = "auth-method";//$NON-NLS-1$ - public String CONTEXT_PARAM = "context-param";//$NON-NLS-1$ - public String DISTRIBUTABLE = "distributable";//$NON-NLS-1$ - public String ERROR_CODE = "error-code";//$NON-NLS-1$ - public String ERROR_PAGE = "error-page";//$NON-NLS-1$ - public String EXCEPTION_TYPE = "exception-type";//$NON-NLS-1$ - public String EXTENSION = "extension";//$NON-NLS-1$ - public String FILTER = "filter"; //$NON-NLS-1$ // Servlet2.3 - public String FILTER_MAPPING = "filter-mapping";//$NON-NLS-1$ // Servlet2.3 - public String FILTER_NAME = "filter-name"; //$NON-NLS-1$ // Servlet2.3 - public String FILTER_CLASS = "filter-class";//$NON-NLS-1$ // Servlet2.3 - public String FORM_ERROR_PAGE = "form-error-page";//$NON-NLS-1$ - public String FORM_LOGIN_CONFIG = "form-login-config";//$NON-NLS-1$ - public String FORM_LOGIN_PAGE = "form-login-page";//$NON-NLS-1$ - public String HTTP_METHOD = "http-method";//$NON-NLS-1$ - public String INIT_PARAM = "init-param";//$NON-NLS-1$ - public String JSP_FILE = "jsp-file";//$NON-NLS-1$ - public String LISTENER = "listener"; //$NON-NLS-1$ // Servlet2.3 - public String LOAD_ON_STARTUP = "load-on-startup";//$NON-NLS-1$ - public String LOCATION = "location";//$NON-NLS-1$ - public String LOGIN_CONFIG = "login-config";//$NON-NLS-1$ - public String MIME_MAPPING = "mime-mapping";//$NON-NLS-1$ - public String MIME_TYPE = "mime-type";//$NON-NLS-1$ - public String REALM_NAME = "realm-name";//$NON-NLS-1$ - public String SECURITY_CONSTRAINT = "security-constraint";//$NON-NLS-1$ - public String SERVLET = "servlet";//$NON-NLS-1$ - public String SERVLET_CLASS = "servlet-class";//$NON-NLS-1$ - public String SERVLET_MAPPING = "servlet-mapping";//$NON-NLS-1$ - public String SERVLET_NAME = "servlet-name";//$NON-NLS-1$ - public String SESSION_CONFIG = "session-config";//$NON-NLS-1$ - public String SESSION_TIMEOUT = "session-timeout";//$NON-NLS-1$ - public String TAGLIB = "taglib";//$NON-NLS-1$ - public String TAGLIB_LOCATION = "taglib-location";//$NON-NLS-1$ - public String TAGLIB_URI = "taglib-uri";//$NON-NLS-1$ - public String TRANSPORT_GUARANTEE = "transport-guarantee";//$NON-NLS-1$ - public String URL_PATTERN = "url-pattern";//$NON-NLS-1$ - public String USER_DATA_CONSTRAINT = "user-data-constraint";//$NON-NLS-1$ - public String WEB_APP = "web-app";//$NON-NLS-1$ - public String WEB_RESOURCE_COLLECTION = "web-resource-collection";//$NON-NLS-1$ - public String WEB_RESOURCE_NAME = "web-resource-name";//$NON-NLS-1$ - public String WELCOME_FILE = "welcome-file";//$NON-NLS-1$ - public String WELCOME_FILE_LIST = "welcome-file-list";//$NON-NLS-1$ - - public String DISPATCHER = "dispatcher";//$NON-NLS-1$ - public String LOCALE_ENCODING_MAPPING_LIST = "locale-encoding-mapping-list";//$NON-NLS-1$ - public String LOCALE_ENCODING_MAPPING = "locale-encoding-mapping";//$NON-NLS-1$ - public String LOCALE = "locale";//$NON-NLS-1$ - public String ENCODING = "encoding";//$NON-NLS-1$ - public String JSP_CONFIG = "jsp-config";//$NON-NLS-1$ - public String JSP_PROPERTY_GROUP = "jsp-property-group";//$NON-NLS-1$ - public String EL_IGNORED = "el-ignored";//$NON-NLS-1$ - public String PAGE_ENCODING = "page-encoding";//$NON-NLS-1$ - public String SCRIPTING_INVALID = "scripting-invalid";//$NON-NLS-1$ - public String IS_XML = "is-xml";//$NON-NLS-1$ - public String INCLUDE_PRELUDE = "include-prelude";//$NON-NLS-1$ - public String INCLUDE_CODA = "include-coda";//$NON-NLS-1$ - -} - - diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/WebServicesDeploymentDescriptorXmlMapperI.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/WebServicesDeploymentDescriptorXmlMapperI.java deleted file mode 100644 index 49868b6a9..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/WebServicesDeploymentDescriptorXmlMapperI.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Aug 5, 2003 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.jst.j2ee.internal.xml; - -/** - * @author dfholttp - * - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -public interface WebServicesDeploymentDescriptorXmlMapperI extends DeploymentDescriptorXmlMapperI{ - //1.3 specific WebServices DD - public String COMP_SCOPED_REFS = "component-scoped-refs";//$NON-NLS-1$ - public String COMP_COMPONENT_NAME = "component-name";//$NON-NLS-1$ - public String WEB_SERVICES_CLIENT = "webservicesclient";//$NON-NLS-1$ - public String LOCALPART = "localpart";//$NON-NLS-1$ - public String NAMESPACEURI = "namespaceURI";//$NON-NLS-1$ -} diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/XMLParseResourceHandler.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/XMLParseResourceHandler.java deleted file mode 100644 index e7ef7b772..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/XMLParseResourceHandler.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - -import org.eclipse.osgi.util.NLS; - -public final class XMLParseResourceHandler extends NLS { - - private static final String BUNDLE_NAME = "xmlparse";//$NON-NLS-1$ - - private XMLParseResourceHandler() { - // Do not instantiate - } - - public static String method_invoke_failed_EXC_; - public static String failed_to_load_EXC_; - public static String method_not_found_EXC_; - public static String failed_instantiating_EXC_; - public static String parse_exception_occured_EXC_; - - static { - NLS.initializeMessages(BUNDLE_NAME, XMLParseResourceHandler.class); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/XmlDocumentReader.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/XmlDocumentReader.java deleted file mode 100644 index 9a75760da..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/xml/XmlDocumentReader.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.internal.xml; - - - -import java.io.InputStream; - -import org.eclipse.jst.j2ee.internal.WrappedRuntimeException; -import org.w3c.dom.Document; -import org.w3c.dom.DocumentType; -import org.xml.sax.EntityResolver; -import org.xml.sax.ErrorHandler; -import org.xml.sax.InputSource; -import org.xml.sax.SAXParseException; - -/** - * Insert the type's description here. - * Creation date: (02/21/01 4:34:13 PM) - * @author: Administrator - */ -public class XmlDocumentReader extends GeneralXmlDocumentReader { -/** - * XmlDocumentReader constructor comment. - */ -public XmlDocumentReader(InputSource source) { - super(source); - setFlagDefaults(); -} -/** - * XmlDocumentReader constructor comment. - */ -public XmlDocumentReader(InputSource source, EntityResolver resolver, ErrorHandler handler) { - super(source, resolver, handler); - setFlagDefaults(); -} -/** - * Insert the method's description here. - * Creation date: (03/19/01 10:13:26 AM) - * @return org.xml.sax.EntityResolver - */ -public org.xml.sax.EntityResolver createDefaultEntityResolver() { - return J2EEXmlDtDEntityResolver.INSTANCE; -} - -protected void handleException(String aMessage, Throwable anException) { - if (anException instanceof SAXParseException) - handleException(aMessage, (SAXParseException) anException); - else - super.handleException(aMessage, anException); -} -protected void handleException(String aMessage, SAXParseException parseException) { - primHandleException(J2EEXMLResourceHandler.getString(XMLParseResourceHandler.parse_exception_occured_EXC_, (new Object[] {new Integer(parseException.getLineNumber()), new Integer(parseException.getColumnNumber()) })), parseException); - //$NON-NLS-1$ = "An Exception occurred while parsing xml: {0} Line #: {1} :Column #: " -} -protected void primHandleException(String aMessage, Throwable anException) { - if (anException instanceof Exception) - throw new WrappedRuntimeException(aMessage, (Exception)anException); - super.primHandleException(aMessage, anException); -} -protected void setFlagDefaults() { - setAllowJavaEncodings(true); - setValidate(true); -} - public static DocumentType readDocumentType(InputStream in, String uri) { - InputSource source = new InputSource(in); - GeneralXmlDocumentReader aReader = new XmlDocumentReader(source); - aReader.setValidate(false); - Document aDocument = aReader.parseDocument(); - if (aDocument != null) - return aDocument.getDoctype(); - return null; - } - -} - - |