| java.lang.Object org.xml.sax.helpers.DefaultHandler org.millstone.webadapter.Theme
Theme | public class Theme extends DefaultHandler (Code) | | This class provides an interface to the meta-information
regarding a particular webadapter theme. This entails for
instanace the inheritance tree of the various xsl-template files,
the different requirments that the theme imposes on the client browser,
etc.
The WebAdapter uses themes to convert the UIDL description into
client representation, typically HTML or XHTML.
A theme consists of set of XSL template files which are used to
perform XSL transform.
XSL files are divided into sets, which can have requirements.
A file set is included in transformation only if the given requirements
are met. Following requirements are supported:
- User-Agent HTTP header substring matching
- Markup language version
- JavaScript version
Additionally following boolean operators may be applied to above
requirements:
The requirements are introduced in XML description file. See example below.
The theme description is XML data, and it can be loaded from file or stream.
The default filename is specified by Theme.DESCRIPTIONFILE .
Example of theme description file:
<?xml version="1.0" encoding="UTF-8"?>
<theme name="normal">
<extends theme="simple"/>
<description>The normal theme for all browsers</description>
<author name="IT Mill Ltd" email="millstone@itmill.com" />
<fileset>
<require>
<supports javascript="JavaScript 1.0"/>
</require>
<file name="common/error.xsl" />
<file name="components/button.xsl" />
<file name="components/select.xsl" />
<file name="components/textfield.xsl" />
<file name="components/table.xsl" />
</fileset>
</theme>
author: IT Mill Ltd. version: 3.1.1 since: 3.0 |
Inner Class :public class Author | |
Inner Class :public interface Requirement | |
Inner Class :public interface RequirementCollection extends Requirement | |
Inner Class :public class NotRequirement implements Requirement | |
Inner Class :public class AndRequirement implements RequirementCollection | |
Inner Class :public class OrRequirement implements RequirementCollection | |
Inner Class :public class AgentRequirement implements Requirement | |
Inner Class :public class JavaScriptRequirement implements Requirement | |
Inner Class :public class MarkupLanguageRequirement implements Requirement | |
Inner Class :public class File | |
Inner Class :public class Fileset extends File | |
Constructor Summary | |
public | Theme(java.io.File descriptionFile) Creates a new instance using XML description file. | public | Theme(InputStream descriptionStream) Creates a new instance using XML description stream. |
DESCRIPTIONFILE | final public static String DESCRIPTIONFILE(Code) | | Default description file name.
|
Theme | public Theme(java.io.File descriptionFile) throws FileNotFoundException(Code) | | Creates a new instance using XML description file.
Instantiate new theme, by loading the description from given File.
Parameters: descriptionFile - Description file throws: FileNotFoundException - Thrown if the given file is not found. |
Theme | public Theme(InputStream descriptionStream)(Code) | | Creates a new instance using XML description stream.
Instantiate new theme, by loading the description from given InputSource.
Parameters: descriptionStream - XML input to parse |
getAuthor | public Author getAuthor()(Code) | | Returns the author of this theme.
Author of the theme. |
getFileNames | public List getFileNames()(Code) | | Get list of all files in this theme.
List of filenames belonging to this theme. |
getFileNames | public List getFileNames(WebBrowser terminal)(Code) | | Get list of file names matching WebBrowserType.
list of filenames in this theme supporting the given terminal. |
getName | public String getName()(Code) | | Returns the name of this theme.
Name of the theme. |
getParentThemes | public List getParentThemes()(Code) | | Returns the list of parent themes of this theme.
Returns list of all inherited themes in the inheritance order.
List of parent theme instances. |
getVersion | public String getVersion()(Code) | | Returns the version of this theme.
Version string |
Methods inherited from org.xml.sax.helpers.DefaultHandler | public void characters(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void endDocument() throws SAXException(Code)(Java Doc) public void endElement(String uri, String localName, String qName) throws SAXException(Code)(Java Doc) public void endPrefixMapping(String prefix) throws SAXException(Code)(Java Doc) public void error(SAXParseException e) throws SAXException(Code)(Java Doc) public void fatalError(SAXParseException e) throws SAXException(Code)(Java Doc) public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void notationDecl(String name, String publicId, String systemId) throws SAXException(Code)(Java Doc) public void processingInstruction(String target, String data) throws SAXException(Code)(Java Doc) public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException(Code)(Java Doc) public void setDocumentLocator(Locator locator)(Code)(Java Doc) public void skippedEntity(String name) throws SAXException(Code)(Java Doc) public void startDocument() throws SAXException(Code)(Java Doc) public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException(Code)(Java Doc) public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)(Java Doc) public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code)(Java Doc) public void warning(SAXParseException e) throws SAXException(Code)(Java Doc)
|
|
|