Package org.geomajas.layer

Examples of org.geomajas.layer.LayerException


    this.entityMappingService = entityMappingService;

    try {
      beanClass = Class.forName(vectorLayerInfo.getFeatureInfo().getDataSourceName());
    } catch (ClassNotFoundException e) {
      throw new LayerException(ExceptionCode.FEATURE_MODEL_PROBLEM, "Feature class "
          + vectorLayerInfo.getFeatureInfo().getDataSourceName() + " was not found", e);
    }
    this.srid = srid;
    PropertyDescriptor d = BeanUtils.getPropertyDescriptor(beanClass, getGeometryAttributeName());
    Class geometryClass = d.getPropertyType();
    if (Geometry.class.isAssignableFrom(geometryClass)) {
      wkt = false;
    } else if (geometryClass == String.class) {
      wkt = true;
    } else {
      throw new LayerException(ExceptionCode.FEATURE_MODEL_PROBLEM, "Feature "
          + vectorLayerInfo.getFeatureInfo().getDataSourceName() + " has no valid geometry attribute");
    }

    FeatureInfo featureInfo = vectorLayerInfo.getFeatureInfo();
    attributeInfoMap.put(featureInfo.getIdentifier().getName(), featureInfo.getIdentifier());
View Full Code Here


  public Attribute getAttribute(Object feature, String name) throws LayerException {
    try {
      return entityMappingService.getAttribute(feature, getFeatureInfo(), entityMapper, name);
    } catch (GeomajasException e) {
      throw new LayerException(e);
    }
  }
View Full Code Here

          attribs.put(name, value);
        }
      }
      return attribs;
    } catch (Exception e) {
      throw new LayerException(e, ExceptionCode.FEATURE_MODEL_PROBLEM);
    }
  }
View Full Code Here

        WKTReader reader = new WKTReader(new GeometryFactory(new PrecisionModel(), srid));
        Geometry geom = reader.read((String) geometry);
        log.debug("bean.getGeometry {}", geom);
        return geom;
      } catch (Throwable t) {
        throw new LayerException(t, ExceptionCode.FEATURE_MODEL_PROBLEM, geometry);
      }
    }
  }
View Full Code Here

  public Object newInstance() throws LayerException {
    try {
      return beanClass.newInstance();
    } catch (Throwable t) {
      throw new LayerException(t, ExceptionCode.FEATURE_MODEL_PROBLEM);
    }
  }
View Full Code Here

    try {
      Object instance = beanClass.newInstance();
      setId(instance, id);
      return instance;
    } catch (Throwable t) {
      throw new LayerException(t, ExceptionCode.FEATURE_MODEL_PROBLEM);
    }
  }
View Full Code Here

              bean = b;
            }
          }
        }
      } catch (Exception e) {
        throw new LayerException(e, ExceptionCode.FEATURE_MODEL_PROBLEM, "Could not instantiate entity");
      }
    }
View Full Code Here

          }
          Object value;
          try {
            value = m.invoke(object);
          } catch (Throwable t) {
            throw new LayerException(t, ExceptionCode.FEATURE_MODEL_PROBLEM);
          }
          return value;
        } else {
          return null;
        }
View Full Code Here

            m.setAccessible(true);
          }
          try {
            m.invoke(object, value);
          } catch (Throwable t) {
            throw new LayerException(t, ExceptionCode.FEATURE_MODEL_PROBLEM);
          }
        }
      }
    }
View Full Code Here

            filteredList.add(feature);
          }
        }
      }
    } catch (Exception e) {
      throw new LayerException(e, ExceptionCode.FILTER_EVALUATION_PROBLEM, filter, getId());
    }
    // Sorting of elements.
    if (comparator != null) {
      Collections.sort(filteredList, comparator);
    }
View Full Code Here

TOP

Related Classes of org.geomajas.layer.LayerException

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.