public class RulesMatcher extends SemanticProcessor implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
RulesMatcher.MatchingPolicy |
SemanticProcessor.Transformer<T>, SemanticProcessor.Visitor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_MATCHING_POLICY |
java.lang.String |
language |
java.lang.String |
matchingPolicy |
java.lang.String |
resourceFile |
contexts, name, src
Constructor and Description |
---|
RulesMatcher() |
RulesMatcher(RulesMatcher o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(SemanticProcessor.Transformer<T> transformer,
T[] t) |
void |
accept(SemanticProcessor.Visitor visitor) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this RulesMatcher.
|
static RulesMatcher |
fromString(java.lang.String s)
String representation of this RulesMatcher.
|
java.lang.String |
getLanguage()
Language for which the rules matcher is activated.
|
java.lang.String |
getMatchingPolicy()
Matching policy (longest, shortest).
|
RulesMatcher.MatchingPolicy |
getMatchingPolicyAsEnum()
Matching policy (longest, shortest).
|
java.lang.String |
getResourceFile()
URL for the resource (data://, file;// or resource://)
|
static boolean |
isA(java.lang.String str,
RulesMatcher.MatchingPolicy item) |
static boolean |
isOneOf(java.lang.String str,
RulesMatcher.MatchingPolicy... items) |
RulesMatcher |
makeCopy()
Creates and returns a deep copy of this RulesMatcher.
|
static RulesMatcher |
readFrom(java.io.InputStream is)
Read this RulesMatcher from an XML fragment.
|
void |
setLanguage(java.lang.String language)
Language for which the rules matcher is activated.
|
void |
setMatchingPolicy(RulesMatcher.MatchingPolicy item)
Matching policy (longest, shortest).
|
void |
setMatchingPolicy(java.lang.String matchingPolicy)
Matching policy (longest, shortest).
|
void |
setResourceFile(java.lang.String resourceFile)
URL for the resource (data://, file;// or resource://)
|
java.lang.String |
toString()
String representation of this RulesMatcher.
|
RulesMatcher |
withContexts(java.lang.String contexts) |
RulesMatcher |
withLanguage(java.lang.String language) |
RulesMatcher |
withMatchingPolicy(java.lang.String matchingPolicy) |
RulesMatcher |
withName(java.lang.String name) |
RulesMatcher |
withResourceFile(java.lang.String resourceFile) |
RulesMatcher |
withSrc(java.lang.String src)
Deprecated.
|
void |
writeTo(java.io.OutputStream os)
Write this RulesMatcher as an XML fragment
|
getContexts, getName, getSrc, setContexts, setName, setSrc
public java.lang.String resourceFile
public java.lang.String matchingPolicy
public static final java.lang.String DEFAULT_MATCHING_POLICY
public java.lang.String language
public RulesMatcher()
public RulesMatcher(RulesMatcher o)
public static boolean isA(java.lang.String str, RulesMatcher.MatchingPolicy item)
public static boolean isOneOf(java.lang.String str, RulesMatcher.MatchingPolicy... items)
public void setMatchingPolicy(RulesMatcher.MatchingPolicy item)
public RulesMatcher.MatchingPolicy getMatchingPolicyAsEnum()
public RulesMatcher withName(java.lang.String name)
withName
in class SemanticProcessor
public RulesMatcher withContexts(java.lang.String contexts)
withContexts
in class SemanticProcessor
@Deprecated public RulesMatcher withSrc(java.lang.String src)
withSrc
in class SemanticProcessor
public void setResourceFile(java.lang.String resourceFile)
public java.lang.String getResourceFile()
public RulesMatcher withResourceFile(java.lang.String resourceFile)
public void setMatchingPolicy(java.lang.String matchingPolicy)
public java.lang.String getMatchingPolicy()
public RulesMatcher withMatchingPolicy(java.lang.String matchingPolicy)
public void setLanguage(java.lang.String language)
public java.lang.String getLanguage()
public RulesMatcher withLanguage(java.lang.String language)
public RulesMatcher makeCopy()
makeCopy
in class SemanticProcessor
public static RulesMatcher readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
writeTo
in class SemanticProcessor
javax.xml.bind.JAXBException
java.io.IOException
public static RulesMatcher fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class SemanticProcessor
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
check
in class SemanticProcessor
com.exalead.util.TypedException
public void accept(SemanticProcessor.Visitor visitor) throws com.exalead.util.TypedException
accept
in class SemanticProcessor
com.exalead.util.TypedException
public <T> T accept(SemanticProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class SemanticProcessor
com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.