|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.targeting.Target
public class Target
Represents an individial target.
Constructor Summary | |
---|---|
Target(java.lang.String matchPattern,
java.lang.String matchThat,
java.lang.String matchTopic,
java.lang.String matchTemplate,
java.lang.String inputText,
java.lang.String inputThat,
java.lang.String inputTopic,
java.lang.String reply)
Creates a new Target object. |
Method Summary | |
---|---|
void |
extend()
Generates extension patterns for all inputs. |
static int |
generateHashCode(java.lang.String matchPattern,
java.lang.String matchThat,
java.lang.String matchTopic)
Returns a hash code that would be generated for a target with the given parameters. |
int |
getActivations()
Returns the activations count. |
java.util.LinkedList |
getExtensionPatterns()
Returns the extension pattern s. |
StringTripleMatrix |
getExtensions()
Returns the extensions. |
java.util.LinkedList |
getExtensionThats()
Returns the extension that s. |
java.util.LinkedList |
getExtensionTopics()
Returns the extension topic s. |
java.lang.String |
getFirstExtensionPattern()
Returns the first extension pattern . |
java.lang.String |
getFirstExtensionThat()
Returns the first extension that . |
java.lang.String |
getFirstExtensionTopic()
Returns the first extension topic . |
java.lang.String |
getFirstInputText()
Returns the first input text. |
java.lang.String |
getFirstInputThat()
Returns the first input that . |
java.lang.String |
getFirstInputTopic()
Returns the first input topic . |
java.lang.String |
getFirstReply()
Returns the first reply . |
StringTripleMatrix |
getInputs()
Returns the inputs. |
java.util.LinkedList |
getInputTexts()
Returns the input texts. |
java.util.LinkedList |
getInputThats()
Returns the input that s. |
java.util.LinkedList |
getInputTopics()
Returns the input topic s. |
java.lang.String |
getLastExtensionPattern()
Returns the last extension pattern . |
java.lang.String |
getLastExtensionThat()
Returns the last extension that . |
java.lang.String |
getLastExtensionTopic()
Returns the last extension topic . |
java.lang.String |
getLastInputText()
Returns the last input text. |
java.lang.String |
getLastInputThat()
Returns the last input that . |
java.lang.String |
getLastInputTopic()
Returns the last input topic . |
java.lang.String |
getLastReply()
Returns the last reply . |
java.lang.String |
getMatchPattern()
Returns the match pattern . |
java.lang.String |
getMatchTemplate()
Returns the match template . |
java.lang.String |
getMatchThat()
Returns the match that . |
java.lang.String |
getMatchTopic()
Returns the match topic . |
java.lang.String |
getNewPattern()
Returns the new pattern . |
java.lang.String |
getNewTemplate()
Returns the new template . |
java.lang.String |
getNewThat()
Returns the new that . |
java.lang.String |
getNewTopic()
Returns the new topic . |
java.lang.String |
getNthExtensionPattern(int n)
Returns the n th extension pattern. |
java.lang.String |
getNthExtensionThat(int n)
Returns the n th extension that . |
java.lang.String |
getNthExtensionTopic(int n)
Returns the n th extension topic . |
java.lang.String |
getNthInputText(int n)
Returns the n th input text. |
java.lang.String |
getNthInputThat(int n)
Returns the n th input that . |
java.lang.String |
getNthInputTopic(int n)
Returns the n th input topic . |
java.lang.String |
getNthReply(int n)
Returns the n th reply |
java.util.LinkedList |
getReplies()
Returns the reply s. |
int |
hashCode()
Returns a hash code representing the target. |
void |
merge(Target target)
Merges input and extension values from one target to this one. |
void |
setNewPattern(java.lang.String pattern)
Sets the new pattern . |
void |
setNewTemplate(java.lang.String template)
Sets the new template . |
void |
setNewThat(java.lang.String that)
Sets the new that . |
void |
setNewTopic(java.lang.String topic)
Sets the new topic . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Target(java.lang.String matchPattern, java.lang.String matchThat, java.lang.String matchTopic, java.lang.String matchTemplate, java.lang.String inputText, java.lang.String inputThat, java.lang.String inputTopic, java.lang.String reply)
matchPattern
- the pattern
part of the matched pathmatchThat
- the that
part of the matched pathmatchTopic
- the topic
part of the matched pathmatchTemplate
- the template
associated with the matched pathinputText
- the input text that was matchedinputThat
- the value of the that
predicate when the input was receivedinputTopic
- the value of the topic
predicate when the input was receivedreply
- the reply that the bot providedMethod Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public static int generateHashCode(java.lang.String matchPattern, java.lang.String matchThat, java.lang.String matchTopic)
matchPattern
- matchThat
- matchTopic
-
public void merge(Target target)
target
- the target whose inputs will be addedpublic java.lang.String getMatchPattern()
pattern
.
pattern
public java.lang.String getMatchThat()
that
.
that
public java.lang.String getMatchTopic()
topic
.
topic
public java.lang.String getMatchTemplate()
template
.
template
public StringTripleMatrix getInputs()
public java.util.LinkedList getInputTexts()
public java.util.LinkedList getInputThats()
that
s.
that
spublic java.util.LinkedList getInputTopics()
topic
s.
topic
spublic java.lang.String getFirstInputText()
public java.lang.String getFirstInputThat()
that
.
that
public java.lang.String getFirstInputTopic()
topic
.
topic
public java.lang.String getLastInputText()
public java.lang.String getLastInputThat()
that
.
that
public java.lang.String getLastInputTopic()
topic
.
topic
public java.lang.String getNthInputText(int n)
n
th input text.
n
- the index of the desired input text
n
th input textpublic java.lang.String getNthInputThat(int n)
n
th input that
.
n
- the index of the desired input that
n
th input that
public java.lang.String getNthInputTopic(int n)
n
th input topic
.
n
- the index of the desired input topic
n
th input topic
public StringTripleMatrix getExtensions()
public java.util.LinkedList getExtensionPatterns()
pattern
s.
pattern
spublic java.util.LinkedList getExtensionThats()
that
s.
that
spublic java.util.LinkedList getExtensionTopics()
topic
s.
topic
spublic java.lang.String getFirstExtensionPattern()
pattern
.
pattern
public java.lang.String getFirstExtensionThat()
that
.
that
public java.lang.String getFirstExtensionTopic()
topic
.
topic
public java.lang.String getLastExtensionPattern()
pattern
.
pattern
public java.lang.String getLastExtensionThat()
that
.
that
public java.lang.String getLastExtensionTopic()
topic
.
topic
public java.lang.String getNthExtensionPattern(int n)
n
th extension pattern.
n
- the index of the desired extension pattern
n
th extension patternpublic java.lang.String getNthExtensionThat(int n)
n
th extension that
.
n
- the index of the desired extension that
n
th extension that
public java.lang.String getNthExtensionTopic(int n)
n
th extension topic
.
n
- the index of the desired extension topic
n
th extension topic
public java.util.LinkedList getReplies()
reply
s.
reply
spublic java.lang.String getFirstReply()
reply
.
reply
public java.lang.String getLastReply()
reply
.
reply
public java.lang.String getNthReply(int n)
n
th reply
n
- the index of the desired reply
n
th replypublic java.lang.String getNewPattern()
pattern
.
pattern
public java.lang.String getNewThat()
that
.
that
public java.lang.String getNewTopic()
topic
.
topic
public java.lang.String getNewTemplate()
template
.
template
public void setNewPattern(java.lang.String pattern)
pattern
.
pattern
- the new pattern
public void setNewThat(java.lang.String that)
that
.
that
- the new that
public void setNewTopic(java.lang.String topic)
topic
.
topic
- the new topic
public void setNewTemplate(java.lang.String template)
template
.
template
- the new template
public int getActivations()
public void extend()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |