no.ntnu.ime.xmlconverter.server
Class XMLSourceParserServiceImpl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by no.ntnu.ime.xmlconverter.server.XMLSourceParserServiceImpl
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, XMLSourceParserService

public class XMLSourceParserServiceImpl
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements XMLSourceParserService

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface no.ntnu.ime.xmlconverter.client.XMLSourceParserService
XMLSourceParserService.Util
 
Field Summary
private static long serialVersionUID
           
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
XMLSourceParserServiceImpl()
           
 
Method Summary
private  java.lang.String dfsXmlToDotString(org.w3c.dom.Node currentNode, int indent, int childIndex)
           
private  java.lang.String getFilepathForUrlIdentifier(java.lang.String urlIdentifier)
           
 boolean isValidSourceURI(java.lang.String sourceAdress)
          Returns true if the given string is a valid resource locator for the XML data.
private  java.lang.String nodeAttrsToString(org.w3c.dom.Node child)
           
 java.lang.String parseXMLSource(java.lang.String urlIdentifier)
           
 java.lang.String retrieveXMLSource(java.lang.String sourceAddress)
          Retrieves the XML Source to disk.
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

XMLSourceParserServiceImpl

public XMLSourceParserServiceImpl()
Method Detail

isValidSourceURI

public boolean isValidSourceURI(java.lang.String sourceAdress)
                         throws ValidSourceException
Description copied from interface: XMLSourceParserService
Returns true if the given string is a valid resource locator for the XML data.

Specified by:
isValidSourceURI in interface XMLSourceParserService
Returns:
Throws:
ValidSourceException

parseXMLSource

public java.lang.String parseXMLSource(java.lang.String urlIdentifier)
                                throws java.lang.RuntimeException
Specified by:
parseXMLSource in interface XMLSourceParserService
Throws:
java.lang.RuntimeException

dfsXmlToDotString

private java.lang.String dfsXmlToDotString(org.w3c.dom.Node currentNode,
                                           int indent,
                                           int childIndex)

nodeAttrsToString

private java.lang.String nodeAttrsToString(org.w3c.dom.Node child)

retrieveXMLSource

public java.lang.String retrieveXMLSource(java.lang.String sourceAddress)
                                   throws java.lang.RuntimeException
Description copied from interface: XMLSourceParserService
Retrieves the XML Source to disk. Returns a session ID for the source.

Specified by:
retrieveXMLSource in interface XMLSourceParserService
Returns:
Throws:
java.lang.RuntimeException

getFilepathForUrlIdentifier

private java.lang.String getFilepathForUrlIdentifier(java.lang.String urlIdentifier)