knowing/Medmon — Issue #46: ClassificationPage: Layout and Implementation
Author: muuki88
Created: 2011-12-01 20:11:15+00:00
State: open
Labels: DataManagement, Logic, PatientManagement, UI

## Task

ClassificationPage provides the possibility to select a classification
or classification-training algorithm based on the selections made on
the preceding pages.

## Preconditions

* [required] _Patient_ selected via the _IGlobalSelectionService_
* [required] _Data_ selected via the _IGlobalSelectionService_

## Function

Provide a selection of only matching _IDataProcessingUnit_s (DPU) to the
selected _Data_ object which includes the linked _Sensor_.

### Retreive all DPUs

ServiceTracker for _IDPUDirectory_ service.

### Check matching DPUs for classifying

1. Existing _INode_s
* Loader => Capable to load sensor data. Match via _FILE_EXTENSION_ property.
* ArffSaver => Stores results
2. Existing tags in the tag field
* classification || test

### Configure DPU for execution

1. _Loader_
* remove _URL_ and _DIR_ property
* replace _FILE_ property with `IPatientService.locateFile(Data d)`
2. _Saver_
* remove _URL and _DIR_ property
* Create Map(INode.id -> `IPatientService.store(Patient p, Sensor s, String type, Date from, Date to)`
3. _Processor_
* replace _DESERIALIZE_ property with `Paths.get(IPatientService.TRAIN, deserialize.lastSegment)`
* replace _SERIALIZE_ property with `Paths.get(IPatientService.TRAIN, deserialize.lastSegment)`

### Returns

1. Configure _IDataProcessingUnit_
2. Map with _Saver_ InputStreams.

### Layout

KISS = Keep It Sample & Simple

## Additional Information

@see #37