private static MysqlGeometry util(WKTNode wktRoot, String type) {
protected static MysqlGeometry util(WKTNode wktRoot, String type) {
    private static MysqlGeometry util(WKTNode wktRoot, String type) {        if (type.equals(MysqlGeometry.POINTTYPE)) {            return createPoint(wktRoot.getChildByNumber(0).getGeoWKT());        } else if (type.equals(MysqlGeometry.LINESTRINGTYPE)) {            return createLine(wktRoot.getChildByNumber(0).getGeoWKT());        } else if (type.equals(MysqlGeometry.POLYGONTTYPE)) {            return createPolygon(wktRoot);        } else if (type.equals(MysqlGeometry.GEOMETRYCOLLECTIONTYPE)) {            MysqlCollection g = new MysqlCollection();            WKTNode n = wktRoot.getChildByNumber(0);            String elementTypes = n.getGeoWKT();            Vector typeVector = parseStringByToken(elementTypes, ',');            if (typeVector.size() == n.countChildren()) {                for (int i = 0; i < typeVector.size(); i++) {                    WKTNode newRoot = new WKTNode();                    newRoot.setRoot(true);                    newRoot.adChild(n.getChildByNumber(i));                    MysqlGeometry newGeometry = util(newRoot,                            (String) typeVector.elementAt(i));                    g.addElement(newGeometry);                }            } else {                Debug.error("MysqlWKTGeometryFactory: Error in GeometryCollection");            }            return g;        } else if (type.equals(MysqlGeometry.MULTIPOINTTYPE)) {            MysqlMultiPoint g = new MysqlMultiPoint();            WKTNode n = wktRoot.getChildByNumber(0);            String pointString = n.getGeoWKT();            Vector pointVector = parseStringByToken(pointString, ',');            for (int i = 0; i < pointVector.size(); i++) {                g.addElement(createPoint((String) pointVector.elementAt(i)));            }            return g;        } else if (type.equals(MysqlGeometry.MULTILINESTRINGTYPE)) {            MysqlMultiLineString g = new MysqlMultiLineString();            WKTNode n = wktRoot.getChildByNumber(0);            for (int i = 0; i < n.countChildren(); i++) {                String lineString = n.getChildByNumber(i).getGeoWKT();                g.addElement(createLine(lineString));            }            return g;        } else if (type.equals(MysqlGeometry.MULTIPOLYGONTYPE)) {            MysqlMultiPolygon g = new MysqlMultiPolygon();            WKTNode n = wktRoot.getChildByNumber(0);            for (int i = 0; i < n.countChildren(); i++) {                WKTNode newRoot = new WKTNode();                newRoot.setRoot(true);                newRoot.adChild(n.getChildByNumber(i));                g.addElement(createPolygon(newRoot));            }            return g;        } else {            Debug.output("MysqlWKTGeometryFactory: Type " + type                    + " not implemented");            return null;        }    }