Package org.eclipse.wst.xsl.core.model
public class StylesheetModel extends org.eclipse.wst.xsl.core.model.XSLModelObjectThe composed stylesheet, consisting of all templates and variables available via imports and includes.
The fix()
method does the actual work of populating the fields
of this, so it must be called before calling any of the other methods.
Note that this model may not be valid - for instance there may be more than one named template for a given name or more than one global variable with a given name.
Field Summary | |
package-private java.util.List | callTemplates |
package-private boolean | circularReference |
package-private java.util.Set | files |
package-private java.util.List | functions |
package-private java.util.List | globalVariables |
package-private java.util.List | importModel |
package-private java.util.List | includeModel |
package-private java.util.Set | stylesheets |
package-private java.util.List | templates |
package-private java.util.Set | templateSet |
Constructor Summary |
StylesheetModel(org.eclipse.wst.xsl.core.model.Stylesheet stylesheet) |
Method Summary | |
public java.util.List | findAllNestedTemplates() A utility method that traverses all stylesheet in the hierarchy of stylesheets (not including the current stylesheet), and adds all their templates to the returned list. Therefore the returned list has no regard for whether a template is 'visible' (i.e. whether it might be overridden since it was included via an import). The order of the templates in the list is arbitrary. |
public java.util.List | findMatching(org.eclipse.wst.xsl.core.model.Template toMatch) Get all templates that match the given template (determined from Template.equals() ). |
public void | fix() Perform the process of traversing the hierarchy to determine all of the properties of this. Note that this method may force other StylesheetModel 's to be built during the process of fixing. |
public java.util.List | getCallTemplates() |
public java.util.Set | getFileDependencies() Get all files that are included in this stylesheet anywhere in the hierarchy via either import or include. |
public java.util.List | getFunctionByName(java.lang.String name) Get all functions that are included in this stylesheet anywhere in the hierarchy via either import or include which have the given name. |
public java.util.List | getFunctions() Get a List of all functions that are known. |
public java.util.List | getGlobalVariables() Get all global variables that are included in this stylesheet anywhere in the hierarchy via either import or include. |
public java.util.List | getIncludes() Get all stylesheets that are included in this stylesheet anywhere in the hierarchy via either import or include. |
public org.eclipse.wst.xsl.core.model.XSLModelObject.Type | getModelType() |
public org.eclipse.wst.xsl.core.model.Stylesheet | getStylesheet() Get the stylesheet that this is the model for. |
public java.util.List | getTemplates() Get all templates that are included in this stylesheet anywhere in the hierarchy via either import or include. |
public java.util.List | getTemplatesByName(java.lang.String name) Get all named templates that are included in this stylesheet anywhere in the hierarchy via either import or include which have the given name. |
public boolean | hasCircularReference() Get whether this has a circular reference anywhere in its import/included hierarchy. |
Field Detail |
package-private java.util.List callTemplates
package-private boolean circularReference
package-private java.util.Set files
package-private java.util.List functions
package-private java.util.List globalVariables
package-private java.util.List importModel
package-private java.util.List includeModel
package-private java.util.Set stylesheets
package-private java.util.List templates
package-private java.util.Set templateSet
Constructor Detail |
public StylesheetModel(org.eclipse.wst.xsl.core.model.Stylesheet stylesheet)
Create a new instance of this.
Methods Detail |
public java.util.List findAllNestedTemplates()
A utility method that traverses all stylesheet in the hierarchy of stylesheets (not including the current stylesheet), and adds all their templates to the returned list. Therefore the returned list has no regard for whether a template is 'visible' (i.e. whether it might be overridden since it was included via an import). The order of the templates in the list is arbitrary.
java.util.List
- an unordered list of all templates from all stylesheets.
public java.util.List findMatching(org.eclipse.wst.xsl.core.model.Template toMatch)
Get all templates that match the given template (determined from
Template.equals()
).
toMatch
- the template to match
java.util.List
- the set of templates that match
public void fix()
Perform the process of traversing the hierarchy to determine all of the
properties of this. Note that this method may force other
StylesheetModel
's to be built during the process of fixing.
public java.util.List getCallTemplates()
java.util.List
public java.util.Set getFileDependencies()
Get all files that are included in this stylesheet anywhere in the hierarchy via either import or include.
java.util.Set
- the set of files in the entire hierarchy
public java.util.List getFunctionByName(java.lang.String name)
Get all functions that are included in this stylesheet anywhere in the hierarchy via either import or include which have the given name.
name
- the template name
java.util.List
- the set of named templates with the given name
public java.util.List getFunctions()
Get a List of all functions that are known.
java.util.List
public java.util.List getGlobalVariables()
Get all global variables that are included in this stylesheet anywhere in the hierarchy via either import or include.
java.util.List
- the set of files in the entire hierarchy
public java.util.List getIncludes()
Get all stylesheets that are included in this stylesheet anywhere in the hierarchy via either import or include.
java.util.List
- the set of stylesheets in the entire hierarchy
public org.eclipse.wst.xsl.core.model.XSLModelObject.Type getModelType()
org.eclipse.wst.xsl.core.model.XSLModelObject.Type
public org.eclipse.wst.xsl.core.model.Stylesheet getStylesheet()
Get the stylesheet that this is the model for.
org.eclipse.wst.xsl.core.model.Stylesheet
- the stylesheet that this is the model for
public java.util.List getTemplates()
Get all templates that are included in this stylesheet anywhere in the hierarchy via either import or include.
java.util.List
- the set of templates in the entire hierarchy
public java.util.List getTemplatesByName(java.lang.String name)
Get all named templates that are included in this stylesheet anywhere in the hierarchy via either import or include which have the given name.
name
- the template name
java.util.List
- the set of named templates with the given name
public boolean hasCircularReference()
Get whether this has a circular reference anywhere in its import/included hierarchy.
boolean
- true
if this has a circular reference