org.glite.ce.monitorapij.resource
Class ResourceHandler

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byorg.apache.axis.encoding.DeserializationContext
          extended byorg.glite.ce.monitorapij.resource.ResourceHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, javax.xml.rpc.encoding.DeserializationContext, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler

public class ResourceHandler
extends org.apache.axis.encoding.DeserializationContext

An implementation of an XML serializer and deserializer. It keeps trace of the registered Resources in an xml file.

Author:
Luigi Zangrando (zangrando@pd.infn.it)

Field Summary
 
Fields inherited from class org.apache.axis.encoding.DeserializationContext
haveSeenSchemaNS, inputSource, log, msgContext, startOfMappingsPos
 
Constructor Summary
ResourceHandler(org.apache.axis.MessageContext context)
          Creates a new ResourceHandler object.
 
Method Summary
 Resource getResource(org.w3c.dom.Element element)
          Get the resource specified by an Element of the xml file.
 java.lang.Object getValue()
          Get the deserialized value.
 java.lang.String getXML(Resource resource)
          Get the xml code as a String referring to the specified Resource.
 
Methods inherited from class org.apache.axis.encoding.DeserializationContext
addObjectById, characters, comment, deserializing, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, getCurElement, getCurrentNSMappings, getCurrentRecordPos, getDeserializer, getDeserializerForClass, getDeserializerForType, getDestinationClass, getDocumentLocator, getElementByID, getEncodingStyle, getEnvelope, getMessageContext, getNamespaceURI, getObjectByRef, getQNameFromString, getRecorder, getSOAPConstants, getStartOfMappingsPos, getTypeFromAttributes, getTypeFromXSITypeAttr, getTypeMapping, getTypeMappingRegistry, hasElementsByID, ignorableWhitespace, isDoneParsing, isNil, isProcessingRef, parse, popElementHandler, processingInstruction, pushElementHandler, pushNewElement, registerElementByID, registerFixup, registerResolverForID, replaceElementHandler, resolveEntity, setCurElement, setDestinationClass, setDocumentLocator, setProcessingRef, setRecorder, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
error, fatalError, notationDecl, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceHandler

public ResourceHandler(org.apache.axis.MessageContext context)
                throws java.lang.Exception
Creates a new ResourceHandler object.

Parameters:
context - The current MessageContext used to get the deserializer for CEMonResource class.
Throws:
java.lang.Exception
Method Detail

getValue

public java.lang.Object getValue()
Get the deserialized value.

Returns:
An Object representing the deserialized value.
See Also:
org.apache.axis.encoding.DeserializationContextImpl#getValue()

getResource

public Resource getResource(org.w3c.dom.Element element)
                     throws java.lang.Exception
Get the resource specified by an Element of the xml file.

Parameters:
element - The Element of the xml file referring to a Resource
Returns:
The Resource descibed by the Element.
Throws:
java.lang.Exception

getXML

public java.lang.String getXML(Resource resource)
                        throws java.lang.Exception
Get the xml code as a String referring to the specified Resource. This will be inserted in the xml file.

Parameters:
resource - the resource to be registered in the xml file.
Returns:
The xml code as a String.
Throws:
java.lang.Exception