sparqlGraphLibrary/src/main/java/com/ge/research/semtk/sparqlX/dispatch/DispatchServiceManager.java
public static void cacheEdcConfig(SparqlConnection servicesGraphConnection, OntologyInfoClient oInfoClient) throws Exception {
		
		try {
			AuthorizationManager.setSemtkSuper();
			
			LocalLogger.logToStdOut("DispatchServiceManager: START querying the services graph for all mnemonic infomation");
			// double-check the services graph connection.  Ontology should be in ModelInterface[0]
			if (servicesGraphConnection.getModelInterfaceCount() != 1) {
				throw new Exception("Edc services connection does not have exactly one model endpoint");
			}
			
			SparqlEndpointInterface sei = servicesGraphConnection.getModelInterface(0);
			
			// load the owl if needed, so that nodegroups will work
			InputStream owlStream = DispatchServiceManager.class.getResourceAsStream("/semantics/OwlModels/sparqlEdcServices.owl");
		
			OntologyInfo.uploadOwlModelIfNeeded(sei, owlStream);
			owlStream.close();
			
			// run the queries to build static mnemonics cache
			DispatchServiceManager.edcTypeCache = SparqlGraphJson.executeSelectToTable(
					Utility.getResourceAsJson(servicesGraphConnection, "/nodegroups/GetEdcMnemonicInfo.json"), servicesGraphConnection, oInfoClient);
			DispatchServiceManager.edcParamsCache = SparqlGraphJson.executeSelectToTable(
					Utility.getResourceAsJson(servicesGraphConnection, "/nodegroups/GetEdcMnemonicParams.json"), servicesGraphConnection, oInfoClient);
			DispatchServiceManager.edcNgRestrictionsCache = SparqlGraphJson.executeSelectToTable(
					Utility.getResourceAsJson(servicesGraphConnection, "/nodegroups/GetEdcMnemonicNgRestrictions.json"), servicesGraphConnection, oInfoClient);
			DispatchServiceManager.edcQueryConstraintsCache = SparqlGraphJson.executeSelectToTable(
					Utility.getResourceAsJson(servicesGraphConnection, "/nodegroups/GetEdcMnemonicQueryConstraints.json"), servicesGraphConnection, oInfoClient);
			
			LocalLogger.logToStdOut("DispatchServiceManager: FINISHED querying the services graph for all mnemonic infomation");
			
		} finally {
			AuthorizationManager.clearSemtkSuper();
		}
			
	}
/**
	 * Query all the edc mnemonic information.
	 * This cache will be used by all instances of DispatchServiceManager
	 * @param servicesGraphConnection
	 * @throws Exception
	 */
Query all the edc mnemonic information.
This cache will be used by all instances of DispatchServiceManager
@param servicesGraphConnection
@throws Exception
Query all the edc mnemonic information . This cache will be used by all instances of DispatchServiceManager @param servicesGraphConnection @throws Exception
public static void cacheEdcConfig(SparqlConnection servicesGraphConnection, OntologyInfoClient oInfoClient) throws Exception {
		try {
			AuthorizationManager.setSemtkSuper();
			LocalLogger.logToStdOut("DispatchServiceManager: START querying the services graph for all mnemonic infomation");
			if (servicesGraphConnection.getModelInterfaceCount() != 1) {
				throw new Exception("Edc services connection does not have exactly one model endpoint");
			}
			SparqlEndpointInterface sei = servicesGraphConnection.getModelInterface(0);
			InputStream owlStream = DispatchServiceManager.class.getResourceAsStream("/semantics/OwlModels/sparqlEdcServices.owl");
			OntologyInfo.uploadOwlModelIfNeeded(sei, owlStream);
			owlStream.close();
			DispatchServiceManager.edcTypeCache = SparqlGraphJson.executeSelectToTable(
					Utility.getResourceAsJson(servicesGraphConnection, "/nodegroups/GetEdcMnemonicInfo.json"), servicesGraphConnection, oInfoClient);
			DispatchServiceManager.edcParamsCache = SparqlGraphJson.executeSelectToTable(
					Utility.getResourceAsJson(servicesGraphConnection, "/nodegroups/GetEdcMnemonicParams.json"), servicesGraphConnection, oInfoClient);
			DispatchServiceManager.edcNgRestrictionsCache = SparqlGraphJson.executeSelectToTable(
					Utility.getResourceAsJson(servicesGraphConnection, "/nodegroups/GetEdcMnemonicNgRestrictions.json"), servicesGraphConnection, oInfoClient);
			DispatchServiceManager.edcQueryConstraintsCache = SparqlGraphJson.executeSelectToTable(
					Utility.getResourceAsJson(servicesGraphConnection, "/nodegroups/GetEdcMnemonicQueryConstraints.json"), servicesGraphConnection, oInfoClient);
			LocalLogger.logToStdOut("DispatchServiceManager: FINISHED querying the services graph for all mnemonic infomation");
		} finally {
			AuthorizationManager.clearSemtkSuper();
		}
	}
public static void cacheEdcConfig ( SparqlConnection servicesGraphConnection , OntologyInfoClient oInfoClient ) throws Exception { try { AuthorizationManager . setSemtkSuper ( ) ; LocalLogger . logToStdOut ( "DispatchServiceManager: START querying the services graph for all mnemonic infomation" ) ; if ( servicesGraphConnection . getModelInterfaceCount ( ) != 1 ) { throw new Exception ( "Edc services connection does not have exactly one model endpoint" ) ; } SparqlEndpointInterface sei = servicesGraphConnection . getModelInterface ( 0 ) ; InputStream owlStream = DispatchServiceManager . class . getResourceAsStream ( "/semantics/OwlModels/sparqlEdcServices.owl" ) ; OntologyInfo . uploadOwlModelIfNeeded ( sei , owlStream ) ; owlStream . close ( ) ; DispatchServiceManager . edcTypeCache = SparqlGraphJson . executeSelectToTable ( Utility . getResourceAsJson ( servicesGraphConnection , "/nodegroups/GetEdcMnemonicInfo.json" ) , servicesGraphConnection , oInfoClient ) ; DispatchServiceManager . edcParamsCache = SparqlGraphJson . executeSelectToTable ( Utility . getResourceAsJson ( servicesGraphConnection , "/nodegroups/GetEdcMnemonicParams.json" ) , servicesGraphConnection , oInfoClient ) ; DispatchServiceManager . edcNgRestrictionsCache = SparqlGraphJson . executeSelectToTable ( Utility . getResourceAsJson ( servicesGraphConnection , "/nodegroups/GetEdcMnemonicNgRestrictions.json" ) , servicesGraphConnection , oInfoClient ) ; DispatchServiceManager . edcQueryConstraintsCache = SparqlGraphJson . executeSelectToTable ( Utility . getResourceAsJson ( servicesGraphConnection , "/nodegroups/GetEdcMnemonicQueryConstraints.json" ) , servicesGraphConnection , oInfoClient ) ; LocalLogger . logToStdOut ( "DispatchServiceManager: FINISHED querying the services graph for all mnemonic infomation" ) ; } finally { AuthorizationManager . clearSemtkSuper ( ) ; } }
Query all the edc mnemonic information.
Query all the edc mnemonic information .
// double-check the services graph connection.  Ontology should be in ModelInterface[0] // load the owl if needed, so that nodegroups will work // run the queries to build static mnemonics cache