Class StringParser
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.expressions.parsing.StringParser
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classStringParser.EscapeStrategyprotected static classStringParser.StringOrPath
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringCLOSE_DELIMstatic java.lang.StringESCAPEstatic java.lang.StringOPEN_DELIM
 - 
Constructor SummaryConstructors Modifier Constructor Description StringParser()protectedStringParser(java.lang.Class<? extends AbstractExpression> exprType)This constructor specifies what type of expression should be created.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddPart(java.util.List<StringParser.StringOrPath> parts, StringParser.StringOrPath newPart)StringParser.EscapeStrategygetAllowsReferenceEscape()static StringParsernewQueryParser()Returns a parser that expects to parse sql queries for referencesstatic StringParsernewStandardParser_Localized()Returns a parser who creates expressions that simply toString sub-expressions, adjusting the values for the locale.static StringParsernewStandardParser_NonLocalized()Returns a parser who creates an expression that is the toString of all of the sub-expressions, but with no consideration of the locale.Expressionparse(java.lang.String expr, ExpressionParseContext binder)protected StringParser.StringOrPath[]parseQueryWithBoundPaths(java.lang.String query)protected StringParser.StringOrPath[]parseQueryWithBoundPathsEscapedCharacters(java.lang.String query)protected static StringParser.StringOrPath[]parseQueryWithBoundPathsNoEscape(java.lang.String query)protected StringParser.StringOrPath[]parseQueryWithEscapedBoundPaths(java.lang.String query)Chops up a query, returning the string segments and path segments separatelyvoidsetAllowsReferenceEscape(boolean escapeReference)If true, allows item reference syntax, such as "{blah}" to be escaped with "\", to avoid expansion.voidsetEscapeStrategy(StringParser.EscapeStrategy strategy)
 
- 
- 
- 
Field Detail- 
ESCAPEpublic static final java.lang.String ESCAPE - See Also:
- Constant Field Values
 
 - 
OPEN_DELIMpublic static final java.lang.String OPEN_DELIM - See Also:
- Constant Field Values
 
 - 
CLOSE_DELIMpublic static final java.lang.String CLOSE_DELIM - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
StringParserpublic StringParser() 
 - 
StringParserprotected StringParser(java.lang.Class<? extends AbstractExpression> exprType) This constructor specifies what type of expression should be created. Different expressions will behave differently.
 
- 
 - 
Method Detail- 
newStandardParser_Localizedpublic static StringParser newStandardParser_Localized() Returns a parser who creates expressions that simply toString sub-expressions, adjusting the values for the locale.
 - 
newStandardParser_NonLocalizedpublic static StringParser newStandardParser_NonLocalized() Returns a parser who creates an expression that is the toString of all of the sub-expressions, but with no consideration of the locale.
 - 
newQueryParserpublic static StringParser newQueryParser() Returns a parser that expects to parse sql queries for references
 - 
setAllowsReferenceEscapepublic void setAllowsReferenceEscape(boolean escapeReference) If true, allows item reference syntax, such as "{blah}" to be escaped with "\", to avoid expansion. False, usesStringParser.EscapeStrategy.NONETrue, usesStringParser.EscapeStrategy.REFERENCE
 - 
setEscapeStrategypublic void setEscapeStrategy(StringParser.EscapeStrategy strategy) 
 - 
getAllowsReferenceEscapepublic StringParser.EscapeStrategy getAllowsReferenceEscape() 
 - 
parsepublic Expression parse(java.lang.String expr, ExpressionParseContext binder) throws java.lang.Exception 
 - 
addPartprotected void addPart(java.util.List<StringParser.StringOrPath> parts, StringParser.StringOrPath newPart) 
 - 
parseQueryWithBoundPathsprotected StringParser.StringOrPath[] parseQueryWithBoundPaths(java.lang.String query) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 - 
parseQueryWithBoundPathsEscapedCharactersprotected StringParser.StringOrPath[] parseQueryWithBoundPathsEscapedCharacters(java.lang.String query) 
 - 
parseQueryWithEscapedBoundPathsprotected StringParser.StringOrPath[] parseQueryWithEscapedBoundPaths(java.lang.String query) throws java.lang.Exception Chops up a query, returning the string segments and path segments separately- Throws:
- java.lang.Exception
 
 - 
parseQueryWithBoundPathsNoEscapeprotected static StringParser.StringOrPath[] parseQueryWithBoundPathsNoEscape(java.lang.String query) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 
- 
 
-