public abstract class AbstractBuilderReader<F extends Field> extends DocumentReader
BuilderReader with no dependencies on core classes.| Modifier and Type | Field and Description |
|---|---|
static String |
DTD_BUILDER
DTD respource filename of the most recent Builder DTD
|
static String |
DTD_BUILDER_1_0
DTD resource filename of the Builder DTD version 1.0
|
static String |
DTD_BUILDER_1_1
DTD resource filename of the Builder DTD version 1.1
|
protected boolean |
inheritanceResolved
If false, the parent builder could not be resolved.
|
protected SortedSet<Integer> |
inputPositions |
static String |
NAMESPACE_BUILDER |
static String |
NAMESPACE_BUILDER_2_0 |
static String |
PUBLIC_ID_BUILDER
Public ID of the most recent Builder DTD
|
static String |
PUBLIC_ID_BUILDER_1_0
Public ID of the Builder DTD version 1.0
|
static String |
PUBLIC_ID_BUILDER_1_1
Public ID of the Builder DTD version 1.1
|
protected SortedSet<Integer> |
searchPositions
searchPositions and inputPositions are used to adminstrate 'occupied' positions (from
editor/positions), which is used to find defaults if not specified.
|
static String |
XSD_BUILDER_2_0 |
document, DTD_ERROR, DTD_ERROR_1_0, FILENOTFOUND, PUBLIC_ID_ERROR, PUBLIC_ID_ERROR_1_0, utilProperties| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBuilderReader(Document doc) |
protected |
AbstractBuilderReader(InputSource source) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decodeDataType(DataTypeSetter setter,
String builder,
DataTypeCollector collector,
String fieldName,
Element fieldElement,
boolean forceInstance)
Determine a data type instance based on the given gui element
|
protected void |
decodeDataTypeLater(DataTypeSetter setter,
String builder,
DataTypeCollector collector,
String fieldName,
Element fieldElement,
boolean forceInstance) |
protected void |
decodeFieldAttributes(Element field,
CoreField def) |
protected void |
decodeFieldDef(Element field,
CoreField def,
DataTypeCollector collector)
Alter a specified, named FieldDef object using information obtained from the buidler configuration.
|
boolean |
equals(Object o) |
static ResourceLoader |
getBuilderLoader() |
String |
getClassName()
Get the class name to use for instantiating this builder.
|
protected BasicDataType |
getDataTypeForFieldAttribute(String fieldAttribute) |
Map<String,BasicDataType<?>> |
getDataTypes(DataTypeCollector collector)
Get the datatypes defined for this builder.
|
Map<String,String> |
getDescriptions()
Deprecated.
use getLocalizedDescription()
|
protected int |
getEditorPos(Element elm)
Determine an integer value from an elements body.
|
String |
getExtends()
Get the name of the builder that this builder extends
|
abstract List<F> |
getFields()
Get the field definitions of this builder.
|
LocalizedString |
getLocalizedDescription(LocalizedString description)
Get the descriptions of this module.
|
LocalizedString |
getLocalizedPluralName(LocalizedString guiName)
Get the (gui) names of this module.
|
LocalizedString |
getLocalizedSingularName(LocalizedString guiName)
Get the (gui) names of this module.
|
String |
getMaintainer()
Retrieve the name of the maintainer of this builder
|
String |
getName()
Get the name of the builder that this builder extends
|
protected abstract String |
getParentClassName() |
protected abstract String |
getParentMaintainer() |
protected abstract Map<String,String> |
getParentProperties() |
protected abstract int |
getParentSearchAge() |
protected abstract int |
getParentVersion() |
Map<String,String> |
getPluralNames()
Deprecated.
use getLocalizedPluralName()
|
Map<String,String> |
getProperties()
Get the properties of this builder
|
int |
getSearchAge()
Retrieves the Search Age.
|
Map<String,String> |
getSingularNames()
Deprecated.
use getLocalizedSingularName()
|
String |
getStatus()
Get the status of this builder.
|
int |
getVersion()
Retrieve the (major) version number of this builder
|
protected abstract boolean |
hasParent() |
boolean |
isInheritanceResolved()
Determines if inheritance is resolved.
|
protected static void |
mergeElementLists(Document doc,
Document overrides,
String list,
String item,
String attr,
boolean replace)
Copy a list of elements, identified by an attribute, from overrides to doc.
|
static void |
registerPublicIDs()
Register the Public Ids for DTDs used by BuilderReader
This method is called by EntityResolver.
|
static void |
registerSystemIDs()
Register the namespace and XSD used by DataTypeConfigurer
This method is called by EntityResolver.
|
protected abstract boolean |
resolveInheritance()
Resolves inheritance.
|
protected static void |
resolveInheritanceByXML(Document doc,
Document overrides)
Copy everything from overrides to doc.
|
String |
toString() |
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, validatepublic static final String PUBLIC_ID_BUILDER_1_0
public static final String PUBLIC_ID_BUILDER_1_1
public static final String DTD_BUILDER_1_0
public static final String DTD_BUILDER_1_1
public static final String PUBLIC_ID_BUILDER
public static final String DTD_BUILDER
public static final String XSD_BUILDER_2_0
public static final String NAMESPACE_BUILDER_2_0
public static final String NAMESPACE_BUILDER
protected boolean inheritanceResolved
protected final SortedSet<Integer> searchPositions
protected AbstractBuilderReader(InputSource source)
protected AbstractBuilderReader(Document doc)
public static void registerSystemIDs()
public static void registerPublicIDs()
public static ResourceLoader getBuilderLoader()
protected static void resolveInheritanceByXML(Document doc, Document overrides)
doc - The receiving builder xml document. This one will be changed.overrides - The builder xml document that provided overriding information. This one will only
be read.protected static void mergeElementLists(Document doc, Document overrides, String list, String item, String attr, boolean replace)
doc - The receiving builder xml document. This one will be changed.overrides - The builder xml document that provided overriding information. This one will only
be read.list - The tagname of list element(s) containign the itemsitem - The tagname of the list item elementattr - The attribute identifying the item (i.e. "name" or "xml:lang")replace - if true, the item is entirely replaced. If false, it is merged.protected abstract boolean resolveInheritance()
RuntimeException - when the builder to extend from is not allowed as parentisInheritanceResolved()public boolean isInheritanceResolved()
resolveInheritance()public String getStatus()
protected abstract int getParentSearchAge()
public int getSearchAge()
protected abstract String getParentClassName()
public String getClassName()
org.mmbase.module.builders package.public Map<String,BasicDataType<?>> getDataTypes(DataTypeCollector collector)
collector - A DataTypeCollector to which the newly found DataTypes will be added.public abstract List<F> getFields()
protected int getEditorPos(Element elm)
elm - The element containing the value.protected void decodeFieldDef(Element field, CoreField def, DataTypeCollector collector)
field - The element containing the field information according to the buidler xml formatdef - The field definition to alterprotected void decodeDataTypeLater(DataTypeSetter setter, String builder, DataTypeCollector collector, String fieldName, Element fieldElement, boolean forceInstance)
protected BasicDataType getDataTypeForFieldAttribute(String fieldAttribute) throws DataTypes.FieldNotFoundException
fieldAttribute - DataTypes.FieldNotFoundExceptionprotected void decodeDataType(DataTypeSetter setter, String builder, DataTypeCollector collector, String fieldName, Element fieldElement, boolean forceInstance)
builder - the MMObjectBuilder to which the field belongscollector - The DataTypeCollector of the bulider.fieldName - the name of the field (used in log messages)fieldElement - The 'field' element of the builder xmlforceInstance - If true, it will never return null, but will return (a clone) of the DataType associated with the database type.protected void decodeFieldAttributes(Element field, CoreField def)
public Map<String,String> getProperties()
public LocalizedString getLocalizedDescription(LocalizedString description)
public LocalizedString getLocalizedSingularName(LocalizedString guiName)
public LocalizedString getLocalizedPluralName(LocalizedString guiName)
public Map<String,String> getDescriptions()
public Map<String,String> getPluralNames()
public Map<String,String> getSingularNames()
public String getExtends()
public String getName()
protected abstract boolean hasParent()
protected abstract int getParentVersion()
public int getVersion()
protected abstract String getParentMaintainer()
public String getMaintainer()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}