org.eclipse.modisco.jee.actions
Class AbstractDeploymentDescriptorDiscoverer<T>

java.lang.Object
  extended by org.eclipse.modisco.infra.discovery.core.AbstractDiscoverer<T>
      extended by org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer<T>
          extended by org.eclipse.modisco.jee.actions.AbstractDeploymentDescriptorDiscoverer<T>
All Implemented Interfaces:
IDiscoverer<T>
Direct Known Subclasses:
EjbJarDiscoverer2, WebXmlDiscoverer2

public abstract class AbstractDeploymentDescriptorDiscoverer<T>
extends AbstractModelDiscoverer<T>

A default implementation for discovering JEE configuration file


Constructor Summary
AbstractDeploymentDescriptorDiscoverer()
           
 
Method Summary
static java.lang.String getDescXmlVersion(Plugin plugin, java.lang.Object source, java.lang.String rootName, java.lang.String dtdUrl)
          Determine which version of DTD/XSD is used in the .xml file
static java.lang.String getDoctypeVersion(Plugin plugin, java.lang.Object source, java.lang.String rootName, java.lang.String baseUrl)
          Look for a DOCTYPE declaration, then a dtd one.
 
Methods inherited from class org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer
discoverElement, getDefaultTargetURI, getTargetModel, getTargetURI, setSerializeTarget, setTargetModel, setTargetURI
 
Methods inherited from class org.eclipse.modisco.infra.discovery.core.AbstractDiscoverer
isAFolder, isAJavaProject, isAnIFileWithExtension, isAProject, setRefreshSourceBeforeDiscovery
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.modisco.infra.discovery.core.IDiscoverer
isApplicableTo
 

Constructor Detail

AbstractDeploymentDescriptorDiscoverer

public AbstractDeploymentDescriptorDiscoverer()
Method Detail

getDescXmlVersion

public static java.lang.String getDescXmlVersion(Plugin plugin,
                                                 java.lang.Object source,
                                                 java.lang.String rootName,
                                                 java.lang.String dtdUrl)
Determine which version of DTD/XSD is used in the .xml file

Parameters:
source -
Returns:
the version of the .xml file

getDoctypeVersion

public static java.lang.String getDoctypeVersion(Plugin plugin,
                                                 java.lang.Object source,
                                                 java.lang.String rootName,
                                                 java.lang.String baseUrl)
Look for a DOCTYPE declaration, then a dtd one. Assume that the right DTD is declared right after the DOCTYPE

Parameters:
file -
Returns:
the version of the hibernate-configuration.xml file