Package com.bbn.openmap.io

Examples of com.bbn.openmap.io.FormatException


                retval.add(newobj);
            }
            cursorRow++;
            return true;
        } catch (FormatException f) {
            throw new FormatException("DcwRecordFile: parserow on table "
                    + filename + ": " + f.getMessage());
        } catch (EOFException e) {
            if (retval.size() > 0) {
                throw new FormatException("DcwRecordFile: hit EOF when list = "
                        + VPFUtil.listToString(retval));
            }
            try {
                if (inputFile.available() > 0) {
                    throw new FormatException("DcwRecordFile: hit EOF with available = "
                            + inputFile.available()
                            + " when list = "
                            + VPFUtil.listToString(retval));
                }
            } catch (IOException i) {
                throw new FormatException("IOException calling available()");
            }
            return false;
        }
    }
View Full Code Here


                offset = (recordLength * (recordNumber - 1)) + headerLength;
            }

            inputFile.seek(offset);
        } catch (IOException io) {
            throw new FormatException("SeekToRow IOException "
                    + io.getMessage() + " offset: " + offset + " " + tablename
                    + " " + filename);
        }
    }
View Full Code Here

            }
            if (seekRow > 0) {
                seekToRow(seekRow);
            }
        } catch (IOException i) {
            throw new FormatException(i.getClass() + ": " + i.getMessage());
        }
    }
View Full Code Here

        edgeLeftFaceAdapter = edges.getLeftFaceTilingAdapter();
        edgeRightEdgeAdapter = edges.getRightEdgeTilingAdapter();
        edgeLeftEdgeAdapter = edges.getLeftEdgeTilingAdapter();

        if (edges.topologyLevel() != 3) {
            throw new FormatException("AreaTable: need level 3 topology: "
                    + edges.topologyLevel());
        }

        rings = new DcwRecordFile(cov.getDataPath() + tile.getPath()
                + Constants.ringTableName + (cov.appendDot ? "." : ""));

        if ((ringStartColumn = rings.whatColumn(Constants.RNG_STARTEDGE)) == -1) {
            throw new FormatException("ring has no start edge: "
                    + rings.filename);
        }

        if ((faceIDColumn = rings.whatColumn(Constants.RNG_FACEID)) == -1) {
            throw new FormatException("ring has no face_id: " + rings.filename);
        }
    }
View Full Code Here

                    prev_node = end_node;
                } else if (end_node == prev_node) {
                    nextedgeid = left_edge;
                    prev_node = start_node;
                } else {
                    throw new FormatException(" node matching assertion failed ");
                }
            } else if (fac_id == rht_face) {
                nextedgeid = right_edge;
                prev_node = end_node;
                polySize += cfs.tcount;
                allLLPoints.add(cfs);
            } else if (fac_id == lft_face) { //reverse direction
                nextedgeid = left_edge;
                prev_node = start_node;
                polySize += cfs.tcount;
                cfs.tcount *= -1;// flag reverse
                allLLPoints.add(cfs);
            } else {
                throw new FormatException("Node Assertion failed");
            }
        } while (nextedgeid != startedgeid);
        return polySize;
    }
View Full Code Here

            //          com.bbn.openmap.util.Debug.output("VLI.init(): number
            // of entries(" + recordCount +
            //                                            ") HeaderLength(" + HeaderLength + ")");

        } catch (IOException i) {
            throw new FormatException("IOException with "
                    + inputstream.getName() + ": " + i.getMessage());
        }
    }
View Full Code Here

            throws FormatException {
        super(cov, tile, isEntityNode ? Constants.endTableName
                : Constants.cndTableName);
        this.isEntityNode = isEntityNode;
        if ((coordColumn = whatColumn(Constants.ND_COORDINATE)) == -1) {
            throw new FormatException("nodetable couldn't get "
                    + Constants.ND_COORDINATE + " column");
        }
        firstEdgeColumn = whatColumn(Constants.ND_FIRSTEDGE);
        containingFaceColumn = whatColumn(Constants.ND_CONTAININGFACE);
    }
View Full Code Here

     */
    public TextTable(CoverageTable cov, TileDirectory tile)
            throws FormatException {
        super(cov, tile, "txt");
        if ((coordColumn = whatColumn("shape_line")) == -1) {
            throw new FormatException("texttable couldn't get "
                    + "shape_line column");
        }
        if ((textColumn = whatColumn("string")) == -1) {
            throw new FormatException("texttable couldn't get "
                    + "string column");
        }
    }
View Full Code Here

                Debug.output("boundary id for frame: " + i + " is "
                        + boundaryId);
            }

            if (boundaryId > numBoundaries - 1) {
                throw new FormatException("Bad boundary id in FF index record "
                        + i);
            }

            RpfTocEntry entry = entriesAlreadyChecked[boundaryId];
View Full Code Here

            // DKS NEW: changed from 1 to 0 to agree w/ spec. -1
            // added also.
            // if (boundaryId < 0 || boundaryId > numBoundaries -
            // 1 )
            if (boundaryId > numBoundaries - 1) {
                throw new FormatException("Bad boundary id in FF index record "
                        + i);
            }

            frameRow = (int) binFile.readShort();
            frameCol = (int) binFile.readShort();

            // DKS. switched from horizFrames to vertFrames
            // DKS NEW: CHANGED FROM 1 to 0 to agree w/spec. ALSO
            // COL below
            // if (frameRow < 1 || frameRow > entry->vertFrames)
            if (frameRow > entry.vertFrames - 1) {
                throw new FormatException("Bad row number: " + frameRow
                        + ", in FF index record " + i
                        + ", Min row num=0;  Max. row num:"
                        + (entry.horizFrames - 1));
            }

            // DKS. switched from vertFrames to horizFrames
            if (frameCol > entry.horizFrames - 1) {
                throw new FormatException(" Bad col number in FF index record "
                        + i);
            }

            // DKS NEW: -1 removed on frameRow, col
            // JRB
View Full Code Here

TOP

Related Classes of com.bbn.openmap.io.FormatException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.