|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.mff.procasor.core.helper.SemanticsHelper
Helper class for Semnatics
Field Summary | |
static int |
ABORT
Constant |
static int |
CONDITION
Constant |
static int |
GOTO
Constant |
static java.lang.String[] |
GUI_STEP_TYPES
Names of the step types that will be shown in GUI (without condition) |
static java.lang.String[] |
GUI_STEP_TYPES_ALL
Names of all step typas, that will be shown in GUI |
static int |
INCLUDE_USECASE
Constant |
static int |
INTERNAL_ACTION
Constant |
static int |
REQUEST_RECEIVED
Constant |
static int |
REQUEST_SENT
Constant |
static int |
TERMINATE_BRANCH
Constant |
static int |
TERMINATE_USECASE
Constant |
static int |
UNKNOWN
Constant |
Method Summary | |
static void |
addWord(Semantics semantics,
int index,
java.lang.String word,
java.lang.String lemma,
java.lang.String pos)
Add new word to the semantics. |
static Semantics |
createSemantics()
Create new Semantics with type UNKNOWN |
static java.lang.String |
doToken(Semantics sem,
TypeSentence ts)
This method build up the the token, from informations in the semantics. |
static java.lang.String |
eliminateWrongChars(java.lang.String in)
Replaces all wrong characters ('{', '}', '*', ...) with ' ' |
static char |
getActionsTypeCharacter(Semantics sem)
Returns the first character of token - which indicates the type of action. |
static int |
getSentenceType(Semantics s)
Gets the sentence's type. |
static Word |
getWord(Semantics semantics,
int index)
Gets word from semantics |
static boolean |
hasSubject(Semantics semantics)
Check if semantics has a subject |
static boolean |
isGeneratedActiv(TypeSentence sentence)
Chceck what type of semantics is activ |
static void |
markWord(Semantics semantics,
int index,
int role)
Set word type from position index to new role. |
static java.lang.String |
setFirstLetterToLowerCase(java.lang.String s)
Sets first letter of string to lower case |
static void |
setSentenceType(Semantics s,
int type)
Sets the sentence's type. |
static int |
wordCount(Semantics semantics)
Return count of words from semantics |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int UNKNOWN
public static final int REQUEST_RECEIVED
public static final int REQUEST_SENT
public static final int INTERNAL_ACTION
public static final int GOTO
public static final int ABORT
public static final int TERMINATE_USECASE
public static final int TERMINATE_BRANCH
public static final int INCLUDE_USECASE
public static final int CONDITION
public static final java.lang.String[] GUI_STEP_TYPES
public static final java.lang.String[] GUI_STEP_TYPES_ALL
Method Detail |
public static char getActionsTypeCharacter(Semantics sem)
sem
- Semantics
public static void setSentenceType(Semantics s, int type)
s
- the sentencetype
- type to be set. Should be a constant defined in SentenceHelper classpublic static int getSentenceType(Semantics s)
s
- the sentence
public static Semantics createSemantics()
public static void addWord(Semantics semantics, int index, java.lang.String word, java.lang.String lemma, java.lang.String pos)
semantics
- semantics word is adding toindex
- position of the word in the List of wordsword
- adding wordlemma
- parameter of wordpos
- position of lemmapublic static void markWord(Semantics semantics, int index, int role)
semantics
- semantics word is come fromindex
- position of the word in list of wordsrole
- new rolepublic static int wordCount(Semantics semantics)
semantics
- semantics words are counted from
public static Word getWord(Semantics semantics, int index)
semantics
- semantics words is getted fromindex
- position of the word
public static boolean hasSubject(Semantics semantics)
semantics
- semantics which is checked
public static java.lang.String doToken(Semantics sem, TypeSentence ts)
sem
- Semanticsts
- TypeSentence
public static java.lang.String setFirstLetterToLowerCase(java.lang.String s)
s
- string
public static java.lang.String eliminateWrongChars(java.lang.String in)
in
- string which is replaced
public static boolean isGeneratedActiv(TypeSentence sentence)
sentence
- sentence with semantics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |