public class XmlFile extends ParameterizedGraphCondition implements XmlFileDTD, XmlFileIn, XmlFileNamespace, XmlFileResult, XmlFileXpath
XmlFileModel objects and creating/returning XmlTypeReferenceModel or XmlFileModel objects on the matching nodes/whole files.| Modifier and Type | Class and Description |
|---|---|
static interface |
XmlFile.XmlFileEvaluationStrategy |
| Constructor and Description |
|---|
XmlFile() |
| Modifier and Type | Method and Description |
|---|---|
XmlFileDTD |
andDTDPublicId(String publicIdRegex)
Specify the DTD public-id regex.
|
XmlFileDTD |
andDTDSystemId(String dtdNamespace)
Specify the DTD system-id regex.
|
org.ocpsoft.rewrite.config.ConditionBuilder |
as(String variable)
Output the results using the provided variable name.
|
protected boolean |
evaluateAndPopulateValueStores(GraphRewrite event,
org.ocpsoft.rewrite.context.EvaluationContext context,
FrameCreationContext frameCreationContext) |
protected boolean |
evaluateWithValueStore(GraphRewrite event,
org.ocpsoft.rewrite.context.EvaluationContext context,
FrameContext frameContext) |
static XmlFileFrom |
from(String fromVariable)
Specify the name of the variables to base this query on.
|
org.ocpsoft.rewrite.param.RegexParameterizedPatternParser |
getInFilePattern() |
String |
getPublicId() |
Set<String> |
getRequiredParameterNames() |
protected String |
getVarname() |
XPathExpression |
getXPathExpression() |
String |
getXpathString() |
XmlFileIn |
inFile(String fileName)
Scan only files that match the given file name.
|
static XmlFileXpath |
matchesXpath(String xpath)
Create a new
XmlFile Condition. |
XmlFileNamespace |
namespace(String prefix,
String url)
Specify the namespace used in the xpath that was provided sooner.
|
XmlFileResult |
resultMatches(String regex)
Only return results that match the given regex.
|
void |
setParameterStore(org.ocpsoft.rewrite.param.ParameterStore store) |
void |
setXpath(String xpath) |
void |
setXpathResultMatch(String xpathResultMatch) |
String |
toString() |
static XmlFileDTD |
withDTDSystemId(String dtdNamespace)
Create a new
XmlFile that matches on the provided DTD namespace. |
evaluateevaluate, getInputVariablesName, getOutputVariablesName, setInputVariablesName, setOutputVariablesName, setResultsand, andNot, or, orNotpublic void setXpathResultMatch(String xpathResultMatch)
public String getXpathString()
public static XmlFileXpath matchesXpath(String xpath)
XmlFile Condition.public XmlFileDTD andDTDPublicId(String publicIdRegex)
XmlFileResultandDTDPublicId in interface XmlFileResultandDTDPublicId in interface XmlFileXpathpublicIdRegex - public-id regexpublic static XmlFileDTD withDTDSystemId(String dtdNamespace)
XmlFile that matches on the provided DTD namespace.public XmlFileDTD andDTDSystemId(String dtdNamespace)
XmlFileXpathandDTDSystemId in interface XmlFileXpathdtdNamespace - system-id regexpublic org.ocpsoft.rewrite.config.ConditionBuilder as(String variable)
as in interface XmlFileDTDas in interface XmlFileInas in interface XmlFileNamespaceas in interface XmlFileResultas in interface XmlFileXpathvariable - variable name that will be saved in stack as the output of this condition.public XmlFileIn inFile(String fileName)
inFile in interface XmlFileDTDinFile in interface XmlFileResultinFile in interface XmlFileXpathfileName - regex of file namepublic XmlFileResult resultMatches(String regex)
resultMatches in interface XmlFileXpathregex - that should the xpath result matchpublic XPathExpression getXPathExpression()
public org.ocpsoft.rewrite.param.RegexParameterizedPatternParser getInFilePattern()
public String getPublicId()
public static XmlFileFrom from(String fromVariable)
fromVariable - public void setParameterStore(org.ocpsoft.rewrite.param.ParameterStore store)
setParameterStore in interface org.ocpsoft.rewrite.param.Parameterizedpublic Set<String> getRequiredParameterNames()
getRequiredParameterNames in interface org.ocpsoft.rewrite.param.Parameterizedprotected String getVarname()
getVarname in class ParameterizedGraphConditionprotected boolean evaluateAndPopulateValueStores(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, FrameCreationContext frameCreationContext)
evaluateAndPopulateValueStores in class ParameterizedGraphConditionprotected boolean evaluateWithValueStore(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, FrameContext frameContext)
evaluateWithValueStore in class ParameterizedGraphConditionpublic XmlFileNamespace namespace(String prefix, String url)
XmlFileDTDnamespace in interface XmlFileDTDnamespace in interface XmlFileInnamespace in interface XmlFileNamespacenamespace in interface XmlFileResultnamespace in interface XmlFileXpathprefix - the namespace prefixurl - the namespace urlpublic void setXpath(String xpath)
Copyright © 2018 JBoss by Red Hat. All rights reserved.