|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codeforamerica.open311.internals.parsing.AbstractParser
public abstract class AbstractParser
Contains common methods of the different DataParser
implementations.
Field Summary |
---|
Constructor Summary | |
---|---|
AbstractParser()
|
Method Summary | |
---|---|
protected boolean |
allStringsAreEmpty(String... strings)
Check if all the given strings are empty. |
protected URL |
buildUrl(String url)
Tries to build a URL. |
protected void |
checkParameters(String... strings)
Checks if any parameter is valid. |
protected String[] |
getKeywords(String rawKeywords)
Parses a comma separated list of keywords. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.codeforamerica.open311.internals.parsing.DataParser |
---|
parseGeoReportV2Errors, parsePostServiceRequestResponse, parseServiceDefinition, parseServiceDiscovery, parseServiceList, parseServiceRequestIdFromAToken, parseServiceRequests |
Constructor Detail |
---|
public AbstractParser()
Method Detail |
---|
protected String[] getKeywords(String rawKeywords)
rawKeywords
- A comma separated list of keywords.
protected URL buildUrl(String url)
url
- Raw url.
null
if it was any problem.protected boolean allStringsAreEmpty(String... strings)
strings
- List of strings.
true
is all are empty.protected void checkParameters(String... strings) throws DataParsingException
strings
- List of parameters.
DataParsingException
- If all parameters are missing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |