org.fourthline.cling.binding.xml
Class UDA10ServiceDescriptorBinderImpl

java.lang.Object
  extended by org.fourthline.cling.binding.xml.UDA10ServiceDescriptorBinderImpl
All Implemented Interfaces:
ServiceDescriptorBinder, ErrorHandler
Direct Known Subclasses:
UDA10ServiceDescriptorBinderSAXImpl

public class UDA10ServiceDescriptorBinderImpl
extends Object
implements ServiceDescriptorBinder, ErrorHandler

Implementation based on JAXP DOM.

Author:
Christian Bauer

Constructor Summary
UDA10ServiceDescriptorBinderImpl()
           
 
Method Summary
 Document buildDOM(Service service)
           
protected
<S extends Service>
S
buildInstance(S undescribedService, MutableService descriptor)
           
<S extends Service>
S
describe(S undescribedService, Document dom)
           
<S extends Service>
S
describe(S undescribedService, String descriptorXml)
           
 void error(SAXParseException e)
           
 void fatalError(SAXParseException e)
           
 String generate(Service service)
           
 void hydrateAction(MutableAction action, Node actionNode)
           
 void hydrateActionArgument(MutableActionArgument actionArgument, Node actionArgumentNode)
           
 void hydrateActionList(MutableService descriptor, Node actionListNode)
           
protected  void hydrateBasic(MutableService descriptor, Service undescribedService)
           
protected  void hydrateRoot(MutableService descriptor, Element rootElement)
           
 void hydrateServiceStateTableList(MutableService descriptor, Node serviceStateTableNode)
           
 void hydrateStateVariable(MutableStateVariable stateVariable, Element stateVariableElement)
           
 void warning(SAXParseException e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDA10ServiceDescriptorBinderImpl

public UDA10ServiceDescriptorBinderImpl()
Method Detail

describe

public <S extends Service> S describe(S undescribedService,
                                      String descriptorXml)
                           throws DescriptorBindingException,
                                  ValidationException
Specified by:
describe in interface ServiceDescriptorBinder
Throws:
DescriptorBindingException
ValidationException

describe

public <S extends Service> S describe(S undescribedService,
                                      Document dom)
                           throws DescriptorBindingException,
                                  ValidationException
Specified by:
describe in interface ServiceDescriptorBinder
Throws:
DescriptorBindingException
ValidationException

buildInstance

protected <S extends Service> S buildInstance(S undescribedService,
                                              MutableService descriptor)
                                   throws ValidationException
Throws:
ValidationException

hydrateBasic

protected void hydrateBasic(MutableService descriptor,
                            Service undescribedService)

hydrateRoot

protected void hydrateRoot(MutableService descriptor,
                           Element rootElement)
                    throws DescriptorBindingException
Throws:
DescriptorBindingException

hydrateActionList

public void hydrateActionList(MutableService descriptor,
                              Node actionListNode)
                       throws DescriptorBindingException
Throws:
DescriptorBindingException

hydrateAction

public void hydrateAction(MutableAction action,
                          Node actionNode)

hydrateActionArgument

public void hydrateActionArgument(MutableActionArgument actionArgument,
                                  Node actionArgumentNode)

hydrateServiceStateTableList

public void hydrateServiceStateTableList(MutableService descriptor,
                                         Node serviceStateTableNode)

hydrateStateVariable

public void hydrateStateVariable(MutableStateVariable stateVariable,
                                 Element stateVariableElement)

generate

public String generate(Service service)
                throws DescriptorBindingException
Specified by:
generate in interface ServiceDescriptorBinder
Throws:
DescriptorBindingException

buildDOM

public Document buildDOM(Service service)
                  throws DescriptorBindingException
Specified by:
buildDOM in interface ServiceDescriptorBinder
Throws:
DescriptorBindingException

warning

public void warning(SAXParseException e)
             throws SAXException
Specified by:
warning in interface ErrorHandler
Throws:
SAXException

error

public void error(SAXParseException e)
           throws SAXException
Specified by:
error in interface ErrorHandler
Throws:
SAXException

fatalError

public void fatalError(SAXParseException e)
                throws SAXException
Specified by:
fatalError in interface ErrorHandler
Throws:
SAXException


Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.