org.mmbase.util.xml
Class ParentBuilderReader

java.lang.Object
  extended by org.mmbase.util.xml.DocumentReader
      extended by org.mmbase.util.xml.AbstractBuilderReader<Field>
          extended by org.mmbase.util.xml.ParentBuilderReader
Direct Known Subclasses:
MockBuilderReader

public abstract class ParentBuilderReader
extends AbstractBuilderReader<Field>

This version of AbstractBuilderReader implements every method besides a getNodeManagerDescription(String). This minimizes the effort to implement a BuilderReader.

Since:
MMBase-1.9.2
Version:
$Id: ParentBuilderReader.java 42558 2010-06-15 09:21:38Z michiel $
Author:
Michiel Meeuwissen

Field Summary
protected  AbstractBuilderReader<Field> parent
           
 
Fields inherited from class org.mmbase.util.xml.AbstractBuilderReader
DTD_BUILDER, DTD_BUILDER_1_0, DTD_BUILDER_1_1, inheritanceResolved, inputPositions, NAMESPACE_BUILDER, NAMESPACE_BUILDER_2_0, PUBLIC_ID_BUILDER, PUBLIC_ID_BUILDER_1_0, PUBLIC_ID_BUILDER_1_1, searchPositions, XSD_BUILDER_2_0
 
Fields inherited from class org.mmbase.util.xml.DocumentReader
document, DTD_ERROR, DTD_ERROR_1_0, FILENOTFOUND, PUBLIC_ID_ERROR, PUBLIC_ID_ERROR_1_0, utilProperties
 
Constructor Summary
ParentBuilderReader(Document doc)
           
ParentBuilderReader(InputSource is)
           
 
Method Summary
 List<Field> getFields()
          Get the field definitions of this builder.
protected abstract  NodeManagerDescription getNodeManagerDescription(String parentBuilder)
           
protected  String getParentClassName()
           
protected  String getParentMaintainer()
           
protected  Map<String,String> getParentProperties()
           
protected  int getParentSearchAge()
           
protected  int getParentVersion()
           
protected  boolean hasParent()
           
protected  boolean resolveInheritance()
          Resolves inheritance.
 
Methods inherited from class org.mmbase.util.xml.AbstractBuilderReader
decodeDataType, decodeDataTypeLater, equals, getBuilderLoader, getClassName, getDataTypes, getDescriptions, getEditorPos, getExtends, getLocalizedDescription, getLocalizedPluralName, getLocalizedSingularName, getMaintainer, getName, getPluralNames, getProperties, getSearchAge, getSingularNames, getStatus, getVersion, hashCode, isInheritanceResolved, mergeElementLists, registerPublicIDs, registerSystemIDs, resolveInheritanceByXML, toString
 
Methods inherited from class org.mmbase.util.xml.DocumentReader
appendChild, getAttribute, getChildElements, getChildElements, getChildElements, getChildElements, getDocument, getDocumentBuilder, getDocumentBuilder, getDocumentBuilder, getDocumentBuilder, getElementAttributeValue, getElementAttributeValue, getElementByPath, getElementByPath, getElementName, getElementValue, getElementValue, getNodeTextValue, getNodeTextValue, getRootElement, getSystemId, hasAttribute, main, setNodeTextValue, setPrefix, setSystemId, toDocument, validate, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

protected AbstractBuilderReader<Field> parent
Constructor Detail

ParentBuilderReader

public ParentBuilderReader(InputSource is)

ParentBuilderReader

public ParentBuilderReader(Document doc)
Method Detail

getParentSearchAge

protected int getParentSearchAge()
Specified by:
getParentSearchAge in class AbstractBuilderReader<Field>

getParentClassName

protected String getParentClassName()
Specified by:
getParentClassName in class AbstractBuilderReader<Field>

getNodeManagerDescription

protected abstract NodeManagerDescription getNodeManagerDescription(String parentBuilder)

resolveInheritance

protected boolean resolveInheritance()
Description copied from class: AbstractBuilderReader
Resolves inheritance. If a builder 'extends' another builder, the parser attempts to retrieve a reference to this builder (using getParentBuilder). Note that if inheritance cannot be resolved, the builder cannot be activated. This method returns false if the builder to extend from is inactive. It throws a RuntimeException is the builder to extend from is not allowed as an parent builder.

Specified by:
resolveInheritance in class AbstractBuilderReader<Field>
Returns:
true if inheritance could be resolved, false if the .
See Also:
AbstractBuilderReader.isInheritanceResolved()

getFields

public List<Field> getFields()
Description copied from class: AbstractBuilderReader
Get the field definitions of this builder. If applicable, this includes the fields inherited from a parent builder.

Specified by:
getFields in class AbstractBuilderReader<Field>
Returns:
a List of all Fields as CoreField

getParentProperties

protected Map<String,String> getParentProperties()
Specified by:
getParentProperties in class AbstractBuilderReader<Field>

hasParent

protected boolean hasParent()
Specified by:
hasParent in class AbstractBuilderReader<Field>

getParentVersion

protected int getParentVersion()
Specified by:
getParentVersion in class AbstractBuilderReader<Field>

getParentMaintainer

protected String getParentMaintainer()
Specified by:
getParentMaintainer in class AbstractBuilderReader<Field>


MMBase 2.0-SNAPSHOT - null