protected function prepareDatasourceFiles(array $datasourceFiles)
    {

        // initialize the array for the prepared datasources
        $ds = array();

        // prepare the datasources
        foreach ($datasourceFiles as $datasourceFile) {
            // explode the directoriy names from the app base path
            $contextPath = explode(DIRECTORY_SEPARATOR, ltrim(str_replace(sprintf('%s', $this->getAppBase()), '', $datasourceFile), DIRECTORY_SEPARATOR));
            // the first element IS the context name
            $contextName = reset($contextPath);
            // create the path to the web application
            $webappPath = $this->getDatasourceService()->getWebappsDir($this->getContainer()->getContainerNode(), $contextName);
            // append it to the array with the prepared datasources
            $ds[] = array($datasourceFile, $webappPath, $contextName);
        }

        // return the array with the prepared datasources
        return $ds;
    }