Wiki

Clone wiki

ieeg / ViewerStructure

Introduction

The IEEG source code is quite large and, as with many Java codebases, fairly sprawling. This guide focuses on the main IEEGView portion of the code.

Details

There are four main packages for the portal and its associated Web services:

  • edu.upenn.cis.db.mefview.client -- compiled to JavaScript on client side

    • WebConsole.java -- the EntryPoint to the app
    • Login.java -- shows the login dialog box, validates the user via an RPC
    • .panels.*Panel.java -- different viewers for the portal
    • .presenters.*Presenter.java -- programmatic control of the Panels
    • ClientFactory(Impl).java -- main Factory object for accessing “global” aspects of the portal
    • getAsync() -- a handle to the RPC mechanism for snapshots including time series I/O, annotations, etc.
    • getPortal() -- a handle to the RPC mechanism for portal inner workings, such as logins, creating new snapshots, etc.
    • getProjects() -- a handle to the RPC mechanism for project management
    • getSearch() -- a handle to the RPC mechanism for search services
    • getEventBus() -- the event bus, which needs handler registration (addHandler) and event firing (fireEvent)
  • events -- event notifications for the message bus

  • actions -- parameters for the event notifications (where applicable)
  • images -- these png images get precompiled into one ImageResource for speed
  • models -- objects capturing state from the DB or portal
  • presenters -- control of the viewers
  • viewers -- various panes and controls for viewing models (viewer)
  • widgets -- additional GUI widgets beyond base GWT. Some are BSD or open-licensed, others are our own code.
  • edu.upenn.cis.db.mefview.shared -- data transfer objects (DTOs) for client-server comm
  • edu.upenn.cis.db.mefview.server -- server-side Java code (servlets, Web services, …)
    • !EEGServiceImpl.java -- the main RPC handler from the portal
    • SearchServiceImpl.java -- the main RPC handler for search
    • SnapshotServiceImpl.java -- the main RPC handler for data/snapshot access

Other important classes and packages

  • ImageResource.java -- the main Web service handler for images
  • TimeSeriesResource.java -- the main Web service handler for time series
  • JobTrackerResource.java -- the main Web service handler for jobs
  • JobTracker.java -- most of the control logic for the JobTrackerResource

  • MEFPageServer.java -- the multithreaded MEF reader + cache manager

  • FilterManager.java -- the main logic for downsampling + decimating

  • AuthenticatingService.java -- an abstract class that handles Drupal user auth

  • ToolUploadServlet.java -- handles the actual upload of user tools

  • jobs subpackage -- code for state management in the job tracker

  • edu.upenn.cis.db.mefview.services -- code for the ieeg-services.jar package

Updated