Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.teleal.cling.support.lastchange
Class LastChangeParser

    java.lang.Object
      org.teleal.common.xml.SAXParser
          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)`
`Event` | `parseResource(String resource)` Uses the current thread's context classloader to read and unmarshall the given resource.

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`

### parseResource

    public Event parseResource(String resource)
                        throws Exception

  Uses the current thread's context classloader to read and unmarshall the given resource.

  Parameters:
    `resource` - The resource on the classpath.
  Returns:
    The unmarshalled Event model.
  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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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