Created
June 29, 2014 03:40
-
-
Save veb/d34a2a9b520d701c5683 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void doPost() { | |
Pattern tagMatcher = Pattern.compile("[#]+[A-Za-z0-9-_]+\\b"); | |
Matcher m = tagMatcher.matcher(sourcetext); | |
List<String> tokens = new ArrayList<String>(); | |
while(m.find()) { | |
String token = m.group(); | |
tokens.add(token); | |
} | |
JournalEntry journalEntry = new JournalEntry(); | |
journalEntry.setMood(statusPager.getCurrentItem()); | |
journalEntry.setContent(statusText.getText().toString()); | |
journalEntry.setIntensity(statusSeekBar.getProgress()); | |
journalEntry.setArchived(false); | |
journalEntry.save(); | |
finish(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment