@@ -0,0 +1,2086 @@
+/**%0A * Copyright (c) 2016, German Neuroinformatics Node (G-Node)%0A *%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted under the terms of the BSD License. See%0A * LICENSE file in the root of the Project.%0A */%0A%0Apackage org.g_node.srv;%0A%0Aimport java.util.Map;%0Aimport java.util.Set;%0Aimport org.g_node.mergers.LktJenaMerger;%0Aimport org.g_node.micro.rdf.RdfFileServiceJena;%0A%0A/**%0A * Class used as a switch between different RDF APIs.%0A *%0A * @author Michael Sonntag (sonntag@bio.lmu.de)%0A */%0Apublic final class RdfServiceSwitch %7B%0A    /**%0A     * Switch to the RDF formats supported by the currently used RDF API.%0A     */%0A    public static final Set%3CString%3E RDF_FORMAT_MAP_KEYS = RdfFileServiceJena.RDF_FORMAT_MAP.keySet();%0A%0A    /**%0A     * Switch to the RDF format file extensions supported by the currently used RDF API.%0A     */%0A    public static final Map%3CString, String%3E RDF_FORMAT_EXTENSION = RdfFileServiceJena.RDF_FORMAT_EXTENSION;%0A%0A    /**%0A     * Switch to the method that checks, if the provided file is a valid RDF file. This check is%0A     * dependent on the used RDF API.%0A     * @param uri Uri of the file that is to be checked if its a valid RDF file.%0A     * @return True if the file is a valid RDF file, false otherwise.%0A     */%0A    public static boolean isValidRdfFile(final String uri) %7B%0A        return RdfFileServiceJena.isValidRdfFile(uri);%0A    %7D%0A%0A    /**%0A     * Switch to the method merging two RDF files and saving the resulting RDF graph to an output file%0A     * as a specified RDF format.%0A     * @param mainFile RDF file.%0A     * @param mergeFile RDF file that is merged with the mainFile.%0A     * @param outputFile Path and filename of the file the merged RDF graph is saved to.%0A     * @param outputFormat RDF format of the result file.%0A     */%0A    public static void runMerger(final String mainFile, final String mergeFile,%0A                                 final String outputFile, final String outputFormat) %7B%0A        LktJenaMerger.mergeAndSave(mainFile, mergeFile, outputFile, outputFormat);%0A    %7D%0A%0A%7D%0A

Add file