|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.parse.SpecificationParser
public class SpecificationParser
Used to parse an application or component specification into a
ApplicationSpecification
or IComponentSpecification
.
Version | PUBLIC ID | SYSTEM ID | Description |
---|---|---|---|
1.3 | -//Howard Lewis Ship//Tapestry Specification 1.3//EN |
http://tapestry.sf.net/dtd/Tapestry_1_3.dtd |
Version of specification introduced in release 2.2. |
3.0 | -//Howard Lewis Ship//Tapestry Specification 3.0//EN |
http://tapestry.sf.net/dtd/Tapestry_3_0.dtd |
Version of specification introduced in release 3.0.
Note: Future DTD versions will track Tapestry release numbers. |
Field Summary | |
---|---|
static String |
ASSET_NAME_PATTERN
Perl5 pattern for asset names. |
static String |
BEAN_NAME_PATTERN
Perl5 pattern for helper bean names. |
static String |
COMPONENT_ALIAS_PATTERN
Perl5 pattern for component alias. |
static String |
COMPONENT_ID_PATTERN
Perl5 pattern for component ids. |
static String |
COMPONENT_TYPE_PATTERN
Perl5 pattern for component types. |
static String |
EXTENDED_PROPERTY_NAME_PATTERN
Like modified property name, but allows periods in the name as well. |
static String |
EXTENSION_NAME_PATTERN
Per5 pattern for extension names. |
static String |
LIBRARY_ID_PATTERN
Perl5 pattern for library ids. |
static String |
PAGE_NAME_PATTERN
Perl5 pattern for page names. |
static String |
PARAMETER_NAME_PATTERN
Perl5 pattern that parameter names must conform to. |
static String |
PROPERTY_NAME_PATTERN
Perl5 pattern that property names (that can be connected to parameters) must conform to. |
static String |
SERVICE_NAME_PATTERN
Perl5 pattern for service names. |
static String |
TAPESTRY_DTD_1_3_PUBLIC_ID
|
static String |
TAPESTRY_DTD_3_0_PUBLIC_ID
|
Constructor Summary | |
---|---|
SpecificationParser(IResourceResolver resolver)
|
Method Summary | |
---|---|
protected void |
configureCommon(SpecificationDigester digester,
String rootElementName)
Configure the common elements shared by both <page-specification> and <component-specification>. |
protected void |
configureLibraryCommon(SpecificationDigester digester,
String rootElementName)
Configures a digester to parse the common elements of a <application> or <library-specification>. |
protected SpecificationDigester |
constructApplicationDigester()
Constructs a digester configued to parse application specifications. |
protected SpecificationDigester |
constructBaseDigester(String rootElement)
Constructs a digester, registerring the known DTDs and the global rules (for <property> and <description>). |
protected SpecificationDigester |
constructComponentDigester()
Returns a digester configured to parse component specifications. |
protected SpecificationDigester |
constructLibraryDigester()
Constructs a digester configured to parse library specifications. |
protected SpecificationDigester |
constructPageDigester()
Returns a digester configured to parse page specifications. |
SpecFactory |
getFactory()
Returns the current SpecFactory which instantiates Tapestry spec objects. |
protected Object |
parse(SpecificationDigester digester,
IResourceLocation location)
Parses a resource using a particular digester. |
IApplicationSpecification |
parseApplicationSpecification(IResourceLocation resourceLocation)
Parses an resource containing an application specification and assembles an ApplicationSpecification from it. |
IComponentSpecification |
parseComponentSpecification(IResourceLocation resourceLocation)
Parses an input stream containing a page or component specification and assembles an IComponentSpecification from it. |
ILibrarySpecification |
parseLibrarySpecification(IResourceLocation resourceLocation)
Parses an input stream containing a library specification and assembles a LibrarySpecification from it. |
IComponentSpecification |
parsePageSpecification(IResourceLocation resourceLocation)
Parses an input stream containing a page specification and assembles an IComponentSpecification from it. |
void |
setFactory(SpecFactory factory)
Sets the SpecFactory which instantiates Tapestry spec objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TAPESTRY_DTD_1_3_PUBLIC_ID
public static final String TAPESTRY_DTD_3_0_PUBLIC_ID
public static final String EXTENDED_PROPERTY_NAME_PATTERN
public static final String PARAMETER_NAME_PATTERN
public static final String PROPERTY_NAME_PATTERN
public static final String PAGE_NAME_PATTERN
public static final String COMPONENT_ALIAS_PATTERN
public static final String BEAN_NAME_PATTERN
public static final String COMPONENT_ID_PATTERN
public static final String ASSET_NAME_PATTERN
public static final String SERVICE_NAME_PATTERN
public static final String LIBRARY_ID_PATTERN
public static final String EXTENSION_NAME_PATTERN
public static final String COMPONENT_TYPE_PATTERN
Constructor Detail |
---|
public SpecificationParser(IResourceResolver resolver)
Method Detail |
---|
public IComponentSpecification parseComponentSpecification(IResourceLocation resourceLocation) throws DocumentParseException
IComponentSpecification
from it.
DocumentParseException
- if the input stream cannot be fully
parsed or contains invalid data.protected Object parse(SpecificationDigester digester, IResourceLocation location) throws DocumentParseException
DocumentParseException
public IComponentSpecification parsePageSpecification(IResourceLocation resourceLocation) throws DocumentParseException
IComponentSpecification
from it.
DocumentParseException
- if the input stream cannot be fully
parsed or contains invalid data.public IApplicationSpecification parseApplicationSpecification(IResourceLocation resourceLocation) throws DocumentParseException
ApplicationSpecification
from it.
DocumentParseException
- if the input stream cannot be fully
parsed or contains invalid data.public ILibrarySpecification parseLibrarySpecification(IResourceLocation resourceLocation) throws DocumentParseException
LibrarySpecification
from it.
DocumentParseException
- if the input stream cannot be fully
parsed or contains invalid data.public void setFactory(SpecFactory factory)
public SpecFactory getFactory()
protected SpecificationDigester constructBaseDigester(String rootElement)
protected SpecificationDigester constructApplicationDigester()
protected SpecificationDigester constructLibraryDigester()
protected void configureLibraryCommon(SpecificationDigester digester, String rootElementName)
protected SpecificationDigester constructPageDigester()
protected SpecificationDigester constructComponentDigester()
protected void configureCommon(SpecificationDigester digester, String rootElementName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |