|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.xml.DocumentReader
org.mmbase.util.xml.AbstractBuilderReader<F>
public abstract class AbstractBuilderReader<F extends Field>
Abstraction of BuilderReader with no dependencies on core classes.
| Field Summary | |
|---|---|
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
|
| 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 | |
|---|---|
protected |
AbstractBuilderReader(Document doc)
|
protected |
AbstractBuilderReader(InputSource source)
|
| Method Summary | |
|---|---|
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)
|
boolean |
equals(Object o)
|
static ResourceLoader |
getBuilderLoader()
|
String |
getClassName()
Get the class name to use for instantiating this builder. |
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 |
int |
hashCode()
|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public 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 final SortedSet<Integer> inputPositions
| Constructor Detail |
|---|
protected AbstractBuilderReader(InputSource source)
protected AbstractBuilderReader(Document doc)
| Method Detail |
|---|
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 decodeDataTypeLater(DataTypeSetter setter,
String builder,
DataTypeCollector collector,
String fieldName,
Element fieldElement,
boolean forceInstance)
protected 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)field - The 'field' element of the builder xmltype - The database type of the fieldlistItemType - If the database type is a List, there is also a type of its elementforceInstance - If true, it will never return null, but will return (a clone) of the DataType associated with the database type.protected abstract Map<String,String> getParentProperties()
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()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||