Package org.geomajas.global

Examples of org.geomajas.global.GeomajasException


          result.add(image);
        }
      }
      return result;
    } catch (TransformException e) {
      throw new GeomajasException(e, ExceptionCode.RENDER_TRANSFORMATION_FAILED);
    }
  }
View Full Code Here


    // check for sld style
    if (vectorLayerRasterizingInfo.getStyle().getSldLocation() != null) {
      try {
        return createSldStyle(layer, vectorLayerRasterizingInfo);
      } catch (Exception e) {
        throw new GeomajasException(e, ExceptionCode.INVALID_SLD, vectorLayerRasterizingInfo.getStyle()
            .getSldLocation(), layer.getId());
      }
    } else {
      return createNamedStyle(layer, vectorLayerRasterizingInfo);
    }
View Full Code Here

  private SecurityContext securityContext;

  public void execute(final DeleteSearchFavouriteRequest request, final SuccessCommandResponse response)
      throws Exception {
    if (null == request.getSearchFavouriteId()) {
      throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "SearchFavouriteId");
    }

    String user = securityContext.getUserName();
    boolean anonymous = false;
    if (user == null || "".equals(user)) {
View Full Code Here

    if (attribute instanceof PrimitiveAttribute<?>) {
      return toPrimitiveObject((PrimitiveAttribute<?>) attribute);
    } else if (attribute instanceof AssociationAttribute<?>) {
      return toAssociationObject((AssociationAttribute<?>) attribute);
    } else {
      throw new GeomajasException(ExceptionCode.CONVERSION_PROBLEM, attribute);
    }
  }
View Full Code Here

        return toPrimitiveDto(object, (PrimitiveAttributeInfo) info);
      }
    } else if (info instanceof AssociationAttributeInfo) {
      return toAssociationDto(object, (AssociationAttributeInfo) info);
    } else {
      throw new GeomajasException(ExceptionCode.CONVERSION_PROBLEM, info.getName());
    }
  }
View Full Code Here

        }
        Object value;
        try {
          value = m.invoke(bean);
        } catch (Exception e) {
          throw new GeomajasException(e);
        }
        return value;
      }
    }
    return null;
View Full Code Here

      dto.setGeometries(convertGeometries(geometry));
    } else if (geometry instanceof MultiPolygon) {
      dto = new Geometry(Geometry.MULTI_POLYGON, srid, precision);
      dto.setGeometries(convertGeometries(geometry));
    } else {
      throw new GeomajasException(ExceptionCode.CANNOT_CONVERT_GEOMETRY, geometry.getClass().getName());
    }

    return dto;
  }
View Full Code Here

      jts = factory.createMultiLineString((LineString[]) convertGeometries(geometry, lineStrings));
    } else if (Geometry.MULTI_POLYGON.equals(geometryType)) {
      Polygon[] polygons = new Polygon[geometry.getGeometries().length];
      jts = factory.createMultiPolygon((Polygon[]) convertGeometries(geometry, polygons));
    } else {
      throw new GeomajasException(ExceptionCode.CANNOT_CONVERT_GEOMETRY, geometryType);
    }

    return jts;
  }
View Full Code Here

    }
    context.put(PipelineCode.STYLE_KEY, style);

    if ((featureIncludes & VectorLayerService.FEATURE_INCLUDE_STYLE) != 0) {
      if (style == null) {
        throw new GeomajasException(ExceptionCode.RENDER_FEATURE_MODEL_PROBLEM, "Style not found");
      }
      styleFilters = initStyleFilters(style.getFeatureStyles());
    }

    context.put(STYLE_FILTERS_KEY, styleFilters);
View Full Code Here

  @Autowired
  private SecurityContext securityContext;

  public void execute(final FeatureSearchRequest request, final FeatureSearchResponse response) throws Exception {
    if (request.getCriterion() == null) {
      throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "criterion");
    }
    if (null == request.getMapCrs()) {
      throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "mapCrs");
    }
    if (!request.getCriterion().isValid()) {
      throw new GeomajasException(ExceptionCode.UNEXPECTED_PROBLEM, "criterion is not valid");
    }

    String mapCrsCode = request.getMapCrs();
    Crs mapCrs = geoService.getCrs2(request.getMapCrs());
View Full Code Here

TOP

Related Classes of org.geomajas.global.GeomajasException

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.