org.zkoss.zk.ui.metainfo
Class Parser

java.lang.Object
  extended by org.zkoss.zk.ui.metainfo.Parser

public class Parser
extends java.lang.Object

Used to parse the ZUL file

Author:
tomyeh

Constructor Summary
Parser(WebApp wapp, Locator locator)
          Constructor.
 
Method Summary
 Locator getLocator()
          returns locator for locating resources.
 PageDefinition parse(Document doc, java.lang.String extension)
          Parse the raw content directly from a DOM tree.
 PageDefinition parse(java.io.File file, java.lang.String path)
          Parses the specified file.
 PageDefinition parse(java.io.Reader reader, java.lang.String extension)
          Parses from the specified reader.
 PageDefinition parse(java.net.URL url, java.lang.String path)
          Parses the specified URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser(WebApp wapp,
              Locator locator)
Constructor.

Parameters:
locator - the locator used to locate taglib and other resources. If null, wapp is assumed (WebApp is also assumed).
Method Detail

parse

public PageDefinition parse(java.io.File file,
                            java.lang.String path)
                     throws java.lang.Exception
Parses the specified file.

Parameters:
path - the request path. It is used as Page.getRequestPath(), or null if not available.
Throws:
java.lang.Exception

parse

public PageDefinition parse(java.net.URL url,
                            java.lang.String path)
                     throws java.lang.Exception
Parses the specified URL.

Parameters:
path - the request path. It is used as Page.getRequestPath(), or null if not available.
Throws:
java.lang.Exception

parse

public PageDefinition parse(java.io.Reader reader,
                            java.lang.String extension)
                     throws java.lang.Exception
Parses from the specified reader.

Parameters:
extension - the default extension if doc (of reader) doesn't specify an language. Ignored if null. If extension is null and the content doesn't specify a language, the language called "xul/html" is assumed.
Throws:
java.lang.Exception

parse

public PageDefinition parse(Document doc,
                            java.lang.String extension)
                     throws java.lang.Exception
Parse the raw content directly from a DOM tree.

Parameters:
extension - the default extension if doc doesn't specify an language. Ignored if null. If extension is null and the content doesn't specify a language, the language called "xul/html" is assumed.
Throws:
java.lang.Exception

getLocator

public Locator getLocator()
returns locator for locating resources.



Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo