public abstract class LastChangeParser
extends org.seamless.xml.SAXParser
Validates against a schema if the SAXParser.getSchemaSources()
method
doesn't return null
.
Note: This is broken on most devices and with most services out in the wild. In fact, you might want to use polling the service with actions, to get its status, instead of GENA. Polling can be expensive on low-power control points, however.
Modifier and Type | Class and Description |
---|---|
static class |
LastChangeParser.CONSTANTS |
Constructor and Description |
---|
LastChangeParser() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected abstract String getNamespace()
protected Set<Class<? extends EventedValue>> getEventedVariables()
protected EventedValue createValue(String name, Map.Entry<String,String>[] attributes) throws Exception
Exception
public Event parseResource(String resource) throws Exception
resource
- The resource on the classpath.Exception
protected void generateInstanceIDs(Event event, Document descriptor, Element rootElement)
protected void generateEventedValue(EventedValue eventedValue, Document descriptor, Element parentElement)
Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.