/** * Returns the next R_PAREN or COMMA in the stream. * * @return the next R_PAREN or COMMA in the stream * @throws ParseException if the next token is not R_PAREN or COMMA * @throws IOException if an I/O error occurs */ private String getNextCloserOrComma() throws IOException, ParseException { String nextWord = getNextWord(); if (nextWord.equals(COMMA) || nextWord.equals(R_PAREN)) { return nextWord; } parseError(COMMA + " or " + R_PAREN); return null; }
/** * Returns the next EMPTY or L_PAREN in the stream as uppercase text. * * @return the next EMPTY or L_PAREN in the stream as uppercase text. * @throws ParseException if the next token is not EMPTY or L_PAREN * @throws IOException if an I/O error occurs */ private String getNextEmptyOrOpener() throws IOException, ParseException { String nextWord = getNextWord(); if (nextWord.equals(EMPTY) || nextWord.equals(L_PAREN)) { return nextWord; } parseError(EMPTY + " or " + L_PAREN); return null; }
/** * Returns the next R_PAREN in the stream. * * @return the next R_PAREN in the stream * @throws ParseException if the next token is not R_PAREN * @throws IOException if an I/O error occurs */ private String getNextCloser() throws IOException, ParseException { String nextWord = getNextWord(); if (nextWord.equals(R_PAREN)) { return nextWord; } parseError(R_PAREN); return null; }
nextWord = getNextWord(); if (nextWord.equals(L_PAREN)) { List<Coordinate> coords = getCoordinateList(false);
nextWord = getNextWord(); if (nextWord.equals(L_PAREN) || nextWord.equals(EMPTY)) { tokenizer.pushBack();
/** * This method will read a LineString, CircularString or CompoundCurve and return the result as * a LinearRing. * * @return LinearRing * <p>This method expects either "EMPTY", "(", "CIRCULARSTRING", or "COMPOIUNDCURVE" to * start out with. * @throws IOException * @throws ParseException */ private LinearRing readCurvedLinearRingText() throws IOException, ParseException { String nextWord = getNextWord(); if (nextWord.equals(L_PAREN)) { List<Coordinate> coords = getCoordinateList(false); return new LinearRing( new CoordinateArraySequence(coords.toArray(new Coordinate[coords.size()])), geometryFactory); } else if (nextWord.equalsIgnoreCase("CIRCULARSTRING")) { return (LinearRing) readCircularStringText(); } else if (nextWord.equalsIgnoreCase("COMPOUNDCURVE")) { return (LinearRing) readCompoundCurveText(); } else { parseError(L_PAREN + ", CIRCULARSTRING or COMPOUNDCURVE"); return null; } }
String peek = getNextWord(); innerParens = peek.equals(L_PAREN); } catch (ParseException ex) {
type = getNextWord(); } catch (IOException e) { return null;
/** * Returns the next EMPTY or L_PAREN in the stream as uppercase text. * *@return the next EMPTY or L_PAREN in the stream as uppercase text. *@throws ParseException * if the next token is not EMPTY or L_PAREN *@throws IOException * if an I/O error occurs */ private String getNextEmptyOrOpener() throws IOException, ParseException { String nextWord = getNextWord(); if (nextWord.equals(EMPTY) || nextWord.equals(L_PAREN)) { return nextWord; } parseError(EMPTY + " or " + L_PAREN); return null; }
/** * Returns the next R_PAREN or COMMA in the stream. * *@return the next R_PAREN or COMMA in the stream *@throws ParseException * if the next token is not R_PAREN or COMMA *@throws IOException * if an I/O error occurs */ private String getNextCloserOrComma() throws IOException, ParseException { String nextWord = getNextWord(); if (nextWord.equals(COMMA) || nextWord.equals(R_PAREN)) { return nextWord; } parseError(COMMA + " or " + R_PAREN); return null; }
/** * Returns the next R_PAREN in the stream. * *@return the next R_PAREN in the stream *@throws ParseException * if the next token is not R_PAREN *@throws IOException * if an I/O error occurs */ private String getNextCloser() throws IOException, ParseException { String nextWord = getNextWord(); if (nextWord.equals(R_PAREN)) { return nextWord; } parseError(R_PAREN); return null; }
nextWord = getNextWord(); if( nextWord.equals(L_PAREN) ){ List<Coordinate> coords = getCoordinateList(false);
Coordinate ring[] = null; String nextWord = getNextWord(); if( nextWord.equals(L_PAREN) ){ List<Coordinate> coords = getCoordinateList(false);
type = getNextWord(); } catch (IOException e) { return null;