Package org.opengis.feature

Examples of org.opengis.feature.IllegalAttributeException


      newFeature.setAttribute(geoAttName, adaptedGeometry);

      return newFeature;

    } catch (IllegalAttributeException e) {
      throw new IllegalAttributeException(null, null, e.getMessage());
    }
  }
View Full Code Here


    @Override
    public void setAttribute(String name, Object value) {
        final Integer revTypeIndex = nameToRevTypeIndex.get(name);
        if (revTypeIndex == null) {
            throw new IllegalAttributeException(null, "Unknown attribute " + name);
        }
        setAttribute(revTypeIndex.intValue(), value);
    }
View Full Code Here

            att = s.readObject();
        } else if (m == FEATURE) {
            SimpleFeature f = unmarshall(s);
            att = f;
        } else { // this should never happen
            throw new IllegalAttributeException(null, null, "Found complex attribute which is not legal for SimpleFeature.");
        }

        return att;
    }
View Full Code Here

        //
        // I have lost hope and am returning the orgional reference
        // Please extend this to support additional classes.
        //
        // And good luck getting Cloneable to work
        throw new IllegalAttributeException(null, "Do not know how to deep copy " + type.getName());
    }
View Full Code Here

                } else {
                    throw new IllegalArgumentException("Argument is not a geometry: " + value);
                }
            }
            if (object instanceof FeatureType) {
                throw new IllegalAttributeException(null, "feature type is immutable");
            }
        }
View Full Code Here

        public void set(Object object, String xpath, Object value, Class target)
                throws IllegalAttributeException {

            if (object instanceof FeatureType) {
                throw new IllegalAttributeException(null, "feature type is immutable");
            }

            JXPathContext context = JXPathContext.newContext(object);
            Enumeration declaredPrefixes = namespaces.getDeclaredPrefixes();
            while (declaredPrefixes.hasMoreElements()) {
View Full Code Here

                    Geometry geometry = (Geometry) value;
                    copy = geometry.clone();
                }
                builder.set(property.getName(), copy);
            } catch (Exception e) {
                throw new IllegalAttributeException(
                        (AttributeDescriptor) property.getDescriptor(), value, e );
            }
        }
        return builder.buildFeature(original.getID());
    }
View Full Code Here

TOP

Related Classes of org.opengis.feature.IllegalAttributeException

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.