org.mmbase.datatypes.util.xml
Class DataTypeXml

java.lang.Object
  extended by org.mmbase.datatypes.util.xml.DataTypeXml

public abstract class DataTypeXml
extends Object

Static methods used for parsing of datatypes.xml

Since:
MMBase-1.8
Version:
$Id: DataTypeXml.java 42557 2010-06-15 09:18:45Z michiel $
Author:
Michiel Meeuwissen

Constructor Summary
DataTypeXml()
           
 
Method Summary
static CommitProcessor chainProcessors(CommitProcessor processor1, CommitProcessor processor2)
           
static Processor chainProcessors(Processor processor1, Processor processor2)
           
static CommitProcessor createCommitProcessor(Element processorElement)
           
static Processor createProcessor(Element processorElement)
           
protected static String getAttribute(Element element, String localName)
          Returns the value of a certain attribute, either an unqualified attribute or an attribute that fits in the default namespace
static boolean getBooleanValue(Element element, boolean defaultValue)
           
static LocalizedString getLocalizedDescription(String tagName, Element element, LocalizedString descriptions, String key)
          Reads a number of tags with 'xml:lang' attributes.
static long getLongValue(Element element)
           
static String getValue(Element element)
           
static boolean hasAttribute(Element element, String localName)
          Returns whether an element has a certain attribute, either an unqualified attribute or an attribute that fits in the default namespace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTypeXml

public DataTypeXml()
Method Detail

hasAttribute

public static boolean hasAttribute(Element element,
                                   String localName)
Returns whether an element has a certain attribute, either an unqualified attribute or an attribute that fits in the default namespace


getAttribute

protected static String getAttribute(Element element,
                                     String localName)
Returns the value of a certain attribute, either an unqualified attribute or an attribute that fits in the default namespace


getLocalizedDescription

public static LocalizedString getLocalizedDescription(String tagName,
                                                      Element element,
                                                      LocalizedString descriptions,
                                                      String key)
Reads a number of tags with 'xml:lang' attributes.

Parameters:
tagName - Wich tags to read. The bodies are the values.
element - From which element this tags must be childs.
descriptions - Existing LocalizedString instance or null if a new one must be created.
key -
Returns:
A new LocalizedString or the updated 'descriptions' parameter if that was not null

getBooleanValue

public static boolean getBooleanValue(Element element,
                                      boolean defaultValue)

chainProcessors

public static Processor chainProcessors(Processor processor1,
                                        Processor processor2)

chainProcessors

public static CommitProcessor chainProcessors(CommitProcessor processor1,
                                              CommitProcessor processor2)

createProcessor

public static Processor createProcessor(Element processorElement)

createCommitProcessor

public static CommitProcessor createCommitProcessor(Element processorElement)

getValue

public static String getValue(Element element)

getLongValue

public static long getLongValue(Element element)


MMBase 2.0-SNAPSHOT - null