org.teleal.cling.support.contentdirectory.descriptor
Class DIDLParser

java.lang.Object
  extended by org.teleal.cling.support.contentdirectory.descriptor.DIDLParser

public class DIDLParser
extends Object


Field Summary
static String DIDL_XSD_RESOURCE
           
protected  Schema didlSchema
           
protected  boolean generateFormatted
           
protected  boolean generateFragment
           
protected  JAXBContext jaxbContext
           
protected  SchemaFactory schemaFactory
           
protected  boolean validating
           
 
Constructor Summary
DIDLParser()
           
DIDLParser(boolean validating)
           
DIDLParser(boolean validating, boolean generateFragment, boolean generateFormatted)
           
 
Method Summary
 Marshaller createMarshaller()
           
 Unmarshaller createUnmarshaller()
           
 void debugXML(String s)
           
 void debugXML(StringWriter writer)
           
static
<C> List<C>
getChildren(Container container, Class<C> type)
           
static
<C> List<C>
getChildren(DIDLLite didl, Class<C> type)
           
static
<C> List<C>
getChildren(Item item, Class<C> type)
           
 Schema getDidlSchema()
           
static
<C> C
getFirstChild(Container container, Class<C> type)
           
static
<C> C
getFirstChild(DIDLLite didl, Class<C> type)
           
static
<C> C
getFirstChild(Item item, Class<C> type)
           
 JAXBContext getJaxbContext()
           
 SchemaFactory getSchemaFactory()
           
static boolean hasContainers(Container container)
           
static boolean hasContainers(DIDLLite didl)
           
static boolean hasDescriptors(Container container)
           
static boolean hasDescriptors(DIDLLite didl)
           
static boolean hasItems(Container container)
           
static boolean hasItems(DIDLLite didl)
           
static boolean hasResources(Container container)
           
 boolean isGenerateFormatted()
           
 boolean isGenerateFragment()
           
 boolean isValidating()
           
 DIDLLite read(String xml)
           
 DIDLLite readResource(String resource)
           
 DIDLLite readWriter(StringWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIDL_XSD_RESOURCE

public static final String DIDL_XSD_RESOURCE
See Also:
Constant Field Values

jaxbContext

protected final JAXBContext jaxbContext

schemaFactory

protected final SchemaFactory schemaFactory

didlSchema

protected final Schema didlSchema

validating

protected boolean validating

generateFragment

protected boolean generateFragment

generateFormatted

protected boolean generateFormatted
Constructor Detail

DIDLParser

public DIDLParser()

DIDLParser

public DIDLParser(boolean validating)

DIDLParser

public DIDLParser(boolean validating,
                  boolean generateFragment,
                  boolean generateFormatted)
Method Detail

getJaxbContext

public JAXBContext getJaxbContext()

getSchemaFactory

public SchemaFactory getSchemaFactory()

getDidlSchema

public Schema getDidlSchema()

isValidating

public boolean isValidating()

isGenerateFragment

public boolean isGenerateFragment()

isGenerateFormatted

public boolean isGenerateFormatted()

createMarshaller

public Marshaller createMarshaller()
                            throws Exception
Throws:
Exception

createUnmarshaller

public Unmarshaller createUnmarshaller()
                                throws Exception
Throws:
Exception

readResource

public DIDLLite readResource(String resource)
                      throws Exception
Throws:
Exception

readWriter

public DIDLLite readWriter(StringWriter writer)
                    throws Exception
Throws:
Exception

read

public DIDLLite read(String xml)
              throws Exception
Throws:
Exception

debugXML

public void debugXML(StringWriter writer)

debugXML

public void debugXML(String s)

hasContainers

public static boolean hasContainers(DIDLLite didl)

hasItems

public static boolean hasItems(DIDLLite didl)

hasDescriptors

public static boolean hasDescriptors(DIDLLite didl)

hasContainers

public static boolean hasContainers(Container container)

hasItems

public static boolean hasItems(Container container)

hasDescriptors

public static boolean hasDescriptors(Container container)

hasResources

public static boolean hasResources(Container container)

getChildren

public static <C> List<C> getChildren(DIDLLite didl,
                                      Class<C> type)

getChildren

public static <C> List<C> getChildren(Container container,
                                      Class<C> type)

getChildren

public static <C> List<C> getChildren(Item item,
                                      Class<C> type)

getFirstChild

public static <C> C getFirstChild(DIDLLite didl,
                                  Class<C> type)

getFirstChild

public static <C> C getFirstChild(Container container,
                                  Class<C> type)

getFirstChild

public static <C> C getFirstChild(Item item,
                                  Class<C> type)


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