| java.lang.Object org.mmbase.util.xml.DocumentReader org.mmbase.util.xml.BuilderReader
BuilderReader | public class BuilderReader extends DocumentReader (Code) | | Used to parse and retrieve data from a builder configuration file.
The parser support builders for builder dtd 1.1.
since: MMBase 1.7 author: Case Roole author: Rico Jansen author: Pierre van Rooden author: Michiel Meeuwissen version: $Id: BuilderReader.java,v 1.97 2008/03/12 15:21:43 michiel Exp $ |
Method Summary | |
protected DataType | decodeDataType(MMObjectBuilder builder, DataTypeCollector collector, String fieldName, Element field, int type, int listItemType, boolean forceInstance) | public boolean | equals(Object o) | public String | getClassName() Get the class name to use for instantiating this builder. | public Map<String, BasicDataType<?>> | getDataTypes(DataTypeCollector collector) Get the datatypes defined for this builder.
Parameters: collector - A DataTypeCollector to which the newly found DataTypes will be added. | public Hashtable<String, String> | getDescriptions() | public String | getExtends() | public List<CoreField> | getFields() Get the field definitions of this builder. | public List<CoreField> | getFields(MMObjectBuilder builder, DataTypeCollector collector) Get the field definitions of this builder.
If applicable, this includes the fields inherited from a parent builder.
Parameters: builder - the MMObjectBuilder to which the fields will be added Parameters: collector - the datatype collector used to access the datatypes available for the fields to read. | public Set<Function> | getFunctions(MMObjectBuilder builder) | public List<Index> | getIndices(MMObjectBuilder builder) Get the named indices of this builder. | public LocalizedString | getLocalizedDescription(LocalizedString description) Get the descriptions of this module. | public LocalizedString | getLocalizedPluralName(LocalizedString guiName) Get the (gui) names of this module. | public LocalizedString | getLocalizedSingularName(LocalizedString guiName) Get the (gui) names of this module. | public String | getMaintainer() | public MMObjectBuilder | getParentBuilder() | public Hashtable<String, String> | getPluralNames() | public Hashtable<String, String> | getProperties() | public int | getSearchAge() Retrieves the Search Age. | public Hashtable<String, String> | getSingularNames() | public String | getStatus() Get the status of this builder. | public int | getVersion() | public boolean | isInheritanceResolved() Detremines if inheritance is resolved. | public static void | main(String[] argv) | public static void | registerPublicIDs() Register the Public Ids for DTDs used by BuilderReader
This method is called by XMLEntityResolver. | public static void | registerSystemIDs() Register the namespace and XSD used by DataTypeConfigurer
This method is called by XMLEntityResolver. | protected boolean | resolveInheritance() Resolves inheritance. | public boolean | storageEquals(BuilderReader f) |
DTD_BUILDER | final public static String DTD_BUILDER(Code) | | DTD respource filename of the most recent Builder DTD
|
DTD_BUILDER_1_0 | final public static String DTD_BUILDER_1_0(Code) | | DTD resource filename of the Builder DTD version 1.0
|
DTD_BUILDER_1_1 | final public static String DTD_BUILDER_1_1(Code) | | DTD resource filename of the Builder DTD version 1.1
|
NAMESPACE_BUILDER | final public static String NAMESPACE_BUILDER(Code) | | |
NAMESPACE_BUILDER_2_0 | final public static String NAMESPACE_BUILDER_2_0(Code) | | |
PUBLIC_ID_BUILDER | final public static String PUBLIC_ID_BUILDER(Code) | | Public ID of the most recent Builder DTD
|
PUBLIC_ID_BUILDER_1_0 | final public static String PUBLIC_ID_BUILDER_1_0(Code) | | Public ID of the Builder DTD version 1.0
|
PUBLIC_ID_BUILDER_1_1 | final public static String PUBLIC_ID_BUILDER_1_1(Code) | | Public ID of the Builder DTD version 1.1
|
XSD_BUILDER_2_0 | final public static String XSD_BUILDER_2_0(Code) | | |
decodeDataType | protected DataType decodeDataType(MMObjectBuilder builder, DataTypeCollector collector, String fieldName, Element field, int type, int listItemType, boolean forceInstance)(Code) | | Determine a data type instance based on the given gui element
Parameters: builder - the MMObjectBuilder to which the field belongs Parameters: collector - The DataTypeCollector of the bulider. Parameters: fieldName - the name of the field (used in log messages) Parameters: field - The 'field' element of the builder xml Parameters: type - The database type of the field Parameters: listItemType - If the database type is a List, there is also a type of its element Parameters: forceInstance - If true, it will never return null , but will return (a clone) of the DataType associated with the database type. since: MMBase-1.8 |
equals | public boolean equals(Object o)(Code) | | since: MMBase-1.7 |
getClassName | public String getClassName()(Code) | | Get the class name to use for instantiating this builder.
Note that it is possible to specify a short-hand format in
the builder configuration file.
If only the classname (withoput package name) is given, the classname
is expanded to fall into the org.mmbase.module.builders package.
the classname to use. |
getDataTypes | public Map<String, BasicDataType<?>> getDataTypes(DataTypeCollector collector)(Code) | | Get the datatypes defined for this builder.
Parameters: collector - A DataTypeCollector to which the newly found DataTypes will be added. Returns the data-types of the given collector after adding the ones which are configured since: MMBase-1.8 |
getDescriptions | public Hashtable<String, String> getDescriptions()(Code) | | Get the descriptions of this builder
the descriptions in a Map, accessible by language |
getExtends | public String getExtends()(Code) | | Get the name of the builder that this builder extends
since: MMBase-1.8 the name of the parent builder |
getFields | public List<CoreField> getFields()(Code) | | Get the field definitions of this builder.
If applicable, this includes the fields inherited from a parent builder.
a List of all Fields as CoreField since: MMBase-1.8 |
getFields | public List<CoreField> getFields(MMObjectBuilder builder, DataTypeCollector collector)(Code) | | Get the field definitions of this builder.
If applicable, this includes the fields inherited from a parent builder.
Parameters: builder - the MMObjectBuilder to which the fields will be added Parameters: collector - the datatype collector used to access the datatypes available for the fields to read. a List of all Fields as CoreField since: MMBase-1.8 |
getIndices | public List<Index> getIndices(MMObjectBuilder builder)(Code) | | Get the named indices of this builder.
Note that the 'default' index (set with the 'key' attribute) is also included
in this list (with the name
Index.MAIN ).
Parameters: builder - the MMObjectBuilder to which the fields will be added a List of all Indices |
getMaintainer | public String getMaintainer()(Code) | | Retrieve the name of the maintainer of this builder
since: MMBase-1.8 the name fo the maintainer as a String |
getParentBuilder | public MMObjectBuilder getParentBuilder()(Code) | | Get the builder that this builder extends
since: MMBase-1.6 the parent as an MMObjectBuilder, or null if not specified or unresolved |
getPluralNames | public Hashtable<String, String> getPluralNames()(Code) | | Get the plural names of this builder
the plural names in a Map, accessible by language |
getProperties | public Hashtable<String, String> getProperties()(Code) | | Get the properties of this builder
the properties in a Map (as name-value pairs) |
getSearchAge | public int getSearchAge()(Code) | | Retrieves the Search Age.
The search age may be used by editors or search forms to determine
the maximum age in days of an object to be searched (limiting the resultset
of a search)
the search age in days |
getSingularNames | public Hashtable<String, String> getSingularNames()(Code) | | Get the singular (GUI) names of this builder
the singular names in a Map, accessible by language |
getStatus | public String getStatus()(Code) | | Get the status of this builder.
Note that if inheritance cannot be resolved, this method always returns "inactive".
a String decribing the status ("active" or "inactive") |
getVersion | public int getVersion()(Code) | | Retrieve the (major) version number of this builder
since: MMBase-1.8 the version as an integer. |
isInheritanceResolved | public boolean isInheritanceResolved()(Code) | | Detremines if inheritance is resolved.
This method returns true if a call to resolveInheritance succeeded.
it returns false if resolveInheritance failed (returned false or threw an exception)
since: MMBase-1.6 true if inheritance could be resolved See Also: BuilderReader.resolveInheritance() |
registerPublicIDs | public static void registerPublicIDs()(Code) | | Register the Public Ids for DTDs used by BuilderReader
This method is called by XMLEntityResolver.
|
registerSystemIDs | public static void registerSystemIDs()(Code) | | Register the namespace and XSD used by DataTypeConfigurer
This method is called by XMLEntityResolver.
|
resolveInheritance | protected boolean resolveInheritance()(Code) | | 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.
since: MMBase-1.6 true if inheritance could be resolved, false if the . See Also: BuilderReader.isInheritanceResolved() throws: RuntimeException - when the builder to extend from is not allowed as parent |
storageEquals | public boolean storageEquals(BuilderReader f)(Code) | | Whether this builderreader object is equal to another for storage purposes (so, ignoring gui and documentation fields)
since: MMBase-1.7 |
Methods inherited from org.mmbase.util.xml.DocumentReader | public static void appendChild(Element parent, Element newChild, String path)(Code)(Java Doc) public static String getAttribute(Element element, String nameSpace, String localName)(Code)(Java Doc) public List<Element> getChildElements(String path)(Code)(Java Doc) public List<Element> getChildElements(Element e)(Code)(Java Doc) public List<Element> getChildElements(String path, String tag)(Code)(Java Doc) public List<Element> getChildElements(Element e, String tag)(Code)(Java Doc) public static DocumentBuilder getDocumentBuilder()(Code)(Java Doc) public static DocumentBuilder getDocumentBuilder(boolean validating)(Code)(Java Doc) public static DocumentBuilder getDocumentBuilder(boolean validating, ErrorHandler handler, EntityResolver resolver)(Code)(Java Doc) public static DocumentBuilder getDocumentBuilder(boolean validating, boolean xsd, ErrorHandler handler, EntityResolver resolver)(Code)(Java Doc) public String getElementAttributeValue(String path, String attr)(Code)(Java Doc) public String getElementAttributeValue(Element e, String attr)(Code)(Java Doc) public Element getElementByPath(String path)(Code)(Java Doc) public Element getElementByPath(Element e, String path)(Code)(Java Doc) public String getElementName(Element e)(Code)(Java Doc) public String getElementValue(String path)(Code)(Java Doc) public String getElementValue(Element e)(Code)(Java Doc) public static String getNodeTextValue(Node n)(Code)(Java Doc) public static String getNodeTextValue(Node n, boolean trim)(Code)(Java Doc) public Element getRootElement()(Code)(Java Doc) public String getSystemId()(Code)(Java Doc) public static boolean hasAttribute(Element element, String nameSpace, String localName)(Code)(Java Doc) public static void main(String argv) throws Exception(Code)(Java Doc) public static void registerPublicIDs()(Code)(Java Doc) public static void setNodeTextValue(Node n, String value)(Code)(Java Doc) public static void setPrefix(Document d, String ns, String prefix)(Code)(Java Doc) public void setSystemId(String url)(Code)(Java Doc) public static Document toDocument(Element element)(Code)(Java Doc) final protected static boolean validate()(Code)(Java Doc) final protected static boolean validate(boolean requested)(Code)(Java Doc)
|
|
|