Examples of VPFColumn


Examples of org.geotools.data.vpf.VPFColumn

    public VPFFile(String cPathName) throws IOException, SchemaException {
        pathName = cPathName;
        inputStream = new RandomAccessFile(cPathName, ACCESS_MODE);
        readHeader();

        VPFColumn column = null;
        String geometryName = null;
       
        Iterator<VPFColumn> iter = columns.iterator();
        while (iter.hasNext()) {
            column = (VPFColumn) iter.next();

            if (column.isGeometry()) {
                geometryName = column.getName();
                break;
            }
        }

        SimpleFeatureType superType = null;
View Full Code Here

Examples of org.geotools.data.vpf.VPFColumn

        Iterator<VPFColumn> iter = columns.iterator();

       
        while (iter.hasNext()) {
            VPFColumn column = (VPFColumn) iter.next();
            int length = FeatureTypes.getFieldLength(column.getDescriptor());
            if ( length > -1 ) {
                size += length;   
            }
        }
View Full Code Here

Examples of org.geotools.data.vpf.VPFColumn

        String indexFile = readString(new String() + VPF_ELEMENT_SEPARATOR
                + VPF_FIELD_SEPARATOR);
        String narrTable = readString(new String() + VPF_ELEMENT_SEPARATOR
                + VPF_FIELD_SEPARATOR);

        return new VPFColumn(name, type, elements, key, colDesc, descTableName,
            indexFile, narrTable);
    }
View Full Code Here

Examples of org.geotools.data.vpf.VPFColumn

     *         illegal
     */
    public SimpleFeature readFeature() throws IOException, IllegalAttributeException {
        SimpleFeature result = null;
        //Iterator<VPFColumn> iter = columns.iterator();
        VPFColumn column;
        boolean textPrimitive = pathName.endsWith(TEXT_PRIMITIVE);
        int size = columns.size();
        if (textPrimitive) size++;
        Object[] values = new Object[size];
       
        try {
            for (int inx = 0; inx < columns.size(); inx++) {
                column = (VPFColumn) columns.get(inx);
                AttributeDescriptor descriptor = column.getDescriptor();
               
                if ( descriptor.getType().getRestrictions().isEmpty() ||
                        descriptor.getType().getRestrictions().contains( org.opengis.filter.Filter.INCLUDE )) {
                    values[inx] = readVariableSizeData(column.getTypeChar());
                }
                else {
                    values[inx] = readFixedSizeData(column.getTypeChar(),
                            column.getElementsNumber());
                }
            }
            if (textPrimitive) {
                values[size-1] = "nam";
            }
View Full Code Here

Examples of org.geotools.data.vpf.VPFColumn

        }

        description = readString(new String() + VPF_RECORD_SEPARATOR);
        narrativeTable = readString(new String() + VPF_RECORD_SEPARATOR);

        VPFColumn column = readColumn();

        while (column != null) {
            columns.add(column);
            ctrl = readChar();
View Full Code Here

Examples of org.geotools.data.vpf.VPFColumn

            }
        }
        return null; // not found
    }
    public AttributeDescriptor getDescriptor(String name ){
        VPFColumn col = getColumn(name);
        return col == null ? null : col.getDescriptor();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.