Examples of GeoMap


Examples of it.eng.spagobi.mapcatalogue.bo.GeoMap

private void newDetailMap(SourceBean response) throws EMFUserError {
 
  try {
   
    GeoMap map = null;
    this.modalita = SpagoBIConstants.DETAIL_INS;
    response.setAttribute("modality", modalita);
    map = new GeoMap();
    map.setMapId(-1);
    map.setDescr("");
    map.setName("");
    map.setFormat("");
    map.setBinId(-1);
    response.setAttribute("mapObj", map);
  } catch (Exception ex) {
    TracerSingleton.log(SpagoBIConstants.NAME_MODULE, TracerSingleton.MAJOR, "Cannot prepare page for the insertion" + ex.getLocalizedMessage());   
    throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
  }
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.bo.GeoMap

 
}


private GeoMap recoverMapDetails (SourceBean serviceRequest) throws EMFUserError, SourceBeanException, IOException  {
  GeoMap map  = new GeoMap();
 
  String idStr = (String)serviceRequest.getAttribute("ID");
  Integer id = new Integer(idStr);
  String description = (String)serviceRequest.getAttribute("DESCR")
  String name = (String)serviceRequest.getAttribute("NAME");
  String format = (String)serviceRequest.getAttribute("FORMAT");
  Integer binId = new Integer((String)serviceRequest.getAttribute("BIN_ID"));
 
  map.setMapId(id.intValue());
  map.setName(name);
  map.setDescr(description);
  map.setFormat(format);
  map.setBinId(binId);
 
  //gets the file eventually uploaded and sets the content variable
  FileItem uploaded = (FileItem) serviceRequest.getAttribute("UPLOADED_FILE");
    String fileName = null;
    if(uploaded!=null) {
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.bo.GeoMap

      super.checkUserPermissionForFunctionality(SpagoBIConstants.MAPCATALOGUE_MANAGEMENT, "User cannot see map catalogue congifuration.");
      if (mapId == null) {
        logger.warn("map identifier in input is null!");
        return null;
      }
      GeoMap geoMap = DAOFactory.getSbiGeoMapsDAO().loadMapByID(mapId);
      if (geoMap == null) {
        logger.warn("Geo Map with identifier [" + mapId + "] not existing.");
        return null;
      }
      toReturn = new SDKObjectsConverter().fromSbiGeoMapToSDKMap(geoMap.toSpagoBiGeoMaps());
    } catch(NotAllowedOperationException e) {
      throw e;
    } catch(Exception e) {
      logger.error("Error while retrieving SDKFeature list", e);
      logger.debug("Returning null");
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.bo.GeoMap

    try {
      super.checkUserPermissionForFunctionality(SpagoBIConstants.MAPCATALOGUE_MANAGEMENT, "User cannot see map catalogues congifuration.");
      List mapList = DAOFactory.getSbiGeoMapsDAO().loadAllMaps();
      toReturn = new SDKMap[mapList.size()];
      for (int i = 0; i < mapList.size(); i++) {
        GeoMap geoMap = (GeoMap) mapList.get(i);
        SDKMap sdkMap = new SDKObjectsConverter().fromSbiGeoMapToSDKMap(geoMap.toSpagoBiGeoMaps());
        toReturn[i] = sdkMap;
      }
    } catch(NotAllowedOperationException e) {
      throw e;
    } catch(Exception e) {
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.bo.GeoMap

    String id = (String) request.getAttribute("ID");
        GeoFeature feature = DAOFactory.getSbiGeoFeaturesDAO().loadFeatureByID(new Integer(id));
        List lstMapFeature =DAOFactory.getSbiGeoMapFeaturesDAO().loadMapsByFeatureId(new Integer(id));
        //deletes relations between feature and maps
        for (int i=0; i < lstMapFeature.size(); i++){
          GeoMap map = (GeoMap)lstMapFeature.get(i);
          GeoMapFeature mapFeature = DAOFactory.getSbiGeoMapFeaturesDAO().loadMapFeatures(new Integer(map.getMapId()), new Integer(id));
          DAOFactory.getSbiGeoMapFeaturesDAO().eraseMapFeatures(mapFeature);
        }
        //deletes the feature
        DAOFactory.getSbiGeoFeaturesDAO().eraseFeature(feature);
  }   catch (EMFUserError e){
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.bo.GeoMap

        logger.debug("IN");
        logger.debug("mapName = " +mapName);
        Content content = new Content();
        try {
            validateTicket(token,user);
            GeoMap tmpMap =  DAOFactory.getSbiGeoMapsDAO().loadMapByName(mapName);
            if (tmpMap == null) {
              logger.info("Map with name " + mapName + " not found on db.");
              return null;
            }
            byte[] template = DAOFactory.getBinContentDAO().getBinContent(tmpMap.getBinId());
  
            if (template == null)
            {
              logger.info("Template map is empty. Try uploadyng the svg.");
              return null;
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.bo.GeoMap

  logger.debug("IN");
  String toReturn = null;
  try {
      ISbiGeoMapFeaturesDAO mapFeaturesDAO = DAOFactory.getSbiGeoMapFeaturesDAO();
      ISbiGeoMapsDAO mapDAO = DAOFactory.getSbiGeoMapsDAO();
      GeoMap tmpMap = mapDAO.loadMapByName(mapName);
      if (tmpMap == null)
    return null;
      List lstFeatures = mapFeaturesDAO.loadFeatureNamesByMapId(new Integer(tmpMap.getMapId()));
      if (lstFeatures != null) {
    for (int i = 0; i < lstFeatures.size(); i++) {
        toReturn = ((toReturn == null) ? "" : toReturn) + (String) lstFeatures.get(i)
          + ((i == lstFeatures.size() - 1) ? "" : ",");
    }
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.bo.GeoMap

    private String getMapUrl(String mapName) {
   logger.debug("IN");
  String toReturn = null;
  try {
      ISbiGeoMapsDAO mapDAO = DAOFactory.getSbiGeoMapsDAO();
      GeoMap tmpMap = mapDAO.loadMapByName(mapName);
      if (tmpMap == null)
    return null;
      toReturn = ((tmpMap.getUrl()== null)?"":tmpMap.getUrl()).replace('\\', '/');
      logger.debug("MapUrl:"+toReturn);
      return toReturn;
  } catch (Exception e) {
      logger.error("Error",e);
      return null;
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.bo.GeoMap

      Transaction tx = session.beginTransaction();
      ISbiGeoMapsDAO mapsDAO = DAOFactory.getSbiGeoMapsDAO();
      List allMaps = mapsDAO.loadAllMaps();
      Iterator mapsIt = allMaps.iterator();
      while (mapsIt.hasNext()) {
        GeoMap map = (GeoMap) mapsIt.next();
        SbiGeoMaps hibMap = new SbiGeoMaps(map.getMapId());
        hibMap.setDescr(map.getDescr());
        hibMap.setFormat(map.getFormat());
        hibMap.setName(map.getName());
        hibMap.setUrl(map.getUrl());

        if (map.getBinId() == 0) {
          logger.warn("Map with id = " + map.getMapId() + " and name = " + map.getName() +
          " has not binary content!!");
          hibMap.setBinContents(null);
        } else {
          SbiBinContents hibBinContent = new SbiBinContents();
          hibBinContent.setId(map.getBinId());
          byte[] content = DAOFactory.getBinContentDAO().getBinContent(map.getBinId());
          hibBinContent.setContent(content);
          hibMap.setBinContents(hibBinContent);

          session.save(hibBinContent);
        }
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.bo.GeoMap

      ISbiGeoMapsDAO mapsDAO = DAOFactory.getSbiGeoMapsDAO();
      List allMaps = mapsDAO.loadAllMaps();
      ISbiGeoMapFeaturesDAO mapFeaturesDAO = DAOFactory.getSbiGeoMapFeaturesDAO();
      Iterator mapsIt = allMaps.iterator();
      while (mapsIt.hasNext()) {
        GeoMap map = (GeoMap) mapsIt.next();
        List mapFeatures = mapFeaturesDAO.loadFeaturesByMapId(new Integer(map.getMapId()));
        Iterator mapFeaturesIt = mapFeatures.iterator();
        while (mapFeaturesIt.hasNext()) {
          GeoFeature feature = (GeoFeature) mapFeaturesIt.next();
          GeoMapFeature mapFeature = mapFeaturesDAO.loadMapFeatures(new Integer(map.getMapId()), new Integer(feature.getFeatureId()));
          SbiGeoMapFeatures hibMapFeature = new SbiGeoMapFeatures()
          SbiGeoMapFeaturesId hibMapFeatureId = new SbiGeoMapFeaturesId();     
          hibMapFeatureId.setMapId(mapFeature.getMapId());
          hibMapFeatureId.setFeatureId(mapFeature.getFeatureId());
          hibMapFeature.setId(hibMapFeatureId);
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.