org.teleal.cling.support.lastchange
Class LastChangeParser

java.lang.Object
  extended by org.teleal.common.xml.SAXParser
      extended by org.teleal.cling.support.lastchange.LastChangeParser
Direct Known Subclasses:
AVTransportLastChangeParser, RenderingControlLastChangeParser

public abstract class LastChangeParser
extends org.teleal.common.xml.SAXParser

Reads and writes the "LastChange" XML content.

Validates against a schema if the SAXParser.getSchemaSources() method doesn't return null.

Author:
Christian Bauer

Nested Class Summary
static class LastChangeParser.CONSTANTS
           
 
Nested classes/interfaces inherited from class org.teleal.common.xml.SAXParser
org.teleal.common.xml.SAXParser.Handler<I>, org.teleal.common.xml.SAXParser.SimpleErrorHandler
 
Field Summary
 
Fields inherited from class org.teleal.common.xml.SAXParser
XML_SCHEMA_NAMESPACE, XML_SCHEMA_RESOURCE
 
Constructor Summary
LastChangeParser()
           
 
Method Summary
protected  Document buildDOM(Event event)
           
protected  EventedValue createValue(String name, Map.Entry<String,String>[] attributes)
           
 String generate(Event event)
           
protected  void generateEventedValue(EventedValue eventedValue, Document descriptor, Element parentElement)
           
protected  void generateInstanceIDs(Event event, Document descriptor, Element rootElement)
           
protected  void generateRoot(Event event, Document descriptor)
           
protected  Set<Class<? extends EventedValue>> getEventedVariables()
           
protected abstract  String getNamespace()
           
 Event parse(String xml)
           
 
Methods inherited from class org.teleal.common.xml.SAXParser
create, createSchema, getErrorHandler, getSchemaSources, parse, setContentHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LastChangeParser

public LastChangeParser()
Method Detail

getNamespace

protected abstract String getNamespace()

getEventedVariables

protected Set<Class<? extends EventedValue>> getEventedVariables()

createValue

protected EventedValue createValue(String name,
                                   Map.Entry<String,String>[] attributes)
                            throws Exception
Throws:
Exception

parse

public Event parse(String xml)
            throws Exception
Throws:
Exception

generate

public String generate(Event event)
                throws Exception
Throws:
Exception

buildDOM

protected Document buildDOM(Event event)
                     throws Exception
Throws:
Exception

generateRoot

protected void generateRoot(Event event,
                            Document descriptor)

generateInstanceIDs

protected void generateInstanceIDs(Event event,
                                   Document descriptor,
                                   Element rootElement)

generateEventedValue

protected void generateEventedValue(EventedValue eventedValue,
                                    Document descriptor,
                                    Element parentElement)


Copyright © 2011 Teleal GmbH, Switzerland. All Rights Reserved.