geotrellis/geotrellis — pull request #656 by lossyrob (2013-11-30 23:40:20+00:00)
Title: Serve the Admin site using Spray, among other things.

Reorganized the 'server' project, so that it is not Jetty-tied. So now there's a 'services' project that can be reused by different frameworks, and a 'jetty' project, which contains the Jetty-specific code, like WebRunner.

The admin site is in it's own project now, and uses spray.io and the new 'services' project.

There were a number of refactors that also happened during this, including:

- Changed how Context is used.

Context was simply functionality for operations to load layers. I moved the responsibility of owning a context away from the _run function of operations (since the large majority of ops were not using it). Now if an operation needs to load a layer it can return a LayerResult which takes a function that, given a LayerLoader (what was the Context) will give a final result.

- Got rid of junit in all the unit tests.

- Brought in the GeoTrellis object from the server project to Core. (Fixes #502)

- Renamed get -> run and run -> get. This is how it was in the GeoTrellis object, and I think it makes more sense...from a 'run' you get a 'OperationResult' (was CalculationResult), but if you simply call 'get' on the operation or data source you get the bare result (with an exception thrown if there is an error).

- Made DataSourceLike have a 'get' and 'run' that delegates to the server.run and server.get of an implicit server parameter. Also, GeoTrellis.server is an implicit val imported in the geotrellis package object. This makes it nice and easy to run DataSources. For example:

```scala
import geotrellis._

object Example {
def getRaster(name:String):Raster = RasterSource(name).get
}
```

Fixes #654
Fixes #514