public OMGraphicList load(){
  OMGraphicList graphicList=new OMGraphicList();
  boolean err=false;
  if (fileName != null) {
    try {
      OMGraphicList list=null;
      URL url=PropUtils.getResourceOrFileOrURL(fileName);
      if (url != null) {
        if (fileName.endsWith(".shp")) {
          list=EsriShapeExport.read(url,drawingAttributes,getCoordTransform());
          dbfFactory=new DbfTableModelFactory();
        }
 else {
          ObjectInputStream ois=new ObjectInputStream(url.openStream());
          list=(OMGraphicList)ois.readObject();
          ois.close();
        }
      }
      if (list != null) {
        graphicList.addAll(list);
        graphicList.setAttributes(list.getAttributes());
      }
    }
 catch (    FileNotFoundException e) {
      if (DTL_DEBUG) {
        e.printStackTrace();
      }
      err=true;
    }
catch (    StreamCorruptedException sce) {
      sce.printStackTrace();
      fireRequestMessage(i18n.get(DrawingToolLayer.class,"LOAD_ERROR","The file doesn't appear to be a valid map file"));
      err=true;
    }
catch (    IOException e) {
      if (DTL_DEBUG) {
        e.printStackTrace();
      }
      err=true;
    }
catch (    ClassNotFoundException e) {
      if (DTL_DEBUG) {
        e.printStackTrace();
      }
      err=true;
    }
catch (    ClassCastException cce) {
      if (DTL_DEBUG) {
        cce.printStackTrace();
      }
      err=true;
    }
  }
  if (err) {
    fileName=null;
  }
  return graphicList;
}

public OMGraphicList load ( ) { OMGraphicList graphicList = new OMGraphicList ( ) ; boolean err = false ; if ( fileName != null ) { try { OMGraphicList list = null ; URL url = PropUtils . getResourceOrFileOrURL ( fileName ) ; if ( url != null ) { if ( fileName . endsWith ( ".shp" ) ) { list = EsriShapeExport . read ( url , drawingAttributes , getCoordTransform ( ) ) ; dbfFactory = new DbfTableModelFactory ( ) ; } else { ObjectInputStream ois = new ObjectInputStream ( url . openStream ( ) ) ; list = ( OMGraphicList ) ois . readObject ( ) ; ois . close ( ) ; } } if ( list != null ) { graphicList . addAll ( list ) ; graphicList . setAttributes ( list . getAttributes ( ) ) ; } } catch ( FileNotFoundException e ) { if ( DTL_DEBUG ) { e . printStackTrace ( ) ; } err = true ; } catch ( StreamCorruptedException sce ) { sce . printStackTrace ( ) ; fireRequestMessage ( i18n . get ( DrawingToolLayer . class , "LOAD_ERROR" , "The file doesn't appear to be a valid map file" ) ) ; err = true ; } catch ( IOException e ) { if ( DTL_DEBUG ) { e . printStackTrace ( ) ; } err = true ; } catch ( ClassNotFoundException e ) { if ( DTL_DEBUG ) { e . printStackTrace ( ) ; } err = true ; } catch ( ClassCastException cce ) { if ( DTL_DEBUG ) { cce . printStackTrace ( ) ; } err = true ; } } if ( err ) { fileName = null ; } return graphicList ; }
load the data from the file set in this layer .
