public class XmlModelFactory extends AbstractWroModelFactory
| Modifier and Type | Field and Description |
|---|---|
static String |
ALIAS
The alias for this model factory used by spi provider.
|
protected static String |
ATTR_GROUP_ABSTRACT
Group abstract attribute used to distinguish an abstract group when its value is true.
|
protected static String |
ATTR_GROUP_NAME
Group name attribute.
|
protected static String |
ATTR_MINIMIZE
Minimize attribute specified on resource level, used to turn on/off minimization on this particular resource during
pre processing.
|
protected static String |
TAG_CSS
CSS tag used in xml.
|
protected static String |
TAG_GROUP
Group tag used in xml.
|
protected static String |
TAG_GROUP_REF
GroupRef tag used in xml.
|
protected static String |
TAG_IMPORT
Import tag used in xml.
|
protected static String |
TAG_JS
JS tag used in xml.
|
| Constructor and Description |
|---|
XmlModelFactory()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
WroModel |
create() |
protected Group |
createGroup(Element element)
Creates a group and all its associated resources.
|
protected Resource |
createResource(Element resourceElement)
Creates a resource from a given resourceElement.
|
protected String |
getDefaultModelFilename() |
protected ResourceType |
getResourceType(Element resourceElement) |
XmlModelFactory |
setValidateXml(boolean validateXml)
Allows disable the xml validation (which is true by default.
|
destroy, getModelResourceAsStreampublic static final String ALIAS
protected static final String TAG_GROUP
protected static final String TAG_IMPORT
protected static final String TAG_CSS
protected static final String TAG_JS
protected static final String TAG_GROUP_REF
protected static final String ATTR_GROUP_NAME
protected static final String ATTR_GROUP_ABSTRACT
protected static final String ATTR_MINIMIZE
public WroModel create()
protected Group createGroup(Element element)
element - Group element to parse.protected final ResourceType getResourceType(Element resourceElement)
ResourceType of the provided Element. If the resource type is not known (not a js or css resource), null is returned.protected Resource createResource(Element resourceElement)
resourceElement - Resource element to parse.protected String getDefaultModelFilename()
getDefaultModelFilename in class AbstractWroModelFactorypublic XmlModelFactory setValidateXml(boolean validateXml)
Copyright © 2008-2016. All Rights Reserved.